Package com.xpn.xwiki.objects.meta
Class MetaClass
- java.lang.Object
-
- com.xpn.xwiki.objects.BaseElement<R>
-
- com.xpn.xwiki.objects.BaseCollection<DocumentReference>
-
- com.xpn.xwiki.objects.classes.BaseClass
-
- 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 lookupPropertyClassProvider
implementations instead using the component manager.- Version:
- $Id: cffed0d016874f8d8d07f0e77152d3e5f734cf39 $
- 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, ownerDocument, referenceCache
-
-
Constructor Summary
Constructors Constructor Description MetaClass()
Creates a new instance that has a property for each available property type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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, addBooleanField, addBooleanField, addBooleanField, addDateField, addDateField, addDateField, addDBListField, addDBListField, addDBListField, addDBTreeListField, addDBTreeListField, addDBTreeListField, addEmailField, addField, addGroupsField, addGroupsField, addLevelsField, addLevelsField, addNumberField, addPageField, addPageField, addPageField, addPageField, addPasswordField, addPasswordField, addStaticListField, addStaticListField, addStaticListField, addStaticListField, addStaticListField, addStaticListField, addStaticListField, addStaticListField, addStaticListField, addTemplateField, addTextAreaField, addTextAreaField, addTextAreaField, addTextAreaField, addTextAreaField, addTextAreaField, addTextAreaField, addTextAreaField, addTextAreaField, addTextField, addTimezoneField, 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, newCustomClassInstance, newCustomClassInstance, setCustomClass, setCustomMapping, setDefaultEditSheet, setDefaultViewSheet, setDefaultWeb, setDirty, setName, setNameField, setOwnerDocument, setValidationScript, validateObject
-
Methods inherited from class com.xpn.xwiki.objects.BaseCollection
addPropertyForRemoval, getClassName, getCurrentReferenceDocumentReferenceResolver, getCustomMappingMap, getDateValue, getDoubleValue, getField, getFieldList, getFieldsToRemove, getFloatValue, getIntValue, getIntValue, getLargeStringValue, getListValue, getLongValue, getNumber, getProperties, getPropertyList, getPropertyNames, getRelativeEntityReferenceResolver, getRelativeXClassReference, getSetValue, getSortedIterator, getStringValue, getXClass, getXClassReference, merge, mergeField, removeField, setClassName, setDateValue, setDBStringListValue, setDocumentReference, setDoubleValue, setFields, setFieldsToRemove, setFloatValue, setIntValue, setLargeStringValue, setLongValue, setNumber, setSetValue, setStringListValue, setStringValue, setXClassReference, toXML, toXML, toXMLString
-
Methods inherited from class com.xpn.xwiki.objects.BaseElement
createReference, getDocumentReference, getId, getLocalEntityReferenceSerializer, getLocalization, getLocalKey, getLocalUidStringEntityReferenceSerializer, getMergeManager, getOwnerDocument, getPrettyName, getXWikiContext, hashCode, localizePlain, localizePlainOrKey, merge, setId, setPrettyName, toString, toXMLString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.xpn.xwiki.objects.ElementInterface
getDocumentReference, merge, setDocumentReference, toString
-
Methods inherited from interface com.xpn.xwiki.objects.ObjectInterface
getXClass, toXML
-
-
-
-
Method Detail
-
safeput
public void safeput(String name, PropertyInterface property)
- Specified by:
safeput
in interfaceObjectInterface
- Overrides:
safeput
in classBaseCollection<DocumentReference>
-
safeget
public PropertyInterface safeget(String name)
- Specified by:
safeget
in interfaceObjectInterface
- Overrides:
safeget
in classBaseCollection<DocumentReference>
-
get
public PropertyInterface get(String name)
- Specified by:
get
in interfaceObjectInterface
- Overrides:
get
in classBaseClass
-
put
public void put(String name, PropertyInterface property)
- Specified by:
put
in interfaceObjectInterface
- Overrides:
put
in classBaseClass
-
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)
-
-