Package com.xpn.xwiki.api
Class Class
- java.lang.Object
-
- com.xpn.xwiki.api.Api
-
- com.xpn.xwiki.api.Element
-
- com.xpn.xwiki.api.Collection
-
- com.xpn.xwiki.api.Class
-
public class Class extends Collection
-
-
Constructor Summary
Constructors Constructor Description Class(BaseClass obj, XWikiContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
Element
get(String name)
protected BaseClass
getBaseClass()
List<Property>
getDeprecatedObjectProperties(Object object)
Retrieves deprecated properties of the given object compared to the class.List<String>
getDeprecatedObjectPropertyNames(Object object)
Get the names of deprecated properties of the given object compared to the class.List<PropertyClass>
getDisabledObjectProperties(Object object)
Get the list of disabled properties that exist in a given object.List<String>
getDisabledObjectPropertyNames(Object object)
Get the names of the class properties that are disabled, and exist in the given object.List<PropertyClass>
getDisabledProperties()
Get the list of disabled property definitions that exist in this class.List<String>
getDisabledPropertyNames()
Get the names of the class properties that are disabled.List<PropertyClass>
getEnabledProperties()
Get the list of enabled (the default, normal state) property definitions that exist in this class.List<String>
getEnabledPropertyNames()
Get the names of the class properties that are enabled.Element[]
getProperties()
Object[]
getPropertyNames()
Returns a String table of the property names.DocumentReference
getReference()
BaseClass
getXWikiClass()
Object
newObject()
-
Methods inherited from class com.xpn.xwiki.api.Collection
getCollection, getName, getNumber, getPrettyName, getProperty, getValue, getxWikiClass
-
Methods inherited from class com.xpn.xwiki.api.Element
getBaseElement, getDocumentReference
-
Methods inherited from class com.xpn.xwiki.api.Api
convert, convert, convert, convertAttachments, getAuthorizationManager, getContextualAuthorizationManager, getXWikiContext, hasAccess, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights
-
-
-
-
Constructor Detail
-
Class
public Class(BaseClass obj, XWikiContext context)
-
-
Method Detail
-
getBaseClass
protected BaseClass getBaseClass()
-
getReference
public DocumentReference getReference()
- Overrides:
getReference
in classElement
- Returns:
- the reference of the element
-
getPropertyNames
public Object[] getPropertyNames()
Returns a String table of the property names.- Overrides:
getPropertyNames
in classCollection
- See Also:
Collection.getPropertyNames()
-
getEnabledPropertyNames
public List<String> getEnabledPropertyNames()
Get the names of the class properties that are enabled.- Returns:
- a list of enabled property names
- Since:
- 2.4M2
- See Also:
getEnabledProperties()
,PropertyClass.isDisabled()
-
getDisabledPropertyNames
public List<String> getDisabledPropertyNames()
Get the names of the class properties that are disabled.- Returns:
- a list of disabled property names
- Since:
- 2.4M2
- See Also:
getDisabledProperties()
,PropertyClass.isDisabled()
-
getDisabledObjectPropertyNames
public List<String> getDisabledObjectPropertyNames(Object object)
Get the names of the class properties that are disabled, and exist in the given object. This list is a subset of all the disabled properties in a class, since the object could have been created and stored before some of the class properties were added.- Parameters:
object
- the instance of this class where the disabled properties must exist- Returns:
- a list of disabled property names
- Since:
- 2.4M2
- See Also:
getDisabledObjectProperties(Object)
,PropertyClass.isDisabled()
-
getDeprecatedObjectPropertyNames
public List<String> getDeprecatedObjectPropertyNames(Object object)
Get the names of deprecated properties of the given object compared to the class. A deprecated property is a property which exists in the Object but doesn't exist anymore in the Class. This is used for synchronization of existing or imported Objects with respect to the modifications of their associated Class.- Parameters:
object
- the instance of this class where to look for undefined properties- Returns:
- a list of deprecated property names
- Since:
- 2.4M2
- See Also:
getDeprecatedObjectProperties(Object)
-
getProperties
public Element[] getProperties()
- Overrides:
getProperties
in classCollection
- Returns:
- an array with the properties of the class
-
getEnabledProperties
public List<PropertyClass> getEnabledProperties()
Get the list of enabled (the default, normal state) property definitions that exist in this class.- Returns:
- a list containing the enabled properties of the class
- Since:
- 2.4M2
- See Also:
PropertyClass.isDisabled()
,getEnabledPropertyNames()
-
getDisabledProperties
public List<PropertyClass> getDisabledProperties()
Get the list of disabled property definitions that exist in this class.- Returns:
- a list containing the disabled properties of the class
- Since:
- 2.4M2
- See Also:
PropertyClass.isDisabled()
,getDisabledPropertyNames()
-
getDisabledObjectProperties
public List<PropertyClass> getDisabledObjectProperties(Object object)
Get the list of disabled properties that exist in a given object. This list is a subset of all the disabled properties in a class, since the object could have been created and stored before some of the class properties were added.- Parameters:
object
- the instance of this class where the disabled properties must exist- Returns:
- a list containing the disabled properties of the given object
- Since:
- 2.4M2
- See Also:
PropertyClass.isDisabled()
,getDisabledObjectPropertyNames(Object)
-
getDeprecatedObjectProperties
public List<Property> getDeprecatedObjectProperties(Object object)
Retrieves deprecated properties of the given object compared to the class. A deprecated property is a property which exists in the Object but doesn't exist anymore in the Class. This is used for synchronization of existing or imported Objects with respect to the modifications of their associated Class.- Parameters:
object
- the instance of this class where to look for undefined properties- Returns:
- a list containing the properties of the object which don't exist in the class
- Since:
- 2.4M2
- See Also:
getDeprecatedObjectPropertyNames(Object)
-
get
public Element get(String name)
- Parameters:
name
- the name of the element- Returns:
- the PropertyClass for the given name
- See Also:
PropertyClass
,Element
-
getXWikiClass
public BaseClass getXWikiClass()
- Returns:
- the BaseClass (without the wrapping) if you have the programming right.
-
newObject
public Object newObject() throws XWikiException
- Returns:
- a new object from this class
- Throws:
XWikiException
-
-