[
https://issues.apache.org/jira/browse/SLING-6610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15896446#comment-15896446
]
Konrad Windszus commented on SLING-6610:
----------------------------------------
While the {{location}} and {{defaultResourceBundle}} are always used as set in
the {{ValidationContext}}, this is not necessarily the case for the
{{severity}} (SLING-5373). I wonder whether a default severity per validator
(which can still be overwritten by each usage in the model) should rather be
defined within an OSGi property on the Validator rather than in the code. That
way the fallback handling for severities could be implemented in the
{{ValidationServiceImpl}} instead of within the {{Validator}}
> DefaultValidationFailure and DefaultValidationResult should use
> ValidationContext as parameter
> ----------------------------------------------------------------------------------------------
>
> Key: SLING-6610
> URL: https://issues.apache.org/jira/browse/SLING-6610
> Project: Sling
> Issue Type: Improvement
> Components: Extensions, Validation
> Reporter: Oliver Lietz
> Fix For: Validation 1.0.0
>
>
> {{ValidationContext}}:
> {noformat}
> public DefaultValidationFailure(@Nonnull ValidationContext validationContext,
> @Nonnull String messageKey, Object... messageArguments)
> {noformat}
> instead of {{location}}, {{severity}} and {{ResourceBundle}} from
> {{ValidationContext}}:
> {noformat}
> public DefaultValidationFailure(@Nonnull String location, Integer severity,
> @Nonnull ResourceBundle defaultResourceBundle, @Nonnull String messageKey,
> Object... messageArguments)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)