Package com.xpn.xwiki.doc
Class AbstractMandatoryClassInitializer
- java.lang.Object
-
- com.xpn.xwiki.doc.AbstractMandatoryDocumentInitializer
-
- com.xpn.xwiki.doc.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 $
-
-
Field Summary
-
Fields inherited from class com.xpn.xwiki.doc.AbstractMandatoryDocumentInitializer
documentSheetBinder, resolver, wikiDescriptorManager
-
Fields inherited from interface com.xpn.xwiki.doc.MandatoryDocumentInitializer
DEFAULT_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description AbstractMandatoryClassInitializer(EntityReference reference)
AbstractMandatoryClassInitializer(EntityReference reference, String title)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
createClass(BaseClass xclass)
protected boolean
updateClassDocumentFields(XWikiDocument document)
Update document with standard class related properties.boolean
updateDocument(XWikiDocument document)
Update the provided document according to the need.protected boolean
updateDocumentSheet(XWikiDocument document)
Update document sheet.-
Methods inherited from class com.xpn.xwiki.doc.AbstractMandatoryDocumentInitializer
getDocumentReference, getTitle, initialize, intFromBoolean, isMainWikiOnly, updateDocumentFields, updateTitle
-
-
-
-
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 nottitle
- the title of the document
-
-
Method Detail
-
updateDocument
public boolean updateDocument(XWikiDocument document)
Description copied from interface:MandatoryDocumentInitializer
Update the provided document according to the need.- Specified by:
updateDocument
in interfaceMandatoryDocumentInitializer
- Overrides:
updateDocument
in classAbstractMandatoryDocumentInitializer
- Parameters:
document
- the existing document to update- Returns:
- true if the document has been modified, false otherwise
-
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
-
-