Package org.xwiki.bridge
Interface DocumentModelBridge
-
public interface DocumentModelBridge
Exposes methods for accessing Documents. This is temporary until we remodel the Model classes and the Document services. The implementation is actually the XWikiDocument class, so this is just a light interface that hides the old xwiki-core.- Since:
- 1.6M1
- Version:
- $Id: 3efdce445606ff568320e01133a2734d8c49343c $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default DocumentAuthors
getAuthors()
String
getContent()
Retrieves the textual content of the document.DocumentReference
getContentAuthorReference()
Deprecated.since 14.0RC1 rely ongetAuthors()
.default Date
getCreationDate()
default Date
getDate()
DocumentReference
getDocumentReference()
String
getFullName()
Deprecated.usegetDocumentReference()
insteadDocumentModelBridge
getOriginalDocument()
Retrieves a copy of the document before it was changed.String
getPageName()
Deprecated.since 2.2M1 usegetDocumentReference()
insteadString
getRealLanguage()
Retrieve the actual language of the document variant.String
getSpaceName()
Deprecated.since 2.2M1 usegetDocumentReference()
insteadorg.xwiki.rendering.syntax.Syntax
getSyntax()
String
getSyntaxId()
Deprecated.since 3.0M1 usegetSyntax()
insteadString
getTitle()
String
getVersion()
String
getWikiName()
Deprecated.since 2.2M1 usegetDocumentReference()
insteadorg.xwiki.rendering.block.XDOM
getXDOM()
default Boolean
isHidden()
default boolean
isRestricted()
-
-
-
Method Detail
-
getFullName
@Deprecated String getFullName()
Deprecated.usegetDocumentReference()
insteadRetrieve the full name of the document, in theSpace.Name
format, for exampleMain.WebHome
.- Returns:
- A
String
representation of the document's full name.
-
getDocumentReference
DocumentReference getDocumentReference()
- Returns:
- the document's reference (without the document locale)
- Since:
- 2.2M1
-
getRealLanguage
String getRealLanguage()
Retrieve the actual language of the document variant. If this is a translation, then it is the language of the translation. If this is the original variant of the document, then it it is the default language of the document.- Returns:
- The document's language in a 2-letter code.
-
getContent
String getContent()
Retrieves the textual content of the document.- Returns:
- The document's content.
-
getOriginalDocument
DocumentModelBridge getOriginalDocument()
Retrieves a copy of the document before it was changed.- Returns:
- the copy of this Document instance before any modification was made to it.
-
getSyntaxId
@Deprecated String getSyntaxId()
Deprecated.since 3.0M1 usegetSyntax()
instead- Returns:
- the Syntax id representing the syntax used for the current document. For example "xwiki/1.0" represents the first version XWiki syntax while "xwiki/2.0" represents version 2.0 of the XWiki Syntax.
-
getSyntax
org.xwiki.rendering.syntax.Syntax getSyntax()
- Returns:
- the Syntax id representing the syntax used for the current document. For example "xwiki/1.0" represents the first version XWiki syntax while "xwiki/2.0" represents version 2.0 of the XWiki Syntax.
- Since:
- 3.0M1
-
getPageName
@Deprecated String getPageName()
Deprecated.since 2.2M1 usegetDocumentReference()
instead- Returns:
- the page to which the document belongs to (eg "WebHome")
-
getSpaceName
@Deprecated String getSpaceName()
Deprecated.since 2.2M1 usegetDocumentReference()
insteadReturn the full local space reference. For example a document located in sub-spacespace11
of spacespace1
will returnspace1.space11
.- Returns:
- the space to which the document belongs to (eg "Main")
-
getWikiName
@Deprecated String getWikiName()
Deprecated.since 2.2M1 usegetDocumentReference()
insteadRetrieve the name of the virtual wiki this document belongs to.- Returns:
- A
String
representation of the document's wiki name.
-
getTitle
String getTitle()
- Returns:
- the document's title or null if not set
-
getVersion
String getVersion()
- Returns:
- a string identifying the current version of this document
-
getXDOM
org.xwiki.rendering.block.XDOM getXDOM()
- Returns:
- the XDOM for the document
- Since:
- 3.0M3
-
getContentAuthorReference
@Deprecated DocumentReference getContentAuthorReference()
Deprecated.since 14.0RC1 rely ongetAuthors()
.- Returns:
- the document's content author user reference
- Since:
- 7.2M1
-
getAuthors
@Unstable default DocumentAuthors getAuthors()
- Returns:
- the various authors information of a document.
- Since:
- 14.0RC1
-
getCreationDate
default Date getCreationDate()
- Returns:
- the creation date of the current document.
- Since:
- 12.8RC1, 12.6.3
-
isHidden
default Boolean isHidden()
- Returns:
true
if the document is hidden.- Since:
- 13.1, 12.10.5, 12.6.8
-
getDate
@Unstable default Date getDate()
- Returns:
- the last save date of the current document.
- Since:
- 14.0RC1
-
isRestricted
@Unstable default boolean isRestricted()
- Returns:
true
if the document is restricted, i.e., transformations should be executed in restricted mode- Since:
- 15.2RC1, 14.10.7
-
-