com.xpn.xwiki.objects.meta
Class MetaClass

java.lang.Object
  extended by com.xpn.xwiki.objects.BaseElement<R>
      extended by com.xpn.xwiki.objects.BaseCollection<DocumentReference>
          extended by com.xpn.xwiki.objects.classes.BaseClass
              extended by com.xpn.xwiki.objects.meta.MetaClass
All Implemented Interfaces:
ClassInterface, ElementInterface, ObjectInterface, Serializable, Cloneable

public class MetaClass
extends BaseClass

A pseudo XClass whose fields are meta properties. In other words, each field of this XClass defines a type of property that can be added to a standard XClass. This class is being used to lookup XClass property types. New code should lookup PropertyClassProvider implementations instead using the component manager.

Version:
$Id: 7762bd6fb9eee8d43f8f381cc968d310187fd063 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.xpn.xwiki.objects.BaseCollection
currentReferenceDocumentReferenceResolver, fields, fieldsToRemove, number, relativeEntityReferenceResolver
 
Fields inherited from class com.xpn.xwiki.objects.BaseElement
documentReference, localEntityReferenceSerializer, ownerDocument, referenceCache
 
Constructor Summary
MetaClass()
          Creates a new instance that has a property for each available property type.
 
Method Summary
 PropertyInterface get(String name)
           
static MetaClass getMetaClass()
           
 BaseCollection newObject(XWikiContext context)
           
 void put(String name, PropertyInterface property)
           
 PropertyInterface safeget(String name)
           
 void safeput(String name, PropertyInterface property)
           
static void setMetaClass(MetaClass metaClass)
          Sets the cached instance of this class.
 
Methods inherited from class com.xpn.xwiki.objects.classes.BaseClass
addBooleanField, addDateField, addDateField, addDateField, addDBListField, addDBListField, addDBListField, addDBTreeListField, addDBTreeListField, addDBTreeListField, addEmailField, addField, addGroupsField, addGroupsField, addLevelsField, addLevelsField, addNumberField, addPasswordField, addStaticListField, addStaticListField, addStaticListField, addStaticListField, addStaticListField, addTemplateField, addTextAreaField, addTextField, addUsersField, addUsersField, addUsersField, addUsersField, apply, clone, disableField, enableField, equals, flushCache, fromMap, fromMap, fromString, fromValueMap, fromXML, fromXML, getCustomClass, getCustomMapping, getCustomMappingPropertyList, getDefaultEditSheet, getDefaultViewSheet, getDefaultWeb, getDeprecatedObjectProperties, getDiff, getDisabledObjectProperties, getDisabledProperties, getEnabledProperties, getName, getNameField, getReference, getValidationScript, hasCustomMapping, hasExternalCustomMapping, hasInternalCustomMapping, isCustomMappingValid, isCustomMappingValid, merge, merge, newCustomClassInstance, newCustomClassInstance, newCustomClassInstance, setCustomClass, setCustomMapping, setDefaultEditSheet, setDefaultViewSheet, setDefaultWeb, setDirty, setName, setNameField, setOwnerDocument, setValidationScript, toXML, toXML, validateObject
 
Methods inherited from class com.xpn.xwiki.objects.BaseCollection
addPropertyForRemoval, getClassName, getCustomMappingMap, getDateValue, getDoubleValue, getField, getFieldList, getFieldsToRemove, getFloatValue, getIntValue, getIntValue, getLargeStringValue, getListValue, getLongValue, getNumber, getProperties, getPropertyList, getPropertyNames, getRelativeXClassReference, getSetValue, getSortedIterator, getStringValue, getXClass, getXClassReference, merge, removeField, setClassName, setDateValue, setDBStringListValue, setDocumentReference, setDoubleValue, setFields, setFieldsToRemove, setFloatValue, setIntValue, setLargeStringValue, setLongValue, setNumber, setSetValue, setStringListValue, setStringValue, setXClassReference, toString, toXMLString
 
Methods inherited from class com.xpn.xwiki.objects.BaseElement
createReference, getDocumentReference, getId, getLocalKey, getLocalUidStringEntityReferenceSerializer, getOwnerDocument, getPrettyName, hashCode, setId, setPrettyName
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.xpn.xwiki.objects.ObjectInterface
getXClass
 
Methods inherited from interface com.xpn.xwiki.objects.ElementInterface
getDocumentReference, setDocumentReference, toString
 

Constructor Detail

MetaClass

public MetaClass()
Creates a new instance that has a property for each available property type.

Method Detail

safeput

public void safeput(String name,
                    PropertyInterface property)
Specified by:
safeput in interface ObjectInterface
Overrides:
safeput in class BaseCollection<DocumentReference>

safeget

public PropertyInterface safeget(String name)
Specified by:
safeget in interface ObjectInterface
Overrides:
safeget in class BaseCollection<DocumentReference>

get

public PropertyInterface get(String name)
Specified by:
get in interface ObjectInterface
Overrides:
get in class BaseClass

put

public void put(String name,
                PropertyInterface property)
Specified by:
put in interface ObjectInterface
Overrides:
put in class BaseClass

getMetaClass

public static MetaClass getMetaClass()
Returns:
a cached instance of this class that can be used to quickly lookup XClass property types

setMetaClass

public static void setMetaClass(MetaClass metaClass)
Sets the cached instance of this class.

Parameters:
metaClass - the cached instance

newObject

public BaseCollection newObject(XWikiContext context)
Overrides:
newObject in class BaseClass


Copyright © 2004–2014 XWiki. All rights reserved.