You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2015/08/28 11:22:45 UTC
[jira] [Resolved] (SLING-4922) Validator should be allowed to get
the resource on which validation was triggered
[ https://issues.apache.org/jira/browse/SLING-4922?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konrad Windszus resolved SLING-4922.
------------------------------------
Resolution: Fixed
Fixed with http://svn.apache.org/r1698283.
> Validator should be allowed to get the resource on which validation was triggered
> ---------------------------------------------------------------------------------
>
> Key: SLING-4922
> URL: https://issues.apache.org/jira/browse/SLING-4922
> Project: Sling
> Issue Type: Bug
> Components: Validation
> Reporter: Konrad Windszus
> Assignee: Konrad Windszus
> Fix For: Validation 1.0.0
>
>
> Currently the {{Validator}} interface only gets the {{ValueMap}} on which the validation has been called (https://github.com/apache/sling/blob/trunk/bundles/extensions/validation/api/src/main/java/org/apache/sling/validation/Validator.java#L75). But sometimes this is not enough because more information need to be evaluated in the validator.
> For example the resource path or even the original resource is now completely inaccessible (except via weird workaround like casting to {{JcrPropertyMap}} and calling the deprecated {{getPath()}} on it). Therefore the validator should also get the resource on which the validation has been called originally (this must be {{null}} in case the validation has been triggered directly on a {{ValueMap}}).
> That way it would be possible to e.g. get information about the container resource or get a Sling Model of that resource.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)