[
https://issues.apache.org/jira/browse/SLING-2853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13649537#comment-13649537
]
Felix Meschberger edited comment on SLING-2853 at 5/6/13 6:17 AM:
------------------------------------------------------------------
Thanks for the discussions and updates. Looking at the latest patch (nit-picks
really):
* ResourceCollection interface:
- PeristenceException needs to be JavaDoc-ed
- orderBefore probably also throws ?
- add/remove: true is returned if "actually added/removed", false is
returned if "already present/not present" (like List.add/remove)
- maybe add JavaDoc that Resource.adaptTo(ResoureCollection.class) is
supported ?
* ResourceCollectionManager
- the exact meaning of Resource in getCollection(Resource) is unclear: Is it
a member resource or the ResourceCollection resource ?
- what is the intent of the getCollection(Resource) method ? Provide a
"stable" access point in case AdapterFactory is absent ?
- PeristenceException needs to be JavaDoc-ed
was (Author: fmeschbe):
Thanks for the discussions and updates. Looking at the latest patch:
* ResourceCollection interface:
- PeristenceException needs to be JavaDoc-ed
- orderBefore probably also throws ?
- add/remove: true is returned if "actually added/removed", false is
returned if "already present/not present" (like List.add/remove)
- maybe add JavaDoc that Resource.adaptTo(ResoureCollection.class) is
supported ?
* ResourceCollectionManager
- the exact meaning of Resource in getCollection(Resource) is unclear: Is it
a member resource or the ResourceCollection resource ?
- what is the intent of the getCollection(Resource) method ? Provide a
"stable" access point in case AdapterFactory is absent ?
- PeristenceException needs to be JavaDoc-ed
> Add ResourceCollection to Sling
> -------------------------------
>
> Key: SLING-2853
> URL: https://issues.apache.org/jira/browse/SLING-2853
> Project: Sling
> Issue Type: New Feature
> Components: API
> Affects Versions: API 2.0.2
> Reporter: Amit Gupta
> Priority: Minor
> Attachments: collection_v2.zip, collection_v3.zip, collection.zip,
> resourcecollection.zip
>
>
> Creating a collection of resources has been a use case for a while and there
> has been no inherent support in SLING for the same.
> This proposal is to add a ResourceCollection interface and implementation
> that allows creation of collection of resources.
> Collection is a simple list of members, where each member contains path of
> resource it refers to. In future, we might need to store additional
> information with the member, hence following structure is proposed
> N: resourceCollection (nt:unstructured)
> + P: sling:resourceType
> + N : members (nt:unstructured)
> + N: member_res1 > nt:unstructured
> + P: path > string, reference to actual resource
> + N: member_res2 > nt:unstructured
> + P: path > string, reference to actual resource
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira