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

Felix Meschberger commented on SLING-6578:
------------------------------------------

bq. Now coming to the point of overloading, if multiple validators register for 
the same "address" (be it based on "service.pid" or some other property), that 
would be already logged 
(https://github.com/apache/sling/blob/trunk/bundles/extensions/validation/core/src/main/java/org/apache/sling/validation/impl/ValidationModelRetrieverImpl.java#L170).
 Probably it would be good to take the "service.ranking" into consideration for 
those cases, to make sure the highest service ranking get actually bound.

Ok, this is currently just a DEBUG message, which may be changed, of course.

The question remains: Is this a use case ? Or would that be stretching the 
boundaries (and we all know developers love to do that) ?



> Use "service.pid" property instead of class name to reference validators
> ------------------------------------------------------------------------
>
>                 Key: SLING-6578
>                 URL: https://issues.apache.org/jira/browse/SLING-6578
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Konrad Windszus
>            Assignee: Konrad Windszus
>
> Leveraging the component's "service.pid" property value instead of its 
> classname is more stable (even if implementation changes, the PID might stay 
> the same) and also allows for configuration factories to refer to a specific 
> validator configuration. The fallback should be the property "component.name" 
> as "service.pid" is not always necessarily set. Basically the validator 
> should be referable via each of those value, i.e. one of the "service.pid"s 
> or the "component.name".



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to