You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Justin Edelson (JIRA)" <ji...@apache.org> on 2016/08/23 22:57:20 UTC
[jira] [Updated] (SLING-5992) Provide a way to map Sling Model
classes to resource types
[ https://issues.apache.org/jira/browse/SLING-5992?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Justin Edelson updated SLING-5992:
----------------------------------
Attachment: SLING-5992.patch
proposed patch
> Provide a way to map Sling Model classes to resource types
> ----------------------------------------------------------
>
> Key: SLING-5992
> URL: https://issues.apache.org/jira/browse/SLING-5992
> Project: Sling
> Issue Type: New Feature
> Components: Extensions
> Reporter: Justin Edelson
> Fix For: Sling Models API 1.3.0, Sling Models Impl 1.3.0
>
> Attachments: SLING-5992.patch
>
>
> For ease of script development, I would like to introduce a mechanism for mapping Sling Model classes to resource types.
> From an API perspective, this introduces a new method on ModelFactory:
> {code}
> public Object getModelFromResource(@Nonnull Resource resource);
> {code}
> And a new attribute on the @Model annotations
> {code}
> public String resourceType() default "";
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)