Class SimpleTemplateBasedRootFactory
java.lang.Object
org.nuxeo.ecm.platform.content.template.factories.BaseContentFactory
org.nuxeo.ecm.platform.content.template.factories.SimpleTemplateBasedFactory
org.nuxeo.ecm.platform.content.template.factories.SimpleTemplateBasedRootFactory
- All Implemented Interfaces:
ContentFactory
Specific factory for Root. Since some other
RepositoryInitializationListener have run before, root won't be
empty but we may still have to run this initializer.- Author:
- Thierry Delprat
-
Field Summary
Fields inherited from class org.nuxeo.ecm.platform.content.template.factories.SimpleTemplateBasedFactory
acl, templateFields inherited from class org.nuxeo.ecm.platform.content.template.factories.BaseContentFactory
session -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateContentStructure(DocumentModel eventDoc) protected booleanshouldCreateDocument(String parentId, String childName, String childType) protected booleanshouldInitAcl(DocumentModel rootDoc) Checks if we should init the acl of the root document.Methods inherited from class org.nuxeo.ecm.platform.content.template.factories.SimpleTemplateBasedFactory
initFactory, isTargetEmpty, setAcl, setPropertiesMethods inherited from class org.nuxeo.ecm.platform.content.template.factories.BaseContentFactory
initSession
-
Constructor Details
-
SimpleTemplateBasedRootFactory
public SimpleTemplateBasedRootFactory()
-
-
Method Details
-
createContentStructure
- Specified by:
createContentStructurein interfaceContentFactory- Overrides:
createContentStructurein classSimpleTemplateBasedFactory
-
shouldCreateDocument
- Returns:
trueif we should create the document with the givenparentId,childNameandchildType,falseotherwise
-
shouldInitAcl
Checks if we should init the acl of the root document.The root init acl should occur only once, At the beginning where root document doesn't contain any child.
- Returns:
trueif the root document doesn't contain any child of template document type,falseotherwise
-