[jira] [Commented] (SLING-7468) Allow to configure the Distribution Resource Provider

2018-03-06 Thread Timothee Maret (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16387746#comment-16387746
 ] 

Timothee Maret commented on SLING-7468:
---

[~mpetria] I understand the point regarding preventing from serving as a 
generic entry point for editing configurations. However, we could still do a 
restricted implementation, without the explicit mapping.

See my comment in 
https://issues.apache.org/jira/browse/SLING-7468?focusedCommentId=16352160=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16352160

Essentially we don't need to treat each factory individually, the factory we 
support all share common characteristics that we should exploit. In Sling 
speak, we could have a filter mechanism that acts on super type.

> 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
> Fix For: Content Distribution Core 0.3.0
>
>
> 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)


[jira] [Commented] (SLING-7468) Allow to configure the Distribution Resource Provider

2018-03-05 Thread Simone Tripodi (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16386282#comment-16386282
 ] 

Simone Tripodi commented on SLING-7468:
---

Welcome back, [~mpetria]!!! :)

The initial design intent was good but at the same time not easy to maintain, I 
did a first review but Tim's patch definitively simplifies the previous 
codebase, without changing the behaviour.

> 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
> Fix For: Content Distribution Core 0.3.0
>
>
> 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)


[jira] [Commented] (SLING-7468) Allow to configure the Distribution Resource Provider

2018-03-05 Thread Marius Petria (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16386222#comment-16386222
 ] 

Marius Petria commented on SLING-7468:
--

Still, it is a very powerful tool: a (configurable) gate to configAdmin :). I 
will try to understand the extensibility need in order to see if we can solve 
it in a more restricted way. I fear that others might use it for their own 
scenarios to access random configurations.

> 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
> Fix For: Content Distribution Core 0.3.0
>
>
> 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)


[jira] [Commented] (SLING-7468) Allow to configure the Distribution Resource Provider

2018-03-05 Thread Timothee Maret (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16386185#comment-16386185
 ] 

Timothee Maret commented on SLING-7468:
---

Thanks [~mpetria] for the perspective! The patch does not change the 
fundamentals, there's still an explicit mapping in place. The patch simply 
allows to configure it.

> 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
> Fix For: Content Distribution Core 0.3.0
>
>
> 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)


[jira] [Commented] (SLING-7468) Allow to configure the Distribution Resource Provider

2018-03-05 Thread Marius Petria (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16386079#comment-16386079
 ] 

Marius Petria commented on SLING-7468:
--

[~marett] I haven't looked yet at your patch but I wanted to share something 
from the initial design intent. From a security perspective there should be 
very little flexibility on what configs should be exposed as resources. We 
should hardcode the exact osgi factories that are available through the 
provider to avoid random osgi config editing. As I said, I do not know if your 
patch violates this principle, so if the comment is misplaced please ignore it.

> 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
> Fix For: Content Distribution Core 0.3.0
>
>
> 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)


[jira] [Commented] (SLING-7468) Allow to configure the Distribution Resource Provider

2018-02-05 Thread Timothee Maret (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16352202#comment-16352202
 ] 

Timothee Maret commented on SLING-7468:
---

Merged and pushed to master

https://github.com/apache/sling-org-apache-sling-distribution-core/commit/eccfdc7ecdef299bcb3313b1d5a18f6a19c0dbcb

> 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
> Fix For: Content Distribution Core 0.3.0
>
>
> 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)


[jira] [Commented] (SLING-7468) Allow to configure the Distribution Resource Provider

2018-02-05 Thread Timothee Maret (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16352199#comment-16352199
 ] 

Timothee Maret commented on SLING-7468:
---

I opened SLING-7472 to track removing the explicit mappings and cleaning up the 
inconsistencies.
For now, I have followed the configuration approach in 

https://github.com/apache/sling-org-apache-sling-distribution-core/compare/master...SLING-7468

> 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)


[jira] [Commented] (SLING-7468) Allow to configure the Distribution Resource Provider

2018-02-05 Thread Timothee Maret (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (SLING-7468) Allow to configure the Distribution Resource Provider

2018-02-02 Thread Tommaso Teofili (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-7468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16351293#comment-16351293
 ] 

Tommaso Teofili commented on SLING-7468:


big +1 on my side as well, and btw I would opt for configuration-less (figure 
out mappings at runtime).

> 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)