Class AbstractMandatoryClassInitializer

  • All Implemented Interfaces:
    MandatoryDocumentInitializer, org.xwiki.component.phase.Initializable

    public abstract class AbstractMandatoryClassInitializer
    extends AbstractMandatoryDocumentInitializer
    Base class for standard mandatory document initializers.
    Since:
    9.0RC1
    Version:
    $Id: 1e541991cc3286e2244af8548741e3e16aed095b $
    • Constructor Detail

      • AbstractMandatoryClassInitializer

        public AbstractMandatoryClassInitializer​(EntityReference reference)
        Parameters:
        reference - the reference of the document to update. Can be either local or absolute depending if the document is associated to a specific wiki or not
      • AbstractMandatoryClassInitializer

        public AbstractMandatoryClassInitializer​(EntityReference reference,
                                                 String title)
        Parameters:
        reference - the reference of the document to update. Can be either local or absolute depending if the document is associated to a specific wiki or not
        title - the title of the document
    • Method Detail

      • createClass

        protected void createClass​(BaseClass xclass)
        Parameters:
        xclass - the class to create
        Since:
        9.0RC1
      • updateClassDocumentFields

        protected boolean updateClassDocumentFields​(XWikiDocument document)
        Update document with standard class related properties.
        Parameters:
        document - the document to update
        Returns:
        true if the document has been modified, false otherwise
        Since:
        9.0
      • updateDocumentSheet

        protected boolean updateDocumentSheet​(XWikiDocument document)
        Update document sheet. By default set the class sheet.
        Parameters:
        document - the document to update
        Returns:
        true if the document has been modified, false otherwise
        Since:
        9.0