Package com.xpn.xwiki.api
Class Element
- java.lang.Object
-
- com.xpn.xwiki.api.Api
-
- com.xpn.xwiki.api.Element
-
- Direct Known Subclasses:
Collection,Property
public class Element extends Api
Element is a superclass for any XWiki Class, Object, or Property which might be stored in the database.- Version:
- $Id: dbe95fd0a8c651cf1cf55f1b39c3160027dbf63f $
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseElementelementThe internal element which this wraps.
-
Constructor Summary
Constructors Constructor Description Element(BaseElement element, XWikiContext context)The Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected BaseElementgetBaseElement()DocumentReferencegetDocumentReference()StringgetName()Get the name of this element.EntityReferencegetReference()-
Methods inherited from class com.xpn.xwiki.api.Api
convert, convert, convert, convertAttachments, getAuthorizationManager, getContextualAuthorizationManager, getXWikiContext, hasAccess, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights
-
-
-
-
Field Detail
-
element
protected BaseElement element
The internal element which this wraps.
-
-
Constructor Detail
-
Element
public Element(BaseElement element, XWikiContext context)
The Constructor. Create a new element wrapping the given internal BaseElement.- Parameters:
element- the internal BaseElement to wrap.context- the XWikiContext which may be used to get information about the current request.
-
-
Method Detail
-
getBaseElement
protected BaseElement getBaseElement()
- Returns:
- the internal BaseElement which this Element wraps.
-
getName
public String getName()
Get the name of this element. If the Element is an XWikiObjectthen it will be the name of the Document containing the Object, if it's an XWikiClassit will be the full name of theDocumentwhere the class is defined, if it's an XWikiPropertythen it will be the name of the property.- Returns:
- the name of this Element.
-
getReference
public EntityReference getReference()
- Returns:
- the reference of the element
- Since:
- 7.3M1
-
getDocumentReference
public DocumentReference getDocumentReference()
- Returns:
- the reference to the document
- Since:
- 10.0
-
-