[
https://issues.apache.org/jira/browse/SLING-13374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18127250#comment-18127250
]
Stefan Seifert commented on SLING-13374:
----------------------------------------
i'm wondering if that's the right way to go.
i only had a very brief look ad the redirects implementation in acs commons -
is this related to context-aware configuration at all? yes, it stores config
data below /conf, which is fine. but if it does not has any related content
resources, thus not relying context, inheritance and all the features of
caconfig - why use it for this use case? why not just implement a sling model
for that data structure and be done?
if we open the API in this way, i see the risk people misuse it in a way never
intended to be used.
> Context-Aware Configuration: Allow conversion of (low-level) configuration
> resource to (high-level) configuration object
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: SLING-13374
> URL: https://issues.apache.org/jira/browse/SLING-13374
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Konrad Windszus
> Priority: Major
>
> Currently high level configuration objects can only be retrieved from the
> context (i.e. content resources). Some edge cases require deriving it
> directly from a given configuration resource.
> Currently the whole converter logic is private part of
> [https://github.com/apache/sling-org-apache-sling-caconfig-impl/blob/master/src/main/java/org/apache/sling/caconfig/impl/ConfigurationBuilderImpl.java]
> and this always assumes the content resource is passed.
> My use case is
> [https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/214fa0c495b8e60fcfd47537ee4c384adfa77ac6/bundle/src/main/java/com/adobe/acs/commons/redirects/models/Redirects.java#L78]
> where configuration values should be retrieved based on a given
> configuration resource.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)