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

Justin Edelson commented on SLING-2355:
---------------------------------------

The situation which prompted this is where an AdapterFactory declares 2 adapter 
classes and 2 adaptable classes (could be more than 2, but let's keep it 
simple), i.e.
adapterClasses = Resource, ResourceResolver
adaptableClasses = MyDomainClass, MyDomainClassManager

This AdapterFactory adapts Resource objects into instances of MyDomainClass and 
ResourceResolver objects into instances of MyDomainClassManager. It does not 
adapt Resource objects into MyDomainClassManager instances nor does it adapt 
ResourceResolver objects into MyDomainClass instances. Attempts to do so simply 
return null (which is perfectly legal).

The intent of this issue is to enable the use of the web console metadata to 
make the options here explicit:

@Adaptables({
    @Adaptable(adaptableClass=ResourceResolver.class, 
adapters=@Adapter(MyDomainClassManager.class), 
servicePid="com.myco.MyDomainAdapterFactory"),
    @Adaptable(adaptableClass=Resource.class, 
adapters=@Adapter(value=MyDomainClass.class, 
servicePid="com.myco.MyDomainAdapterFactory")
})
                
> An Adapter annotation should be able to declare that it replaces the service 
> properties metadata
> ------------------------------------------------------------------------------------------------
>
>                 Key: SLING-2355
>                 URL: https://issues.apache.org/jira/browse/SLING-2355
>             Project: Sling
>          Issue Type: Improvement
>          Components: Extensions
>            Reporter: Justin Edelson
>            Assignee: Justin Edelson
>
> Currently, the Adapters web console plugin merges metadata from the JSON 
> files with the metadata extracted from the OSGi service properties for 
> AdapterFactory services. It should be possible for the JSON metadata to 
> declare that it overrides the metadata from the AdapterFactory service (just 
> for the purposes of the web console plugin).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to