Angela Schreiber created SLING-10236:
----------------------------------------

             Summary: Introduce Operation.asRepoInitString
                 Key: SLING-10236
                 URL: https://issues.apache.org/jira/browse/SLING-10236
             Project: Sling
          Issue Type: Improvement
          Components: Repoinit
            Reporter: Angela Schreiber


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:

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

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)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to