You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Dirk Rudolph (JIRA)" <ji...@apache.org> on 2017/03/16 09:58:41 UTC
[jira] [Commented] (SLING-6652) Allow multiple adapters for Models
with resourceType binding
[ https://issues.apache.org/jira/browse/SLING-6652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15927751#comment-15927751 ]
Dirk Rudolph commented on SLING-6652:
-------------------------------------
Currently only a warning is logged: "Skipped registering {} for resourceType {} under adaptable {} because of existing mapping to {}" but I don't see anyway to "specify" a order of registration so it should be supported to prevent non-deterministic behaviour.
> Allow multiple adapters for Models with resourceType binding
> ------------------------------------------------------------
>
> Key: SLING-6652
> URL: https://issues.apache.org/jira/browse/SLING-6652
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Reporter: Dirk Rudolph
>
> According to http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/models/impl/src/main/java/org/apache/sling/models/impl/AdapterImplementations.java?view=markup#l59 the AdapterImplementations support only mapping resourceType to Adapter 1:1. I would like to propose extending that to support 1:n binding between resourceType and adapter classes.
> My use case:
> Lets assume I want to combine my models with the exporter framework to export 2 representations of a single resource:
> * metadata
> * data
> To do so I would create 2 models, each bound to the same resourceType but annotated to be exported for different selectors.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)