sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Justin Edelson (JIRA)" <>
Subject [jira] [Commented] (SLING-6652) Allow multiple adapters for Models with resourceType binding
Date Fri, 17 Mar 2017 11:34:41 GMT


Justin Edelson commented on SLING-6652:

I'm not sure it matters which {{adapterType}} is used in the {{ExporterServlet}}. Under what
circumstance would it make any difference?

bq. register each @Model having @Exporter set implicitly with its implType as adapterType,
if not already present there.

I think if we are going to do this, we should do it consistently -- the {{implType}} should
always be one of the {{adapterType}}s. That said, I believe there was some intentionality
behind the choice originally to not always include the {{implType}} in the {{adapterType}}s
list. Please check on the dev list or JIRA for the history.

> Allow multiple adapters for Models with resourceType binding
> ------------------------------------------------------------
>                 Key: SLING-6652
>                 URL:
>             Project: Sling
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: Sling Models Impl 1.3.0
>            Reporter: Dirk Rudolph
>         Attachments: SLING-6652.diff
> According to
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

View raw message