[OPENIDM-11738] Don't activate components which are disabled Created: 19/Sep/18 Updated: 09/Mar/20 |
|
Status: | Open |
Project: | OpenIDM |
Component/s: | Module - OSGi Container / Framework integration |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Story | Priority: | Major |
Reporter: | Brendan Miller | Assignee: | Brendan Miller |
Resolution: | Unresolved | Votes: | 0 |
Labels: | Tabled, TechnicalDebt | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
To keep our component model in sync with our configuration model, we should not activate components whose configuration declares `"enabled" : false`.
Presently, IDM allows `"enabled" : false` in several configurations to indicate that the component should not be active, even though the configuration is present. This is often to allow components to be "turned off" without losing (deleting) the entire configuration. This produces an ugly problem of `@Reference` to components which are, in fact, optional, but they are always there, but in a disabled state. We then have to implement `isEnabled` methods on all these components to determine behavior when we could simple use an optional reference on the optional component and use its presence to guide behavior. The latter is more consistent with the API.
As a developer, I would like to use `OPTIONAL` references to determine whether optional components are available. This should react properly to services which have been disabled through config. |