Interface ValueType
-
- All Superinterfaces:
java.io.Serializable
- All Known Subinterfaces:
FileValueType,JsonValueType,PrimitiveValueType,SerializableValueType,SpinValueType,XmlValueType
- All Known Implementing Classes:
AbstractValueTypeImpl,FileValueTypeImpl,JsonTypeImpl,JsonValueTypeImpl,ObjectTypeImpl,PrimitiveValueTypeImpl,PrimitiveValueTypeImpl.BooleanTypeImpl,PrimitiveValueTypeImpl.BytesTypeImpl,PrimitiveValueTypeImpl.DateTypeImpl,PrimitiveValueTypeImpl.DoubleTypeImpl,PrimitiveValueTypeImpl.IntegerTypeImpl,PrimitiveValueTypeImpl.LongTypeImpl,PrimitiveValueTypeImpl.NullTypeImpl,PrimitiveValueTypeImpl.NumberTypeImpl,PrimitiveValueTypeImpl.ShortTypeImpl,PrimitiveValueTypeImpl.StringTypeImpl,SpinValueTypeImpl,XmlTypeImpl,XmlValueTypeImpl
public interface ValueType extends java.io.Serializable- Since:
- 7.2
- Author:
- Thorben Lindhauer, Daniel Meyer
-
-
Field Summary
Fields Modifier and Type Field Description static PrimitiveValueTypeBOOLEANstatic PrimitiveValueTypeBYTESstatic PrimitiveValueTypeDATEstatic PrimitiveValueTypeDOUBLEstatic FileValueTypeFILEstatic PrimitiveValueTypeINTEGERstatic PrimitiveValueTypeLONGstatic PrimitiveValueTypeNULLstatic PrimitiveValueTypeNUMBERstatic SerializableValueTypeOBJECTstatic PrimitiveValueTypeSHORTstatic PrimitiveValueTypeSTRINGstatic java.lang.StringVALUE_INFO_TRANSIENT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanConvertFromTypedValue(TypedValue typedValue)Determines whether the argument typed value can be converted to a typed value of this value type.TypedValueconvertFromTypedValue(TypedValue typedValue)Converts a typed value to a typed value of this type.TypedValuecreateValue(java.lang.Object value, java.util.Map<java.lang.String,java.lang.Object> valueInfo)Creates a new TypedValue using this type.java.lang.StringgetName()Returns the name of the variable typeValueTypegetParent()Gets the parent value type.java.util.Map<java.lang.String,java.lang.Object>getValueInfo(TypedValue typedValue)Get the value info (meta data) for aTypedValue.booleanisAbstract()Returns whether the value type is abstract.booleanisPrimitiveValueType()Indicates whether this type is primitive valued.
-
-
-
Field Detail
-
NULL
static final PrimitiveValueType NULL
-
BOOLEAN
static final PrimitiveValueType BOOLEAN
-
SHORT
static final PrimitiveValueType SHORT
-
LONG
static final PrimitiveValueType LONG
-
DOUBLE
static final PrimitiveValueType DOUBLE
-
STRING
static final PrimitiveValueType STRING
-
INTEGER
static final PrimitiveValueType INTEGER
-
DATE
static final PrimitiveValueType DATE
-
BYTES
static final PrimitiveValueType BYTES
-
NUMBER
static final PrimitiveValueType NUMBER
-
OBJECT
static final SerializableValueType OBJECT
-
FILE
static final FileValueType FILE
-
VALUE_INFO_TRANSIENT
static final java.lang.String VALUE_INFO_TRANSIENT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
java.lang.String getName()
Returns the name of the variable type
-
isPrimitiveValueType
boolean isPrimitiveValueType()
Indicates whether this type is primitive valued. Primitive valued types can be handled natively by the process engine.- Returns:
- true if this is a primitive valued type. False otherwise
-
getValueInfo
java.util.Map<java.lang.String,java.lang.Object> getValueInfo(TypedValue typedValue)
Get the value info (meta data) for aTypedValue. The keys of the returned map for aTypedValueare available as constants in the value'sValueTypeinterface.- Parameters:
typedValue-- Returns:
-
createValue
TypedValue createValue(java.lang.Object value, java.util.Map<java.lang.String,java.lang.Object> valueInfo)
Creates a new TypedValue using this type.- Parameters:
value- the value- Returns:
- the typed value for the value
-
getParent
ValueType getParent()
Gets the parent value type.
Value type hierarchy is only relevant for queries and has the following meaning: When a value query is made (e.g. all tasks with a certain variable value), a "child" type's value also matches a parameter value of the parent type. This is only supported when the parent value type's implementation of
isAbstract()returnstrue.
-
canConvertFromTypedValue
boolean canConvertFromTypedValue(TypedValue typedValue)
Determines whether the argument typed value can be converted to a typed value of this value type.
-
convertFromTypedValue
TypedValue convertFromTypedValue(TypedValue typedValue)
Converts a typed value to a typed value of this type. This does not suceed ifcanConvertFromTypedValue(TypedValue)returnsfalse.
-
isAbstract
boolean isAbstract()
Returns whether the value type is abstract. This is not related to the term abstract in the Java language.
Abstract value types cannot be used as types for variables but only used for querying.
-
-