|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xpn.xwiki.plugin.applicationmanager.core.doc.objects.classes.AbstractSuperClass
public abstract class AbstractSuperClass
Abstract implementation of SuperClass.
This class has to be extended with at least :
updateBaseClass(BaseClass)
SuperClass| Field Summary |
|---|
| Fields inherited from interface com.xpn.xwiki.plugin.applicationmanager.core.doc.objects.classes.SuperClass |
|---|
XWIKI_CLASS_SPACE_PREFIX, XWIKI_CLASS_SPACE_SUFFIX, XWIKI_CLASS_SUFFIX, XWIKI_CLASSSHEET_SPACE_SUFFIX, XWIKI_CLASSSHEET_SUFFIX, XWIKI_CLASSTEMPLATE_SPACE_SUFFIX, XWIKI_CLASSTEMPLATE_SUFFIX |
| Constructor Summary | |
|---|---|
protected |
AbstractSuperClass(java.lang.String prefix)
Constructor for AbstractSuperClass. |
protected |
AbstractSuperClass(java.lang.String spaceprefix,
java.lang.String prefix)
Constructor for AbstractSuperClass. |
protected |
AbstractSuperClass(java.lang.String spaceprefix,
java.lang.String prefix,
boolean dispatch)
Constructor for AbstractSuperClass. |
| Method Summary | |
|---|---|
protected void |
check(com.xpn.xwiki.XWikiContext context)
Check if all necessary documents for manage this class in this context exists and update. |
java.lang.String |
createWhereClause(java.lang.String[][] fieldDescriptors,
java.util.List parameterValues)
Construct HQL where clause to use with XWikiStoreInterface
"searchDocuments" methods. |
com.xpn.xwiki.objects.classes.BaseClass |
getBaseClass()
|
com.xpn.xwiki.api.Document |
getClassDocument(com.xpn.xwiki.XWikiContext context)
Get the document containing the class in this context's database. |
java.lang.String |
getClassFullName()
|
java.lang.String |
getClassName()
|
java.lang.String |
getClassPrefix()
|
java.lang.String |
getClassSheetDefaultContent()
|
com.xpn.xwiki.api.Document |
getClassSheetDocument(com.xpn.xwiki.XWikiContext context)
Get the document containing the class sheet for this context's database. |
java.lang.String |
getClassSheetFullName()
|
java.lang.String |
getClassSheetName()
|
java.lang.String |
getClassSheetSpace()
|
java.lang.String |
getClassSpace()
|
java.lang.String |
getClassSpacePrefix()
|
java.lang.String |
getClassTemplateDefaultContent()
|
com.xpn.xwiki.api.Document |
getClassTemplateDocument(com.xpn.xwiki.XWikiContext context)
Get the document containing the class template for this context's database. |
java.lang.String |
getClassTemplateFullName()
|
java.lang.String |
getClassTemplateName()
|
java.lang.String |
getClassTemplateSpace()
|
java.lang.String |
getItemDefaultName(java.lang.String docFullName)
Get item name extracted from document full name. |
java.lang.String |
getItemDocumentDefaultFullName(java.lang.String itemName,
com.xpn.xwiki.XWikiContext context)
Get document full name from item name item. |
java.lang.String |
getItemDocumentDefaultName(java.lang.String itemName,
com.xpn.xwiki.XWikiContext context)
Get document name from item name item. |
SuperDocument |
getSuperDocument(java.lang.String itemName,
int objectId,
boolean validate,
com.xpn.xwiki.XWikiContext context)
Get document by full name from item name itemName. |
boolean |
isInstance(com.xpn.xwiki.api.Document doc)
Determines if the specified doc is compatible with this xwiki class (if he
contains class object). |
boolean |
isInstance(com.xpn.xwiki.doc.XWikiDocument doc)
Determines if the specified doc is compatible with this xwiki class (if he
contains class object). |
SuperDocument |
newSuperDocument(java.lang.String docFullName,
int objId,
com.xpn.xwiki.XWikiContext context)
Create new super document containing object of class SuperClass.getClassFullName(). |
SuperDocument |
newSuperDocument(com.xpn.xwiki.XWikiContext context)
Create new super document containing object of class SuperClass.getClassFullName(). |
SuperDocument |
newSuperDocument(com.xpn.xwiki.doc.XWikiDocument doc,
int objId,
com.xpn.xwiki.XWikiContext context)
Create new super document containing object of class SuperClass.getClassFullName(). |
java.util.List |
newSuperDocumentList(java.util.List documents,
com.xpn.xwiki.XWikiContext context)
Create new super document for each object of class SuperClass.getClassFullName() of each
XWikiDocument in the list and return it. |
java.util.List |
newSuperDocumentList(com.xpn.xwiki.doc.XWikiDocument document,
com.xpn.xwiki.XWikiContext context)
Create new super documents for each object of class SuperClass.getClassFullName() for provided
XWikiDocument and return it. |
java.util.List |
searchSuperDocuments(com.xpn.xwiki.XWikiContext context)
Find all XWikiDocument containing object of this XWiki class. |
java.util.List |
searchSuperDocumentsByField(java.lang.String fieldName,
java.lang.String fieldValue,
java.lang.String fieldType,
com.xpn.xwiki.XWikiContext context)
Search in instances of this document class. |
java.util.List |
searchSuperDocumentsByFields(java.lang.String[][] fieldDescriptors,
com.xpn.xwiki.XWikiContext context)
Search in instances of this document class. |
protected boolean |
updateBaseClass(com.xpn.xwiki.objects.classes.BaseClass baseClass)
Configure BaseClass. |
protected boolean |
updateClassTemplateDocument(com.xpn.xwiki.doc.XWikiDocument doc)
Initialize template document with default content. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractSuperClass(java.lang.String prefix)
prefix - the prefix of class document.AbstractSuperClass(String, String),
AbstractSuperClass(String, String, boolean)
protected AbstractSuperClass(java.lang.String spaceprefix,
java.lang.String prefix)
spaceprefix - the space prefix of class document.prefix - the prefix of class document.AbstractSuperClass(String),
AbstractSuperClass(String, String, boolean)
protected AbstractSuperClass(java.lang.String spaceprefix,
java.lang.String prefix,
boolean dispatch)
spaceprefix - the space of class document.prefix - the prefix of class document.dispatch - Indicate if it had to use standard XWiki applications space names.AbstractSuperClass(String),
AbstractSuperClass(String, String)| Method Detail |
|---|
public java.lang.String getClassSpacePrefix()
getClassSpacePrefix in interface SuperClassSuperClass.getClassSpacePrefix()public java.lang.String getClassSpace()
getClassSpace in interface SuperClassSuperClass.getClassSpace()public java.lang.String getClassPrefix()
getClassPrefix in interface SuperClassSuperClass.getClassPrefix()public java.lang.String getClassName()
getClassName in interface SuperClassSuperClass.getClassName()public java.lang.String getClassFullName()
getClassFullName in interface SuperClassSuperClass.getClassFullName()public java.lang.String getClassTemplateSpace()
getClassTemplateSpace in interface SuperClassSuperClass.getClassTemplateName()public java.lang.String getClassTemplateName()
getClassTemplateName in interface SuperClassSuperClass.getClassTemplateName()public java.lang.String getClassTemplateFullName()
getClassTemplateFullName in interface SuperClassSuperClass.getClassTemplateFullName()public java.lang.String getClassSheetSpace()
getClassSheetSpace in interface SuperClassSuperClass.getClassSheetName()public java.lang.String getClassSheetName()
getClassSheetName in interface SuperClassSuperClass.getClassSheetName()public java.lang.String getClassSheetFullName()
getClassSheetFullName in interface SuperClassSuperClass.getClassSheetFullName()
protected void check(com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
context - the XWiki context.
com.xpn.xwiki.XWikiException - error when saving documents.checkClassDocument(XWikiContext)public java.lang.String getClassSheetDefaultContent()
getClassSheetDefaultContent in interface SuperClassSuperClass.getClassSheetDefaultContent()public java.lang.String getClassTemplateDefaultContent()
getClassTemplateDefaultContent in interface SuperClassSuperClass.getClassTemplateDefaultContent()protected boolean updateClassTemplateDocument(com.xpn.xwiki.doc.XWikiDocument doc)
doc - the class template document that will be saved.
doc modified.protected boolean updateBaseClass(com.xpn.xwiki.objects.classes.BaseClass baseClass)
baseClass - the baseClass to configure.
baseClass modified.public com.xpn.xwiki.objects.classes.BaseClass getBaseClass()
getBaseClass in interface SuperClassSuperClass.getBaseClass()
public com.xpn.xwiki.api.Document getClassDocument(com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
getClassDocument in interface SuperClasscontext - the XWiki context.
com.xpn.xwiki.XWikiException - error when getting class document from the database.SuperClass.getClassDocument(com.xpn.xwiki.XWikiContext)
public com.xpn.xwiki.api.Document getClassSheetDocument(com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
getClassSheetDocument in interface SuperClasscontext - the XWiki context.
com.xpn.xwiki.XWikiException - error when getting class sheet document from the database.SuperClass.getClassSheetDocument(com.xpn.xwiki.XWikiContext)
public com.xpn.xwiki.api.Document getClassTemplateDocument(com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
getClassTemplateDocument in interface SuperClasscontext - the XWiki context.
com.xpn.xwiki.XWikiException - error when getting class template document from the database.SuperClass.getClassTemplateDocument(com.xpn.xwiki.XWikiContext)public boolean isInstance(com.xpn.xwiki.doc.XWikiDocument doc)
doc is compatible with this xwiki class (if he
contains class object).
isInstance in interface SuperClassdoc - the XWikidocument to test.
doc support this class, false otherwise.SuperClass.isInstance(com.xpn.xwiki.doc.XWikiDocument)public boolean isInstance(com.xpn.xwiki.api.Document doc)
doc is compatible with this xwiki class (if he
contains class object).
isInstance in interface SuperClassdoc - the XWikidocument to test.
doc support this class, false otherwise.SuperClass.isInstance(com.xpn.xwiki.doc.XWikiDocument)
public java.lang.String getItemDocumentDefaultName(java.lang.String itemName,
com.xpn.xwiki.XWikiContext context)
item. Usually a Document name is
DocumentTypeItemName.
getItemDocumentDefaultName in interface SuperClassitemName - the name of the item to find.context - the XWiki context.
SuperClass.getItemDocumentDefaultName(java.lang.String, XWikiContext)
public java.lang.String getItemDocumentDefaultFullName(java.lang.String itemName,
com.xpn.xwiki.XWikiContext context)
item. Usually a Document full name is
Space.DocumentTypeItemName.
getItemDocumentDefaultFullName in interface SuperClassitemName - the name of the item.context - the XWiki context.
SuperClass.getItemDocumentDefaultFullName(java.lang.String, XWikiContext)public java.lang.String getItemDefaultName(java.lang.String docFullName)
getItemDefaultName in interface SuperClassdocFullName - the full name of the document.
SuperClass.getItemDefaultName(java.lang.String)
public SuperDocument getSuperDocument(java.lang.String itemName,
int objectId,
boolean validate,
com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
itemName.
getSuperDocument in interface SuperClassitemName - 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 SuperDocument or throw exception if wiki
descriptor does not exist.context - the XWiki context.
com.xpn.xwiki.XWikiException - error when getting document from the database.SuperClass.getSuperDocument(java.lang.String,
int, boolean, com.xpn.xwiki.XWikiContext)
public java.lang.String createWhereClause(java.lang.String[][] fieldDescriptors,
java.util.List parameterValues)
XWikiStoreInterface
"searchDocuments" methods.
createWhereClause in interface SuperClassfieldDescriptors - the list of fields name/value constraints. Format : [[fieldName1,
typeField1, valueField1][fieldName2, typeField2, valueField2]].parameterValues - the where clause values that replace the question marks (?).
public java.util.List searchSuperDocuments(com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
context - the XWiki context.
SuperDocument.
com.xpn.xwiki.XWikiException - error when searching for document in database.getClassFullName()
public java.util.List searchSuperDocumentsByField(java.lang.String fieldName,
java.lang.String fieldValue,
java.lang.String fieldType,
com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
fieldName - the name of field.fieldValue - the value of field.fieldType - the type of field.context - the XWiki context.
SuperDocument.
com.xpn.xwiki.XWikiException - error when searching for documents from in database.
public java.util.List searchSuperDocumentsByFields(java.lang.String[][] fieldDescriptors,
com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
fieldDescriptors - the list of fields name/value constraints. Format : [[fieldName1,
typeField1, valueField1][fieldName2, typeField2, valueField2]].context - the XWiki context.
SuperDocument.
com.xpn.xwiki.XWikiException - error when searching for documents from in database.
public SuperDocument newSuperDocument(com.xpn.xwiki.doc.XWikiDocument doc,
int objId,
com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
SuperClass.getClassFullName(). If
document already exist it is returned with new object if it does not contains any.
newSuperDocument in interface SuperClassdoc - the XWiki document to manage.objId - the id of the XWiki object included in the document to manage.context - the XWiki context.
com.xpn.xwiki.XWikiException - error when calling SuperDocument implementation constructor.SuperClass.newSuperDocument(com.xpn.xwiki.doc.XWikiDocument,
int, com.xpn.xwiki.XWikiContext)
public SuperDocument newSuperDocument(java.lang.String docFullName,
int objId,
com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
SuperClass.getClassFullName(). If
document already exist it is returned with new object if it does not contains any.
newSuperDocument in interface SuperClassdocFullName - the full name of document to manage.objId - the id of the XWiki object included in the document to manage.context - the XWiki context.
com.xpn.xwiki.XWikiException - error when calling SuperDocument implementation constructor.SuperClass.newSuperDocument(java.lang.String,
int, com.xpn.xwiki.XWikiContext)
public SuperDocument newSuperDocument(com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
SuperClass.getClassFullName(). If
document already exist it is returned with new object if it does not contains any.
newSuperDocument in interface SuperClasscontext - the XWiki context.
com.xpn.xwiki.XWikiException - error when calling SuperDocument implementation constructor.SuperClass.newSuperDocument(com.xpn.xwiki.XWikiContext)
public java.util.List newSuperDocumentList(com.xpn.xwiki.doc.XWikiDocument document,
com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
SuperClass.getClassFullName() for provided
XWikiDocument and return it.
newSuperDocumentList in interface SuperClassdocument - the list of XWikiDocument.context - the XWiki context.
SuperDocument.
com.xpn.xwiki.XWikiException - error when calling SuperDocument implementation constructor.SuperClass.newSuperDocumentList(com.xpn.xwiki.doc.XWikiDocument,
com.xpn.xwiki.XWikiContext)
public java.util.List newSuperDocumentList(java.util.List documents,
com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
SuperClass.getClassFullName() of each
XWikiDocument in the list and return it.
newSuperDocumentList in interface SuperClassdocuments - the list of XWikiDocument.context - the XWiki context.
SuperDocument.
com.xpn.xwiki.XWikiException - error when calling SuperDocument implementation constructor.SuperClass.newSuperDocumentList(java.util.List,
com.xpn.xwiki.XWikiContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||