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
public class SimpleTemplateBasedRootFactory extends SimpleTemplateBasedFactory
Specific factory for Root. Since some otherRepositoryInitializationListener
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, template
-
Fields inherited from class org.nuxeo.ecm.platform.content.template.factories.BaseContentFactory
session
-
-
Constructor Summary
Constructors Constructor Description SimpleTemplateBasedRootFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createContentStructure(DocumentModel eventDoc)
protected boolean
shouldCreateDocument(String parentId, String childName, String childType)
protected boolean
shouldInitAcl(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, setProperties
-
Methods inherited from class org.nuxeo.ecm.platform.content.template.factories.BaseContentFactory
initSession
-
-
-
-
Method Detail
-
createContentStructure
public void createContentStructure(DocumentModel eventDoc)
- Specified by:
createContentStructure
in interfaceContentFactory
- Overrides:
createContentStructure
in classSimpleTemplateBasedFactory
-
shouldCreateDocument
protected boolean shouldCreateDocument(String parentId, String childName, String childType)
- Returns:
true
if we should create the document with the givenparentId
,childName
andchildType
,false
otherwise
-
shouldInitAcl
protected boolean shouldInitAcl(DocumentModel rootDoc)
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:
true
if the root document doesn't contain any child of template document type,false
otherwise
-
-