Class PropertyBag
- java.lang.Object
-
- lumis.portal.structure.sync.model.propertybag.PropertyBag
-
- All Implemented Interfaces:
Serializable
,ICustomEquivalence
,IDefaultAware
public class PropertyBag extends Object implements IDefaultAware, ICustomEquivalence, Serializable
Property bag model.Documentation in this class focus synchronization behavior. About the use behind the fields in the portal, see
PropertyBag
.- Since:
- 6.2.0
- Version:
- $Revision: 20617 $ $Date: 2017-10-13 14:58:47 -0300 (Fri, 13 Oct 2017) $
- See Also:
PropertyBag
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PropertyBag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getId()
String
getParentPropertyBagId()
List<Property>
getProperties()
Property
getPropertyToSetValue(String propertyName)
Returns the property to set value on.String
getValue(String propertyName)
Returns the value of the given property.boolean
isDefault()
Returns whether this object is equivalent to the default value.boolean
isEquivalent(Object obj)
Returns whether this object is equivalent to the given object.List<String>
removeProperties(String propertyName)
Removes and returns the values of the given property.String
removeProperty(String propertyName)
void
setDefaultValue(String propertyName, String value)
void
setDefaultValue(String propertyName, String value, Property.InheritMode inheritMode)
Sets the default value.void
setDefaultValues(String propertyName, List<String> values)
Sets the property default values.void
setDefaultValues(String propertyName, List<String> values, Property.InheritMode inheritMode)
Sets the property default values.void
setId(String id)
void
setParentPropertyBagId(String parentPropertyBagId)
-
-
-
Method Detail
-
isDefault
public boolean isDefault()
Description copied from interface:IDefaultAware
Returns whether this object is equivalent to the default value.- Specified by:
isDefault
in interfaceIDefaultAware
- Returns:
- true if this object is equivalent to the default value, false otherwise.
-
isEquivalent
public boolean isEquivalent(Object obj)
Description copied from interface:ICustomEquivalence
Returns whether this object is equivalent to the given object. If the object is equivalent, it will not need to be updated during synchronization.- Specified by:
isEquivalent
in interfaceICustomEquivalence
- Parameters:
obj
- the object to compare with.- Returns:
- true if the objects are equivalent, false otherwise.
-
getId
public String getId()
-
setId
public void setId(String id)
-
getParentPropertyBagId
public String getParentPropertyBagId()
-
setParentPropertyBagId
public void setParentPropertyBagId(String parentPropertyBagId)
-
removeProperties
public List<String> removeProperties(String propertyName)
Removes and returns the values of the given property.- Parameters:
propertyName
- the property name.- Returns:
- the stored values or
null
if there's no such property. - Since:
- 7.0.0
-
setDefaultValue
public void setDefaultValue(String propertyName, String value, Property.InheritMode inheritMode)
Sets the default value.- Parameters:
propertyName
- the property name.value
- the value.inheritMode
- theProperty.InheritMode
.- Since:
- 7.0.0
-
setDefaultValues
public void setDefaultValues(String propertyName, List<String> values)
Sets the property default values.- Parameters:
propertyName
- the property name.values
- the values.- Since:
- 7.0.0
-
setDefaultValues
public void setDefaultValues(String propertyName, List<String> values, Property.InheritMode inheritMode)
Sets the property default values.- Parameters:
propertyName
- the property name.values
- the values.inheritMode
- theProperty.InheritMode
.- Since:
- 7.0.0
-
getValue
public String getValue(String propertyName)
Returns the value of the given property.- Parameters:
propertyName
- the property name.- Returns:
- the stored value or
null
if there's no such property. - Since:
- 7.0.0
-
-