com.xpn.xwiki.api
Class Class

java.lang.Object
  extended by com.xpn.xwiki.api.Api
      extended by com.xpn.xwiki.api.Element
          extended by com.xpn.xwiki.api.Collection
              extended by com.xpn.xwiki.api.Class

public class Class
extends Collection


Field Summary
 
Fields inherited from class com.xpn.xwiki.api.Element
element
 
Fields inherited from class com.xpn.xwiki.api.Api
context
 
Constructor Summary
Class(BaseClass obj, XWikiContext context)
           
 
Method Summary
 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.
 BaseClass getXWikiClass()
           
 Object newObject()
           
 
Methods inherited from class com.xpn.xwiki.api.Collection
getCollection, getName, getNumber, getPrettyName, getProperty, getxWikiClass
 
Methods inherited from class com.xpn.xwiki.api.Element
getBaseElement
 
Methods inherited from class com.xpn.xwiki.api.Api
convert, convert, getXWikiContext, hasAccessLevel, hasAdminRights, hasProgrammingRights, hasWikiAdminRights
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Class

public Class(BaseClass obj,
             XWikiContext context)
Method Detail

getBaseClass

protected BaseClass getBaseClass()

getPropertyNames

public Object[] getPropertyNames()
Returns a String table of the property names.

Overrides:
getPropertyNames in class Collection
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 class Collection
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


Copyright © 2004-2013 XWiki. All Rights Reserved.