Class ParentChildScriptService

  • All Implemented Interfaces:
    org.xwiki.script.service.ScriptService

    @Component
    @Named("parentchild")
    @Singleton
    public class ParentChildScriptService
    extends Object
    implements org.xwiki.script.service.ScriptService
    This script service give an access to the configuration of the parent/child mechanism, which has been deprecated but can still be enabled for retro-compatibility issues.
    Since:
    7.2M2
    Version:
    $Id: 0f62ada1ee18061b22a8ba8ce23a851e391f8edb $
    • Constructor Detail

      • ParentChildScriptService

        public ParentChildScriptService()
    • Method Detail

      • isParentChildMechanismEnabled

        public boolean isParentChildMechanismEnabled()
        Returns:
        whether or not legacy parent/child mechanism is enabled for the hierarchy handling
      • getParentsBasedOnReference

        public List<DocumentReference> getParentsBasedOnReference​(DocumentReference docRef)
        Returns the parents of a document, based on the nested document paradigm (described in the document reference).
        Parameters:
        docRef - a reference of the document
        Returns:
        the list of parents of the document
      • getParentsBasedOnParentChildRelationship

        public List<DocumentReference> getParentsBasedOnParentChildRelationship​(DocumentReference docRef)
        Returns the parents of a document, based on the parent/child relationship.
        Parameters:
        docRef - a reference of the document
        Returns:
        the list of parents of the document