[
https://issues.apache.org/jira/browse/SLING-2779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13752485#comment-13752485
]
Gilles Knobloch edited comment on SLING-2779 at 8/29/13 8:09 PM:
-----------------------------------------------------------------
Attaching a new patch
* Changed constructor signature to use two ValueMap instead of Map, so that
CompositeValueMap relies on existing implementations of ValueMap for type
conversion
* Removed deleted properties mechanism
* Fixed keySet(), entrySet(), and values(), added more tests to cover them
* Updated JavaDoc
* Replaced some ternary statements by if-then-else
* Created org.apache.sling.api.resource.ValueMapUtil with checkKey method
* Increased version number of exported package version
was (Author: gknob):
Attaching a new patch
* Changed constructor signature to use two ValueMap instead of Map, so that
CompositeValueMap relies on existing implementations of ValueMap for type
conversion
* Fixed keySet(), entrySet(), and values(), added more tests to cover them
* Updated JavaDoc
* Replaced some ternary statements by if-then-else
* Created org.apache.sling.api.resource.ValueMapUtil with checkKey method
* Increased version number of exported package version
> Support for default properties values of a resource
> ---------------------------------------------------
>
> Key: SLING-2779
> URL: https://issues.apache.org/jira/browse/SLING-2779
> Project: Sling
> Issue Type: New Feature
> Components: API
> Affects Versions: API 2.3.0
> Reporter: Gilles Knobloch
> Attachments: SLING-2779_20130828.patch, SLING-2779.patch
>
>
> I already noticed several times it would be useful to be able to specify a
> default properties for a resource:
> * if the resource itself contains the property, it will override the default
> one.
> * but if it doesn't, the default value is used.
> This could be done either via:
> * specifying a {{sling:defaults}} property on the resource, which contains
> the path to the resource which properties will be used by default.
> * providing a default map of properties
> Attaching a patch for review.
> For testing purpose, I put it under {{org.apache.sling.defaults}}, but I
> imagine it could go to {{org.apache.sling.api.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