public class Object extends Collection
Constructor and Description |
---|
Object(BaseObject obj,
XWikiContext context) |
Modifier and Type | Method and Description |
---|---|
Object |
display(String name,
String mode)
Display the property with the passed name in the context of its own document.
|
Object |
display(String name,
String mode,
boolean isolated)
Display the property with the passed name in the context of the current document or its own document.
|
boolean |
equals(Object arg0) |
Object |
get(String name)
Display the passed field.
|
protected BaseObject |
getBaseObject() |
String |
getGuid() |
ObjectPropertyReference |
getPropertyReference(String propertyName)
Helper method used to obtain the reference of an object property even when the object might not have the property
(e.g.
|
BaseObjectReference |
getReference() |
BaseObject |
getXWikiObject() |
void |
set(String fieldname,
Object value) |
void |
setGuid(String guid) |
getCollection, getName, getNumber, getPrettyName, getProperties, getProperty, getPropertyNames, getValue, getxWikiClass
getBaseElement, getDocumentReference
convert, convert, convert, convertAttachments, getAuthorizationManager, getContextualAuthorizationManager, getXWikiContext, hasAccess, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights
public Object(BaseObject obj, XWikiContext context)
protected BaseObject getBaseObject()
public BaseObject getXWikiObject()
public String getGuid()
public void setGuid(String guid)
public Object get(String name)
This method's name is misleading since it doesn't return the Object's property value; it"s equivalent to
display(String, String)
(with type
equals to the context action ("view" or "edit" usually). The
right method to get the field value is Collection.getValue(String)
.
public Object display(String name, String mode)
name
- the name of the propertymode
- the edit mode in which the property should be displayed ("view", "edit", etc.)public Object display(String name, String mode, boolean isolated)
name
- the name of the propertymode
- the edit mode in which the property should be displayed ("view", "edit", etc.)isolated
- true if the property should be displayed in it's own document contextpublic BaseObjectReference getReference()
getReference
in class Element
public ObjectPropertyReference getPropertyReference(String propertyName)
getProperty(propertyName).getReference()
when you're not sure whether the object
has the specified property or not.propertyName
- the property nameCopyright © 2004–2022 XWiki. All rights reserved.