@Test public void convertSyntax() throws XWikiException { this.document.setSyntax(Syntax.HTML_4_01); this.document.setContent("<p>content not in section</p>" + "<h1>header 1</h1><p>header 1 content</p>" + "<h2>header 2</h2><p>header 2 content</p>"); this.baseObject.setLargeStringValue("area", "<p>object content not in section</p>" + "<h1>object header 1</h1><p>object header 1 content</p>" + "<h2>object header 2</h2><p>object header 2 content</p>"); this.baseObject.setLargeStringValue("puretextarea", "<p>object content not in section</p>" + "<h1>object header 1</h1><p>object header 1 content</p>" + "<h2>object header 2</h2><p>object header 2 content</p>"); this.document.convertSyntax("xwiki/2.0", this.oldcore.getXWikiContext()); assertEquals("content not in section\n\n" + "= header 1 =\n\nheader 1 content\n\n" + "== header 2 ==\n\nheader 2 content", this.document.getContent()); assertEquals("object content not in section\n\n" + "= object header 1 =\n\nobject header 1 content\n\n" + "== object header 2 ==\n\nobject header 2 content", this.baseObject.getStringValue("area")); assertEquals( "<p>object content not in section</p>" + "<h1>object header 1</h1><p>object header 1 content</p>" + "<h2>object header 2</h2><p>object header 2 content</p>", this.baseObject.getStringValue("puretextarea")); assertEquals("xwiki/2.0", this.document.getSyntaxId()); }
public void convertSyntax(String targetSyntaxId, XWikiContext context) throws XWikiException { try { convertSyntax(Syntax.valueOf(targetSyntaxId), context); } catch (Exception e) { throw new XWikiException(XWikiException.MODULE_XWIKI_RENDERING, XWikiException.ERROR_XWIKI_UNKNOWN, "Failed to convert document to syntax [" + targetSyntaxId + "]", e); } }
XWikiDocument implements DocumentModelBridge, Cloneable { public void convertSyntax(String targetSyntaxId, XWikiContext context) throws XWikiException { try { convertSyntax(Syntax.valueOf(targetSyntaxId), context); } catch (Exception e) { throw new XWikiException(XWikiException.MODULE_XWIKI_RENDERING, XWikiException.ERROR_XWIKI_UNKNOWN, "Failed to convert document to syntax [" + targetSyntaxId + "]", e); } } }
XWikiDocument implements DocumentModelBridge, Cloneable { public void convertSyntax(String targetSyntaxId, XWikiContext context) throws XWikiException { try { convertSyntax(Syntax.valueOf(targetSyntaxId), context); } catch (Exception e) { throw new XWikiException(XWikiException.MODULE_XWIKI_RENDERING, XWikiException.ERROR_XWIKI_UNKNOWN, "Failed to convert document to syntax [" + targetSyntaxId + "]", e); } } XWikiDocument(DocumentReference reference);  XWikiDocument(DocumentReference reference, Locale locale); @Deprecated  XWikiDocument(); @Deprecated  XWikiDocument(String space, String name); @Deprecated  XWikiDocument(String wiki, String space, String name); }
XWikiDocument implements DocumentModelBridge, Cloneable { public void convertSyntax(String targetSyntaxId, XWikiContext context) throws XWikiException { try { convertSyntax(Syntax.valueOf(targetSyntaxId), context); } catch (Exception e) { throw new XWikiException(XWikiException.MODULE_XWIKI_RENDERING, XWikiException.ERROR_XWIKI_UNKNOWN, "Failed to convert document to syntax [" + targetSyntaxId + "]", e); } } XWikiDocument(DocumentReference reference);  XWikiDocument(DocumentReference reference, Locale locale); @Deprecated  XWikiDocument(); @Deprecated  XWikiDocument(String space, String name); @Deprecated  XWikiDocument(String wiki, String space, String name); XWikiStoreInterface getStore(XWikiContext context); @Deprecated XWikiAttachmentStoreInterface getAttachmentStore(XWikiContext context); XWikiVersioningStoreInterface getVersioningStore(XWikiContext context); XWikiStoreInterface getStore(); void setStore(XWikiStoreInterface store); String getKey(); @Override int hashCode(); long getId(); void setId(long id); @Deprecated String getSpace(); @Deprecated void setSpace(String spaces); @Deprecated String getWeb(); @Deprecated void setWeb(String space); @Override String getVersion(); void setVersion(String version); Version getRCSVersion(); void setRCSVersion(Version version); @Override XWikiDocument getOriginalDocument(); void setOriginalDocument(XWikiDocument originalDocument); DocumentReference getParentReference(); @Deprecated String getParent(); @Deprecated XWikiDocument getParentDoc(); void setParentReference(EntityReference parentReference); @Deprecated void setParent(String parent); @Override String getContent(); void setContent(String content); void setContent(XDOM content); String getRenderedContent(Syntax targetSyntax, XWikiContext context); String getRenderedContent(boolean transformationContextIsolated, XWikiContext context); @Unstable String displayDocument(XWikiContext context); @Unstable String displayDocument(boolean restricted, XWikiContext context); @Unstable String displayDocument(Syntax targetSyntax, XWikiContext context); @Unstable String displayDocument(Syntax targetSyntax, boolean restricted, XWikiContext context); String getRenderedContent(Syntax targetSyntax, boolean transformationContextIsolated, XWikiContext context); String getRenderedContent(XWikiContext context); String getRenderedContent(String text, String syntaxId, XWikiContext context); String getRenderedContent(String text, String syntaxId, boolean restrictedTransformationContext,
        XWikiContext context); String getRenderedContent(String text, String syntaxId, boolean restrictedTransformationContext,
        XWikiDocument sDocument, XWikiContext context); String getRenderedContent(String text, String sourceSyntaxId, String targetSyntaxId, XWikiContext context); String getRenderedContent(String text, String sourceSyntaxId, String targetSyntaxId,
        boolean restrictedTransformationContext, XWikiContext context); String getRenderedContent(String text, String sourceSyntaxId, String targetSyntaxId,
        boolean restrictedTransformationContext, XWikiDocument sDocument, XWikiContext context); String getEscapedContent(XWikiContext context); @Deprecated String getName(); @Deprecated void setName(String name); @Override DocumentReference getDocumentReference(); PageReference getPageReference(); PageReference getPageReferenceWithLocale(); DocumentReference getDocumentReferenceWithLocale(); @Deprecated @Override String getFullName(); @Deprecated String getPrefixedFullName(); @Deprecated void setDocumentReference(DocumentReference reference); @Deprecated void setFullName(String name); @Deprecated void setFullName(String fullName, XWikiContext context); @Deprecated @Override String getWikiName(); @Deprecated @Override String getSpaceName(); @Deprecated @Override String getPageName(); @Override String getTitle(); String getRenderedTitle(Syntax outputSyntax, XWikiContext context); String getRenderedTitle(XWikiContext context); void setTitle(String title); String getFormat(); void setFormat(String format); DocumentReference getAuthorReference(); void setAuthorReference(DocumentReference authorReference); @Deprecated String getAuthor(); @Deprecated void setAuthor(String author); @Override DocumentReference getContentAuthorReference(); void setContentAuthorReference(DocumentReference contentAuthorReference); @Deprecated String getContentAuthor(); @Deprecated void setContentAuthor(String contentAuthor); DocumentReference getCreatorReference(); void setCreatorReference(DocumentReference creatorReference); @Deprecated String getCreator(); @Deprecated void setCreator(String creator); Date getDate(); void setDate(Date date); Date getCreationDate(); void setCreationDate(Date date); Date getContentUpdateDate(); void setContentUpdateDate(Date date); String getMeta(); void setMeta(String meta); void appendMeta(String meta); boolean isContentDirty(); void incrementVersion(); static Version getNextVersion(Version version, boolean minorEdit); void setContentDirty(boolean contentDirty); boolean isMetaDataDirty(); void setMetaDataDirty(boolean metaDataDirty); String getAttachmentURL(String filename, XWikiContext context); String getAttachmentURL(String filename, String action, XWikiContext context); String getExternalAttachmentURL(String filename, String action, XWikiContext context); String getAttachmentURL(String filename, String action, String querystring, XWikiContext context); String getAttachmentRevisionURL(String filename, String revision, XWikiContext context); String getAttachmentRevisionURL(String filename, String revision, String querystring, XWikiContext context); String getURL(String action, String params, boolean redirect, XWikiContext context); String getURL(String action, boolean redirect, XWikiContext context); String getURL(String action, XWikiContext context); String getURL(String action, String querystring, XWikiContext context); String getURL(String action, String querystring, String anchor, XWikiContext context); String getExternalURL(String action, XWikiContext context); String getExternalURL(String action, String querystring, XWikiContext context); String getParentURL(XWikiContext context); XWikiDocumentArchive getDocumentArchive(XWikiContext context); com.xpn.xwiki.api.Document newDocument(String customClassName, XWikiContext context); com.xpn.xwiki.api.Document newDocument(Class<?> customClass, XWikiContext context); com.xpn.xwiki.api.Document newDocument(XWikiContext context); void loadArchive(XWikiContext context); XWikiDocumentArchive getDocumentArchive(); XWikiDocumentArchive loadDocumentArchive(); void setDocumentArchive(XWikiDocumentArchive arch); void setDocumentArchive(String sarch); Version[] getRevisions(XWikiContext context); String[] getRecentRevisions(int nb, XWikiContext context); List<String> getRevisions(RevisionCriteria criteria, XWikiContext context); XWikiRCSNodeInfo getRevisionInfo(String version, XWikiContext context); boolean isMostRecent(); void setMostRecent(boolean mostRecent); BaseClass getXClass(); void setXClass(BaseClass xwikiClass); Map<DocumentReference, List<BaseObject>> getXObjects(); void setXObjects(Map<DocumentReference, List<BaseObject>> objects); BaseObject getXObject(); @Deprecated BaseObject getxWikiObject(); List<BaseClass> getXClasses(XWikiContext context); int createXObject(EntityReference classReference, XWikiContext context); @Deprecated int createNewObject(String className, XWikiContext context); int getXObjectSize(DocumentReference classReference); int getXObjectSize(EntityReference classReference); @Deprecated int getObjectNumbers(String className); List<BaseObject> getXObjects(DocumentReference classReference); List<BaseObject> getXObjects(EntityReference reference); @Deprecated Vector<BaseObject> getObjects(String className); void setXObjects(DocumentReference classReference, List<BaseObject> objects); BaseObject getXObject(EntityReference reference); BaseObject getXObject(DocumentReference classReference); BaseObject getXObject(ObjectReference objectReference); BaseProperty<ObjectPropertyReference> getXObjectProperty(ObjectPropertyReference objectPropertyReference); @Deprecated BaseObject getObject(String className); BaseObject getXObject(DocumentReference classReference, int nb); BaseObject getXObject(EntityReference classReference, int number, boolean create, XWikiContext xcontext); BaseObject getXObject(EntityReference classReference, int nb); @Deprecated BaseObject getObject(String className, int nb); BaseObject getXObject(DocumentReference classReference, String key, String value); @Deprecated BaseObject getObject(String className, String key, String value); BaseObject getXObject(EntityReference reference, String key, String value, boolean failover); BaseObject getXObject(DocumentReference classReference, String key, String value, boolean failover); @Deprecated BaseObject getObject(String className, String key, String value, boolean failover); @Deprecated void addXObject(DocumentReference classReference, BaseObject object); void addXObject(BaseObject object); @Deprecated void addObject(String className, BaseObject object); @Deprecated void setXObject(DocumentReference classReference, int nb, BaseObject object); void setXObject(int nb, BaseObject object); @Deprecated void setObject(String className, int nb, BaseObject object); boolean isNew(); void setNew(boolean aNew); void mergeXClass(XWikiDocument templatedoc); @Deprecated void mergexWikiClass(XWikiDocument templatedoc); void mergeXObjects(XWikiDocument templateDoc); @Deprecated void mergexWikiObjects(XWikiDocument templatedoc); void cloneXObjects(XWikiDocument templatedoc); void duplicateXObjects(XWikiDocument templatedoc); DocumentReference getTemplateDocumentReference(); @Deprecated String getTemplate(); void setTemplateDocumentReference(DocumentReference templateDocumentReference); @Deprecated void setTemplate(String template); String displayPrettyName(String fieldname, XWikiContext context); String displayPrettyName(String fieldname, boolean showMandatory, XWikiContext context); String displayPrettyName(String fieldname, boolean showMandatory, boolean before, 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 displayTooltip(String fieldname, XWikiContext context); String displayTooltip(String fieldname, BaseObject obj, XWikiContext context); String display(String fieldname, XWikiContext context); String display(String fieldname, BaseObject obj, XWikiContext context); String display(String fieldname, String mode, XWikiContext context); String display(String fieldname, String type, BaseObject obj, XWikiContext context); String display(String fieldname, String mode, String prefix, XWikiContext context); String display(String fieldname, String type, BaseObject obj, String wrappingSyntaxId, XWikiContext context); String display(String fieldname, String type, String pref, BaseObject obj, XWikiContext context); String display(String fieldname, String type, String pref, BaseObject obj, String wrappingSyntaxId,
        XWikiContext context); String displayForm(DocumentReference classReference, String header, String format, XWikiContext context); @Deprecated String displayForm(String className, String header, String format, XWikiContext context); String displayForm(DocumentReference classReference, String header, String format, boolean linebreak,
        XWikiContext context); @Deprecated String displayForm(String className, String header, String format, boolean linebreak, XWikiContext context); String displayForm(DocumentReference classReference, XWikiContext context); @Deprecated String displayForm(String className, XWikiContext context); boolean isFromCache(); void setFromCache(boolean fromCache); void readDocMetaFromForm(EditForm eform, XWikiContext context); void setTags(String tagsStr, XWikiContext context); String getTags(XWikiContext context); List<String> getTagsList(XWikiContext context); List<String> getTagsPossibleValues(XWikiContext context); void readTranslationMetaFromForm(EditForm eform, XWikiContext context); void readObjectsFromForm(EditForm eform, XWikiContext context); void readObjectsFromFormUpdateOrCreate(EditForm eform, XWikiContext context); void readFromForm(EditForm eform, XWikiContext context); void readFromTemplate(EditForm eform, XWikiContext context); void readFromTemplate(DocumentReference templateDocumentReference, XWikiContext context); @Deprecated void readFromTemplate(String template, XWikiContext context); void clone(XWikiDocument document); @Override XWikiDocument clone(); XWikiDocument duplicate(DocumentReference newDocumentReference); void copyAttachments(XWikiDocument sourceDocument); void loadAttachmentsContent(XWikiContext context); void loadAttachmentsContentSafe(XWikiContext context); void loadAttachments(XWikiContext context); @Override boolean equals(Object object); boolean equalsData(XWikiDocument otherDocument); String getXMLContent(XWikiContext context); String toXML(XWikiContext context); String toFullXML(XWikiContext context); @Deprecated void addToZip(ZipOutputStream zos, String zipname, boolean withVersions, XWikiContext context); @Deprecated void addToZip(ZipOutputStream zos, boolean withVersions, XWikiContext context); @Deprecated void addToZip(ZipOutputStream zos, XWikiContext context); String toXML(boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent,
        boolean bWithVersions, XWikiContext context); @Deprecated Document toXMLDocument(XWikiContext context); @Deprecated Document toXMLDocument(boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent,
        boolean bWithVersions, XWikiContext context); @Deprecated void toXML(XMLWriter wr, boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent,
        boolean bWithVersions, XWikiContext context); void toXML(OutputStream out, boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent,
        boolean bWithVersions, XWikiContext context); void toXML(OutputTarget out, boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent,
        boolean bWithVersions, boolean format, String encoding); void fromXML(String xml); void fromXML(InputStream is); void fromXML(InputSource source, boolean withArchive); void fromXML(String source, boolean withArchive); void fromXML(InputStream source, boolean withArchive); @Deprecated void fromXML(Document domdoc, boolean withArchive); static boolean containsXMLWikiDocument(Document domdoc); void setAttachmentList(List<XWikiAttachment> list); List<XWikiAttachment> getAttachmentList(); @Deprecated void saveAllAttachments(XWikiContext context); @Deprecated void saveAllAttachments(boolean updateParent, boolean transaction, XWikiContext context); @Deprecated void saveAttachmentsContent(List<XWikiAttachment> attachments, XWikiContext context); @Deprecated void saveAttachmentContent(XWikiAttachment attachment, XWikiContext context); @Deprecated void saveAttachmentContent(XWikiAttachment attachment, boolean updateParent, boolean transaction,
        XWikiContext context); @Deprecated void loadAttachmentContent(XWikiAttachment attachment, XWikiContext context); XWikiAttachment removeAttachment(XWikiAttachment attachment); XWikiAttachment removeAttachment(XWikiAttachment attachmentToRemove, boolean toRecycleBin); List<XWikiAttachmentToRemove> getAttachmentsToRemove(); void clearAttachmentsToRemove(); List<DocumentReference> getBackLinkedReferences(XWikiContext context); @Deprecated List<String> getBackLinkedPages(XWikiContext context); Set<XWikiLink> getUniqueWikiLinkedPages(XWikiContext context); Set<String> getUniqueLinkedPages(XWikiContext context); List<DocumentReference> getChildrenReferences(XWikiContext context); @Deprecated List<String> getChildren(XWikiContext context); List<DocumentReference> getChildrenReferences(int nb, int start, XWikiContext context); @Deprecated List<String> getChildren(int nb, int start, XWikiContext context); void renameProperties(DocumentReference classReference, Map<String, String> fieldsToRename); @Deprecated void renameProperties(String className, Map<String, String> fieldsToRename); void addXObjectToRemove(BaseObject object); void addXObjectsToRemoveFromVersion(XWikiDocument previousVersion); @Deprecated void addObjectsToRemove(BaseObject object); List<BaseObject> getXObjectsToRemove(); @Deprecated ArrayList<BaseObject> getObjectsToRemove(); void setXObjectsToRemove(List<BaseObject> objectsToRemove); List<String> getIncludedPages(XWikiContext context); List<String> getIncludedMacros(XWikiContext context); String displayRendered(PropertyClass pclass, String prefix, BaseCollection object, XWikiContext context); String displayView(PropertyClass pclass, String prefix, BaseCollection object, XWikiContext context); String displayEdit(PropertyClass pclass, String prefix, BaseCollection object, XWikiContext context); String displayHidden(PropertyClass pclass, String prefix, BaseCollection object, XWikiContext context); XWikiAttachment getAttachment(String filename); @Deprecated void addAttachment(XWikiAttachment attachment); XWikiAttachment setAttachment(XWikiAttachment attachment); @Deprecated XWikiAttachment addAttachment(String fileName, byte[] content, XWikiContext context); @Deprecated XWikiAttachment addAttachment(String fileName, InputStream content, XWikiContext context); XWikiAttachment setAttachment(String fileName, InputStream content, XWikiContext context); BaseObject getFirstObject(String fieldname); BaseObject getFirstObject(String fieldname, XWikiContext context); void setProperty(EntityReference classReference, String fieldName, BaseProperty value); @Deprecated void setProperty(String className, String fieldName, BaseProperty value); int getIntValue(DocumentReference classReference, String fieldName); @Unstable int getIntValue(DocumentReference classReference, String fieldName, int defaultValue); @Deprecated int getIntValue(String className, String fieldName); long getLongValue(DocumentReference classReference, String fieldName); @Deprecated long getLongValue(String className, String fieldName); String getStringValue(EntityReference classReference, String fieldName); String getStringValue(DocumentReference classReference, String fieldName); @Deprecated String getStringValue(String className, String fieldName); int getIntValue(String fieldName); long getLongValue(String fieldName); String getStringValue(String fieldName); void setStringValue(EntityReference classReference, String fieldName, String value); @Deprecated void setStringValue(String className, String fieldName, String value); List getListValue(DocumentReference classReference, String fieldName); @Deprecated List getListValue(String className, String fieldName); List getListValue(String fieldName); void setStringListValue(EntityReference classReference, String fieldName, List value); @Deprecated void setStringListValue(String className, String fieldName, List value); void setDBStringListValue(EntityReference classReference, String fieldName, List value); @Deprecated void setDBStringListValue(String className, String fieldName, List value); void setLargeStringValue(EntityReference classReference, String fieldName, String value); @Deprecated void setLargeStringValue(String className, String fieldName, String value); void setIntValue(EntityReference classReference, String fieldName, int value); @Deprecated void setIntValue(String className, String fieldName, int value); @Deprecated String getDatabase(); @Deprecated void setDatabase(String database); @Deprecated String getLanguage(); @Deprecated void setLanguage(String language); Locale getLocale(); void setLocale(Locale locale); @Deprecated String getDefaultLanguage(); @Deprecated void setDefaultLanguage(String defaultLanguage); Locale getDefaultLocale(); void setDefaultLocale(Locale defaultLocale); int getTranslation(); @Deprecated void setTranslation(int translation); String getTranslatedContent(XWikiContext context); String getTranslatedContent(String locale, XWikiContext context); XWikiDocument getTranslatedDocument(XWikiContext context); @Deprecated XWikiDocument getTranslatedDocument(String language, XWikiContext context); XWikiDocument getTranslatedDocument(Locale locale, XWikiContext context); @Deprecated String getRealLanguage(XWikiContext context); @Override @Deprecated String getRealLanguage(); Locale getRealLocale(); @Deprecated List<String> getTranslationList(XWikiContext context); List<Locale> getTranslationLocales(XWikiContext context); List<Delta> getXMLDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context); List<Delta> getContentDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context); List<Delta> getContentDiff(String fromRev, String toRev, XWikiContext context); List<Delta> getContentDiff(String fromRev, XWikiContext context); List<Delta> getLastChanges(XWikiContext context); List<Delta> getRenderedContentDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context); List<Delta> getRenderedContentDiff(String fromRev, String toRev, XWikiContext context); List<Delta> getRenderedContentDiff(String fromRev, XWikiContext context); 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); 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); List<List<ObjectDiff>> getClassDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context); List<AttachmentDiff> getAttachmentDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context); @Deprecated void rename(DocumentReference newDocumentReference, XWikiContext context); @Deprecated void rename(DocumentReference newDocumentReference, List<DocumentReference> backlinkDocumentReferences,
        XWikiContext context); @Deprecated void rename(DocumentReference newDocumentReference, List<DocumentReference> backlinkDocumentReferences,
        List<DocumentReference> childDocumentReferences, XWikiContext context); @Unstable XWikiDocument cloneRename(DocumentReference newDocumentReference, XWikiContext context); XWikiDocument copyDocument(DocumentReference newDocumentReference, XWikiContext context); @Deprecated XWikiDocument copyDocument(String newDocumentName, XWikiContext context); XWikiLock getLock(XWikiContext context); void setLock(String userName, XWikiContext context); void removeLock(XWikiContext context); void insertText(String text, String marker, XWikiContext context); Object getWikiNode(); void setWikiNode(Object wikiNode); String getXClassXML(); @Deprecated String getxWikiClassXML(); void setXClassXML(String xClassXML); @Deprecated void setxWikiClassXML(String xClassXML); int getElements(); void setElements(int elements); void setElement(int element, boolean toggle); boolean hasElement(int element); String getDefaultEditMode(XWikiContext context); String getDefaultEditURL(XWikiContext context); String getEditURL(String action, String mode, XWikiContext context); String getEditURL(String action, String mode, String language, XWikiContext context); String getDefaultTemplate(); void setDefaultTemplate(String defaultTemplate); Vector<BaseObject> getComments(); @Override Syntax getSyntax(); @Override @Deprecated String getSyntaxId(); void setSyntax(Syntax syntax); @Deprecated void setSyntaxId(String syntaxId); Vector<BaseObject> getComments(boolean asc); boolean isCurrentUserCreator(XWikiContext context); @Deprecated boolean isCreator(String username); boolean isCreator(DocumentReference username); boolean isCurrentUserPage(XWikiContext context); boolean isCurrentLocalUserPage(XWikiContext context); void resetArchive(XWikiContext context); BaseObject addXObjectFromRequest(XWikiContext context); BaseObject addXObjectFromRequest(EntityReference classReference, XWikiContext context); @Deprecated BaseObject addObjectFromRequest(String className, XWikiContext context); BaseObject addXObjectFromRequest(DocumentReference classReference, String prefix, XWikiContext context); @Deprecated BaseObject addObjectFromRequest(String className, String prefix, XWikiContext context); List<BaseObject> addXObjectsFromRequest(DocumentReference classReference, XWikiContext context); @Deprecated List<BaseObject> addObjectsFromRequest(String className, XWikiContext context); List<BaseObject> addXObjectsFromRequest(DocumentReference classReference, String pref, XWikiContext context); @Deprecated List<BaseObject> addObjectsFromRequest(String className, String pref, XWikiContext context); BaseObject addXObjectFromRequest(DocumentReference classReference, int num, XWikiContext context); @Deprecated BaseObject addObjectFromRequest(String className, int num, XWikiContext context); BaseObject addXObjectFromRequest(EntityReference classReference, String prefix, int num,
        XWikiContext context); @Deprecated BaseObject addObjectFromRequest(String className, String prefix, int num, XWikiContext context); BaseObject updateXObjectFromRequest(EntityReference classReference, XWikiContext context); @Deprecated BaseObject updateObjectFromRequest(String className, XWikiContext context); BaseObject updateXObjectFromRequest(EntityReference classReference, String prefix, XWikiContext context); @Deprecated BaseObject updateObjectFromRequest(String className, String prefix, XWikiContext context); BaseObject updateXObjectFromRequest(EntityReference classReference, String prefix, int num,
        XWikiContext context); @Deprecated BaseObject updateObjectFromRequest(String className, String prefix, int num, XWikiContext context); List<BaseObject> updateXObjectsFromRequest(EntityReference classReference, XWikiContext context); @Deprecated List<BaseObject> updateObjectsFromRequest(String className, XWikiContext context); List<BaseObject> updateXObjectsFromRequest(EntityReference classReference, String pref, XWikiContext context); @Deprecated List<BaseObject> updateObjectsFromRequest(String className, String pref, XWikiContext context); boolean isAdvancedContent(); boolean isProgrammaticContent(); boolean removeXObject(BaseObject object); @Deprecated boolean removeObject(BaseObject object); boolean removeXObjects(DocumentReference classReference); boolean removeXObjects(EntityReference reference); @Deprecated boolean removeObjects(String className); List<DocumentSection> getSections(); DocumentSection getDocumentSection(int sectionNumber); String getContentOfSection(int sectionNumber); String updateDocumentSection(int sectionNumber, String newSectionContent); String getVersionHashCode(XWikiContext context); static String getInternalPropertyName(String propname, XWikiContext context); String getInternalProperty(String propname); String getCustomClass(); void setCustomClass(String customClass); void setValidationScript(String validationScript); String getValidationScript(); String getComment(); void setComment(String comment); boolean isMinorEdit(); void setMinorEdit(boolean isMinor); BaseObject newXObject(EntityReference classReference, XWikiContext context); @Deprecated BaseObject newObject(String className, XWikiContext context); BaseObject getXObject(DocumentReference classReference, boolean create, XWikiContext context); BaseObject getXObject(EntityReference classReference, boolean create, XWikiContext context); @Deprecated BaseObject getObject(String className, boolean create, XWikiContext context); boolean validate(XWikiContext context); boolean validate(String[] classNames, XWikiContext context); static void backupContext(Map<String, Object> backup, XWikiContext context); static void restoreContext(Map<String, Object> backup, XWikiContext context); void setAsContextDoc(XWikiContext context); String getPreviousVersion(); @Override String toString(); void setHidden(Boolean hidden); Boolean isHidden(); void convertSyntax(String targetSyntaxId, XWikiContext context); void convertSyntax(Syntax targetSyntax, XWikiContext context); @Override XDOM getXDOM(); boolean is10Syntax(); boolean is10Syntax(String syntaxId); DocumentReference resolveClassReference(String documentName); EntityReference getRelativeParentReference(); @Deprecated MergeResult merge(XWikiDocument previousDocument, XWikiDocument newDocument,
        MergeConfiguration configuration, XWikiContext context); boolean apply(XWikiDocument document); boolean apply(XWikiDocument document, boolean clean); @Unstable int getLocalReferenceMaxLength(); }
XWikiDocument implements DocumentModelBridge, Cloneable { public void convertSyntax(String targetSyntaxId, XWikiContext context) throws XWikiException { try { convertSyntax(Syntax.valueOf(targetSyntaxId), context); } catch (Exception e) { throw new XWikiException(XWikiException.MODULE_XWIKI_RENDERING, XWikiException.ERROR_XWIKI_UNKNOWN, "Failed to convert document to syntax [" + targetSyntaxId + "]", e); } } XWikiDocument(DocumentReference reference);  XWikiDocument(DocumentReference reference, Locale locale); @Deprecated  XWikiDocument(); @Deprecated  XWikiDocument(String space, String name); @Deprecated  XWikiDocument(String wiki, String space, String name); XWikiStoreInterface getStore(XWikiContext context); @Deprecated XWikiAttachmentStoreInterface getAttachmentStore(XWikiContext context); XWikiVersioningStoreInterface getVersioningStore(XWikiContext context); XWikiStoreInterface getStore(); void setStore(XWikiStoreInterface store); String getKey(); @Override int hashCode(); long getId(); void setId(long id); @Deprecated String getSpace(); @Deprecated void setSpace(String spaces); @Deprecated String getWeb(); @Deprecated void setWeb(String space); @Override String getVersion(); void setVersion(String version); Version getRCSVersion(); void setRCSVersion(Version version); @Override XWikiDocument getOriginalDocument(); void setOriginalDocument(XWikiDocument originalDocument); DocumentReference getParentReference(); @Deprecated String getParent(); @Deprecated XWikiDocument getParentDoc(); void setParentReference(EntityReference parentReference); @Deprecated void setParent(String parent); @Override String getContent(); void setContent(String content); void setContent(XDOM content); String getRenderedContent(Syntax targetSyntax, XWikiContext context); String getRenderedContent(boolean transformationContextIsolated, XWikiContext context); @Unstable String displayDocument(XWikiContext context); @Unstable String displayDocument(boolean restricted, XWikiContext context); @Unstable String displayDocument(Syntax targetSyntax, XWikiContext context); @Unstable String displayDocument(Syntax targetSyntax, boolean restricted, XWikiContext context); String getRenderedContent(Syntax targetSyntax, boolean transformationContextIsolated, XWikiContext context); String getRenderedContent(XWikiContext context); String getRenderedContent(String text, String syntaxId, XWikiContext context); String getRenderedContent(String text, String syntaxId, boolean restrictedTransformationContext,
        XWikiContext context); String getRenderedContent(String text, String syntaxId, boolean restrictedTransformationContext,
        XWikiDocument sDocument, XWikiContext context); String getRenderedContent(String text, String sourceSyntaxId, String targetSyntaxId, XWikiContext context); String getRenderedContent(String text, String sourceSyntaxId, String targetSyntaxId,
        boolean restrictedTransformationContext, XWikiContext context); String getRenderedContent(String text, String sourceSyntaxId, String targetSyntaxId,
        boolean restrictedTransformationContext, XWikiDocument sDocument, XWikiContext context); String getEscapedContent(XWikiContext context); @Deprecated String getName(); @Deprecated void setName(String name); @Override DocumentReference getDocumentReference(); PageReference getPageReference(); PageReference getPageReferenceWithLocale(); DocumentReference getDocumentReferenceWithLocale(); @Deprecated @Override String getFullName(); @Deprecated String getPrefixedFullName(); @Deprecated void setDocumentReference(DocumentReference reference); @Deprecated void setFullName(String name); @Deprecated void setFullName(String fullName, XWikiContext context); @Deprecated @Override String getWikiName(); @Deprecated @Override String getSpaceName(); @Deprecated @Override String getPageName(); @Override String getTitle(); String getRenderedTitle(Syntax outputSyntax, XWikiContext context); String getRenderedTitle(XWikiContext context); void setTitle(String title); String getFormat(); void setFormat(String format); DocumentReference getAuthorReference(); void setAuthorReference(DocumentReference authorReference); @Deprecated String getAuthor(); @Deprecated void setAuthor(String author); @Override DocumentReference getContentAuthorReference(); void setContentAuthorReference(DocumentReference contentAuthorReference); @Deprecated String getContentAuthor(); @Deprecated void setContentAuthor(String contentAuthor); DocumentReference getCreatorReference(); void setCreatorReference(DocumentReference creatorReference); @Deprecated String getCreator(); @Deprecated void setCreator(String creator); Date getDate(); void setDate(Date date); Date getCreationDate(); void setCreationDate(Date date); Date getContentUpdateDate(); void setContentUpdateDate(Date date); String getMeta(); void setMeta(String meta); void appendMeta(String meta); boolean isContentDirty(); void incrementVersion(); static Version getNextVersion(Version version, boolean minorEdit); void setContentDirty(boolean contentDirty); boolean isMetaDataDirty(); void setMetaDataDirty(boolean metaDataDirty); String getAttachmentURL(String filename, XWikiContext context); String getAttachmentURL(String filename, String action, XWikiContext context); String getExternalAttachmentURL(String filename, String action, XWikiContext context); String getAttachmentURL(String filename, String action, String querystring, XWikiContext context); String getAttachmentRevisionURL(String filename, String revision, XWikiContext context); String getAttachmentRevisionURL(String filename, String revision, String querystring, XWikiContext context); String getURL(String action, String params, boolean redirect, XWikiContext context); String getURL(String action, boolean redirect, XWikiContext context); String getURL(String action, XWikiContext context); String getURL(String action, String querystring, XWikiContext context); String getURL(String action, String querystring, String anchor, XWikiContext context); String getExternalURL(String action, XWikiContext context); String getExternalURL(String action, String querystring, XWikiContext context); String getParentURL(XWikiContext context); XWikiDocumentArchive getDocumentArchive(XWikiContext context); com.xpn.xwiki.api.Document newDocument(String customClassName, XWikiContext context); com.xpn.xwiki.api.Document newDocument(Class<?> customClass, XWikiContext context); com.xpn.xwiki.api.Document newDocument(XWikiContext context); void loadArchive(XWikiContext context); XWikiDocumentArchive getDocumentArchive(); XWikiDocumentArchive loadDocumentArchive(); void setDocumentArchive(XWikiDocumentArchive arch); void setDocumentArchive(String sarch); Version[] getRevisions(XWikiContext context); String[] getRecentRevisions(int nb, XWikiContext context); List<String> getRevisions(RevisionCriteria criteria, XWikiContext context); XWikiRCSNodeInfo getRevisionInfo(String version, XWikiContext context); boolean isMostRecent(); void setMostRecent(boolean mostRecent); BaseClass getXClass(); void setXClass(BaseClass xwikiClass); Map<DocumentReference, List<BaseObject>> getXObjects(); void setXObjects(Map<DocumentReference, List<BaseObject>> objects); BaseObject getXObject(); @Deprecated BaseObject getxWikiObject(); List<BaseClass> getXClasses(XWikiContext context); int createXObject(EntityReference classReference, XWikiContext context); @Deprecated int createNewObject(String className, XWikiContext context); int getXObjectSize(DocumentReference classReference); int getXObjectSize(EntityReference classReference); @Deprecated int getObjectNumbers(String className); List<BaseObject> getXObjects(DocumentReference classReference); List<BaseObject> getXObjects(EntityReference reference); @Deprecated Vector<BaseObject> getObjects(String className); void setXObjects(DocumentReference classReference, List<BaseObject> objects); BaseObject getXObject(EntityReference reference); BaseObject getXObject(DocumentReference classReference); BaseObject getXObject(ObjectReference objectReference); BaseProperty<ObjectPropertyReference> getXObjectProperty(ObjectPropertyReference objectPropertyReference); @Deprecated BaseObject getObject(String className); BaseObject getXObject(DocumentReference classReference, int nb); BaseObject getXObject(EntityReference classReference, int number, boolean create, XWikiContext xcontext); BaseObject getXObject(EntityReference classReference, int nb); @Deprecated BaseObject getObject(String className, int nb); BaseObject getXObject(DocumentReference classReference, String key, String value); @Deprecated BaseObject getObject(String className, String key, String value); BaseObject getXObject(EntityReference reference, String key, String value, boolean failover); BaseObject getXObject(DocumentReference classReference, String key, String value, boolean failover); @Deprecated BaseObject getObject(String className, String key, String value, boolean failover); @Deprecated void addXObject(DocumentReference classReference, BaseObject object); void addXObject(BaseObject object); @Deprecated void addObject(String className, BaseObject object); @Deprecated void setXObject(DocumentReference classReference, int nb, BaseObject object); void setXObject(int nb, BaseObject object); @Deprecated void setObject(String className, int nb, BaseObject object); boolean isNew(); void setNew(boolean aNew); void mergeXClass(XWikiDocument templatedoc); @Deprecated void mergexWikiClass(XWikiDocument templatedoc); void mergeXObjects(XWikiDocument templateDoc); @Deprecated void mergexWikiObjects(XWikiDocument templatedoc); void cloneXObjects(XWikiDocument templatedoc); void duplicateXObjects(XWikiDocument templatedoc); DocumentReference getTemplateDocumentReference(); @Deprecated String getTemplate(); void setTemplateDocumentReference(DocumentReference templateDocumentReference); @Deprecated void setTemplate(String template); String displayPrettyName(String fieldname, XWikiContext context); String displayPrettyName(String fieldname, boolean showMandatory, XWikiContext context); String displayPrettyName(String fieldname, boolean showMandatory, boolean before, 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 displayTooltip(String fieldname, XWikiContext context); String displayTooltip(String fieldname, BaseObject obj, XWikiContext context); String display(String fieldname, XWikiContext context); String display(String fieldname, BaseObject obj, XWikiContext context); String display(String fieldname, String mode, XWikiContext context); String display(String fieldname, String type, BaseObject obj, XWikiContext context); String display(String fieldname, String mode, String prefix, XWikiContext context); String display(String fieldname, String type, BaseObject obj, String wrappingSyntaxId, XWikiContext context); String display(String fieldname, String type, String pref, BaseObject obj, XWikiContext context); String display(String fieldname, String type, String pref, BaseObject obj, String wrappingSyntaxId,
        XWikiContext context); String displayForm(DocumentReference classReference, String header, String format, XWikiContext context); @Deprecated String displayForm(String className, String header, String format, XWikiContext context); String displayForm(DocumentReference classReference, String header, String format, boolean linebreak,
        XWikiContext context); @Deprecated String displayForm(String className, String header, String format, boolean linebreak, XWikiContext context); String displayForm(DocumentReference classReference, XWikiContext context); @Deprecated String displayForm(String className, XWikiContext context); boolean isFromCache(); void setFromCache(boolean fromCache); void readDocMetaFromForm(EditForm eform, XWikiContext context); void setTags(String tagsStr, XWikiContext context); String getTags(XWikiContext context); List<String> getTagsList(XWikiContext context); List<String> getTagsPossibleValues(XWikiContext context); void readTranslationMetaFromForm(EditForm eform, XWikiContext context); void readObjectsFromForm(EditForm eform, XWikiContext context); void readObjectsFromFormUpdateOrCreate(EditForm eform, XWikiContext context); void readFromForm(EditForm eform, XWikiContext context); void readFromTemplate(EditForm eform, XWikiContext context); void readFromTemplate(DocumentReference templateDocumentReference, XWikiContext context); @Deprecated void readFromTemplate(String template, XWikiContext context); void clone(XWikiDocument document); @Override XWikiDocument clone(); XWikiDocument duplicate(DocumentReference newDocumentReference); void copyAttachments(XWikiDocument sourceDocument); void loadAttachmentsContent(XWikiContext context); void loadAttachmentsContentSafe(XWikiContext context); void loadAttachments(XWikiContext context); @Override boolean equals(Object object); boolean equalsData(XWikiDocument otherDocument); String getXMLContent(XWikiContext context); String toXML(XWikiContext context); String toFullXML(XWikiContext context); @Deprecated void addToZip(ZipOutputStream zos, String zipname, boolean withVersions, XWikiContext context); @Deprecated void addToZip(ZipOutputStream zos, boolean withVersions, XWikiContext context); @Deprecated void addToZip(ZipOutputStream zos, XWikiContext context); String toXML(boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent,
        boolean bWithVersions, XWikiContext context); @Deprecated Document toXMLDocument(XWikiContext context); @Deprecated Document toXMLDocument(boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent,
        boolean bWithVersions, XWikiContext context); @Deprecated void toXML(XMLWriter wr, boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent,
        boolean bWithVersions, XWikiContext context); void toXML(OutputStream out, boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent,
        boolean bWithVersions, XWikiContext context); void toXML(OutputTarget out, boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent,
        boolean bWithVersions, boolean format, String encoding); void fromXML(String xml); void fromXML(InputStream is); void fromXML(InputSource source, boolean withArchive); void fromXML(String source, boolean withArchive); void fromXML(InputStream source, boolean withArchive); @Deprecated void fromXML(Document domdoc, boolean withArchive); static boolean containsXMLWikiDocument(Document domdoc); void setAttachmentList(List<XWikiAttachment> list); List<XWikiAttachment> getAttachmentList(); @Deprecated void saveAllAttachments(XWikiContext context); @Deprecated void saveAllAttachments(boolean updateParent, boolean transaction, XWikiContext context); @Deprecated void saveAttachmentsContent(List<XWikiAttachment> attachments, XWikiContext context); @Deprecated void saveAttachmentContent(XWikiAttachment attachment, XWikiContext context); @Deprecated void saveAttachmentContent(XWikiAttachment attachment, boolean updateParent, boolean transaction,
        XWikiContext context); @Deprecated void loadAttachmentContent(XWikiAttachment attachment, XWikiContext context); XWikiAttachment removeAttachment(XWikiAttachment attachment); XWikiAttachment removeAttachment(XWikiAttachment attachmentToRemove, boolean toRecycleBin); List<XWikiAttachmentToRemove> getAttachmentsToRemove(); void clearAttachmentsToRemove(); List<DocumentReference> getBackLinkedReferences(XWikiContext context); @Deprecated List<String> getBackLinkedPages(XWikiContext context); Set<XWikiLink> getUniqueWikiLinkedPages(XWikiContext context); Set<String> getUniqueLinkedPages(XWikiContext context); List<DocumentReference> getChildrenReferences(XWikiContext context); @Deprecated List<String> getChildren(XWikiContext context); List<DocumentReference> getChildrenReferences(int nb, int start, XWikiContext context); @Deprecated List<String> getChildren(int nb, int start, XWikiContext context); void renameProperties(DocumentReference classReference, Map<String, String> fieldsToRename); @Deprecated void renameProperties(String className, Map<String, String> fieldsToRename); void addXObjectToRemove(BaseObject object); void addXObjectsToRemoveFromVersion(XWikiDocument previousVersion); @Deprecated void addObjectsToRemove(BaseObject object); List<BaseObject> getXObjectsToRemove(); @Deprecated ArrayList<BaseObject> getObjectsToRemove(); void setXObjectsToRemove(List<BaseObject> objectsToRemove); List<String> getIncludedPages(XWikiContext context); List<String> getIncludedMacros(XWikiContext context); String displayRendered(PropertyClass pclass, String prefix, BaseCollection object, XWikiContext context); String displayView(PropertyClass pclass, String prefix, BaseCollection object, XWikiContext context); String displayEdit(PropertyClass pclass, String prefix, BaseCollection object, XWikiContext context); String displayHidden(PropertyClass pclass, String prefix, BaseCollection object, XWikiContext context); XWikiAttachment getAttachment(String filename); @Deprecated void addAttachment(XWikiAttachment attachment); XWikiAttachment setAttachment(XWikiAttachment attachment); @Deprecated XWikiAttachment addAttachment(String fileName, byte[] content, XWikiContext context); @Deprecated XWikiAttachment addAttachment(String fileName, InputStream content, XWikiContext context); XWikiAttachment setAttachment(String fileName, InputStream content, XWikiContext context); BaseObject getFirstObject(String fieldname); BaseObject getFirstObject(String fieldname, XWikiContext context); void setProperty(EntityReference classReference, String fieldName, BaseProperty value); @Deprecated void setProperty(String className, String fieldName, BaseProperty value); int getIntValue(DocumentReference classReference, String fieldName); @Unstable int getIntValue(DocumentReference classReference, String fieldName, int defaultValue); @Deprecated int getIntValue(String className, String fieldName); long getLongValue(DocumentReference classReference, String fieldName); @Deprecated long getLongValue(String className, String fieldName); String getStringValue(EntityReference classReference, String fieldName); String getStringValue(DocumentReference classReference, String fieldName); @Deprecated String getStringValue(String className, String fieldName); int getIntValue(String fieldName); long getLongValue(String fieldName); String getStringValue(String fieldName); void setStringValue(EntityReference classReference, String fieldName, String value); @Deprecated void setStringValue(String className, String fieldName, String value); List getListValue(DocumentReference classReference, String fieldName); @Deprecated List getListValue(String className, String fieldName); List getListValue(String fieldName); void setStringListValue(EntityReference classReference, String fieldName, List value); @Deprecated void setStringListValue(String className, String fieldName, List value); void setDBStringListValue(EntityReference classReference, String fieldName, List value); @Deprecated void setDBStringListValue(String className, String fieldName, List value); void setLargeStringValue(EntityReference classReference, String fieldName, String value); @Deprecated void setLargeStringValue(String className, String fieldName, String value); void setIntValue(EntityReference classReference, String fieldName, int value); @Deprecated void setIntValue(String className, String fieldName, int value); @Deprecated String getDatabase(); @Deprecated void setDatabase(String database); @Deprecated String getLanguage(); @Deprecated void setLanguage(String language); Locale getLocale(); void setLocale(Locale locale); @Deprecated String getDefaultLanguage(); @Deprecated void setDefaultLanguage(String defaultLanguage); Locale getDefaultLocale(); void setDefaultLocale(Locale defaultLocale); int getTranslation(); @Deprecated void setTranslation(int translation); String getTranslatedContent(XWikiContext context); String getTranslatedContent(String locale, XWikiContext context); XWikiDocument getTranslatedDocument(XWikiContext context); @Deprecated XWikiDocument getTranslatedDocument(String language, XWikiContext context); XWikiDocument getTranslatedDocument(Locale locale, XWikiContext context); @Deprecated String getRealLanguage(XWikiContext context); @Override @Deprecated String getRealLanguage(); Locale getRealLocale(); @Deprecated List<String> getTranslationList(XWikiContext context); List<Locale> getTranslationLocales(XWikiContext context); List<Delta> getXMLDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context); List<Delta> getContentDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context); List<Delta> getContentDiff(String fromRev, String toRev, XWikiContext context); List<Delta> getContentDiff(String fromRev, XWikiContext context); List<Delta> getLastChanges(XWikiContext context); List<Delta> getRenderedContentDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context); List<Delta> getRenderedContentDiff(String fromRev, String toRev, XWikiContext context); List<Delta> getRenderedContentDiff(String fromRev, XWikiContext context); 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); 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); List<List<ObjectDiff>> getClassDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context); List<AttachmentDiff> getAttachmentDiff(XWikiDocument fromDoc, XWikiDocument toDoc, XWikiContext context); @Deprecated void rename(DocumentReference newDocumentReference, XWikiContext context); @Deprecated void rename(DocumentReference newDocumentReference, List<DocumentReference> backlinkDocumentReferences,
        XWikiContext context); @Deprecated void rename(DocumentReference newDocumentReference, List<DocumentReference> backlinkDocumentReferences,
        List<DocumentReference> childDocumentReferences, XWikiContext context); @Unstable XWikiDocument cloneRename(DocumentReference newDocumentReference, XWikiContext context); XWikiDocument copyDocument(DocumentReference newDocumentReference, XWikiContext context); @Deprecated XWikiDocument copyDocument(String newDocumentName, XWikiContext context); XWikiLock getLock(XWikiContext context); void setLock(String userName, XWikiContext context); void removeLock(XWikiContext context); void insertText(String text, String marker, XWikiContext context); Object getWikiNode(); void setWikiNode(Object wikiNode); String getXClassXML(); @Deprecated String getxWikiClassXML(); void setXClassXML(String xClassXML); @Deprecated void setxWikiClassXML(String xClassXML); int getElements(); void setElements(int elements); void setElement(int element, boolean toggle); boolean hasElement(int element); String getDefaultEditMode(XWikiContext context); String getDefaultEditURL(XWikiContext context); String getEditURL(String action, String mode, XWikiContext context); String getEditURL(String action, String mode, String language, XWikiContext context); String getDefaultTemplate(); void setDefaultTemplate(String defaultTemplate); Vector<BaseObject> getComments(); @Override Syntax getSyntax(); @Override @Deprecated String getSyntaxId(); void setSyntax(Syntax syntax); @Deprecated void setSyntaxId(String syntaxId); Vector<BaseObject> getComments(boolean asc); boolean isCurrentUserCreator(XWikiContext context); @Deprecated boolean isCreator(String username); boolean isCreator(DocumentReference username); boolean isCurrentUserPage(XWikiContext context); boolean isCurrentLocalUserPage(XWikiContext context); void resetArchive(XWikiContext context); BaseObject addXObjectFromRequest(XWikiContext context); BaseObject addXObjectFromRequest(EntityReference classReference, XWikiContext context); @Deprecated BaseObject addObjectFromRequest(String className, XWikiContext context); BaseObject addXObjectFromRequest(DocumentReference classReference, String prefix, XWikiContext context); @Deprecated BaseObject addObjectFromRequest(String className, String prefix, XWikiContext context); List<BaseObject> addXObjectsFromRequest(DocumentReference classReference, XWikiContext context); @Deprecated List<BaseObject> addObjectsFromRequest(String className, XWikiContext context); List<BaseObject> addXObjectsFromRequest(DocumentReference classReference, String pref, XWikiContext context); @Deprecated List<BaseObject> addObjectsFromRequest(String className, String pref, XWikiContext context); BaseObject addXObjectFromRequest(DocumentReference classReference, int num, XWikiContext context); @Deprecated BaseObject addObjectFromRequest(String className, int num, XWikiContext context); BaseObject addXObjectFromRequest(EntityReference classReference, String prefix, int num,
        XWikiContext context); @Deprecated BaseObject addObjectFromRequest(String className, String prefix, int num, XWikiContext context); BaseObject updateXObjectFromRequest(EntityReference classReference, XWikiContext context); @Deprecated BaseObject updateObjectFromRequest(String className, XWikiContext context); BaseObject updateXObjectFromRequest(EntityReference classReference, String prefix, XWikiContext context); @Deprecated BaseObject updateObjectFromRequest(String className, String prefix, XWikiContext context); BaseObject updateXObjectFromRequest(EntityReference classReference, String prefix, int num,
        XWikiContext context); @Deprecated BaseObject updateObjectFromRequest(String className, String prefix, int num, XWikiContext context); List<BaseObject> updateXObjectsFromRequest(EntityReference classReference, XWikiContext context); @Deprecated List<BaseObject> updateObjectsFromRequest(String className, XWikiContext context); List<BaseObject> updateXObjectsFromRequest(EntityReference classReference, String pref, XWikiContext context); @Deprecated List<BaseObject> updateObjectsFromRequest(String className, String pref, XWikiContext context); boolean isAdvancedContent(); boolean isProgrammaticContent(); boolean removeXObject(BaseObject object); @Deprecated boolean removeObject(BaseObject object); boolean removeXObjects(DocumentReference classReference); boolean removeXObjects(EntityReference reference); @Deprecated boolean removeObjects(String className); List<DocumentSection> getSections(); DocumentSection getDocumentSection(int sectionNumber); String getContentOfSection(int sectionNumber); String updateDocumentSection(int sectionNumber, String newSectionContent); String getVersionHashCode(XWikiContext context); static String getInternalPropertyName(String propname, XWikiContext context); String getInternalProperty(String propname); String getCustomClass(); void setCustomClass(String customClass); void setValidationScript(String validationScript); String getValidationScript(); String getComment(); void setComment(String comment); boolean isMinorEdit(); void setMinorEdit(boolean isMinor); BaseObject newXObject(EntityReference classReference, XWikiContext context); @Deprecated BaseObject newObject(String className, XWikiContext context); BaseObject getXObject(DocumentReference classReference, boolean create, XWikiContext context); BaseObject getXObject(EntityReference classReference, boolean create, XWikiContext context); @Deprecated BaseObject getObject(String className, boolean create, XWikiContext context); boolean validate(XWikiContext context); boolean validate(String[] classNames, XWikiContext context); static void backupContext(Map<String, Object> backup, XWikiContext context); static void restoreContext(Map<String, Object> backup, XWikiContext context); void setAsContextDoc(XWikiContext context); String getPreviousVersion(); @Override String toString(); void setHidden(Boolean hidden); Boolean isHidden(); void convertSyntax(String targetSyntaxId, XWikiContext context); void convertSyntax(Syntax targetSyntax, XWikiContext context); @Override XDOM getXDOM(); boolean is10Syntax(); boolean is10Syntax(String syntaxId); DocumentReference resolveClassReference(String documentName); EntityReference getRelativeParentReference(); @Deprecated MergeResult merge(XWikiDocument previousDocument, XWikiDocument newDocument,
        MergeConfiguration configuration, XWikiContext context); boolean apply(XWikiDocument document); boolean apply(XWikiDocument document, boolean clean); @Unstable int getLocalReferenceMaxLength(); static final EntityReference COMMENTSCLASS_REFERENCE; static final EntityReference SHEETCLASS_REFERENCE; static final int HAS_ATTACHMENTS; static final int HAS_OBJECTS; static final int HAS_CLASS; static final String CKEY_SDOC; static final String DB_SPACE_SEP; static final String SPACE_NAME_SEP; }