[
https://issues.apache.org/jira/browse/SLING-10117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17283746#comment-17283746
]
Carsten Ziegeler commented on SLING-10117:
------------------------------------------
Implemented enumeration "Mode" which can be configured as described globally,
per configuration description and per property description.
The mode is used during property validation:
https://github.com/apache/sling-org-apache-sling-feature-extension-apiregions/commit/5f3bf4d74a1b45845ae848edbfbfdc1e3ef25196
> Support different configuration validation modes
> ------------------------------------------------
>
> Key: SLING-10117
> URL: https://issues.apache.org/jira/browse/SLING-10117
> Project: Sling
> Issue Type: Improvement
> Components: Feature Model
> Reporter: Carsten Ziegeler
> Assignee: Carsten Ziegeler
> Priority: Major
> Fix For: Feature Model API Regions Extension 1.1.22
>
>
> If configuration rules for validating OSGi configuration are specified, these
> rules are strict - any violation will result in an error, failing the
> validation.
> There are cases, where it is better to warn about invalid values instead. And
> when warning the invalid value might still be used or the invalid value is
> ignored.
> This leads to the need of supporting different modes.
> I think such a mode could be defined on different levels: global, per OSGi
> configuration, per OSGi configuration property where the latter overrides the
> former.
> The default mode for global is strict.
> We could support the following modes
> * strict - if validation fails, issue an error
> * lenient - if validation fails, issue a warning (but use the invalid value)
> * silent - if validation fails, do not report and use the invalid value
> * definitive - if validation fails, use the default value (if provided
> otherwise remove value) and issue a warning
> * silent definitive - if validation fails, use the default value (if provided
> otherwise remove value) and do not issue a warning
> Support of default values is part of SLING-10090
--
This message was sent by Atlassian Jira
(v8.3.4#803005)