Package com.xpn.xwiki.script.parentchild
Class ParentChildScriptService
- java.lang.Object
-
- com.xpn.xwiki.script.parentchild.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 Summary
Constructors Constructor Description ParentChildScriptService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<DocumentReference>
getParents(DocumentReference docRef)
List<DocumentReference>
getParentsBasedOnParentChildRelationship(DocumentReference docRef)
Returns the parents of a document, based on the parent/child relationship.List<DocumentReference>
getParentsBasedOnReference(DocumentReference docRef)
Returns the parents of a document, based on the nested document paradigm (described in the document reference).boolean
isParentChildMechanismEnabled()
-
-
-
Method Detail
-
isParentChildMechanismEnabled
public boolean isParentChildMechanismEnabled()
- Returns:
- whether or not legacy parent/child mechanism is enabled for the hierarchy handling
-
getParents
public List<DocumentReference> getParents(DocumentReference docRef)
- Parameters:
docRef
- a reference of the document- Returns:
- the list of parents of the document
-
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
-
-