Class SimpleTemplateBasedRootFactory

All Implemented Interfaces:
ContentFactory

public class SimpleTemplateBasedRootFactory extends SimpleTemplateBasedFactory
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
  • Constructor Details

    • SimpleTemplateBasedRootFactory

      public SimpleTemplateBasedRootFactory()
  • Method Details

    • createContentStructure

      public void createContentStructure(DocumentModel eventDoc)
      Specified by:
      createContentStructure in interface ContentFactory
      Overrides:
      createContentStructure in class SimpleTemplateBasedFactory
    • shouldCreateDocument

      protected boolean shouldCreateDocument(String parentId, String childName, String childType)
      Returns:
      true if we should create the document with the given parentId, childName and childType, 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