[
https://issues.apache.org/jira/browse/SLING-8655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16917747#comment-16917747
]
Stefan Seifert commented on SLING-8655:
---------------------------------------
i think we are discussing two different aspects here:
* the proposal is about a generic mechanism to externalize properties
containing a path by putting an annotation on it and probably a hook-in
mechanism for it. vlad agrees, but proposes to put the switch rather to the
view level (HTL, json serialization) than the model itself
* radu and myself are arguing whether the approach of just marking a path as
externalized is enough, or if link validating and externalization as a whole is
perhaps too complex to be handled by this approach, and is usually done in the
application code perhaps with the help of additional layers like wcm.io
url/link handler
are the requirements for externalization this different for SPA vs. non SPA
applications? the JSON has to contain the externalized links, that is sure, the
questions on which level/layer this approach is best.
> Add an Annotation to Sling Model to mark a property to be Externalized
> ----------------------------------------------------------------------
>
> Key: SLING-8655
> URL: https://issues.apache.org/jira/browse/SLING-8655
> Project: Sling
> Issue Type: New Feature
> Components: Sling Models
> Affects Versions: Sling Models API 1.3.8
> Reporter: Andreas Schaefer
> Assignee: Andreas Schaefer
> Priority: Major
> Fix For: Sling Models API 1.3.10
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> For Peregrine CMS we use Sling Models to obtain data in JSon format to be
> rendered on the client side. This means that the returned content is not
> externalized aka paths are not mapped to the external view.
> Sling Model should have an Annotation (@ExternalizedPath) that marks a
> property to be externalized when loaded.
> In order to be flexible the Externalized Path Injector should be pluggable so
> that customers can add their custom Externalized Path Providers if they
> choose to do so. By default there is a provider that uses the Resource
> Resolver's map() function.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)