Package com.adobe.aem.dermis.model.value
Class TypeValue
- java.lang.Object
-
- com.adobe.aem.dermis.model.value.AbstractValue
-
- com.adobe.aem.dermis.model.value.TypeValue
-
- All Implemented Interfaces:
ITypeValue
,IValue
public class TypeValue extends AbstractValue implements ITypeValue
Define the generic value map which will represent the operation input and output of any primitive type.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
get()
Return the actual value object.<T> T
get(java.lang.Class<T> type)
Get the value by converting it into the given type.<T> T
get(java.lang.Class<T> type, T defaultValue)
Get the value by converting it into the given type.PropertyFormatType
getFormat()
Returns thePropertyFormatType
of valuePropertyType
getPropertyType()
Returns thePropertyType
of valuejava.lang.Object
getResult()
static boolean
isReference(PropertyType type, PropertyFormatType formatType, java.lang.Object value)
Checks whether passed value is sas url or not.static boolean
isReference(TypeValue typeValue)
check whether typeValue represents sas url or not.static TypeValue
of(PropertyType type, PropertyFormatType formatType, java.lang.Object value)
static TypeValue
of(PropertyType type, PropertyFormatType formatType, java.lang.Object value, boolean strictTypeChecking)
java.lang.String
toString()
-
Methods inherited from class com.adobe.aem.dermis.model.value.AbstractValue
toJson
-
-
-
-
Method Detail
-
get
public java.lang.Object get()
Return the actual value object.- Specified by:
get
in interfaceITypeValue
- Returns:
-
getPropertyType
public PropertyType getPropertyType()
Returns thePropertyType
of value- Specified by:
getPropertyType
in interfaceITypeValue
- Returns:
- - Returns the
PropertyType
of value
-
getFormat
public PropertyFormatType getFormat()
Returns thePropertyFormatType
of value- Specified by:
getFormat
in interfaceITypeValue
- Returns:
- - Returns the
PropertyFormatType
of value
-
get
public <T> T get(java.lang.Class<T> type)
Get the value by converting it into the given type.- Specified by:
get
in interfaceITypeValue
- Parameters:
type
- The class of the type- Returns:
-
get
public <T> T get(java.lang.Class<T> type, T defaultValue)
Get the value by converting it into the given type. It should return the default value if value empty- Specified by:
get
in interfaceITypeValue
- Parameters:
type
- The class of the typedefaultValue
- The default value to use if the named property does not exist or cannot be converted to the requested type. The default value is also used to define the type to convert the value to. If this isnull
any existing property is not converted.- Returns:
-
getResult
public java.lang.Object getResult()
-
of
public static TypeValue of(PropertyType type, PropertyFormatType formatType, java.lang.Object value) throws DermisException
- Throws:
DermisException
-
of
public static TypeValue of(PropertyType type, PropertyFormatType formatType, java.lang.Object value, boolean strictTypeChecking) throws DermisException
- Throws:
DermisException
-
toString
public java.lang.String toString()
Description copied from class:AbstractValue
- Overrides:
toString
in classAbstractValue
-
isReference
public static boolean isReference(PropertyType type, PropertyFormatType formatType, java.lang.Object value)
Checks whether passed value is sas url or not.- Parameters:
type
-formatType
-value
-- Returns:
-
isReference
public static boolean isReference(TypeValue typeValue)
check whether typeValue represents sas url or not.- Parameters:
typeValue
-- Returns:
-
-