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: 3cf47f9d20b1b76559cf24e09257fbd3a0d5c471 $

Method Summary
 String getContent()
          Retrieves the textual content of the document.
 DocumentName getDocumentName()
          Deprecated. replaced by getDocumentReference() since 2.2M1
 DocumentReference getDocumentReference()
           
 String getFullName()
          Deprecated. use getDocumentReference() instead
 DocumentModelBridge getOriginalDocument()
          Retrieves a copy of the document before it was changed.
 String getPageName()
          Deprecated. since 2.2M1 use getDocumentReference() instead
 String getRealLanguage()
          Retrieve the actual language of the document variant.
 String getSpaceName()
          Deprecated. since 2.2M1 use getDocumentReference() instead
 org.xwiki.rendering.syntax.Syntax getSyntax()
           
 String getSyntaxId()
          Deprecated. since 3.0M1 use getSyntax() instead
 String getTitle()
           
 String getVersion()
           
 String getWikiName()
          Deprecated. since 2.2M1 use getDocumentReference() instead
 org.xwiki.rendering.block.XDOM getXDOM()
           
 

Method Detail

getFullName

@Deprecated
String getFullName()
Deprecated. use getDocumentReference() instead

Retrieve the full name of the document, in the Space.Name format, for example Main.WebHome.

Returns:
A String representation of the document's full name.

getDocumentReference

DocumentReference getDocumentReference()
Returns:
the document's reference
Since:
2.2M1

getDocumentName

@Deprecated
DocumentName getDocumentName()
Deprecated. replaced by getDocumentReference() since 2.2M1

Returns:
the full document's name, including Wiki, Space and Page

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 use getSyntax() 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 use getDocumentReference() instead

Returns:
the page to which the document belongs to (eg "WebHome")

getSpaceName

@Deprecated
String getSpaceName()
Deprecated. since 2.2M1 use getDocumentReference() instead

Returns:
the space to which the document belongs to (eg "Main")

getWikiName

@Deprecated
String getWikiName()
Deprecated. since 2.2M1 use getDocumentReference() instead

Retrieve 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


Copyright © 2004-2011 XWiki. All Rights Reserved.