com.xpn.xwiki.objects
Class ListProperty
java.lang.Object
com.xpn.xwiki.objects.BaseElement<R>
com.xpn.xwiki.objects.BaseProperty
com.xpn.xwiki.objects.ListProperty
- All Implemented Interfaces:
- ElementInterface, PropertyInterface, Serializable, Cloneable
- Direct Known Subclasses:
- DBStringListProperty, StringListProperty
public class ListProperty
- extends BaseProperty
- implements Cloneable
- See Also:
- Serialized Form
Nested Class Summary |
static class |
ListProperty.NotifyList
List implementation for updating dirty flag when updated. |
Field Summary |
protected List<String> |
list
We make this a notifying list, because we must propagate any value updates to the owner document. |
Methods inherited from class com.xpn.xwiki.objects.BaseProperty |
apply, createReference, getClassType, getCustomMappingValue, getId, getObject, hashCode, isValueDirty, merge, setClassType, setId, setObject, setOwnerDocument, setValueDirty, setValueDirty, toFormString, toXMLString |
list
protected transient List<String> list
- We make this a notifying list, because we must propagate any value updates to the owner document.
ListProperty
public ListProperty()
getFormStringSeparator
public String getFormStringSeparator()
setFormStringSeparator
public void setFormStringSeparator(String formStringSeparator)
getValue
public Object getValue()
- Overrides:
getValue
in class BaseProperty
setValue
public void setValue(Object value)
- Overrides:
setValue
in class BaseProperty
getTextValue
public String getTextValue()
- This method is called by Hibernate to get the raw value to store in the database. Check the xwiki.hbm.xml file.
- Returns:
- the string value that is saved in the database
toText
public String toText()
- Overrides:
toText
in class BaseProperty
toSingleFormString
public String toSingleFormString()
equals
public boolean equals(Object obj)
- Overrides:
equals
in class BaseProperty
clone
public ListProperty clone()
- Specified by:
clone
in interface PropertyInterface
- Overrides:
clone
in class BaseProperty
cloneInternal
protected void cloneInternal(BaseProperty clone)
- Description copied from class:
BaseProperty
- Subclasses override this to copy values during cloning.
- Overrides:
cloneInternal
in class BaseProperty
- Parameters:
clone
- The cloned value.
getList
public List<String> getList()
setList
public void setList(List<String> list)
- Starting from 4.3M2, this method will copy the list passed as parameter. Due to XWIKI-8398 we must be able to
detect when the values in the list changes, so we cannot store the values in any type of list.
- Parameters:
list
- The list to copy.
toXML
public org.dom4j.Element toXML()
- Specified by:
toXML
in interface PropertyInterface
- Overrides:
toXML
in class BaseProperty
toString
public String toString()
-
This is important.. Otherwise we can get a stackoverflow calling toXML()
- Specified by:
toString
in interface ElementInterface
- Overrides:
toString
in class BaseProperty
- See Also:
BaseProperty.toString()
mergeValue
protected void mergeValue(Object previousValue,
Object newValue,
MergeResult mergeResult)
- Description copied from class:
BaseProperty
- Try to apply 3 ways merge on property value.
- Overrides:
mergeValue
in class BaseProperty
- Parameters:
previousValue
- the previous version of the valuenewValue
- the new version of the valuemergeResult
- merge report
Copyright © 2004-2013 XWiki. All Rights Reserved.