|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- the item class extending XObjectDocument
.public interface XClassManager<T extends XObjectDocument>
Interface that give way to manage a XWiki class.
Field Summary | |
---|---|
static String |
XWIKI_CLASS_SPACE_PREFIX
Default prefix for a document's space containing a class. |
static String |
XWIKI_CLASS_SPACE_SUFFIX
Default suffix for a document's space containing a class. |
static String |
XWIKI_CLASS_SUFFIX
Default suffix for the document containing the class. |
static String |
XWIKI_CLASSSHEET_SPACE_SUFFIX
Default suffix for a document's space containing a class sheet. |
static String |
XWIKI_CLASSSHEET_SUFFIX
Default suffix for a document containing a class sheet. |
static String |
XWIKI_CLASSTEMPLATE_SPACE_SUFFIX
Default suffix for a document's space containing a class template. |
static String |
XWIKI_CLASSTEMPLATE_SUFFIX
Default suffix for a document containing a class template. |
Method Summary | |
---|---|
String |
createWhereClause(Object[][] fieldDescriptors,
List<Object> parameterValues)
Construct HQL where clause to use with XWikiStoreInterface "searchDocuments" methods. |
boolean |
forceValidDocumentName()
|
BaseClass |
getBaseClass()
|
Document |
getClassDocument(XWikiContext context)
Get the document containing the class in this context's database. |
String |
getClassFullName()
|
String |
getClassName()
|
String |
getClassPrefix()
|
String |
getClassSheetDefaultContent()
|
Document |
getClassSheetDocument(XWikiContext context)
Get the document containing the class sheet for this context's database. |
String |
getClassSheetFullName()
|
String |
getClassSheetName()
|
String |
getClassSheetSpace()
|
String |
getClassSpace()
|
String |
getClassSpacePrefix()
|
String |
getClassTemplateDefaultContent()
|
Document |
getClassTemplateDocument(XWikiContext context)
Get the document containing the class template for this context's database. |
String |
getClassTemplateFullName()
|
String |
getClassTemplateName()
|
String |
getClassTemplateSpace()
|
String |
getItemDefaultName(String docFullName)
Get item name extracted from document full name. |
String |
getItemDocumentDefaultFullName(String itemName,
XWikiContext context)
Get document full name from item name item . |
String |
getItemDocumentDefaultName(String itemName,
XWikiContext context)
Get document name from item name item . |
T |
getXObjectDocument(String itemName,
int objectId,
boolean validate,
XWikiContext context)
Get document by full name from item name itemName . |
boolean |
isInstance(Document doc)
Determines if the specified doc is compatible with this xwiki class (if he contains class object). |
boolean |
isInstance(XWikiDocument doc)
Determines if the specified doc is compatible with this xwiki class (if he contains class object). |
boolean |
isValidName(String fullName)
|
T |
newXObjectDocument(String docFullName,
int objId,
XWikiContext context)
Create new super document containing object of class getClassFullName() . |
T |
newXObjectDocument(XWikiContext context)
Create new super document containing object of class getClassFullName() . |
T |
newXObjectDocument(XWikiDocument doc,
int objId,
XWikiContext context)
Create new super document containing object of class getClassFullName() . |
List<T> |
newXObjectDocumentList(List<XWikiDocument> documents,
XWikiContext context)
Create new super document for each object of class getClassFullName() of each XWikiDocument in
the list and return it. |
List<T> |
newXObjectDocumentList(XWikiDocument documents,
XWikiContext context)
Create new super documents for each object of class getClassFullName() for provided
XWikiDocument and return it. |
Field Detail |
---|
static final String XWIKI_CLASS_SUFFIX
static final String XWIKI_CLASSSHEET_SUFFIX
static final String XWIKI_CLASSTEMPLATE_SUFFIX
static final String XWIKI_CLASS_SPACE_PREFIX
static final String XWIKI_CLASS_SPACE_SUFFIX
static final String XWIKI_CLASSSHEET_SPACE_SUFFIX
static final String XWIKI_CLASSTEMPLATE_SPACE_SUFFIX
Method Detail |
---|
String getClassSpacePrefix()
String getClassPrefix()
getClassSpace()
String getClassSpace()
getClassSpacePrefix()
,
XWIKI_CLASS_SPACE_SUFFIX
String getClassName()
getClassFullName()
,
getClassPrefix()
,
XWIKI_CLASS_SUFFIX
String getClassFullName()
getClassName()
,
getClassSpace()
String getClassTemplateSpace()
getClassPrefix()
,
XWIKI_CLASSTEMPLATE_SPACE_SUFFIX
String getClassTemplateName()
getClassPrefix()
,
getClassTemplateFullName()
,
XWIKI_CLASSTEMPLATE_SUFFIX
String getClassTemplateFullName()
getClassTemplateSpace()
,
getClassTemplateName()
String getClassSheetSpace()
getClassSpacePrefix()
,
XWIKI_CLASSSHEET_SPACE_SUFFIX
String getClassSheetName()
getClassPrefix()
,
getClassSheetFullName()
,
XWIKI_CLASSSHEET_SUFFIX
String getClassSheetFullName()
getClassSheetSpace()
,
getClassSheetName()
boolean forceValidDocumentName()
BaseClass getBaseClass()
Document getClassDocument(XWikiContext context) throws XWikiException
context
- the XWiki context.
XWikiException
- error when getting class document from the database.String getClassSheetDefaultContent()
Document getClassSheetDocument(XWikiContext context) throws XWikiException
context
- the XWiki context.
XWikiException
- error when getting class sheet document from the database.String getClassTemplateDefaultContent()
Document getClassTemplateDocument(XWikiContext context) throws XWikiException
context
- the XWiki context.
XWikiException
- error when getting class template document from the database.boolean isInstance(XWikiDocument doc)
doc
is compatible with this xwiki class (if he contains class object).
doc
- the XWikidocument to test.
doc
support this class, false otherwise.boolean isInstance(Document doc)
doc
is compatible with this xwiki class (if he contains class object).
doc
- the XWikidocument to test.
doc
support this class, false otherwise.boolean isValidName(String fullName)
fullName
- the full name of the document
String getItemDocumentDefaultName(String itemName, XWikiContext context)
item
. Usually a Document name is DocumentTypeItemName.
itemName
- the name of the item to find.context
- the XWiki context.
getItemDocumentDefaultFullName(String, XWikiContext)
,
getItemDefaultName(String)
String getItemDocumentDefaultFullName(String itemName, XWikiContext context)
item
. Usually a Document full name is
Space.DocumentTypeItemName.
itemName
- the name of the item.context
- the XWiki context.
getItemDocumentDefaultName(String, XWikiContext)
,
getItemDefaultName(String)
String getItemDefaultName(String docFullName)
docFullName
- the full name of the document.
getItemDocumentDefaultFullName(String, XWikiContext)
T getXObjectDocument(String itemName, int objectId, boolean validate, XWikiContext context) throws XWikiException
itemName
.
itemName
- the full name of the item.objectId
- the id of the XWiki object included in the document to manage.validate
- indicate if it return new T
or throw exception if wiki descriptor does not exist.context
- the XWiki context.
XWikiException
- error when getting document from the database.getItemDefaultName(String)
,
getItemDocumentDefaultFullName(String, XWikiContext)
String createWhereClause(Object[][] fieldDescriptors, List<Object> parameterValues)
XWikiStoreInterface
"searchDocuments" methods.
fieldDescriptors
- the list of fields name/value constraints. Format : [[fieldName1, typeField1,
valueField1][fieldName2, typeField2, valueField2]].parameterValues
- the where clause values filled by the method that replace the question marks (?).
T newXObjectDocument(XWikiDocument doc, int objId, XWikiContext context) throws XWikiException
getClassFullName()
. If document already exist it is
returned with new object if it does not contains any.
doc
- the XWiki document to manage.objId
- the id of the XWiki object included in the document to manage.context
- the XWiki context.
XWikiException
- error when calling XObjectDocument implementation constructor.T newXObjectDocument(XWikiContext context) throws XWikiException
getClassFullName()
. If document already exist it is
returned with new object if it does not contains any.
context
- the XWiki context.
XWikiException
- error when calling T constructor.T newXObjectDocument(String docFullName, int objId, XWikiContext context) throws XWikiException
getClassFullName()
. If document already exist it is
returned with new object if it does not contains any.
docFullName
- the full name of document to manage.objId
- the id of the XWiki object included in the document to manage.context
- the XWiki context.
XWikiException
- error when calling T constructor.getClassFullName()
List<T> newXObjectDocumentList(XWikiDocument documents, XWikiContext context) throws XWikiException
getClassFullName()
for provided
XWikiDocument
and return it.
documents
- the list of XWikiDocument
.context
- the XWiki context.
T
.
XWikiException
- error when calling XObjectDocument implementation constructor.List<T> newXObjectDocumentList(List<XWikiDocument> documents, XWikiContext context) throws XWikiException
getClassFullName()
of each XWikiDocument
in
the list and return it.
documents
- the list of XWikiDocument
.context
- the XWiki context.
T
.
XWikiException
- error when calling XObjectDocument implementation constructor.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |