public class UsersClass extends ListClass
ListClass.MapComparatorDEFAULT_SEPARATOR, DISPLAYTYPE_CHECKBOX, DISPLAYTYPE_INPUT, DISPLAYTYPE_RADIO, DISPLAYTYPE_SELECT, FREE_TEXT_ALLOWED, FREE_TEXT_DISCOURAGED, FREE_TEXT_FORBIDDEN, SEPARATOR_ESCAPEcachedCustomDisplayercurrentReferenceDocumentReferenceResolver, fields, fieldsToRemove, number, relativeEntityReferenceResolverdocumentReference, ownerDocument, referenceCache| Constructor and Description |
|---|
UsersClass()
Default constructor.
|
UsersClass(PropertyMetaClass metaClass)
Creates a new Users List property that is described by the given meta class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
fromList(BaseProperty<?> property,
List<String> list)
Set the passed
List into the passed property. |
BaseProperty |
fromString(String value) |
BaseProperty |
fromStringArray(String[] strings) |
List<String> |
getList(XWikiContext context) |
static List<String> |
getListFromString(String value)
Splits the given string into a list of user names.
|
Map<String,ListItem> |
getMap(XWikiContext context) |
String |
getText(String value,
XWikiContext context) |
boolean |
isUsesList()
Deprecated.
since 4.3M2 this meta property is not used anymore because we changed the default displayer
|
<T extends EntityReference> |
mergeProperty(BaseProperty<T> currentProperty,
BaseProperty<T> previousProperty,
BaseProperty<T> newProperty,
MergeConfiguration configuration,
XWikiContext xcontext,
MergeResult mergeResult)
Apply a 3 ways merge on passed current, previous and new version of the same property.
|
BaseProperty |
newProperty() |
BaseProperty |
newPropertyfromXML(org.dom4j.Element ppcel) |
void |
setUsesList(boolean usesList)
Deprecated.
since 4.3M2 this meta property is not used anymore because we changed the default displayer
|
List<String> |
toList(BaseProperty<?> property)
ListClass does not produce only ListPropertys and this method allows to access the value as
List whatever property is actually storing it. |
displayEdit, displayHidden, displayRadioEdit, displaySelectEdit, displayView, getDefaultValue, getDisplayType, getDisplayValue, getDisplayValue, getElementValue, getFreeText, getListFromString, getMapFromString, getSeparator, getSeparators, getSize, getSort, getStringFromList, getStringFromList, isCache, isLargeStorage, isMultiSelect, isPicker, isRelationalStorage, mergeNotOrderedListProperty, setCache, setDefaultValue, setDisplayType, setFreeText, setLargeStorage, setMultiSelect, setPicker, setRelationalStorage, setSeparator, setSeparators, setSize, setSort, toFormStringclone, compareTo, createReference, displayCustom, displayEdit, displayEdit, displayHidden, displayHidden, displayView, displayView, flushCache, fromValue, fromXML, getCachedDefaultCustomDisplayer, getClassName, getClassType, getCustomDisplay, getDefaultCustomDisplayer, getFieldFullName, getFullQueryPropertyName, getHint, getId, getName, getNumber, getObject, getPrettyName, getPrettyName, getTooltip, getTooltip, getTranslatedPrettyName, getValidationMessage, getValidationRegExp, getXClass, getxWikiClass, initLazyCollections, isCustomDisplayed, isDisabled, isUnmodifiable, isValidColumnTypes, renderContentInContext, renderContentInContext, setClassType, setCustomDisplay, setDisabled, setHint, setId, setName, setNumber, setObject, setPrettyName, setTooltip, setUnmodifiable, setValidationMessage, setValidationRegExp, setxWikiClass, toFormString, toString, toXML, toXML, validatePropertyaddField, addPropertyForRemoval, apply, equals, get, getCurrentReferenceDocumentReferenceResolver, getCustomMappingMap, getDateValue, getDiff, getDoubleValue, getField, getFieldList, getFieldsToRemove, getFloatValue, getIntValue, getIntValue, getLargeStringValue, getListValue, getLongValue, getProperties, getPropertyList, getPropertyNames, getRelativeEntityReferenceResolver, getRelativeXClassReference, getSetValue, getSortedIterator, getStringValue, getXClassReference, merge, merge, mergeField, put, removeField, safeget, safeput, setClassName, setDateValue, setDBStringListValue, setDocumentReference, setDoubleValue, setFields, setFieldsToRemove, setFloatValue, setIntValue, setLargeStringValue, setLongValue, setOwnerDocument, setSetValue, setStringListValue, setStringValue, setXClassReference, toXMLStringfromXML, getDocumentReference, getLocalEntityReferenceSerializer, getLocalization, getLocalKey, getLocalUidStringEntityReferenceSerializer, getMergeManager, getOwnerDocument, getReference, getXWikiContext, hashCode, localizePlain, localizePlainOrKey, toString, toXMLStringfinalize, getClass, notify, notifyAll, wait, wait, waitget, put, safeget, safeputapply, getDocumentReference, getReference, merge, setDocumentReference, toStringpublic UsersClass(PropertyMetaClass metaClass)
metaClass - the meta class that defines the list of meta properties associated with this property typepublic UsersClass()
public List<String> getList(XWikiContext context)
public Map<String,ListItem> getMap(XWikiContext context)
@Deprecated public boolean isUsesList()
true if the list box that is used to select the users should be filled with all the available
users, false otherwise@Deprecated public void setUsesList(boolean usesList)
usesList - true to fill the list box that is used to select the users with all the available users,
false otherwisepublic BaseProperty newProperty()
newProperty in interface PropertyClassInterfacenewProperty in class ListClasspublic BaseProperty fromString(String value)
fromString in interface PropertyClassInterfacefromString in class ListClasspublic BaseProperty fromStringArray(String[] strings)
fromStringArray in class ListClasspublic String getText(String value, XWikiContext context)
value - a user namecontext - the XWiki contextpublic static List<String> getListFromString(String value)
value - a comma separate list of user namespublic BaseProperty newPropertyfromXML(org.dom4j.Element ppcel)
newPropertyfromXML in class ListClasspublic List<String> toList(BaseProperty<?> property)
ListClassListClass does not produce only ListPropertys and this method allows to access the value as
List whatever property is actually storing it.
There is no guarantees the returned List will be modifiable.
public void fromList(BaseProperty<?> property, List<String> list)
ListClassList into the passed property.public <T extends EntityReference> void mergeProperty(BaseProperty<T> currentProperty, BaseProperty<T> previousProperty, BaseProperty<T> newProperty, MergeConfiguration configuration, XWikiContext xcontext, MergeResult mergeResult)
PropertyClassmergeProperty in class ListClasscurrentProperty - the current version of the element and the one to modifypreviousProperty - the previous version of the elementnewProperty - the new version of the propertyconfiguration - the configuration of the merge Indicate how to deal with some conflicts use cases, etc.xcontext - the XWiki contextmergeResult - the merge reportCopyright © 2004–2021 XWiki. All rights reserved.