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 booleanprotected final FieldMetadataprotected ClassRef -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPropertyValue(Map<String, PropertyValue> complexValue, FieldMetadata fieldMetadata) PropertyValue(FieldMetadata fieldMetadata) PropertyValue(PropertyValue other) PropertyValue(PropertyValue other, FieldMetadata metadata) protectedPropertyValue(PrototypedList<ArrayItem> arrayValue, FieldMetadata fieldMetadata) protectedPropertyValue(PrototypedList<ArrayItem> array, ComplexValue complex, FieldMetadata metadata) -
Method Summary
Modifier and TypeMethodDescriptionstatic PropertyValuearray(FieldMetadata metadata, PropertyValue parentPropValue) static PropertyValuecomplex(FieldMetadata metadata, PropertyValue parentPropValue) static PropertyValueempty(FieldMetadata metadata, PropertyValue parentPropValue) booleangetArray()<T> TinthashCode()static PropertyValuebooleanisArray()booleanbooleanbooleanisSimple()voidChange this value type to array, erasing previous value if type changesvoidChange this value type to complex, erasing previous value if type changesvoidChange this value type to simple, erasing previous value if type changesvoidvoidsetArray(PrototypedList<ArrayItem> items) voidsetComplex(Map<String, PropertyValue> complexValue) voidsetComplex(ComplexValue complexValue) voidsetEnumIndex(Integer idx) voidsetExpanded(boolean expanded) voidsetImplRef(ClassRef implRef) voidsetParentPropValue(PropertyValue parentPropValue) voidsetScriptContext(Object scriptContext) voidstatic PropertyValuesimple(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:
getPropertiesin interfacePropertyContext
-
getScriptContext
-
setScriptContext
-
getParentPropValue
-
setParentPropValue
-
toString
-