[ 
https://issues.apache.org/jira/browse/SLING-1056?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler closed SLING-1056.
-----------------------------------


> Allow registration of adapter factories for synthetic resources
> ---------------------------------------------------------------
>
>                 Key: SLING-1056
>                 URL: https://issues.apache.org/jira/browse/SLING-1056
>             Project: Sling
>          Issue Type: Improvement
>          Components: Adapter, API
>    Affects Versions: API 2.0.4, Adapter 2.0.2
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: API 2.0.6, Adapter 2.0.4
>
>
> The current implementation of the synthetic resource always returns null in 
> the adaptTo(Class) method. However, there are use cases, where adapting a 
> synthetic resource to an application class would make sense.
> Therefore it is required to be able to use the adapter manager in the 
> synthetic resource.
> Unfortunately, the synthetic resource is a class in the api while the adapter 
> manager is a service in the adapter bundle. We want to keep the api 
> "inactive" and don't want to add a dependency to the adapter bundle. 
> Splitting the api and moving some classes to the adapter bundle would work, 
> but doesn't look nice either. We discussed several possible solutions, all of 
> them have drawbacks
> It seems that out of these solutions, the one with the least changes is to 
> add some static variabe somewhere in the API and the adapter bundle (or a 
> different bundle) can set this variable once it is started. The synthetic 
> resource checks this variable during adaptTo and if it is available delegates 
> the adapting to the specificed object.
> This is a transparent change which should suite all needs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to