|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.xpn.xwiki.api.Api com.xpn.xwiki.api.Element com.xpn.xwiki.api.Collection com.xpn.xwiki.api.PropertyClass
public class PropertyClass
XProperty definition API.
A property definition is the instantiation of a PropertyMetaClass
for a particular Object definition (XClass
), that customizes a property type to suit
the needs of the class. For example, it can set the number type for a
NumberClass
, the list of possible values for a
StaticListClass
, etc.
Field Summary |
---|
Fields inherited from class com.xpn.xwiki.api.Element |
---|
element |
Fields inherited from class com.xpn.xwiki.api.Api |
---|
context |
Constructor Summary | |
---|---|
PropertyClass(PropertyClass property,
XWikiContext context)
Default API constructor that creates a wrapper for a PropertyClass , given a
context . |
Method Summary | |
---|---|
int |
compareTo(PropertyClass other)
Compares two property definitions based on their index number. |
protected PropertyClass |
getBasePropertyClass()
Internal access to the wrapped PropertyClass . |
String |
getClassName()
Get the name of the XClass (Object Definition) this property definition belongs
to. |
String |
getClassType()
Get the full name of the actual class of the wrapped PropertyClass . |
List<String> |
getListValues()
If the property is a ListClass , returns the possible values. |
Map<String,ListItem> |
getMapValues()
If the property is a ListClass , returns the possible values as a map internal key <-> displayed
value . |
String |
getPrettyName()
Get the untranslated user-friendly name of this property. |
PropertyClass |
getPropertyClass()
Provides access to the wrapped PropertyClass if Programming Rights are
present. |
String |
getTooltip()
Get a tooltip string that should be displayed for input fields for instances of this property definition. |
String |
getType()
Get the actual type of the wrapped PropertyClass . |
String |
getValidationMessage()
Get the message that should be displayed when a value for an instance of this property definition fails the validation. |
String |
getValidationRegExp()
Get the regular expression used for validating a value for an instance of this property definition. |
boolean |
isDisabled()
See if this property is disabled or not. |
Methods inherited from class com.xpn.xwiki.api.Collection |
---|
getCollection, getName, getNumber, getProperties, getProperty, getPropertyNames, 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 |
---|
public PropertyClass(PropertyClass property, XWikiContext context)
PropertyClass
, given a
context
.
property
- the property definition to wrapcontext
- the current request contextMethod Detail |
---|
protected PropertyClass getBasePropertyClass()
PropertyClass
.
public String getClassType()
PropertyClass
. The
returned value is the canonical class name of the runtime object representing this property definition, for
example com.xpn.xwiki.objects.classes.StringClass
.
{@code getType()} for a more user-friendly type
public String getType()
PropertyClass
. The returned value is
extracted from the class name of the runtime object representing this property definition, and denotes a
user-friendly data type name, for example StringClass
, NumberClass
or StaticListClass
.
{@code getClassType()} for a more formal type
public String getClassName()
XClass
(Object Definition) this property definition belongs
to. For example, XWiki.XWikiUsers
or Blog.BlogPostClass
.
@Programming public PropertyClass getPropertyClass()
PropertyClass
if Programming Rights are
present.
public String getPrettyName()
User type
instead of the internal
usertype
.
getPrettyName
in class Collection
{@code getName()} returns the actual property name
public String getValidationMessage()
Please enter a valid IP address
.
{@code getValidationRegExp()} returns the regular expression used for validating the
property value
public String getValidationRegExp()
{@code getValidationMessage()} returns the message that should be displayed in case
the validation failed
public String getTooltip()
title
attribute.public boolean isDisabled()
true
if this property is disabled and should not be used, false
otherwisepublic List<String> getListValues()
ListClass
, returns the possible values. These are the internal values (keys), and
not the user-friendly or translated values that would be displayed to the user.
String
) values{@code getMapValues()} returns both the keys and their user-friendly displayed values
public Map<String,ListItem> getMapValues()
ListClass
, returns the possible values as a map internal key <-> displayed
value
.
String
) values and their associated (ListItem
) displayed values{@code getListValues()} returns only the list of possible internal keys
public int compareTo(PropertyClass other)
compareTo
in interface Comparable<PropertyClass>
other
- the other property definition to be compared with
Collection.getNumber()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |