Package com.xpn.xwiki.doc
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: 96f2bcae3d45f0cd09ffc11c71a9486345dcb7cc $
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_PRIORITY
Default priority with which a document initializer will be executed along side other document initializers.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EntityReference
getDocumentReference()
boolean
updateDocument(XWikiDocument document)
Update the provided document according to the need.
-
-
-
Field Detail
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITY
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
-
-