|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xpn.xwiki.api.Api
com.xpn.xwiki.api.Document
com.xpn.xwiki.plugin.applicationmanager.core.doc.objects.classes.DefaultSuperDocument
public class DefaultSuperDocument
Default implementation of SuperDocument. This class manage an XWiki document containing provided
XWiki class. It add some specifics methods, getters and setters for this type of object and
fields. It also override Document (and then XWikiDocument) isNew concept
considering as new a document that does not contains an XWiki object of the provided XWiki class.
SuperDocument,
SuperClass| Field Summary | |
|---|---|
protected boolean |
isNew
true if this is a new document of this class (this document can exist but does not contains object of this class). |
protected int |
objectId
The id of the XWiki object included in the document to manage. |
protected SuperClass |
sclass
The class manager for this document. |
| Fields inherited from class com.xpn.xwiki.api.Document |
|---|
cloned, currentObj, doc |
| Fields inherited from class com.xpn.xwiki.api.Api |
|---|
context |
| Fields inherited from interface com.xpn.xwiki.plugin.applicationmanager.core.doc.objects.classes.SuperDocument |
|---|
SPACE_DOC_SEPARATOR, WIKI_SPACE_SEPARATOR |
| Constructor Summary | |
|---|---|
DefaultSuperDocument(SuperClass sclass,
com.xpn.xwiki.doc.XWikiDocument xdoc,
int objectId,
com.xpn.xwiki.XWikiContext context)
Create instance of DefaultSuperDocument from provided XWikiDocument. |
|
| Method Summary | |
|---|---|
protected void |
deleteDocument()
|
protected com.xpn.xwiki.objects.BaseObject |
getBaseObject(boolean toWrite)
Get the managed BaseObject. |
java.lang.Boolean |
getBooleanValue(java.lang.String fieldName)
Get the value of the field fieldName of the managed object's class. |
com.xpn.xwiki.api.Document |
getDocumentApi()
|
int |
getIntValue(java.lang.String fieldName)
Get the value of the field fieldName of the managed object's class. |
java.lang.String |
getLargeStringValue(java.lang.String fieldName)
Get the value of the field fieldName of the managed object's class. |
java.util.List |
getListValue(java.lang.String fieldName)
Get the value of the field fieldName of the managed object's class. |
com.xpn.xwiki.api.Object |
getObjectApi()
|
int |
getObjectId()
|
java.lang.String |
getStringValue(java.lang.String fieldName)
Get the value of the field fieldName of the managed object's class. |
SuperClass |
getSuperClass()
|
boolean |
isNew()
|
void |
mergeObject(DefaultSuperDocument sdoc)
Merge two documents BaseObject. |
void |
reload(com.xpn.xwiki.XWikiContext context)
Reload XWiki document from database using Document full name. |
protected void |
saveDocument(java.lang.String comment)
|
void |
setBooleanValue(java.lang.String fieldName,
java.lang.Boolean value)
Modify the value of the field fieldName of the managed object's class. |
void |
setFullName(java.lang.String docFullName)
|
void |
setIntValue(java.lang.String fieldName,
int value)
Modify the value of the field fieldName of the managed object's class. |
void |
setLargeStringValue(java.lang.String fieldName,
java.lang.String value)
Modify the value of the field fieldName of the managed object's class. |
void |
setListValue(java.lang.String fieldName,
java.util.List value)
Modify the value of the field fieldName of the managed object's class. |
void |
setStringValue(java.lang.String fieldName,
java.lang.String value)
Modify the value of the field fieldName of the managed object's class. |
| Methods inherited from class com.xpn.xwiki.api.Document |
|---|
addAttachment, addAttachment, addAttachments, addAttachments, addObjectFromRequest, addObjectFromRequest, addObjectFromRequest, addObjectsFromRequest, addObjectsFromRequest, checkAccess, createNewObject, delete, deleteWithProgrammingRights, display, display, display, display, display, display, displayEdit, displayForm, displayForm, displayForm, displayHidden, displayPrettyName, displayPrettyName, displayPrettyName, displayPrettyName, displayPrettyName, displayPrettyName, displayRendered, displayTooltip, displayTooltip, displayView, equals, get, getActiveClass, getArchive, getAttachment, getAttachmentDiff, getAttachmentList, getAttachmentRevisionURL, getAttachmentRevisionURL, getAttachmentURL, getAttachmentURL, getAttachmentURL, getAuthor, getBacklinks, getClassDiff, getComment, getComments, getComments, getContent, getContentAuthor, getContentDiff, getContentUpdateDate, getCreationDate, getCreator, getCurrentMonthPageStats, getCurrentMonthRefStats, getCurrentMonthWebStats, getDate, getDefaultEditURL, getDefaultLanguage, getDefaultTemplate, getDisplayTitle, getDoc, getDocument, getDocumentArchive, getDocumentRevision, getEditURL, getEditURL, getEscapedContent, getExternalURL, getExternalURL, getExternalURL, getFirstObject, getFormat, getFullName, getId, getIncludedMacros, getIncludedPages, getLanguage, getLastChanges, getLinkedPages, getLinks, getLocked, getLockingDate, getLockingUser, getMetaDataDiff, getName, getObject, getObject, getObject, getObject, getObject, getObjectDiff, getObjectNumbers, getObjects, getObjects, getParent, getParentURL, getPrefixedFullName, getPreviousDocument, getPreviousVersion, getRCSVersion, getRealLanguage, getRecentRevisions, getRecentRevisions, getRenderedContent, getRenderedContent, getRenderedContentDiff, getRevisionInfo, getRevisions, getSpace, getTagList, getTags, getTagsPossibleValues, getTemplate, getTextArea, getTitle, getTOC, getTranslatedContent, getTranslatedContent, getTranslatedDocument, getTranslatedDocument, getTranslationList, getURL, getURL, getURL, getValue, getValue, getVersion, getVersionHashCode, getWeb, getWiki, getXMLContent, getXMLDiff, getxWikiClass, getxWikiClasses, getxWikiObjects, hasAccessLevel, hasAccessLevel, insertText, isAdvancedContent, isCreator, isCurrentLocalUserPage, isCurrentUserCreator, isCurrentUserPage, isFromCache, isMinorEdit, isMostRecent, isProgrammaticContent, newObject, removeObject, removeObjects, rename, rename, renameDocument, renameDocument, save, save, saveWithProgrammingRights, saveWithProgrammingRights, set, set, setComment, setContent, setCustomClass, setDefaultTemplate, setMinorEdit, setParent, setTitle, toXML, toXMLDocument, updateObjectFromRequest, updateObjectFromRequest, updateObjectsFromRequest, updateObjectsFromRequest, use, use, use, validate, validate |
| Methods inherited from class com.xpn.xwiki.api.Api |
|---|
checkProgrammingRights, getXWikiContext, hasAdminRights, hasProgrammingRights |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SuperClass sclass
protected int objectId
protected boolean isNew
| Constructor Detail |
|---|
public DefaultSuperDocument(SuperClass sclass,
com.xpn.xwiki.doc.XWikiDocument xdoc,
int objectId,
com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
sclass - the class manager for this document.xdoc - the XWikiDocument to manage.objectId - the id of the XWiki object included in the document to manage.context - the XWiki context.
com.xpn.xwiki.XWikiException - error when calling reload(XWikiContext).| Method Detail |
|---|
public void setFullName(java.lang.String docFullName)
docFullName - modify the full name the the managed XWikiDocument.
public void reload(com.xpn.xwiki.XWikiContext context)
throws com.xpn.xwiki.XWikiException
reload in interface SuperDocumentcontext - the XWiki context.
com.xpn.xwiki.XWikiException - error when initialize document.SuperDocument.reload(com.xpn.xwiki.XWikiContext)public com.xpn.xwiki.api.Document getDocumentApi()
getDocumentApi in interface SuperDocumentSuperDocument.getDocumentApi()public int getObjectId()
getObjectId in interface SuperDocumentSuperDocument.getObjectId()public com.xpn.xwiki.api.Object getObjectApi()
getObjectApi in interface SuperDocumentSuperDocument.getObjectApi()protected com.xpn.xwiki.objects.BaseObject getBaseObject(boolean toWrite)
BaseObject.
toWrite - indicate that the BaseObject will be modified.
BaseObject.public void mergeObject(DefaultSuperDocument sdoc)
sdoc - the document to merge.public SuperClass getSuperClass()
getSuperClass in interface SuperDocumentSuperDocument.getSuperClass()public boolean isNew()
isNew in interface SuperDocumentisNew in class com.xpn.xwiki.api.DocumentSuperDocument.isNew()
protected void saveDocument(java.lang.String comment)
throws com.xpn.xwiki.XWikiException
saveDocument in class com.xpn.xwiki.api.Documentcom.xpn.xwiki.XWikiExceptionDocument.saveDocument(String)
protected void deleteDocument()
throws com.xpn.xwiki.XWikiException
deleteDocument in class com.xpn.xwiki.api.Documentcom.xpn.xwiki.XWikiExceptionDocument.deleteDocument()public java.lang.String getStringValue(java.lang.String fieldName)
fieldName of the managed object's class.
fieldName - the name of the field from the managed object's class where to find the
value.
String of the field fieldName of the managed
object's class.XWikiDocument.getStringValue(java.lang.String)
public void setStringValue(java.lang.String fieldName,
java.lang.String value)
fieldName of the managed object's class.
fieldName - the name of the field from the managed object's class where to find the
value.value - the new value of the field fieldName of the managed object's
class.XWikiDocument.setStringValue(java.lang.String,java.lang.String,java.lang.String)public java.lang.String getLargeStringValue(java.lang.String fieldName)
fieldName of the managed object's class.
fieldName - the name of the field from the managed object's class where to find the
value.
String of the field fieldName of the managed
object's class.XWikiDocument.getStringValue(java.lang.String)
public void setLargeStringValue(java.lang.String fieldName,
java.lang.String value)
fieldName of the managed object's class.
fieldName - the name of the field from the managed object's class where to find the
value.value - the new value of the field fieldName of the managed object's
class.XWikiDocument.setLargeStringValue(java.lang.String,java.lang.String,java.lang.String)public java.util.List getListValue(java.lang.String fieldName)
fieldName of the managed object's class.
fieldName - the name of the field from the managed object's class where to find the
value.
List of the field fieldName of the managed
object's class.XWikiDocument.getListValue(java.lang.String)
public void setListValue(java.lang.String fieldName,
java.util.List value)
fieldName of the managed object's class.
fieldName - the name of the field from the managed object's class where to find the
value.value - the new value of the field fieldName of the managed object's
class.XWikiDocument.setStringListValue(java.lang.String,java.lang.String,java.util.List)public int getIntValue(java.lang.String fieldName)
fieldName of the managed object's class.
fieldName - the name of the field from the managed object's class where to find the
value.
fieldName of the managed object's class.XWikiDocument.getListValue(java.lang.String)
public void setIntValue(java.lang.String fieldName,
int value)
fieldName of the managed object's class.
fieldName - the name of the field from the managed object's class where to find the
value.value - the new value of the field fieldName of the managed object's
class.XWikiDocument.setIntValue(String, String, int)public java.lang.Boolean getBooleanValue(java.lang.String fieldName)
fieldName of the managed object's class.
fieldName - the name of the field from the managed object's class where to find the
value.
Boolean of the field fieldName of the managed
object's class.XWikiDocument.getListValue(java.lang.String)
public void setBooleanValue(java.lang.String fieldName,
java.lang.Boolean value)
fieldName of the managed object's class.
fieldName - the name of the field from the managed object's class where to find the
value.value - the new value of the field fieldName of the managed object's
class.XWikiDocument.setIntValue(String, String, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||