[
https://issues.apache.org/jira/browse/SLING-6578?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15890016#comment-15890016
]
Carsten Ziegeler edited comment on SLING-6578 at 3/1/17 11:41 AM:
------------------------------------------------------------------
Well sure you can do this, however then you're deviating from the general use
of this property and create a special case for this. And you lose the
information whether this component has an OSGi configuration or not by simply
looking at the pid property.
You have to write this into the contract of the validation api anyway, so just
using a specific property is imho better as it more fits the validation
contract.
And the service.pid has usually an implementation class name as it's value.
was (Author: cziegeler):
Well sure you can do this, however then you're deviating from the general use
of this property and create a special case for this. And you lose the
information whether this component has an OSGi configuration or not by simply
looking at the pid property.
You have to write this into the contract of the validation api anyway, so just
using a specific property is imho better as it more fits the validation
contract.
> 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)