[
https://issues.apache.org/jira/browse/SLING-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16352160#comment-16352160
]
Timothee Maret commented on SLING-7468:
---------------------------------------
I looked closely at the current implementation.
IIUC, we could do without an explicit mapping of factories, by simply setting a
'kind' constant property to each factory. The 'kind' property would carry the
category of the factory belongs to. Thus, listing the available factories for a
given kind could leverage a simple ConfigAdmin filter (e.g. {{(kind=agent)}}).
However, looking at implementing the simplification above, I noticed that the
current implementation provides services that are miss-categorised (e.g.
provide the 'agent' kind although it is not an agent). I also noticed that
there are inconsistencies in the properties set to a factory, depending on
whether we configure the service directly from the OSGI config manager, or
whether we use the
{{org.apache.sling.distribution.component.impl.DefaultDistributionConfigurationManager}}.
> Allow to configure the Distribution Resource Provider
> -----------------------------------------------------
>
> Key: SLING-7468
> URL: https://issues.apache.org/jira/browse/SLING-7468
> Project: Sling
> Issue Type: Improvement
> Components: Content Distribution
> Reporter: Timothee Maret
> Assignee: Timothee Maret
> Priority: Major
>
> SCD maintain its own Resource Provider
> https://github.com/apache/sling-org-apache-sling-distribution-core/tree/master/src/main/java/org/apache/sling/distribution/resources
> The implementation maps OSGI configurations and services as sling resources.
> The implementation is not flexible to allow plugging a custom agent in the
> resource tree.
> The mapping seems to be done currently in enums, for instance
> https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/component/impl/DistributionComponentKind.java
> This issue is about making the configuration flexible (OSGI properties) or
> even configuration-less (figure out the mappings at runtime). As a side
> effect, the implementation may be simplified.
> [~teofili],[~simone.tripodi] FYI
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)