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

Introduce Operation.asRepoInitString

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Repoinit Parser 1.6.6
    • Repoinit Parser 1.6.8
    • Repoinit
    • None

    Description

      for SLING-10219 (and maybe other use cases too) it would be great if org.apache.sling.repoinit.parser.operations.Operation would come with a asRepoInitString method that would allow to obtain the original repo-init statements.

      I was checking if toString would allow to extract that (with a bit of extra effort) but unfortunately the default implementation is:

          public String toString() {
              return this.getClass().getSimpleName() + " " + this.getParametersDescription();
          }
      

      and getParametersDescription isn't implemented in a consistent way and in some cases doesn't reveal all information needed.
      further more even the toString method isn't consistent across the various operation implementations (e.g. RegisterPrivilege.toString actually coming close to the original statement and not including the simple class name)

      Attachments

        Issue Links

          Activity

            People

              bdelacretaz Bertrand Delacretaz
              angela Angela Schreiber
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 20m
                  4h 20m