Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-5469

Resource Merger: Add some name prefixing mechanism for properties which are used by the resource merger itself

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Resource Merger 1.2.10
    • Fix Version/s: Resource Merger 1.4.0
    • Component/s: Extensions
    • Labels:


      Currently within the resource merger it is not possible to

      1. use the jcr:primaryType of the underlying resource, while the overlaid/overridden resource has a different jcr:primaryType.
        That is a problem because for a JCR the primaryType is mandatory for each node. Some node type definitions don't allow arbitrary property names like sling:hideResource. To be able to use those properties (which are only relevant up the point where the resource has been merged) you might need to use a more relaxed node type. Still you don't want that relaxed node type to appear as primaryType in the merged resource.
      2. use the sling:resourceSuperType from the underlying resource, while the overridden resource has a different sling:resourceSuperType.
        This is kind of a edge case because sling:resourceSuperType would be used for two different things here:
        • for getting the underlying resource path for the OverridingResourcePicker
        • for the request resolution of the merged resource
          Sometime the value for each of the cases would be different.

      Therefore I propose a general property name mangling mechanism which allows someone to use a prefix like sling-resource-merging_ for the properties, which are during the resource merging exposed as properties without the prefix. One example for case 1):

      - jcr:primaryType=nt:folder
      - sling:resourceSuperType=apps/my/super/resource
      - sling:hideProperties=customNodeTypePrefix:property1
      - jcr:sling-resource-merging_primaryTypemyCustomNodeRestrictedNodeType
      - jcr:primaryType=myCustomNodeRestrictedNodeType
      - customNodeTypePrefix:property1=test
      - customNodeTypePrefix:property2=test
      - jcrPrimaryType=nt:unstructured (but should be myCustomNodeRestrictedNodeType)
      - customNodeTypePrefix:property2=test

      In this example it is impossible to let my merged resource have the nodeType myCustomNodeRestrictedNodeType (because that simply does not allow the property sling:hideProperties to be set in /apps/my/resource.




            • Assignee:
              kwin Konrad Windszus
              kwin Konrad Windszus


              • Created:

                Time Tracking

                Original Estimate - Not Specified
                Not Specified
                Remaining Estimate - 0h
                Time Spent - 20m

                  Issue deployment