public class UsersClass extends ListClass
ListClass.MapComparator
DEFAULT_SEPARATOR, DISPLAYTYPE_CHECKBOX, DISPLAYTYPE_INPUT, DISPLAYTYPE_RADIO, DISPLAYTYPE_SELECT, FREE_TEXT_ALLOWED, FREE_TEXT_DISCOURAGED, FREE_TEXT_FORBIDDEN, SEPARATOR_ESCAPE
cachedCustomDisplayer
currentReferenceDocumentReferenceResolver, fields, fieldsToRemove, number, relativeEntityReferenceResolver
documentReference, 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) |
protected String |
getFirstSeparator() |
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 ListProperty s and this method allows to access the value as
List whatever property is actually storing it. |
displayEdit, displayHidden, displayRadioEdit, displaySelectEdit, displayView, fromList, getDefaultValue, getDisplayType, getDisplayValue, getDisplayValue, getElementValue, getFreeText, getListFromString, 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, toFormString
clone, 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, validateProperty
addField, 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, toXMLString
fromXML, getDocumentReference, getLocalEntityReferenceSerializer, getLocalization, getLocalKey, getLocalUidStringEntityReferenceSerializer, getMergeManager, getOwnerDocument, getReference, getXWikiContext, hashCode, localizePlain, localizePlainOrKey, toString, toXMLString
finalize, getClass, notify, notifyAll, wait, wait, wait
displayView
get, put, safeget, safeput
apply, getDocumentReference, getReference, merge, setDocumentReference, toString
public UsersClass(PropertyMetaClass metaClass)
metaClass
- the meta class that defines the list of meta properties associated with this property typepublic UsersClass()
protected String getFirstSeparator()
getFirstSeparator
in class ListClass
ListClass.DEFAULT_SEPARATOR
.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 PropertyClassInterface
newProperty
in class ListClass
public BaseProperty fromString(String value)
fromString
in interface PropertyClassInterface
fromString
in class ListClass
public BaseProperty fromStringArray(String[] strings)
fromStringArray
in class ListClass
public void fromList(BaseProperty<?> property, List<String> list)
ListClass
List
into the passed property.public 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 ListClass
public List<String> toList(BaseProperty<?> property)
ListClass
ListClass
does not produce only ListProperty
s 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 <T extends EntityReference> void mergeProperty(BaseProperty<T> currentProperty, BaseProperty<T> previousProperty, BaseProperty<T> newProperty, MergeConfiguration configuration, XWikiContext xcontext, MergeResult mergeResult)
PropertyClass
mergeProperty
in class ListClass
currentProperty
- 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–2022 XWiki. All rights reserved.