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, template
Fields inherited from class org.nuxeo.ecm.platform.content.template.factories.BaseContentFactory
session
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
-
Constructor Details
-
SimpleTemplateBasedRootFactory
public SimpleTemplateBasedRootFactory()
-
-
Method Details
-
createContentStructure
- Specified by:
createContentStructure
in interfaceContentFactory
- Overrides:
createContentStructure
in classSimpleTemplateBasedFactory
-
shouldCreateDocument
- Returns:
true
if we should create the document with the givenparentId
,childName
andchildType
,false
otherwise
-
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:
true
if the root document doesn't contain any child of template document type,false
otherwise
-