Interface MandatoryDocumentInitializer

  • All Known Implementing Classes:
    AbstractMandatoryClassInitializer, AbstractMandatoryDocumentInitializer

    @Role
    public interface MandatoryDocumentInitializer
    Provide a document that should be initialized at startup and when creating a new wiki.

    The role hint should be the local (or absolute if it's supposed to be used only for a specific wiki) reference of the document so that it can easily be found.

    An additional Priority annotation can be added to affect the order in which the initializer will be executed when a wiki is initialized. If not specified, 1000 will be assumed.

    Version:
    $Id: 41b1a0c99deefb217ad903c66c25ae76fd1741a9 $
    • Field Detail

      • DEFAULT_PRIORITY

        @Deprecated(since="15.4RC1")
        static final int DEFAULT_PRIORITY
        Deprecated.
        use ComponentDescriptor.DEFAULT_PRIORITY instead
        Default priority with which a document initializer will be executed along side other document initializers.
        Since:
        7.0RC1
        See Also:
        Constant Field Values
    • Method Detail

      • getDocumentReference

        EntityReference getDocumentReference()
        Returns:
        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
      • updateDocument

        boolean updateDocument​(XWikiDocument document)
        Update the provided document according to the need.
        Parameters:
        document - the existing document to update
        Returns:
        true if the document has been modified, false otherwise