[
https://issues.apache.org/jira/browse/SLING-6034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15464939#comment-15464939
]
Stefan Seifert commented on SLING-6034:
---------------------------------------
[~cziegeler] a draft implementation if this features was included in my
prototype:
https://github.com/stefanseifert/sling-config/blob/develop/impl/src/main/java/org/apache/sling/config/impl/ConfigAdapterFactory.java
you did not take it over when contributing most parts of this prototype in this
sling svn, beause you feared it may create problems. which problems did you
mean?
a) the part parsing the bundle classpaths for configuration classes (but we
need it anyway for SLING-6025)
b) or the part with the dynamic adapter factories for each configuration
annotation class found (this is a similar mechanism used by sling models)
> Context-Aware Config: Allow direct adaption of configuration annotation
> classes
> -------------------------------------------------------------------------------
>
> Key: SLING-6034
> URL: https://issues.apache.org/jira/browse/SLING-6034
> Project: Sling
> Issue Type: New Feature
> Components: Extensions
> Reporter: Stefan Seifert
> Assignee: Stefan Seifert
> Labels: contextaware-config
> Fix For: Context-Aware Configuration 1.0.0
>
>
> currently for getting a configuration mapped to a configuration annotation
> classes you need this code line:
> {code:java}
> SimpleConfig config =
> resourcePage1.adaptTo(ConfigurationBuilder.class).as(SimpleConfig.class);
> {code}
> with a dynamic adapter factory it should be also possible to adapt directly
> to the configuration class:
> {code:java}
> SimpleConfig config = resourcePage1.adaptTo(SimpleConfig.class);
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)