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

Carsten Ziegeler commented on SLING-10117:
------------------------------------------

Added support for configuration validation using the mode:
https://github.com/apache/sling-org-apache-sling-feature-extension-apiregions/commit/b7fe2b483f20c9daa0b95f80fff7bba0a549130c

> 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)

Reply via email to