|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.doc.XWikiDocument
public class XWikiDocument
Field Summary | |
---|---|
static EntityReference |
COMMENTSCLASS_REFERENCE
|
protected EntityReferenceSerializer<String> |
compactEntityReferenceSerializer
Used to convert a proper Document Reference to string (compact form). |
protected EntityReferenceSerializer<String> |
compactWikiEntityReferenceSerializer
Used to convert a Document Reference to string (compact form without the wiki part if it matches the current wiki). |
protected DocumentReferenceResolver<String> |
currentDocumentReferenceResolver
Used to resolve a string into a proper Document Reference using the current document's reference to fill the blanks. |
protected DocumentReferenceResolver<String> |
currentMixedDocumentReferenceResolver
Used to resolve a string into a proper Document Reference using the current document's reference to fill the blanks, except for the page name for which the default page name is used instead and for the wiki name for which the current wiki is used instead of the current document reference's wiki. |
protected DocumentReferenceResolver<EntityReference> |
currentReferenceDocumentReferenceResolver
Used to normalize references. |
protected ObjectReferenceResolver<EntityReference> |
currentReferenceObjectReferenceResolver
Used to normalize references. |
static String |
DB_SPACE_SEP
Separator string between database name and space name. |
protected EntityReferenceSerializer<String> |
defaultEntityReferenceSerializer
Used to convert a proper Document Reference to string (standard form). |
protected DocumentReferenceResolver<String> |
explicitDocumentReferenceResolver
Used to resolve a string into a proper Document Reference. |
protected DocumentReferenceResolver<EntityReference> |
explicitReferenceDocumentReferenceResolver
Used to normalize references. |
static int |
HAS_ATTACHMENTS
|
static int |
HAS_CLASS
|
static int |
HAS_OBJECTS
|
protected EntityReferenceSerializer<String> |
localEntityReferenceSerializer
Used to convert a proper Document Reference to a string but without the wiki name. |
protected EntityReferenceSerializer<String> |
localUidStringEntityReferenceSerializer
Used to compute document identifier. |
protected EntityReferenceResolver<String> |
relativeEntityReferenceResolver
Used to resolve parent references in the way they are stored externally (database, xml, etc), ie relative or absolute. |
static EntityReference |
SHEETCLASS_REFERENCE
|
static String |
SPACE_NAME_SEP
Separator string between space name and page name. |
protected org.xwiki.rendering.syntax.SyntaxFactory |
syntaxFactory
Used to create proper Syntax objects. |
protected EntityReferenceSerializer<String> |
uidStringEntityReferenceSerializer
Used to compute document identifier. |
protected org.suigeneris.jrcs.rcs.Version |
version
|
protected EntityReferenceResolver<String> |
xClassEntityReferenceResolver
|
Constructor Summary | |
---|---|
XWikiDocument()
Deprecated. since 2.2M1 use XWikiDocument(org.xwiki.model.reference.DocumentReference) instead |
|
XWikiDocument(DocumentReference reference)
|
|
XWikiDocument(String space,
String name)
Deprecated. since 2.2M1 use XWikiDocument(org.xwiki.model.reference.DocumentReference) instead |
|
XWikiDocument(String wiki,
String space,
String name)
Deprecated. since 2.2M1 use XWikiDocument(org.xwiki.model.reference.DocumentReference) instead |
Method Summary | |
---|---|
XWikiAttachment |
addAttachment(String fileName,
byte[] data,
XWikiContext context)
|
XWikiAttachment |
addAttachment(String fileName,
InputStream iStream,
XWikiContext context)
|
void |
addObject(String className,
BaseObject object)
Deprecated. since 2.2M1 use addXObject(BaseObject) instead |
BaseObject |
addObjectFromRequest(String className,
int num,
XWikiContext context)
Deprecated. since 2.2M2 use addXObjectFromRequest(DocumentReference, int, XWikiContext) |
BaseObject |
addObjectFromRequest(String className,
String prefix,
int num,
XWikiContext context)
Deprecated. since 2.2M2 use addXObjectFromRequest(EntityReference, String, int, XWikiContext) |
BaseObject |
addObjectFromRequest(String className,
String prefix,
XWikiContext context)
Deprecated. since 2.2M2 use addXObjectFromRequest(DocumentReference, String, XWikiContext) |
BaseObject |
addObjectFromRequest(String className,
XWikiContext context)
Deprecated. since 2.2M2 use addXObjectFromRequest(EntityReference, XWikiContext) |
List<BaseObject> |
addObjectsFromRequest(String className,
String pref,
XWikiContext context)
Deprecated. since 2.2M2 use addXObjectsFromRequest(DocumentReference, String, XWikiContext) |
List<BaseObject> |
addObjectsFromRequest(String className,
XWikiContext context)
Deprecated. since 2.2M2 use addXObjectsFromRequest(DocumentReference, XWikiContext) |
void |
addObjectsToRemove(BaseObject object)
Deprecated. since 2.2M2 use addXObjectToRemove(BaseObject) )} instead |
void |
addToZip(ZipOutputStream zos,
boolean withVersions,
XWikiContext context)
Deprecated. since 4.2M2 |
void |
addToZip(ZipOutputStream zos,
String zipname,
boolean withVersions,
XWikiContext context)
Deprecated. since 4.1M2 |
void |
addToZip(ZipOutputStream zos,
XWikiContext context)
Deprecated. since 4.1M2 |
void |
addXObject(BaseObject object)
Add the object to the document. |
void |
addXObject(DocumentReference classReference,
BaseObject object)
Deprecated. use addXObject(BaseObject) instead |
BaseObject |
addXObjectFromRequest(DocumentReference classReference,
int num,
XWikiContext context)
Adds object from an new object creation form. |
BaseObject |
addXObjectFromRequest(DocumentReference classReference,
String prefix,
XWikiContext context)
Adds an object from an new object creation form. |
BaseObject |
addXObjectFromRequest(EntityReference classReference,
String prefix,
int num,
XWikiContext context)
Adds object from an new object creation form. |
BaseObject |
addXObjectFromRequest(EntityReference classReference,
XWikiContext context)
Adds an object from an new object creation form. |
BaseObject |
addXObjectFromRequest(XWikiContext context)
Adds an object from an new object creation form. |
List<BaseObject> |
addXObjectsFromRequest(DocumentReference classReference,
String pref,
XWikiContext context)
Adds multiple objects from an new objects creation form. |
List<BaseObject> |
addXObjectsFromRequest(DocumentReference classReference,
XWikiContext context)
Adds multiple objects from an new objects creation form. |
void |
addXObjectsToRemoveFromVersion(XWikiDocument previousVersion)
Automatically add objects present in the old version, but not in the current document, to the list of objects marked for removal from the database. |
void |
addXObjectToRemove(BaseObject object)
|
void |
appendMeta(String meta)
|
boolean |
apply(XWikiDocument document)
Apply modification comming from provided document. |
boolean |
apply(XWikiDocument document,
boolean clean)
Apply modification comming from provided document. |
static void |
backupContext(Map<String,Object> backup,
XWikiContext context)
|
XWikiDocument |
clone()
|
void |
cloneXObjects(XWikiDocument templatedoc)
|
void |
clonexWikiObjects(XWikiDocument templatedoc)
Deprecated. since 2.2M1 use cloneXObjects(XWikiDocument) instead |
static boolean |
containsXMLWikiDocument(org.dom4j.Document domdoc)
Check if provided xml document is a wiki document. |
void |
convertSyntax(String targetSyntaxId,
XWikiContext context)
Convert the current document content from its current syntax to the new syntax passed as parameter. |
void |
convertSyntax(org.xwiki.rendering.syntax.Syntax targetSyntax,
XWikiContext context)
Convert the current document content from its current syntax to the new syntax passed as parameter. |
void |
copyAttachments(XWikiDocument sourceDocument)
Copy attachments from one document to another. |
XWikiDocument |
copyDocument(DocumentReference newDocumentReference,
XWikiContext context)
|
XWikiDocument |
copyDocument(String newDocumentName,
XWikiContext context)
Deprecated. since 2.2M1 use copyDocument(DocumentReference, XWikiContext) instead |
int |
createNewObject(String className,
XWikiContext context)
Deprecated. since 2.2M1 use createXObject(EntityReference, XWikiContext) instead |
int |
createXObject(EntityReference classReference,
XWikiContext context)
Create and add a new object to the document with the provided class. |
void |
deleteAttachment(XWikiAttachment attachment,
boolean toRecycleBin,
XWikiContext context)
|
void |
deleteAttachment(XWikiAttachment attachment,
XWikiContext context)
|
String |
display(String fieldname,
BaseObject obj,
XWikiContext context)
|
String |
display(String fieldname,
String type,
BaseObject obj,
String wrappingSyntaxId,
XWikiContext context)
|
String |
display(String fieldname,
String type,
BaseObject obj,
XWikiContext context)
|
String |
display(String fieldname,
String type,
String pref,
BaseObject obj,
String wrappingSyntaxId,
XWikiContext context)
|
String |
display(String fieldname,
String type,
String pref,
BaseObject obj,
XWikiContext context)
|
String |
display(String fieldname,
String mode,
String prefix,
XWikiContext context)
|
String |
display(String fieldname,
String mode,
XWikiContext context)
|
String |
display(String fieldname,
XWikiContext context)
|
String |
displayEdit(PropertyClass pclass,
String prefix,
BaseCollection object,
XWikiContext context)
|
String |
displayForm(DocumentReference classReference,
String header,
String format,
boolean linebreak,
XWikiContext context)
|
String |
displayForm(DocumentReference classReference,
String header,
String format,
XWikiContext context)
|
String |
displayForm(DocumentReference classReference,
XWikiContext context)
|
String |
displayForm(String className,
String header,
String format,
boolean linebreak,
XWikiContext context)
Deprecated. since 2.2M1, use displayForm(DocumentReference, String, String, boolean, XWikiContext)
instead |
String |
displayForm(String className,
String header,
String format,
XWikiContext context)
Deprecated. since 2.2M1, use displayForm(DocumentReference, String, String, XWikiContext) instead |
String |
displayForm(String className,
XWikiContext context)
Deprecated. since 2.2M1, use displayForm(DocumentReference, XWikiContext) instead |
String |
displayHidden(PropertyClass pclass,
String prefix,
BaseCollection object,
XWikiContext context)
|
String |
displayPrettyName(String fieldname,
BaseObject obj,
XWikiContext context)
|
String |
displayPrettyName(String fieldname,
boolean showMandatory,
BaseObject obj,
XWikiContext context)
|
String |
displayPrettyName(String fieldname,
boolean showMandatory,
boolean before,
BaseObject obj,
XWikiContext context)
|
String |
displayPrettyName(String fieldname,
boolean showMandatory,
boolean before,
XWikiContext context)
|
String |
displayPrettyName(String fieldname,
boolean showMandatory,
XWikiContext context)
|
String |
displayPrettyName(String fieldname,
XWikiContext context)
|
String |
displayRendered(PropertyClass pclass,
String prefix,
BaseCollection object,
XWikiContext context)
|
String |
displayTooltip(String fieldname,
BaseObject obj,
XWikiContext context)
|
String |
displayTooltip(String fieldname,
XWikiContext context)
|
String |
displayView(PropertyClass pclass,
String prefix,
BaseCollection object,
XWikiContext context)
|
XWikiDocument |
duplicate(DocumentReference newDocumentReference)
Duplicate this document and give it a new name. |
void |
duplicateXObjects(XWikiDocument templatedoc)
|
protected String |
encodedXMLStringAsUTF8(String xmlString)
|
boolean |
equals(Object object)
|
boolean |
equalsData(XWikiDocument doc)
Same as equals(Object) but only for actual datas of the document. |
void |
fromXML(org.dom4j.Document domdoc,
boolean withArchive)
|
void |
fromXML(InputStream is)
|
void |
fromXML(InputStream in,
boolean withArchive)
|
void |
fromXML(String xml)
|
void |
fromXML(String xml,
boolean withArchive)
|
XWikiAttachment |
getAttachment(String filename)
|
List<AttachmentDiff> |
getAttachmentDiff(XWikiDocument fromDoc,
XWikiDocument toDoc,
XWikiContext context)
|
List<XWikiAttachment> |
getAttachmentList()
|
String |
getAttachmentRevisionURL(String filename,
String revision,
String querystring,
XWikiContext context)
|
String |
getAttachmentRevisionURL(String filename,
String revision,
XWikiContext context)
|
XWikiAttachmentStoreInterface |
getAttachmentStore(XWikiContext context)
|
String |
getAttachmentURL(String filename,
String action,
String querystring,
XWikiContext context)
|
String |
getAttachmentURL(String filename,
String action,
XWikiContext context)
|
String |
getAttachmentURL(String filename,
XWikiContext context)
|
String |
getAuthor()
Deprecated. since 3.0M3 use getAuthorReference() instead |
DocumentReference |
getAuthorReference()
|
List<String> |
getBackLinkedPages(XWikiContext context)
Deprecated. since 2.2M2 use getBackLinkedReferences(XWikiContext) |
List<DocumentReference> |
getBackLinkedReferences(XWikiContext context)
Get the wiki document references pointing to this document. |
List<String> |
getChildren(int nb,
int start,
XWikiContext context)
Deprecated. since 2.2M2 use getChildrenReferences(XWikiContext) |
List<String> |
getChildren(XWikiContext context)
Deprecated. since 2.2M2 use getChildrenReferences(XWikiContext) |
List<DocumentReference> |
getChildrenReferences(int nb,
int start,
XWikiContext context)
Returns a list of references of all documents which list this document as their parent |
List<DocumentReference> |
getChildrenReferences(XWikiContext context)
Returns a list of references of all documents which list this document as their parent getChildren(int, int, com.xpn.xwiki.XWikiContext) |
List<List<ObjectDiff>> |
getClassDiff(XWikiDocument fromDoc,
XWikiDocument toDoc,
XWikiContext context)
|
String |
getComment()
|
Vector<BaseObject> |
getComments()
|
Vector<BaseObject> |
getComments(boolean asc)
|
String |
getContent()
|
String |
getContentAuthor()
Deprecated. since 3.0M3 use getContentAuthorReference() instead |
DocumentReference |
getContentAuthorReference()
|
List<org.suigeneris.jrcs.diff.delta.Delta> |
getContentDiff(String fromRev,
String toRev,
XWikiContext context)
|
List<org.suigeneris.jrcs.diff.delta.Delta> |
getContentDiff(String fromRev,
XWikiContext context)
|
List<org.suigeneris.jrcs.diff.delta.Delta> |
getContentDiff(XWikiDocument fromDoc,
XWikiDocument toDoc,
XWikiContext context)
|
String |
getContentOfSection(int sectionNumber)
Return the content of a section. |
Date |
getContentUpdateDate()
|
Date |
getCreationDate()
|
String |
getCreator()
Deprecated. since 3.0M2 use getCreatorReference() instead |
DocumentReference |
getCreatorReference()
|
String |
getCustomClass()
|
String |
getDatabase()
Deprecated. since 2.2M1 use getDocumentReference() instead |
Date |
getDate()
|
String |
getDefaultEditMode(XWikiContext context)
Gets the default edit mode for this document. |
String |
getDefaultEditURL(XWikiContext context)
|
String |
getDefaultLanguage()
Deprecated. since 4.3M2 use getDefaultLocale() instead |
Locale |
getDefaultLocale()
|
String |
getDefaultTemplate()
|
protected List<org.suigeneris.jrcs.diff.delta.Delta> |
getDeltas(org.suigeneris.jrcs.diff.Revision rev)
|
XWikiDocumentArchive |
getDocumentArchive()
|
XWikiDocumentArchive |
getDocumentArchive(XWikiContext context)
|
DocumentReference |
getDocumentReference()
|
DocumentSection |
getDocumentSection(int sectionNumber)
Return a Document section with parameter is sectionNumber. |
String |
getEditURL(String action,
String mode,
String language,
XWikiContext context)
|
String |
getEditURL(String action,
String mode,
XWikiContext context)
|
protected String |
getElement(org.dom4j.Element docel,
String name)
|
int |
getElements()
|
String |
getEscapedContent(XWikiContext context)
|
String |
getExternalAttachmentURL(String filename,
String action,
XWikiContext context)
|
String |
getExternalURL(String action,
String querystring,
XWikiContext context)
|
String |
getExternalURL(String action,
XWikiContext context)
|
BaseObject |
getFirstObject(String fieldname)
|
BaseObject |
getFirstObject(String fieldname,
XWikiContext context)
|
String |
getFormat()
|
String |
getFullName()
Deprecated. since 2.2M1 use getDocumentReference() instead |
long |
getId()
|
List<String> |
getIncludedMacros(XWikiContext context)
|
List<String> |
getIncludedPages(XWikiContext context)
|
String |
getInternalProperty(String propname)
|
static String |
getInternalPropertyName(String propname,
XWikiContext context)
|
int |
getIntValue(DocumentReference classReference,
String fieldName)
|
int |
getIntValue(String fieldName)
|
int |
getIntValue(String className,
String fieldName)
Deprecated. since 2.2M2 use getIntValue(DocumentReference, String) instead |
String |
getKey()
Temporary helper to produce a uid serialization of this document reference, including the locale. |
String |
getLanguage()
Deprecated. since 4.3M2 use getLocale() instead |
List<org.suigeneris.jrcs.diff.delta.Delta> |
getLastChanges(XWikiContext context)
|
List |
getListValue(DocumentReference classReference,
String fieldName)
|
List |
getListValue(String fieldName)
|
List |
getListValue(String className,
String fieldName)
Deprecated. since 2.2M2 use getListValue(DocumentReference, String) instead |
Locale |
getLocale()
|
XWikiLock |
getLock(XWikiContext context)
|
long |
getLongValue(DocumentReference classReference,
String fieldName)
|
long |
getLongValue(String fieldName)
|
long |
getLongValue(String className,
String fieldName)
Deprecated. since 2.2M2 use getLongValue(DocumentReference, String) instead |
String |
getMeta()
|
List<MetaDataDiff> |
getMetaDataDiff(String fromRev,
String toRev,
XWikiContext context)
|
List<MetaDataDiff> |
getMetaDataDiff(String fromRev,
XWikiContext context)
|
List<MetaDataDiff> |
getMetaDataDiff(XWikiDocument fromDoc,
XWikiDocument toDoc,
XWikiContext context)
|
protected Boolean |
getMinorEdit1()
|
String |
getName()
Deprecated. since 2.2M1 used getDocumentReference() instead |
BaseObject |
getObject(String className)
Deprecated. since 2.2M1 use getXObject(DocumentReference) instead |
BaseObject |
getObject(String className,
boolean create,
XWikiContext context)
Deprecated. since 2.2M2 use getXObject(DocumentReference, boolean, XWikiContext) |
BaseObject |
getObject(String className,
int nb)
Deprecated. since 2.2M1 use getXObject(DocumentReference, int) instead |
BaseObject |
getObject(String className,
String key,
String value)
Deprecated. since 2.2M1 use getXObject(DocumentReference, String, String) instead |
BaseObject |
getObject(String className,
String key,
String value,
boolean failover)
Deprecated. since 2.2M1 use getXObject(DocumentReference, String, String, boolean) instead |
List<List<ObjectDiff>> |
getObjectDiff(String fromRev,
String toRev,
XWikiContext context)
|
List<List<ObjectDiff>> |
getObjectDiff(String fromRev,
XWikiContext context)
|
List<List<ObjectDiff>> |
getObjectDiff(XWikiDocument fromDoc,
XWikiDocument toDoc,
XWikiContext context)
Return the object differences between two document versions. |
int |
getObjectNumbers(String className)
Deprecated. since 2.2M1 use getXObjectSize(DocumentReference) instead |
Vector<BaseObject> |
getObjects(String className)
Deprecated. since 2.2M1 use getXObjects(DocumentReference) instead |
ArrayList<BaseObject> |
getObjectsToRemove()
Deprecated. since 2.2M2 use getObjectsToRemove() instead |
XWikiDocument |
getOriginalDocument()
|
String |
getPageName()
Deprecated. since 2.2M1 use getDocumentReference() instead |
String |
getParent()
Deprecated. since 2.2M1 use getParentReference() instead |
XWikiDocument |
getParentDoc()
Deprecated. since 2.2M1 use getParentReference() instead |
DocumentReference |
getParentReference()
|
String |
getParentURL(XWikiContext context)
|
String |
getPrefixedFullName()
Deprecated. since 2.2M1 use getDocumentReference() instead |
String |
getPreviousVersion()
|
org.suigeneris.jrcs.rcs.Version |
getRCSVersion()
|
String |
getRealLanguage()
Deprecated. since 4.3M1 use getRealLocale() instead |
String |
getRealLanguage(XWikiContext context)
Deprecated. since 4.3M1 use getRealLocale() instead |
Locale |
getRealLocale()
|
String[] |
getRecentRevisions(int nb,
XWikiContext context)
|
protected EntityReference |
getRelativeParentReference()
|
String |
getRenderedContent(String text,
String syntaxId,
boolean restrictedTransformationContext,
XWikiContext context)
|
String |
getRenderedContent(String text,
String sourceSyntaxId,
String targetSyntaxId,
boolean restrictedTransformationContext,
XWikiContext context)
|
String |
getRenderedContent(String text,
String sourceSyntaxId,
String targetSyntaxId,
XWikiContext context)
|
String |
getRenderedContent(String text,
String syntaxId,
XWikiContext context)
|
String |
getRenderedContent(org.xwiki.rendering.syntax.Syntax targetSyntax,
boolean isolateVelocityMacros,
XWikiContext context)
|
String |
getRenderedContent(org.xwiki.rendering.syntax.Syntax targetSyntax,
XWikiContext context)
|
String |
getRenderedContent(XWikiContext context)
|
List<org.suigeneris.jrcs.diff.delta.Delta> |
getRenderedContentDiff(String fromRev,
String toRev,
XWikiContext context)
|
List<org.suigeneris.jrcs.diff.delta.Delta> |
getRenderedContentDiff(String fromRev,
XWikiContext context)
|
List<org.suigeneris.jrcs.diff.delta.Delta> |
getRenderedContentDiff(XWikiDocument fromDoc,
XWikiDocument toDoc,
XWikiContext context)
|
String |
getRenderedTitle(org.xwiki.rendering.syntax.Syntax outputSyntax,
XWikiContext context)
Get the rendered version of the document title. |
XWikiRCSNodeInfo |
getRevisionInfo(String version,
XWikiContext context)
|
List<String> |
getRevisions(RevisionCriteria criteria,
XWikiContext context)
Get document versions matching criterias like author, minimum creation date, etc. |
org.suigeneris.jrcs.rcs.Version[] |
getRevisions(XWikiContext context)
|
List<DocumentSection> |
getSections()
Get the top sections contained in the document. |
String |
getSpace()
Deprecated. since 2.2M1 used getDocumentReference() instead |
String |
getSpaceName()
Deprecated. since 2.2M1 use getDocumentReference() instead |
XWikiStoreInterface |
getStore()
|
XWikiStoreInterface |
getStore(XWikiContext context)
|
String |
getStringValue(DocumentReference classReference,
String fieldName)
|
String |
getStringValue(String fieldName)
|
String |
getStringValue(String className,
String fieldName)
Deprecated. since 2.2M2 use getStringValue(DocumentReference, String) instead |
org.xwiki.rendering.syntax.Syntax |
getSyntax()
|
String |
getSyntaxId()
Deprecated. since 2.3M1, use {link #getSyntax()} instead |
String |
getTags(XWikiContext context)
|
List<String> |
getTagsList(XWikiContext context)
|
List<String> |
getTagsPossibleValues(XWikiContext context)
|
String |
getTemplate()
Deprecated. since 2.2M1 use getTemplateDocumentReference() instead |
DocumentReference |
getTemplateDocumentReference()
|
String |
getTitle()
|
String |
getTranslatedContent(String language,
XWikiContext context)
|
String |
getTranslatedContent(XWikiContext context)
|
XWikiDocument |
getTranslatedDocument(Locale locale,
XWikiContext context)
Return the document in the provided language. |
XWikiDocument |
getTranslatedDocument(String language,
XWikiContext context)
Deprecated. since 4.3M2 use getTranslatedDocument(Locale, XWikiContext) insead |
XWikiDocument |
getTranslatedDocument(XWikiContext context)
|
int |
getTranslation()
|
List<String> |
getTranslationList(XWikiContext context)
|
Set<String> |
getUniqueLinkedPages(XWikiContext context)
Extract all the unique static (i.e. |
Set<XWikiLink> |
getUniqueWikiLinkedPages(XWikiContext context)
Get a list of unique links from this document to others documents. |
String |
getURL(String action,
boolean redirect,
XWikiContext context)
|
String |
getURL(String action,
String params,
boolean redirect,
XWikiContext context)
|
String |
getURL(String action,
String querystring,
String anchor,
XWikiContext context)
|
String |
getURL(String action,
String querystring,
XWikiContext context)
|
String |
getURL(String action,
XWikiContext context)
|
String |
getValidationScript()
|
String |
getVersion()
|
String |
getVersionHashCode(XWikiContext context)
Computes a document hash, taking into account all document data: content, objects, attachments, metadata... |
XWikiVersioningStoreInterface |
getVersioningStore(XWikiContext context)
|
String |
getWeb()
Deprecated. use getDocumentReference() instead |
String |
getWikiName()
Deprecated. since 2.2M1 use getDocumentReference() instead |
Object |
getWikiNode()
|
BaseClass |
getXClass()
|
List<BaseClass> |
getXClasses(XWikiContext context)
|
String |
getXClassXML()
|
org.xwiki.rendering.block.XDOM |
getXDOM()
NOTE: This method caches the XDOM and returns a clone that can be safely modified. |
String |
getXMLContent(XWikiContext context)
Retrieve the document in the current context language as an XML string. |
List<org.suigeneris.jrcs.diff.delta.Delta> |
getXMLDiff(XWikiDocument fromDoc,
XWikiDocument toDoc,
XWikiContext context)
|
BaseObject |
getXObject()
|
BaseObject |
getXObject(DocumentReference classReference)
|
BaseObject |
getXObject(DocumentReference classReference,
boolean create,
XWikiContext context)
|
BaseObject |
getXObject(DocumentReference classReference,
int nb)
|
BaseObject |
getXObject(DocumentReference classReference,
String key,
String value)
|
BaseObject |
getXObject(DocumentReference classReference,
String key,
String value,
boolean failover)
|
BaseObject |
getXObject(EntityReference reference)
|
BaseObject |
getXObject(EntityReference classReference,
boolean create,
XWikiContext context)
|
BaseObject |
getXObject(EntityReference classReference,
int nb)
|
BaseObject |
getXObject(ObjectReference objectReference)
Get an object of this document based on its reference. |
BaseProperty<ObjectPropertyReference> |
getXObjectProperty(ObjectPropertyReference objectPropertyReference)
Get an object property of this document based on its reference. |
Map<DocumentReference,List<BaseObject>> |
getXObjects()
|
List<BaseObject> |
getXObjects(DocumentReference classReference)
|
List<BaseObject> |
getXObjects(EntityReference reference)
|
int |
getXObjectSize(DocumentReference classReference)
|
List<BaseObject> |
getXObjectsToRemove()
|
String |
getxWikiClassXML()
Deprecated. since 2.2M1 use getXClassXML() instead Hibernate uses this through reflection. It cannot be
removed without altering hibernate.cfg.xml |
BaseObject |
getxWikiObject()
Deprecated. since 2.2M1 use getXObject() instead |
boolean |
hasElement(int element)
|
int |
hashCode()
|
void |
incrementVersion()
|
void |
insertText(String text,
String marker,
XWikiContext context)
|
boolean |
is10Syntax()
|
boolean |
is10Syntax(String syntaxId)
|
boolean |
isAdvancedContent()
|
boolean |
isContentDirty()
|
boolean |
isCreator(DocumentReference username)
|
boolean |
isCreator(String username)
Deprecated. use isCreator(DocumentReference) instead |
boolean |
isCurrentLocalUserPage(XWikiContext context)
|
boolean |
isCurrentUserCreator(XWikiContext context)
|
boolean |
isCurrentUserPage(XWikiContext context)
|
boolean |
isFromCache()
|
Boolean |
isHidden()
Indicates whether the document is 'hidden' or not, meaning that it should not be returned in public search results. |
boolean |
isMetaDataDirty()
|
boolean |
isMinorEdit()
|
boolean |
isMostRecent()
|
boolean |
isNew()
|
boolean |
isProgrammaticContent()
|
void |
loadArchive(XWikiContext context)
|
void |
loadAttachmentContent(XWikiAttachment attachment,
XWikiContext context)
|
void |
loadAttachments(XWikiContext context)
|
XWikiDocumentArchive |
loadDocumentArchive()
|
MergeResult |
merge(XWikiDocument previousDocument,
XWikiDocument newDocument,
MergeConfiguration configuration,
XWikiContext context)
Apply a 3 ways merge on the current document based on provided previous and new version of the document. |
void |
mergeXClass(XWikiDocument templatedoc)
|
void |
mergeXObjects(XWikiDocument templateDoc)
|
void |
mergexWikiClass(XWikiDocument templatedoc)
Deprecated. since 2.2M1 use mergeXClass(XWikiDocument) instead |
void |
mergexWikiObjects(XWikiDocument templatedoc)
Deprecated. since 2.2M1 use mergeXObjects(XWikiDocument) instead |
Document |
newDocument(Class<?> customClass,
XWikiContext context)
Create a new protected Document public API to access page information and actions from
scripting. |
Document |
newDocument(String customClassName,
XWikiContext context)
Create a new protected Document public API to access page information and actions from
scripting. |
Document |
newDocument(XWikiContext context)
|
BaseObject |
newObject(String className,
XWikiContext context)
Deprecated. since 2.2M2 use newXObject(EntityReference, XWikiContext) |
BaseObject |
newXObject(EntityReference classReference,
XWikiContext context)
Create, add and return a new object with the provided class. |
void |
readDocMetaFromForm(EditForm eform,
XWikiContext context)
|
void |
readFromForm(EditForm eform,
XWikiContext context)
|
void |
readFromTemplate(DocumentReference templateDocumentReference,
XWikiContext context)
|
void |
readFromTemplate(EditForm eform,
XWikiContext context)
|
void |
readFromTemplate(String template,
XWikiContext context)
Deprecated. since 2.2M1 use readFromTemplate(DocumentReference, XWikiContext) instead |
void |
readObjectsFromForm(EditForm eform,
XWikiContext context)
|
void |
readTranslationMetaFromForm(EditForm eform,
XWikiContext context)
|
void |
removeLock(XWikiContext context)
|
boolean |
removeObject(BaseObject object)
Deprecated. since 2.2M1, use removeXObject(com.xpn.xwiki.objects.BaseObject) instead |
boolean |
removeObjects(String className)
Deprecated. since 2.2M1 use removeXObjects(org.xwiki.model.reference.DocumentReference) instead |
boolean |
removeXObject(BaseObject object)
Remove an XObject from the document. |
boolean |
removeXObjects(DocumentReference classReference)
Remove all the objects of a given type (XClass) from the document. |
boolean |
removeXObjects(EntityReference reference)
Remove all the objects of a given type (XClass) from the document. |
void |
rename(DocumentReference newDocumentReference,
List<DocumentReference> backlinkDocumentReferences,
List<DocumentReference> childDocumentReferences,
XWikiContext context)
Same as rename(String, List, XWikiContext) but the list of documents having the current document as
their parent is passed in parameter. |
void |
rename(DocumentReference newDocumentReference,
List<DocumentReference> backlinkDocumentReferences,
XWikiContext context)
Rename the current document and all the links pointing to it in the list of passed backlink documents. |
void |
rename(DocumentReference newDocumentReference,
XWikiContext context)
Rename the current document and all the backlinks leading to it. |
void |
rename(String newDocumentName,
List<String> backlinkDocumentNames,
List<String> childDocumentNames,
XWikiContext context)
Deprecated. since 2.2M2 use rename(DocumentReference, List, List, com.xpn.xwiki.XWikiContext) |
void |
rename(String newDocumentName,
List<String> backlinkDocumentNames,
XWikiContext context)
Deprecated. since 2.2M2 use rename(DocumentReference, java.util.List, com.xpn.xwiki.XWikiContext) |
void |
rename(String newDocumentName,
XWikiContext context)
Deprecated. since 2.2M2 use rename(DocumentReference, XWikiContext) |
void |
renameProperties(DocumentReference classReference,
Map<String,String> fieldsToRename)
|
void |
renameProperties(String className,
Map<String,String> fieldsToRename)
Deprecated. since 2.2M2 use renameProperties(DocumentReference, Map) instead |
protected static String |
renderXDOM(org.xwiki.rendering.block.XDOM content,
org.xwiki.rendering.syntax.Syntax targetSyntax)
Render privided XDOM into content of the provided syntax identifier. |
void |
resetArchive(XWikiContext context)
|
DocumentReference |
resolveClassReference(String documentName)
Backward-compatibility method to use in order to resolve a class reference passed as a String into a DocumentReference proper. |
static void |
restoreContext(Map<String,Object> backup,
XWikiContext context)
|
void |
saveAllAttachments(boolean updateParent,
boolean transaction,
XWikiContext context)
|
void |
saveAllAttachments(XWikiContext context)
|
void |
saveAttachmentContent(XWikiAttachment attachment,
boolean bParentUpdate,
boolean bTransaction,
XWikiContext context)
|
void |
saveAttachmentContent(XWikiAttachment attachment,
XWikiContext context)
|
void |
saveAttachmentsContent(List<XWikiAttachment> attachments,
XWikiContext context)
|
void |
setAsContextDoc(XWikiContext context)
|
void |
setAttachmentList(List<XWikiAttachment> list)
|
void |
setAuthor(String author)
Deprecated. since 3.0M3 use setAuthorReference(org.xwiki.model.reference.DocumentReference) instead |
void |
setAuthorReference(DocumentReference authorReference)
|
void |
setComment(String comment)
|
void |
setContent(String content)
|
void |
setContent(org.xwiki.rendering.block.XDOM content)
|
void |
setContentAuthor(String contentAuthor)
Deprecated. since 3.0M3 use setContentAuthorReference(org.xwiki.model.reference.DocumentReference) instead |
void |
setContentAuthorReference(DocumentReference contentAuthorReference)
|
void |
setContentDirty(boolean contentDirty)
|
void |
setContentUpdateDate(Date date)
|
void |
setCreationDate(Date date)
|
void |
setCreator(String creator)
Deprecated. since 3.0M2 use setCreatorReference(org.xwiki.model.reference.DocumentReference) instead |
void |
setCreatorReference(DocumentReference creatorReference)
|
void |
setCustomClass(String customClass)
|
void |
setDatabase(String database)
Deprecated. since 2.2M1 use setDocumentReference(DocumentReference) instead |
void |
setDate(Date date)
|
void |
setDBStringListValue(EntityReference classReference,
String fieldName,
List value)
|
void |
setDBStringListValue(String className,
String fieldName,
List value)
Deprecated. since 2.2M2 use setDBStringListValue(EntityReference, String, List) instead |
void |
setDefaultLanguage(String defaultLanguage)
Deprecated. since 4.3M2 use setDefaultLocale(Locale) instead |
void |
setDefaultLocale(Locale defaultLocale)
|
void |
setDefaultTemplate(String defaultTemplate)
|
void |
setDocumentArchive(String sarch)
|
void |
setDocumentArchive(XWikiDocumentArchive arch)
|
void |
setDocumentReference(DocumentReference reference)
Deprecated. since 2.2.3 don't change the reference of a document once it's been constructed. Instead you can clone the doc, rename it or copy it. |
void |
setElement(int element,
boolean toggle)
|
void |
setElements(int elements)
|
void |
setFormat(String format)
|
void |
setFromCache(boolean fromCache)
|
void |
setFullName(String name)
Deprecated. since 2.2M1 use setDocumentReference(org.xwiki.model.reference.DocumentReference) instead |
void |
setFullName(String fullName,
XWikiContext context)
Deprecated. since 2.2M1 use setDocumentReference(org.xwiki.model.reference.DocumentReference) instead |
void |
setHidden(Boolean hidden)
Indicates whether the document should be 'hidden' or not, meaning that it should not be returned in public search results. |
void |
setId(long id)
|
void |
setIntValue(EntityReference classReference,
String fieldName,
int value)
|
void |
setIntValue(String className,
String fieldName,
int value)
Deprecated. since 2.2M2 use setIntValue(EntityReference, String, int) instead |
void |
setLanguage(String language)
Deprecated. since 4.3M2 use setLocale(Locale) instead |
void |
setLargeStringValue(EntityReference classReference,
String fieldName,
String value)
|
void |
setLargeStringValue(String className,
String fieldName,
String value)
Deprecated. since 2.2M2 use setLargeStringValue(EntityReference, String, String) instead |
void |
setLocale(Locale locale)
|
void |
setLock(String userName,
XWikiContext context)
|
void |
setMeta(String meta)
|
void |
setMetaDataDirty(boolean metaDataDirty)
|
void |
setMinorEdit(boolean isMinor)
|
protected void |
setMinorEdit1(Boolean isMinor)
|
void |
setMostRecent(boolean mostRecent)
must not be used unless in store system. |
void |
setName(String name)
Deprecated. since 2.2M1 used setDocumentReference(DocumentReference) instead |
void |
setNew(boolean aNew)
|
void |
setObject(String className,
int nb,
BaseObject object)
Deprecated. since 2.2M1 use setXObject(DocumentReference, int, BaseObject) instead |
void |
setOriginalDocument(XWikiDocument originalDocument)
|
void |
setParent(String parent)
Deprecated. since 2.2M1 used setParentReference(DocumentReference) instead |
void |
setParentReference(DocumentReference parentReference)
Deprecated. since 2.2.3 use setParentReference(org.xwiki.model.reference.EntityReference) instead |
void |
setParentReference(EntityReference parentReference)
|
void |
setProperty(EntityReference classReference,
String fieldName,
BaseProperty value)
|
void |
setProperty(String className,
String fieldName,
BaseProperty value)
Deprecated. since 2.2M2 use setProperty(EntityReference, String, BaseProperty) instead |
void |
setRCSVersion(org.suigeneris.jrcs.rcs.Version version)
|
void |
setSpace(String space)
Deprecated. since 2.2M1 used setDocumentReference(DocumentReference) instead |
void |
setStore(XWikiStoreInterface store)
|
void |
setStringListValue(EntityReference classReference,
String fieldName,
List value)
|
void |
setStringListValue(String className,
String fieldName,
List value)
Deprecated. since 2.2M2 use setStringListValue(EntityReference, String, List) instead |
void |
setStringValue(EntityReference classReference,
String fieldName,
String value)
|
void |
setStringValue(String className,
String fieldName,
String value)
Deprecated. since 2.2M2 use setStringValue(EntityReference, String, String) instead |
void |
setSyntax(org.xwiki.rendering.syntax.Syntax syntax)
|
void |
setSyntaxId(String syntaxId)
Deprecated. since 2.3M1, use {link #setSyntax(Syntax)} instead |
void |
setTags(String tagsStr,
XWikiContext context)
add tags to the document. |
void |
setTemplate(String template)
Deprecated. since 2.2M1 use setTemplateDocumentReference(DocumentReference) instead |
void |
setTemplateDocumentReference(DocumentReference templateDocumentReference)
|
void |
setTitle(String title)
|
void |
setTranslation(int translation)
|
void |
setValidationScript(String validationScript)
|
void |
setVersion(String version)
|
void |
setWeb(String space)
Deprecated. use setDocumentReference(DocumentReference) instead |
void |
setWikiNode(Object wikiNode)
|
void |
setXClass(BaseClass xwikiClass)
|
void |
setXClassXML(String xClassXML)
|
void |
setXObject(DocumentReference classReference,
int nb,
BaseObject object)
Deprecated. use setXObject(int, BaseObject) instead |
void |
setXObject(int nb,
BaseObject object)
Replaces the object at the specified position and for the specified object xclass. |
void |
setXObjects(DocumentReference classReference,
List<BaseObject> objects)
|
void |
setXObjects(Map<DocumentReference,List<BaseObject>> objects)
|
void |
setXObjectsToRemove(List<BaseObject> objectsToRemove)
|
void |
setxWikiClassXML(String xClassXML)
Deprecated. since 2.2M1 use setXClassXML(String) ()} instead Hibernate uses this through reflection. It
cannot be removed without altering hibernate.cfg.xml |
String |
toFullXML(XWikiContext context)
Retrieve the document as an XML string. |
String |
toString()
|
String |
toXML(boolean bWithObjects,
boolean bWithRendering,
boolean bWithAttachmentContent,
boolean bWithVersions,
XWikiContext context)
Serialize the document to an XML string. |
String |
toXML(org.dom4j.Document doc,
XWikiContext context)
Deprecated. this method has nothing to do here and is apparently unused |
void |
toXML(OutputStream out,
boolean bWithObjects,
boolean bWithRendering,
boolean bWithAttachmentContent,
boolean bWithVersions,
XWikiContext context)
Serialize the document to an OutputStream. |
void |
toXML(com.xpn.xwiki.internal.xml.XMLWriter wr,
boolean bWithObjects,
boolean bWithRendering,
boolean bWithAttachmentContent,
boolean bWithVersions,
XWikiContext context)
Serialize the document to a XMLWriter . |
String |
toXML(XWikiContext context)
Retrieve the document as an XML string. |
org.dom4j.Document |
toXMLDocument(boolean bWithObjects,
boolean bWithRendering,
boolean bWithAttachmentContent,
boolean bWithVersions,
XWikiContext context)
Serialize the document to an XML DOMDocument . |
org.dom4j.Document |
toXMLDocument(XWikiContext context)
Serialize the document to an XML DOMDocument . |
String |
updateDocumentSection(int sectionNumber,
String newSectionContent)
Update a section content in document. |
BaseObject |
updateObjectFromRequest(String className,
String prefix,
int num,
XWikiContext context)
Deprecated. since 2.2M2 use updateXObjectFromRequest(EntityReference, String, int, XWikiContext) |
BaseObject |
updateObjectFromRequest(String className,
String prefix,
XWikiContext context)
Deprecated. since 2.2M2 use updateXObjectFromRequest(EntityReference, String, XWikiContext) |
BaseObject |
updateObjectFromRequest(String className,
XWikiContext context)
Deprecated. since 2.2M2 use updateXObjectFromRequest(EntityReference, XWikiContext) |
List<BaseObject> |
updateObjectsFromRequest(String className,
String pref,
XWikiContext context)
Deprecated. since 2.2M2 use updateXObjectsFromRequest(EntityReference, String, XWikiContext) |
List<BaseObject> |
updateObjectsFromRequest(String className,
XWikiContext context)
Deprecated. since 2.2M2 use updateXObjectsFromRequest(EntityReference, XWikiContext) |
BaseObject |
updateXObjectFromRequest(EntityReference classReference,
String prefix,
int num,
XWikiContext context)
Adds an object from an new object creation form. |
BaseObject |
updateXObjectFromRequest(EntityReference classReference,
String prefix,
XWikiContext context)
Adds an object from an new object creation form. |
BaseObject |
updateXObjectFromRequest(EntityReference classReference,
XWikiContext context)
Adds an object from an new object creation form. |
List<BaseObject> |
updateXObjectsFromRequest(EntityReference classReference,
String pref,
XWikiContext context)
Adds multiple objects from an new objects creation form. |
List<BaseObject> |
updateXObjectsFromRequest(EntityReference classReference,
XWikiContext context)
Adds an object from an new object creation form. |
boolean |
validate(String[] classNames,
XWikiContext context)
|
boolean |
validate(XWikiContext context)
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final EntityReference COMMENTSCLASS_REFERENCE
public static final EntityReference SHEETCLASS_REFERENCE
protected org.suigeneris.jrcs.rcs.Version version
public static final int HAS_ATTACHMENTS
public static final int HAS_OBJECTS
public static final int HAS_CLASS
public static final String DB_SPACE_SEP
public static final String SPACE_NAME_SEP
protected DocumentReferenceResolver<String> currentDocumentReferenceResolver
protected DocumentReferenceResolver<String> explicitDocumentReferenceResolver
protected EntityReferenceResolver<String> xClassEntityReferenceResolver
protected DocumentReferenceResolver<String> currentMixedDocumentReferenceResolver
protected DocumentReferenceResolver<EntityReference> currentReferenceDocumentReferenceResolver
protected DocumentReferenceResolver<EntityReference> explicitReferenceDocumentReferenceResolver
protected EntityReferenceResolver<String> relativeEntityReferenceResolver
protected EntityReferenceSerializer<String> compactEntityReferenceSerializer
protected EntityReferenceSerializer<String> defaultEntityReferenceSerializer
protected EntityReferenceSerializer<String> compactWikiEntityReferenceSerializer
protected EntityReferenceSerializer<String> localEntityReferenceSerializer
protected EntityReferenceSerializer<String> uidStringEntityReferenceSerializer
protected EntityReferenceSerializer<String> localUidStringEntityReferenceSerializer
protected ObjectReferenceResolver<EntityReference> currentReferenceObjectReferenceResolver
protected org.xwiki.rendering.syntax.SyntaxFactory syntaxFactory
Syntax
objects.
Constructor Detail |
---|
public XWikiDocument(DocumentReference reference)
@Deprecated public XWikiDocument()
XWikiDocument(org.xwiki.model.reference.DocumentReference)
instead
@Deprecated public XWikiDocument(String space, String name)
XWikiDocument(org.xwiki.model.reference.DocumentReference)
instead
setDatabase(String)
must be called afterwards to specify the wiki name.
space
- the space this document belongs toname
- the name of the document@Deprecated public XWikiDocument(String wiki, String space, String name)
XWikiDocument(org.xwiki.model.reference.DocumentReference)
instead
wiki
- The wiki this document belongs to.space
- The space this document belongs to.name
- The name of the document (can contain either the page name or the space and page name)Method Detail |
---|
public XWikiStoreInterface getStore(XWikiContext context)
public XWikiAttachmentStoreInterface getAttachmentStore(XWikiContext context)
public XWikiVersioningStoreInterface getVersioningStore(XWikiContext context)
public XWikiStoreInterface getStore()
public void setStore(XWikiStoreInterface store)
public String getKey()
public int hashCode()
hashCode
in class Object
public long getId()
public void setId(long id)
getId()
@Deprecated public String getSpace()
getDocumentReference()
instead
@Deprecated public void setSpace(String space)
setDocumentReference(DocumentReference)
instead
@Deprecated public String getWeb()
getDocumentReference()
instead
@Deprecated public void setWeb(String space)
setDocumentReference(DocumentReference)
instead
public String getVersion()
getVersion
in interface DocumentModelBridge
public void setVersion(String version)
public org.suigeneris.jrcs.rcs.Version getRCSVersion()
public void setRCSVersion(org.suigeneris.jrcs.rcs.Version version)
public XWikiDocument getOriginalDocument()
getOriginalDocument
in interface DocumentModelBridge
public void setOriginalDocument(XWikiDocument originalDocument)
originalDocument
- the original document representing this document instance before any change was made to
it, prior to the last time it was savedgetOriginalDocument()
public DocumentReference getParentReference()
@Deprecated public String getParent()
getParentReference()
instead
getParentReference()
@Deprecated public XWikiDocument getParentDoc()
getParentReference()
instead
public void setParentReference(EntityReference parentReference)
@Deprecated public void setParentReference(DocumentReference parentReference)
setParentReference(org.xwiki.model.reference.EntityReference)
instead
@Deprecated public void setParent(String parent)
setParentReference(DocumentReference)
instead
parent
- the reference of the parent relative to the documentpublic String getContent()
getContent
in interface DocumentModelBridge
public void setContent(String content)
public void setContent(org.xwiki.rendering.block.XDOM content) throws XWikiException
XWikiException
public String getRenderedContent(org.xwiki.rendering.syntax.Syntax targetSyntax, XWikiContext context) throws XWikiException
XWikiException
public String getRenderedContent(org.xwiki.rendering.syntax.Syntax targetSyntax, boolean isolateVelocityMacros, XWikiContext context) throws XWikiException
XWikiException
public String getRenderedContent(XWikiContext context) throws XWikiException
XWikiException
public String getRenderedContent(String text, String syntaxId, XWikiContext context)
text
- the text to rendersyntaxId
- the id of the Syntax used by the passed text (for example: "xwiki/1.0")context
- the XWiki Context object
public String getRenderedContent(String text, String syntaxId, boolean restrictedTransformationContext, XWikiContext context)
text
- the text to rendersyntaxId
- the id of the Syntax used by the passed text (for example: "xwiki/1.0")restrictedTransformationContext
- see DocumentDisplayerParameters.isTransformationContextRestricted()
.context
- the XWiki Context object
public String getRenderedContent(String text, String sourceSyntaxId, String targetSyntaxId, XWikiContext context)
text
- the text to rendersourceSyntaxId
- the id of the Syntax used by the passed text (for example: "xwiki/1.0")targetSyntaxId
- the id of the syntax in which to render the document content
public String getRenderedContent(String text, String sourceSyntaxId, String targetSyntaxId, boolean restrictedTransformationContext, XWikiContext context)
text
- the text to rendersourceSyntaxId
- the id of the Syntax used by the passed text (for example: "xwiki/1.0")targetSyntaxId
- the id of the syntax in which to render the document contentrestrictedTransformationContext
- see DocumentDisplayerParameters.isTransformationContextRestricted()
.
public String getEscapedContent(XWikiContext context) throws XWikiException
XWikiException
@Deprecated public String getName()
getDocumentReference()
instead
@Deprecated public void setName(String name)
setDocumentReference(DocumentReference)
instead
public DocumentReference getDocumentReference()
getDocumentReference
in interface DocumentModelBridge
@Deprecated public String getFullName()
getDocumentReference()
instead
getFullName
in interface DocumentModelBridge
@Deprecated public String getPrefixedFullName()
getDocumentReference()
instead
@Deprecated public void setDocumentReference(DocumentReference reference)
@Deprecated public void setFullName(String name)
setDocumentReference(org.xwiki.model.reference.DocumentReference)
instead
@Deprecated public void setFullName(String fullName, XWikiContext context)
setDocumentReference(org.xwiki.model.reference.DocumentReference)
instead
@Deprecated public String getWikiName()
getDocumentReference()
instead
getWikiName
in interface DocumentModelBridge
DocumentModelBridge.getWikiName()
@Deprecated public String getSpaceName()
getDocumentReference()
instead
getSpaceName
in interface DocumentModelBridge
DocumentModelBridge.getSpaceName()
@Deprecated public String getPageName()
getDocumentReference()
instead
getPageName
in interface DocumentModelBridge
DocumentModelBridge.getSpaceName()
public String getTitle()
getTitle
in interface DocumentModelBridge
public String getRenderedTitle(org.xwiki.rendering.syntax.Syntax outputSyntax, XWikiContext context)
outputSyntax
- the syntax to render to; this is not taken into account for XWiki 1.0 syntaxcontext
- the XWiki context
public void setTitle(String title)
public String getFormat()
public void setFormat(String format)
public DocumentReference getAuthorReference()
public void setAuthorReference(DocumentReference authorReference)
@Deprecated public String getAuthor()
getAuthorReference()
instead
@Deprecated public void setAuthor(String author)
setAuthorReference(org.xwiki.model.reference.DocumentReference)
instead
public DocumentReference getContentAuthorReference()
public void setContentAuthorReference(DocumentReference contentAuthorReference)
@Deprecated public String getContentAuthor()
getContentAuthorReference()
instead
@Deprecated public void setContentAuthor(String contentAuthor)
setContentAuthorReference(org.xwiki.model.reference.DocumentReference)
instead
public DocumentReference getCreatorReference()
public void setCreatorReference(DocumentReference creatorReference)
@Deprecated public String getCreator()
getCreatorReference()
instead
@Deprecated public void setCreator(String creator)
setCreatorReference(org.xwiki.model.reference.DocumentReference)
instead
public Date getDate()
public void setDate(Date date)
public Date getCreationDate()
public void setCreationDate(Date date)
public Date getContentUpdateDate()
public void setContentUpdateDate(Date date)
public String getMeta()
public void setMeta(String meta)
public void appendMeta(String meta)
public boolean isContentDirty()
public void incrementVersion()
public void setContentDirty(boolean contentDirty)
public boolean isMetaDataDirty()
public void setMetaDataDirty(boolean metaDataDirty)
public String getAttachmentURL(String filename, XWikiContext context)
public String getAttachmentURL(String filename, String action, XWikiContext context)
public String getExternalAttachmentURL(String filename, String action, XWikiContext context)
public String getAttachmentURL(String filename, String action, String querystring, XWikiContext context)
public String getAttachmentRevisionURL(String filename, String revision, XWikiContext context)
public String getAttachmentRevisionURL(String filename, String revision, String querystring, XWikiContext context)
public String getURL(String action, String params, boolean redirect, XWikiContext context)
action
- the action, see the struts-config.xml
file for a list of all existing action namesparams
- the URL query stringredirect
- true if the URL is going to be used in HttpServletResponse#sendRedirect(String)
context
- the XWiki context
public String getURL(String action, boolean redirect, XWikiContext context)
public String getURL(String action, XWikiContext context)
public String getURL(String action, String querystring, XWikiContext context)
public String getURL(String action, String querystring, String anchor, XWikiContext context)
public String getExternalURL(String action, XWikiContext context)
public String getExternalURL(String action, String querystring, XWikiContext context)
public String getParentURL(XWikiContext context) throws XWikiException
XWikiException
public XWikiDocumentArchive getDocumentArchive(XWikiContext context) throws XWikiException
XWikiException
public Document newDocument(String customClassName, XWikiContext context)
Document
public API to access page information and actions from
scripting.
customClassName
- the name of the custom Document
class of the object to create.context
- the XWiki context.
public Document newDocument(Class<?> customClass, XWikiContext context)
Document
public API to access page information and actions from
scripting.
customClass
- the custom Document
class the object to create.context
- the XWiki context.
public Document newDocument(XWikiContext context)
public void loadArchive(XWikiContext context) throws XWikiException
XWikiException
public XWikiDocumentArchive getDocumentArchive()
XWikiDocumentArchive
for this document. If it is not stored in the document, null is
returned.public XWikiDocumentArchive loadDocumentArchive()
XWikiDocumentArchive
for this document. If it is not stored in the document, we get it using
the current context. If there is an exception, null is returned.public void setDocumentArchive(XWikiDocumentArchive arch)
public void setDocumentArchive(String sarch) throws XWikiException
XWikiException
public org.suigeneris.jrcs.rcs.Version[] getRevisions(XWikiContext context) throws XWikiException
XWikiException
public String[] getRecentRevisions(int nb, XWikiContext context) throws XWikiException
XWikiException
public List<String> getRevisions(RevisionCriteria criteria, XWikiContext context) throws XWikiException
criteria
- criteria used to match versions
XWikiException
public XWikiRCSNodeInfo getRevisionInfo(String version, XWikiContext context) throws XWikiException
XWikiException
public boolean isMostRecent()
public void setMostRecent(boolean mostRecent)
mostRecent
- - mark document as most recent.public BaseClass getXClass()
public void setXClass(BaseClass xwikiClass)
public Map<DocumentReference,List<BaseObject>> getXObjects()
public void setXObjects(Map<DocumentReference,List<BaseObject>> objects)
public BaseObject getXObject()
@Deprecated public BaseObject getxWikiObject()
getXObject()
instead
public List<BaseClass> getXClasses(XWikiContext context)
public int createXObject(EntityReference classReference, XWikiContext context) throws XWikiException
Note that absolute reference are not supported for xclasses which mean that the wiki part (whatever the wiki is) of the reference will be systematically removed.
classReference
- the reference of the classcontext
- the XWiki context
XWikiException
- error when creating the new object@Deprecated public int createNewObject(String className, XWikiContext context) throws XWikiException
createXObject(EntityReference, XWikiContext)
instead
XWikiException
public int getXObjectSize(DocumentReference classReference)
@Deprecated public int getObjectNumbers(String className)
getXObjectSize(DocumentReference)
instead
public List<BaseObject> getXObjects(DocumentReference classReference)
public List<BaseObject> getXObjects(EntityReference reference)
@Deprecated public Vector<BaseObject> getObjects(String className)
getXObjects(DocumentReference)
instead
public void setXObjects(DocumentReference classReference, List<BaseObject> objects)
public BaseObject getXObject(EntityReference reference)
public BaseObject getXObject(DocumentReference classReference)
public BaseObject getXObject(ObjectReference objectReference)
objectReference
- the reference of the object
public BaseProperty<ObjectPropertyReference> getXObjectProperty(ObjectPropertyReference objectPropertyReference)
objectPropertyReference
- the reference of the object property
@Deprecated public BaseObject getObject(String className)
getXObject(DocumentReference)
instead
public BaseObject getXObject(DocumentReference classReference, int nb)
public BaseObject getXObject(EntityReference classReference, int nb)
@Deprecated public BaseObject getObject(String className, int nb)
getXObject(DocumentReference, int)
instead
public BaseObject getXObject(DocumentReference classReference, String key, String value)
@Deprecated public BaseObject getObject(String className, String key, String value)
getXObject(DocumentReference, String, String)
instead
public BaseObject getXObject(DocumentReference classReference, String key, String value, boolean failover)
@Deprecated public BaseObject getObject(String className, String key, String value, boolean failover)
getXObject(DocumentReference, String, String, boolean)
instead
@Deprecated public void addXObject(DocumentReference classReference, BaseObject object)
addXObject(BaseObject)
instead
public void addXObject(BaseObject object)
object
- the xobject to add
NullPointerException
- if the specified object is null because we need the get the class reference from the
object@Deprecated public void addObject(String className, BaseObject object)
addXObject(BaseObject)
instead
@Deprecated public void setXObject(DocumentReference classReference, int nb, BaseObject object)
setXObject(int, BaseObject)
instead
public void setXObject(int nb, BaseObject object)
nb
- index of the element to replaceobject
- the xobject to insert
NullPointerException
- if the specified object is null because we need the get the class reference from the
object@Deprecated public void setObject(String className, int nb, BaseObject object)
setXObject(DocumentReference, int, BaseObject)
instead
public boolean isNew()
public void setNew(boolean aNew)
public void mergeXClass(XWikiDocument templatedoc)
@Deprecated public void mergexWikiClass(XWikiDocument templatedoc)
mergeXClass(XWikiDocument)
instead
public void mergeXObjects(XWikiDocument templateDoc)
@Deprecated public void mergexWikiObjects(XWikiDocument templatedoc)
mergeXObjects(XWikiDocument)
instead
public void cloneXObjects(XWikiDocument templatedoc)
public void duplicateXObjects(XWikiDocument templatedoc)
@Deprecated public void clonexWikiObjects(XWikiDocument templatedoc)
cloneXObjects(XWikiDocument)
instead
public DocumentReference getTemplateDocumentReference()
@Deprecated public String getTemplate()
getTemplateDocumentReference()
instead
public void setTemplateDocumentReference(DocumentReference templateDocumentReference)
@Deprecated public void setTemplate(String template)
setTemplateDocumentReference(DocumentReference)
instead
public String displayPrettyName(String fieldname, XWikiContext context)
public String displayPrettyName(String fieldname, boolean showMandatory, XWikiContext context)
public String displayPrettyName(String fieldname, boolean showMandatory, boolean before, XWikiContext context)
public String displayPrettyName(String fieldname, BaseObject obj, XWikiContext context)
public String displayPrettyName(String fieldname, boolean showMandatory, BaseObject obj, XWikiContext context)
public String displayPrettyName(String fieldname, boolean showMandatory, boolean before, BaseObject obj, XWikiContext context)
public String displayTooltip(String fieldname, XWikiContext context)
public String displayTooltip(String fieldname, BaseObject obj, XWikiContext context)
public String display(String fieldname, XWikiContext context)
fieldname
- the name of the field to displaycontext
- the XWiki context
public String display(String fieldname, BaseObject obj, XWikiContext context)
fieldname
- the name of the field to displayobj
- the object containing the field to displaycontext
- the XWiki context
public String display(String fieldname, String mode, XWikiContext context)
fieldname
- the name of the field to displaymode
- the mode to use ("view", "edit", ...)context
- the XWiki context
public String display(String fieldname, String type, BaseObject obj, XWikiContext context)
fieldname
- the name of the field to displaytype
- the type of the field to displayobj
- the object containing the field to displaycontext
- the XWiki context
public String display(String fieldname, String mode, String prefix, XWikiContext context)
fieldname
- the name of the field to displaymode
- the mode to use ("view", "edit", ...)prefix
- the prefix to add in the field identifier in edit display for examplecontext
- the XWiki context
public String display(String fieldname, String type, BaseObject obj, String wrappingSyntaxId, XWikiContext context)
fieldname
- the name of the field to displaytype
- the type of the field to displayobj
- the object containing the field to displaywrappingSyntaxId
- the syntax of the content in which the result will be included. This to take care of some
escaping depending of the syntax.context
- the XWiki context
public String display(String fieldname, String type, String pref, BaseObject obj, XWikiContext context)
fieldname
- the name of the field to displaytype
- the type of the field to displaypref
- the prefix to add in the field identifier in edit display for exampleobj
- the object containing the field to displaycontext
- the XWiki context
public String display(String fieldname, String type, String pref, BaseObject obj, String wrappingSyntaxId, XWikiContext context)
fieldname
- the name of the field to displaytype
- the type of the field to displaypref
- the prefix to add in the field identifier in edit display for exampleobj
- the object containing the field to displaywrappingSyntaxId
- the syntax of the content in which the result will be included. This to take care of some
escaping depending of the syntax.context
- the XWiki context
public String displayForm(DocumentReference classReference, String header, String format, XWikiContext context)
@Deprecated public String displayForm(String className, String header, String format, XWikiContext context)
displayForm(DocumentReference, String, String, XWikiContext)
instead
public String displayForm(DocumentReference classReference, String header, String format, boolean linebreak, XWikiContext context)
@Deprecated public String displayForm(String className, String header, String format, boolean linebreak, XWikiContext context)
displayForm(DocumentReference, String, String, boolean, XWikiContext)
instead
public String displayForm(DocumentReference classReference, XWikiContext context)
@Deprecated public String displayForm(String className, XWikiContext context)
displayForm(DocumentReference, XWikiContext)
instead
public boolean isFromCache()
public void setFromCache(boolean fromCache)
public void readDocMetaFromForm(EditForm eform, XWikiContext context) throws XWikiException
XWikiException
public void setTags(String tagsStr, XWikiContext context) throws XWikiException
XWikiException
public String getTags(XWikiContext context)
public List<String> getTagsList(XWikiContext context)
public List<String> getTagsPossibleValues(XWikiContext context)
public void readTranslationMetaFromForm(EditForm eform, XWikiContext context) throws XWikiException
XWikiException
public void readObjectsFromForm(EditForm eform, XWikiContext context) throws XWikiException
XWikiException
public void readFromForm(EditForm eform, XWikiContext context) throws XWikiException
XWikiException
public void readFromTemplate(EditForm eform, XWikiContext context) throws XWikiException
XWikiException
public void readFromTemplate(DocumentReference templateDocumentReference, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public void readFromTemplate(String template, XWikiContext context) throws XWikiException
readFromTemplate(DocumentReference, XWikiContext)
instead
XWikiException
public XWikiDocument clone()
clone
in class Object
public XWikiDocument duplicate(DocumentReference newDocumentReference)
public void copyAttachments(XWikiDocument sourceDocument)
sourceDocument
- an XWikiDocument to copy attachments frompublic void loadAttachments(XWikiContext context) throws XWikiException
XWikiException
public boolean equals(Object object)
equals
in class Object
public boolean equalsData(XWikiDocument doc)
equals(Object)
but only for actual datas of the document.
The goal being to compare two versions of the same document this method skip every version/reference/author related information. For example it allows to compare a document comming from a another wiki and easily check if thoses actually are the same thing whatever the plumbing differences.
doc
- the document to compare
@Deprecated public String toXML(org.dom4j.Document doc, XWikiContext context)
Document
into an XML string. You should prefer
toXML(OutputStream, boolean, boolean, boolean, boolean, XWikiContext)
or
toXML(com.xpn.xwiki.internal.xml.XMLWriter, boolean, boolean, boolean, boolean, XWikiContext)
when
possible to avoid memory load.
doc
- the Document
to convert to a Stringcontext
- current XWikiContext
Document
public String getXMLContent(XWikiContext context) throws XWikiException
context
- current XWikiContext
XWikiException
- when an error occurs during wiki operationpublic String toXML(XWikiContext context) throws XWikiException
context
- current XWikiContext
XWikiException
- when an error occurs during wiki operationpublic String toFullXML(XWikiContext context) throws XWikiException
context
- current XWikiContext
XWikiException
- when an error occurs during wiki operation@Deprecated public void addToZip(ZipOutputStream zos, String zipname, boolean withVersions, XWikiContext context) throws XWikiException, IOException
zos
- the ZipOutputStream to write tozipname
- the name of the new entry to createwithVersions
- if true, also include archived version of the documentcontext
- current XWikiContext
XWikiException
- when an error occurs during xwiki operations
IOException
- when an error occurs during streaming operations@Deprecated public void addToZip(ZipOutputStream zos, boolean withVersions, XWikiContext context) throws XWikiException, IOException
zos
- the ZipOutputStream to write towithVersions
- if true, also include archived version of the documentcontext
- current XWikiContext
XWikiException
- when an error occurs during xwiki operations
IOException
- when an error occurs during streaming operations@Deprecated public void addToZip(ZipOutputStream zos, XWikiContext context) throws XWikiException, IOException
zos
- the ZipOutputStream to write tocontext
- current XWikiContext
XWikiException
- when an error occurs during xwiki operations
IOException
- when an error occurs during streaming operationspublic String toXML(boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent, boolean bWithVersions, XWikiContext context) throws XWikiException
toXML(OutputStream, boolean, boolean, boolean, boolean, XWikiContext)
or
toXML(com.xpn.xwiki.internal.xml.XMLWriter, boolean, boolean, boolean, boolean, XWikiContext)
when
possible to reduce memory load.
bWithObjects
- include XObjectsbWithRendering
- include the rendered contentbWithAttachmentContent
- include attachments contentbWithVersions
- include archived versionscontext
- current XWikiContext
XWikiException
- when an errors occurs during wiki operationspublic org.dom4j.Document toXMLDocument(XWikiContext context) throws XWikiException
DOMDocument
. All XObject are included. Rendered content, attachments and
archived version are excluded. You should prefer toXML(OutputStream, true, false, false, false, XWikiContext)} or
toXML(com.xpn.xwiki.util.XMLWriter, true, false, false, false, XWikiContext) when possible to reduce memory load.
context
- current XWikiContext
DOMDocument
containing the serialized document.
XWikiException
- when an errors occurs during wiki operationspublic org.dom4j.Document toXMLDocument(boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent, boolean bWithVersions, XWikiContext context) throws XWikiException
DOMDocument
. You should prefer
toXML(OutputStream, boolean, boolean, boolean, boolean, XWikiContext)
or
toXML(com.xpn.xwiki.internal.xml.XMLWriter, boolean, boolean, boolean, boolean, XWikiContext)
when
possible to reduce memory load.
bWithObjects
- include XObjectsbWithRendering
- include the rendered contentbWithAttachmentContent
- include attachments contentbWithVersions
- include archived versionscontext
- current XWikiContext
DOMDocument
containing the serialized document.
XWikiException
- when an errors occurs during wiki operationspublic void toXML(com.xpn.xwiki.internal.xml.XMLWriter wr, boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent, boolean bWithVersions, XWikiContext context) throws XWikiException, IOException
XMLWriter
.
bWithObjects
- include XObjectsbWithRendering
- include the rendered contentbWithAttachmentContent
- include attachments contentbWithVersions
- include archived versionscontext
- current XWikiContext
XWikiException
- when an errors occurs during wiki operations
IOException
- when an errors occurs during streaming operationspublic void toXML(OutputStream out, boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent, boolean bWithVersions, XWikiContext context) throws XWikiException, IOException
bWithObjects
- include XObjectsbWithRendering
- include the rendered contentbWithAttachmentContent
- include attachments contentbWithVersions
- include archived versionscontext
- current XWikiContext
XWikiException
- when an errors occurs during wiki operations
IOException
- when an errors occurs during streaming operationsprotected String encodedXMLStringAsUTF8(String xmlString)
protected String getElement(org.dom4j.Element docel, String name)
public void fromXML(String xml) throws XWikiException
XWikiException
public void fromXML(InputStream is) throws XWikiException
XWikiException
public void fromXML(String xml, boolean withArchive) throws XWikiException
XWikiException
public void fromXML(InputStream in, boolean withArchive) throws XWikiException
XWikiException
public void fromXML(org.dom4j.Document domdoc, boolean withArchive) throws XWikiException
XWikiException
public static boolean containsXMLWikiDocument(org.dom4j.Document domdoc)
domdoc
- the xml document.
public void setAttachmentList(List<XWikiAttachment> list)
public List<XWikiAttachment> getAttachmentList()
public void saveAllAttachments(XWikiContext context) throws XWikiException
XWikiException
public void saveAllAttachments(boolean updateParent, boolean transaction, XWikiContext context) throws XWikiException
XWikiException
public void saveAttachmentsContent(List<XWikiAttachment> attachments, XWikiContext context) throws XWikiException
XWikiException
public void saveAttachmentContent(XWikiAttachment attachment, XWikiContext context) throws XWikiException
XWikiException
public void saveAttachmentContent(XWikiAttachment attachment, boolean bParentUpdate, boolean bTransaction, XWikiContext context) throws XWikiException
XWikiException
public void loadAttachmentContent(XWikiAttachment attachment, XWikiContext context) throws XWikiException
XWikiException
public void deleteAttachment(XWikiAttachment attachment, XWikiContext context) throws XWikiException
XWikiException
public void deleteAttachment(XWikiAttachment attachment, boolean toRecycleBin, XWikiContext context) throws XWikiException
XWikiException
public List<DocumentReference> getBackLinkedReferences(XWikiContext context) throws XWikiException
Theses links are stored to the database when documents are saved. You can use "backlinks" in XWikiPreferences or "xwiki.backlinks" in xwiki.cfg file to enable links storage in the database.
context
- the XWiki context.
XWikiException
- error when getting pages names from database.@Deprecated public List<String> getBackLinkedPages(XWikiContext context) throws XWikiException
getBackLinkedReferences(XWikiContext)
XWikiException
public Set<XWikiLink> getUniqueWikiLinkedPages(XWikiContext context) throws XWikiException
getUniqueLinkedPages(XWikiContext)
and generate the List
context
- the XWiki context
XWikiException
- error when getting links from database when 1.0 content.public Set<String> getUniqueLinkedPages(XWikiContext context)
context
- the XWiki context.
public List<DocumentReference> getChildrenReferences(XWikiContext context) throws XWikiException
getChildren(int, int, com.xpn.xwiki.XWikiContext)
XWikiException
@Deprecated public List<String> getChildren(XWikiContext context) throws XWikiException
getChildrenReferences(XWikiContext)
XWikiException
public List<DocumentReference> getChildrenReferences(int nb, int start, XWikiContext context) throws XWikiException
nb
- The number of results to return.start
- The number of results to skip before we begin returning results.context
- The context
.
XWikiException
- If there's an error querying the database.@Deprecated public List<String> getChildren(int nb, int start, XWikiContext context) throws XWikiException
getChildrenReferences(XWikiContext)
XWikiException
public void renameProperties(DocumentReference classReference, Map<String,String> fieldsToRename)
@Deprecated public void renameProperties(String className, Map<String,String> fieldsToRename)
renameProperties(DocumentReference, Map)
instead
public void addXObjectToRemove(BaseObject object)
public void addXObjectsToRemoveFromVersion(XWikiDocument previousVersion)
previousVersion
- the version of the document present in the database@Deprecated public void addObjectsToRemove(BaseObject object)
addXObjectToRemove(BaseObject)
)} instead
public List<BaseObject> getXObjectsToRemove()
@Deprecated public ArrayList<BaseObject> getObjectsToRemove()
getObjectsToRemove()
instead
public void setXObjectsToRemove(List<BaseObject> objectsToRemove)
public List<String> getIncludedPages(XWikiContext context)
public List<String> getIncludedMacros(XWikiContext context)
public String displayRendered(PropertyClass pclass, String prefix, BaseCollection object, XWikiContext context) throws XWikiException
XWikiException
public String displayView(PropertyClass pclass, String prefix, BaseCollection object, XWikiContext context)
public String displayEdit(PropertyClass pclass, String prefix, BaseCollection object, XWikiContext context)
public String displayHidden(PropertyClass pclass, String prefix, BaseCollection object, XWikiContext context)
public XWikiAttachment getAttachment(String filename)
filename
- the file name of the attachment with or without the extension
XWikiAttachment
corresponding to the file name, null if none can be foundpublic XWikiAttachment addAttachment(String fileName, InputStream iStream, XWikiContext context) throws XWikiException, IOException
XWikiException
IOException
public XWikiAttachment addAttachment(String fileName, byte[] data, XWikiContext context) throws XWikiException
XWikiException
public BaseObject getFirstObject(String fieldname)
public BaseObject getFirstObject(String fieldname, XWikiContext context)
public void setProperty(EntityReference classReference, String fieldName, BaseProperty value)
@Deprecated public void setProperty(String className, String fieldName, BaseProperty value)
setProperty(EntityReference, String, BaseProperty)
instead
public int getIntValue(DocumentReference classReference, String fieldName)
@Deprecated public int getIntValue(String className, String fieldName)
getIntValue(DocumentReference, String)
instead
public long getLongValue(DocumentReference classReference, String fieldName)
@Deprecated public long getLongValue(String className, String fieldName)
getLongValue(DocumentReference, String)
instead
public String getStringValue(DocumentReference classReference, String fieldName)
@Deprecated public String getStringValue(String className, String fieldName)
getStringValue(DocumentReference, String)
instead
public int getIntValue(String fieldName)
public long getLongValue(String fieldName)
public String getStringValue(String fieldName)
public void setStringValue(EntityReference classReference, String fieldName, String value)
@Deprecated public void setStringValue(String className, String fieldName, String value)
setStringValue(EntityReference, String, String)
instead
public List getListValue(DocumentReference classReference, String fieldName)
@Deprecated public List getListValue(String className, String fieldName)
getListValue(DocumentReference, String)
instead
public List getListValue(String fieldName)
public void setStringListValue(EntityReference classReference, String fieldName, List value)
@Deprecated public void setStringListValue(String className, String fieldName, List value)
setStringListValue(EntityReference, String, List)
instead
public void setDBStringListValue(EntityReference classReference, String fieldName, List value)
@Deprecated public void setDBStringListValue(String className, String fieldName, List value)
setDBStringListValue(EntityReference, String, List)
instead
public void setLargeStringValue(EntityReference classReference, String fieldName, String value)
@Deprecated public void setLargeStringValue(String className, String fieldName, String value)
setLargeStringValue(EntityReference, String, String)
instead
public void setIntValue(EntityReference classReference, String fieldName, int value)
@Deprecated public void setIntValue(String className, String fieldName, int value)
setIntValue(EntityReference, String, int)
instead
@Deprecated public String getDatabase()
getDocumentReference()
instead
@Deprecated public void setDatabase(String database)
setDocumentReference(DocumentReference)
instead
@Deprecated public String getLanguage()
getLocale()
instead
@Deprecated public void setLanguage(String language)
setLocale(Locale)
instead
public Locale getLocale()
public void setLocale(Locale locale)
locale
- the locale of the document@Deprecated public String getDefaultLanguage()
getDefaultLocale()
instead
@Deprecated public void setDefaultLanguage(String defaultLanguage)
setDefaultLocale(Locale)
instead
public Locale getDefaultLocale()
public void setDefaultLocale(Locale defaultLocale)
public int getTranslation()
public void setTranslation(int translation)
public String getTranslatedContent(XWikiContext context) throws XWikiException
XWikiException
public String getTranslatedContent(String language, XWikiContext context) throws XWikiException
XWikiException
public XWikiDocument getTranslatedDocument(XWikiContext context) throws XWikiException
XWikiException
@Deprecated public XWikiDocument getTranslatedDocument(String language, XWikiContext context) throws XWikiException
getTranslatedDocument(Locale, XWikiContext)
insead
This method return this if the provided language does not exists. See
language
- the language of the document to returncontext
- the XWiki Context
XWikiException
- error when loading the documentpublic XWikiDocument getTranslatedDocument(Locale locale, XWikiContext context) throws XWikiException
This method return this if the provided language does not exists. See
locale
- the locale of the document to returncontext
- the XWiki Context
XWikiException
- error when loading the document@Deprecated public String getRealLanguage(XWikiContext context) throws XWikiException
getRealLocale()
instead
XWikiException
@Deprecated public String getRealLanguage()
getRealLocale()
instead
getRealLanguage
in interface DocumentModelBridge
DocumentModelBridge.getRealLanguage()
public Locale getRealLocale()
public List<String> getTranslationList(XWikiContext context) throws XWikiException
XWikiException
public List<org.suigeneris.jrcs.diff.delta.Delta> getXMLDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context) throws XWikiException, org.suigeneris.jrcs.diff.DifferentiationFailedException
XWikiException
org.suigeneris.jrcs.diff.DifferentiationFailedException
public List<org.suigeneris.jrcs.diff.delta.Delta> getContentDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context) throws XWikiException, org.suigeneris.jrcs.diff.DifferentiationFailedException
XWikiException
org.suigeneris.jrcs.diff.DifferentiationFailedException
public List<org.suigeneris.jrcs.diff.delta.Delta> getContentDiff(String fromRev, String toRev, XWikiContext context) throws XWikiException, org.suigeneris.jrcs.diff.DifferentiationFailedException
XWikiException
org.suigeneris.jrcs.diff.DifferentiationFailedException
public List<org.suigeneris.jrcs.diff.delta.Delta> getContentDiff(String fromRev, XWikiContext context) throws XWikiException, org.suigeneris.jrcs.diff.DifferentiationFailedException
XWikiException
org.suigeneris.jrcs.diff.DifferentiationFailedException
public List<org.suigeneris.jrcs.diff.delta.Delta> getLastChanges(XWikiContext context) throws XWikiException, org.suigeneris.jrcs.diff.DifferentiationFailedException
XWikiException
org.suigeneris.jrcs.diff.DifferentiationFailedException
public List<org.suigeneris.jrcs.diff.delta.Delta> getRenderedContentDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context) throws XWikiException, org.suigeneris.jrcs.diff.DifferentiationFailedException
XWikiException
org.suigeneris.jrcs.diff.DifferentiationFailedException
public List<org.suigeneris.jrcs.diff.delta.Delta> getRenderedContentDiff(String fromRev, String toRev, XWikiContext context) throws XWikiException, org.suigeneris.jrcs.diff.DifferentiationFailedException
XWikiException
org.suigeneris.jrcs.diff.DifferentiationFailedException
public List<org.suigeneris.jrcs.diff.delta.Delta> getRenderedContentDiff(String fromRev, XWikiContext context) throws XWikiException, org.suigeneris.jrcs.diff.DifferentiationFailedException
XWikiException
org.suigeneris.jrcs.diff.DifferentiationFailedException
protected List<org.suigeneris.jrcs.diff.delta.Delta> getDeltas(org.suigeneris.jrcs.diff.Revision rev)
public List<MetaDataDiff> getMetaDataDiff(String fromRev, String toRev, XWikiContext context) throws XWikiException
XWikiException
public List<MetaDataDiff> getMetaDataDiff(String fromRev, XWikiContext context) throws XWikiException
XWikiException
public List<MetaDataDiff> getMetaDataDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context) throws XWikiException
XWikiException
public List<List<ObjectDiff>> getObjectDiff(String fromRev, String toRev, XWikiContext context) throws XWikiException
XWikiException
public List<List<ObjectDiff>> getObjectDiff(String fromRev, XWikiContext context) throws XWikiException
XWikiException
public List<List<ObjectDiff>> getObjectDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context)
fromDoc
- The old ('before') version of the document.toDoc
- The new ('after') version of the document.context
- The context
.
ObjectDiff
elements, one object for each changed property of the object.
Additionally, if the object was added or removed, then the first entry in the list will be an
"object-added" or "object-removed" marker.public List<List<ObjectDiff>> getClassDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context)
public List<AttachmentDiff> getAttachmentDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context)
fromDoc
- toDoc
- context
-
public void rename(DocumentReference newDocumentReference, XWikiContext context) throws XWikiException
See rename(String, java.util.List, com.xpn.xwiki.XWikiContext)
for more details.
newDocumentReference
- the new document referencecontext
- the ubiquitous XWiki Context
XWikiException
- in case of an error@Deprecated public void rename(String newDocumentName, XWikiContext context) throws XWikiException
rename(DocumentReference, XWikiContext)
XWikiException
public void rename(DocumentReference newDocumentReference, List<DocumentReference> backlinkDocumentReferences, XWikiContext context) throws XWikiException
Note: links without a space are renamed with the space added and all documents which have the document being renamed as parent have their parent field set to "currentwiki:CurrentSpace.Page".
newDocumentReference
- the new document referencebacklinkDocumentReferences
- the list of references of documents to parse and for which links will be
modified to point to the new document referencecontext
- the ubiquitous XWiki Context
XWikiException
- in case of an error@Deprecated public void rename(String newDocumentName, List<String> backlinkDocumentNames, XWikiContext context) throws XWikiException
rename(DocumentReference, java.util.List, com.xpn.xwiki.XWikiContext)
XWikiException
public void rename(DocumentReference newDocumentReference, List<DocumentReference> backlinkDocumentReferences, List<DocumentReference> childDocumentReferences, XWikiContext context) throws XWikiException
rename(String, List, XWikiContext)
but the list of documents having the current document as
their parent is passed in parameter.
newDocumentReference
- the new document referencebacklinkDocumentReferences
- the list of references of documents to parse and for which links will be
modified to point to the new document referencechildDocumentReferences
- the list of references of document whose parent field will be set to the new
document referencecontext
- the ubiquitous XWiki Context
XWikiException
- in case of an error@Deprecated public void rename(String newDocumentName, List<String> backlinkDocumentNames, List<String> childDocumentNames, XWikiContext context) throws XWikiException
rename(DocumentReference, List, List, com.xpn.xwiki.XWikiContext)
XWikiException
public XWikiDocument copyDocument(DocumentReference newDocumentReference, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public XWikiDocument copyDocument(String newDocumentName, XWikiContext context) throws XWikiException
copyDocument(DocumentReference, XWikiContext)
instead
XWikiException
public XWikiLock getLock(XWikiContext context) throws XWikiException
XWikiException
public void setLock(String userName, XWikiContext context) throws XWikiException
XWikiException
public void removeLock(XWikiContext context) throws XWikiException
XWikiException
public void insertText(String text, String marker, XWikiContext context) throws XWikiException
XWikiException
public Object getWikiNode()
public void setWikiNode(Object wikiNode)
public String getXClassXML()
@Deprecated public String getxWikiClassXML()
getXClassXML()
instead Hibernate uses this through reflection. It cannot be
removed without altering hibernate.cfg.xml
public void setXClassXML(String xClassXML)
@Deprecated public void setxWikiClassXML(String xClassXML)
setXClassXML(String)
()} instead Hibernate uses this through reflection. It
cannot be removed without altering hibernate.cfg.xml
public int getElements()
public void setElements(int elements)
public void setElement(int element, boolean toggle)
public boolean hasElement(int element)
public String getDefaultEditMode(XWikiContext context) throws XWikiException
XWiki.EditModeClass
object in the current document, with the appropriate value for the
defaultEditMode property, or by adding this object in a sheet included by the document. This function also falls
back on the old SheetClass
, deprecated since 3.1M2, which can be attached to included documents to
specify that the current document should be edited inline.
context
- the context of the request for this document
XWikiException
- if an error happens when computing the edit modepublic String getDefaultEditURL(XWikiContext context) throws XWikiException
XWikiException
public String getEditURL(String action, String mode, XWikiContext context) throws XWikiException
XWikiException
public String getEditURL(String action, String mode, String language, XWikiContext context)
public String getDefaultTemplate()
public void setDefaultTemplate(String defaultTemplate)
public Vector<BaseObject> getComments()
public org.xwiki.rendering.syntax.Syntax getSyntax()
getSyntax
in interface DocumentModelBridge
@Deprecated public String getSyntaxId()
Note that this method cannot be removed for now since it's used by Hibernate for saving a XWikiDocument.
getSyntaxId
in interface DocumentModelBridge
DocumentModelBridge.getSyntaxId()
public void setSyntax(org.xwiki.rendering.syntax.Syntax syntax)
syntax
- the new syntax to set for this documentgetSyntax()
@Deprecated public void setSyntaxId(String syntaxId)
syntaxId
- the new syntax id to set (eg "xwiki/1.0", "xwiki/2.0", etc)getSyntaxId()
public Vector<BaseObject> getComments(boolean asc)
public boolean isCurrentUserCreator(XWikiContext context)
@Deprecated public boolean isCreator(String username)
isCreator(DocumentReference)
instead
public boolean isCreator(DocumentReference username)
public boolean isCurrentUserPage(XWikiContext context)
public boolean isCurrentLocalUserPage(XWikiContext context)
public void resetArchive(XWikiContext context) throws XWikiException
XWikiException
public BaseObject addXObjectFromRequest(XWikiContext context) throws XWikiException
XWikiException
public BaseObject addXObjectFromRequest(EntityReference classReference, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public BaseObject addObjectFromRequest(String className, XWikiContext context) throws XWikiException
addXObjectFromRequest(EntityReference, XWikiContext)
XWikiException
public BaseObject addXObjectFromRequest(DocumentReference classReference, String prefix, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public BaseObject addObjectFromRequest(String className, String prefix, XWikiContext context) throws XWikiException
addXObjectFromRequest(DocumentReference, String, XWikiContext)
XWikiException
public List<BaseObject> addXObjectsFromRequest(DocumentReference classReference, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public List<BaseObject> addObjectsFromRequest(String className, XWikiContext context) throws XWikiException
addXObjectsFromRequest(DocumentReference, XWikiContext)
XWikiException
public List<BaseObject> addXObjectsFromRequest(DocumentReference classReference, String pref, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public List<BaseObject> addObjectsFromRequest(String className, String pref, XWikiContext context) throws XWikiException
addXObjectsFromRequest(DocumentReference, String, XWikiContext)
XWikiException
public BaseObject addXObjectFromRequest(DocumentReference classReference, int num, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public BaseObject addObjectFromRequest(String className, int num, XWikiContext context) throws XWikiException
addXObjectFromRequest(DocumentReference, int, XWikiContext)
XWikiException
public BaseObject addXObjectFromRequest(EntityReference classReference, String prefix, int num, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public BaseObject addObjectFromRequest(String className, String prefix, int num, XWikiContext context) throws XWikiException
addXObjectFromRequest(EntityReference, String, int, XWikiContext)
XWikiException
public BaseObject updateXObjectFromRequest(EntityReference classReference, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public BaseObject updateObjectFromRequest(String className, XWikiContext context) throws XWikiException
updateXObjectFromRequest(EntityReference, XWikiContext)
XWikiException
public BaseObject updateXObjectFromRequest(EntityReference classReference, String prefix, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public BaseObject updateObjectFromRequest(String className, String prefix, XWikiContext context) throws XWikiException
updateXObjectFromRequest(EntityReference, String, XWikiContext)
XWikiException
public BaseObject updateXObjectFromRequest(EntityReference classReference, String prefix, int num, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public BaseObject updateObjectFromRequest(String className, String prefix, int num, XWikiContext context) throws XWikiException
updateXObjectFromRequest(EntityReference, String, int, XWikiContext)
XWikiException
public List<BaseObject> updateXObjectsFromRequest(EntityReference classReference, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public List<BaseObject> updateObjectsFromRequest(String className, XWikiContext context) throws XWikiException
updateXObjectsFromRequest(EntityReference, XWikiContext)
XWikiException
public List<BaseObject> updateXObjectsFromRequest(EntityReference classReference, String pref, XWikiContext context) throws XWikiException
XWikiException
@Deprecated public List<BaseObject> updateObjectsFromRequest(String className, String pref, XWikiContext context) throws XWikiException
updateXObjectsFromRequest(EntityReference, String, XWikiContext)
XWikiException
public boolean isAdvancedContent()
public boolean isProgrammaticContent()
public boolean removeXObject(BaseObject object)
object
- the object to remove
true
if the object was successfully removed, false
if the object was not found in the
current document.@Deprecated public boolean removeObject(BaseObject object)
removeXObject(com.xpn.xwiki.objects.BaseObject)
instead
object
- the object to remove
true
if the object was successfully removed, false
if the object was not found in the
current document.public boolean removeXObjects(DocumentReference classReference)
classReference
- The XClass reference of the XObjects to be removed.
true
if the objects were successfully removed, false
if no object from the target class
was in the current document.public boolean removeXObjects(EntityReference reference)
classReference
- The XClass reference of the XObjects to be removed.
true
if the objects were successfully removed, false
if no object from the target class
was in the current document.@Deprecated public boolean removeObjects(String className)
removeXObjects(org.xwiki.model.reference.DocumentReference)
instead
className
- The class name of the objects to be removed.
true
if the objects were successfully removed, false
if no object from the target class
was in the current document.public List<DocumentSection> getSections() throws XWikiException
The section are filtered by xwiki.section.depth property on the maximum depth of the sections to return. This method is usually used to get "editable" sections.
XWikiException
public DocumentSection getDocumentSection(int sectionNumber) throws XWikiException
sectionNumber
- the index (+1) of the section in the list of all sections in the document.
XWikiException
- error when extracting sections from documentpublic String getContentOfSection(int sectionNumber) throws XWikiException
sectionNumber
- the index (+1) of the section in the list of all sections in the document.
XWikiException
- error when trying to extract section contentpublic String updateDocumentSection(int sectionNumber, String newSectionContent) throws XWikiException
sectionNumber
- the index (starting at 1) of the section in the list of all sections in the document.newSectionContent
- the new section content.
XWikiException
- error when updating contentpublic String getVersionHashCode(XWikiContext context)
public static String getInternalPropertyName(String propname, XWikiContext context)
public String getInternalProperty(String propname)
public String getCustomClass()
public void setCustomClass(String customClass)
public void setValidationScript(String validationScript)
public String getValidationScript()
public String getComment()
public void setComment(String comment)
public boolean isMinorEdit()
public void setMinorEdit(boolean isMinor)
protected Boolean getMinorEdit1()
protected void setMinorEdit1(Boolean isMinor)
public BaseObject newXObject(EntityReference classReference, XWikiContext context) throws XWikiException
Note that absolute reference are not supported for xclasses which mean that the wiki part (whatever the wiki is) of the reference will be systematically removed.
classReference
- the reference of the classcontext
- the XWiki context
XWikiException
- error when creating the new object@Deprecated public BaseObject newObject(String className, XWikiContext context) throws XWikiException
newXObject(EntityReference, XWikiContext)
XWikiException
public BaseObject getXObject(DocumentReference classReference, boolean create, XWikiContext context)
public BaseObject getXObject(EntityReference classReference, boolean create, XWikiContext context)
@Deprecated public BaseObject getObject(String className, boolean create, XWikiContext context)
getXObject(DocumentReference, boolean, XWikiContext)
public boolean validate(XWikiContext context) throws XWikiException
XWikiException
public boolean validate(String[] classNames, XWikiContext context) throws XWikiException
XWikiException
public static void backupContext(Map<String,Object> backup, XWikiContext context)
public static void restoreContext(Map<String,Object> backup, XWikiContext context)
public void setAsContextDoc(XWikiContext context)
public String getPreviousVersion()
public String toString()
toString
in class Object
public void setHidden(Boolean hidden)
hidden
- The new value of the hidden
property.public Boolean isHidden()
true
if the document is hidden and does not appear among the results of
XWiki.searchDocuments(String)
, false
otherwise.public void convertSyntax(String targetSyntaxId, XWikiContext context) throws XWikiException
targetSyntaxId
- the syntax to convert to (eg "xwiki/2.0", "xhtml/1.0", etc)
XWikiException
- if an exception occurred during the conversion processpublic void convertSyntax(org.xwiki.rendering.syntax.Syntax targetSyntax, XWikiContext context) throws XWikiException
targetSyntax
- the syntax to convert to (eg "xwiki/2.0", "xhtml/1.0", etc)
XWikiException
- if an exception occurred during the conversion processpublic org.xwiki.rendering.block.XDOM getXDOM()
getXDOM
in interface DocumentModelBridge
public boolean is10Syntax()
public boolean is10Syntax(String syntaxId)
protected static String renderXDOM(org.xwiki.rendering.block.XDOM content, org.xwiki.rendering.syntax.Syntax targetSyntax) throws XWikiException
content
- the XDOM content to rendertargetSyntax
- the syntax identifier of the rendered content
XWikiException
- if an exception occurred during the rendering processpublic DocumentReference resolveClassReference(String documentName)
protected EntityReference getRelativeParentReference()
public MergeResult merge(XWikiDocument previousDocument, XWikiDocument newDocument, MergeConfiguration configuration, XWikiContext context)
All 3 documents are supposed to have the same document reference and language already since that's what makes them uniques.
Important note: this method does not take care of attachments contents related operations and only remove attachments which need to be removed from the list. For memory handling reasons all attachments contents related operations should be done elsewhere.
previousDocument
- the previous version of the documentnewDocument
- the next version of the documentconfiguration
- the configuration of the merge Indicate how to deal with some conflicts use cases, etc.context
- the XWiki context
public boolean apply(XWikiDocument document)
Thid method does not take into account versions and author related informations and the provided document should
have the same reference. Like merge(XWikiDocument, XWikiDocument, MergeConfiguration, XWikiContext)
,
this method is dealing with "real" data and should not change everything related to version management and
document identifier.
This method also does not take into account attachments because:
document
- the document to apply
public boolean apply(XWikiDocument document, boolean clean)
Thid method does not take into account versions and author related informations and the provided document should
have the same reference. Like merge(XWikiDocument, XWikiDocument, MergeConfiguration, XWikiContext)
,
this method is dealing with "real" data and should not change everything related to version management and
document identifier.
This method also does not take into account attachments because:
document
- the document to apply
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |