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

Support for default properties values of a resource

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • API 2.3.0
    • API 2.5.0
    • API
    • None

    Description

      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.

      Attachments

        1. SLING-2779_20130828.patch
          24 kB
          Gilles Knobloch
        2. SLING-2779.patch
          33 kB
          Gilles Knobloch

        Activity

          People

            cziegeler Carsten Ziegeler
            gknob Gilles Knobloch
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: