Class PropertyValue
java.lang.Object
ru.cg.webbpm.studio.subsystems.script_editor.serialization.api.bean.PropertyValue
- All Implemented Interfaces:
PropertyContext
Class that stores a property value alongside with metadata. Value can be either simple (an atomic
object that is not merged and stored as json), array (i.e. a list) or complex (i.e. a map).
- Author:
- krylov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected final FieldMetadata
protected ClassRef
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
PropertyValue
(Map<String, PropertyValue> complexValue, FieldMetadata fieldMetadata) PropertyValue
(FieldMetadata fieldMetadata) PropertyValue
(PropertyValue other) PropertyValue
(PropertyValue other, FieldMetadata metadata) protected
PropertyValue
(PrototypedList<ArrayItem> arrayValue, FieldMetadata fieldMetadata) protected
PropertyValue
(PrototypedList<ArrayItem> array, ComplexValue complex, FieldMetadata metadata) -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertyValue
array
(FieldMetadata metadata, PropertyValue parentPropValue) static PropertyValue
complex
(FieldMetadata metadata, PropertyValue parentPropValue) static PropertyValue
empty
(FieldMetadata metadata, PropertyValue parentPropValue) boolean
getArray()
<T> T
int
hashCode()
static PropertyValue
boolean
isArray()
boolean
boolean
boolean
isSimple()
void
Change this value type to array, erasing previous value if type changesvoid
Change this value type to complex, erasing previous value if type changesvoid
Change this value type to simple, erasing previous value if type changesvoid
void
setArray
(PrototypedList<ArrayItem> items) void
setComplex
(Map<String, PropertyValue> complexValue) void
setComplex
(ComplexValue complexValue) void
setEnumIndex
(Integer idx) void
setExpanded
(boolean expanded) void
setImplRef
(ClassRef implRef) void
setParentPropValue
(PropertyValue parentPropValue) void
setScriptContext
(Object scriptContext) void
static PropertyValue
simple
(Object target, FieldMetadata metadata, PropertyValue parentPropValue) toString()
-
Field Details
-
fieldMetadata
-
implRef
-
expanded
protected boolean expanded
-
-
Constructor Details
-
PropertyValue
-
PropertyValue
-
PropertyValue
-
PropertyValue
-
PropertyValue
-
PropertyValue
protected PropertyValue(PrototypedList<ArrayItem> array, ComplexValue complex, FieldMetadata metadata)
-
-
Method Details
-
inheritPropertyValue
-
simple
public static PropertyValue simple(Object target, FieldMetadata metadata, PropertyValue parentPropValue) -
array
-
complex
-
empty
-
getFieldMetadata
-
getImplRef
-
setImplRef
-
isExpanded
public boolean isExpanded() -
setExpanded
public void setExpanded(boolean expanded) -
isSimple
public boolean isSimple() -
isArray
public boolean isArray()- Returns:
- true if the stored value is an array
-
isComplex
public boolean isComplex()- Returns:
- true if the stored value is a map
-
getSimple
public <T> T getSimple() -
getArray
-
getComplex
-
setSimple
-
setArray
-
setArray
-
setComplex
-
setComplex
-
makeSimple
public void makeSimple()Change this value type to simple, erasing previous value if type changes -
makeArray
public void makeArray()Change this value type to array, erasing previous value if type changes -
makeComplex
public void makeComplex()Change this value type to complex, erasing previous value if type changes -
getEnumIndex
-
setEnumIndex
-
equals
-
hashCode
public int hashCode() -
getProperties
- Specified by:
getProperties
in interfacePropertyContext
-
getScriptContext
-
setScriptContext
-
getParentPropValue
-
setParentPropValue
-
toString
-