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

Allow Sling validation to pick up models in any location in the repository

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • Validation 1.0.0
    • Validation

    Description

      Currently only validation models being defined below

      • /apps/sling/validation/models/ and
      • /libs/sling/validation/models/

      are picked up

      This is due to the XPath query containing the path restriction (in https://github.com/apache/sling/blob/trunk/contrib/validation/core/src/main/java/org/apache/sling/validation/impl/ValidationServiceImpl.java#L295).

      Similar to the JCR Repository based ResourceBundleProvider ( http://sling.apache.org/site/internationalization-support.html) the validation models should be allowed everywhere in the repository (where apps should still have higher priority than libs). That should not have a major performance drawback.

      This is especially useful, if multiple different applications are deployed on the same Sling instance. To be able to distinguish their scripts and validation models in the repository (and to not overwrite other applications' models) it should be allowed that everything belonging to that one application is located below one common entry node (e.g. /apps/mycoolslingapp/)

      Attachments

        Issue Links

          Activity

            People

              kwin Konrad Windszus
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: