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.Objectget()Return the actual value object.<T> Tget(java.lang.Class<T> type)Get the value by converting it into the given type.<T> Tget(java.lang.Class<T> type, T defaultValue)Get the value by converting it into the given type.PropertyFormatTypegetFormat()Returns thePropertyFormatTypeof valuePropertyTypegetPropertyType()Returns thePropertyTypeof valuejava.lang.ObjectgetResult()static booleanisReference(PropertyType type, PropertyFormatType formatType, java.lang.Object value)Checks whether passed value is sas url or not.static booleanisReference(TypeValue typeValue)check whether typeValue represents sas url or not.static TypeValueof(PropertyType type, PropertyFormatType formatType, java.lang.Object value)static TypeValueof(PropertyType type, PropertyFormatType formatType, java.lang.Object value, boolean strictTypeChecking)java.lang.StringtoString()-
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:
getin interfaceITypeValue- Returns:
-
getPropertyType
public PropertyType getPropertyType()
Returns thePropertyTypeof value- Specified by:
getPropertyTypein interfaceITypeValue- Returns:
- - Returns the
PropertyTypeof value
-
getFormat
public PropertyFormatType getFormat()
Returns thePropertyFormatTypeof value- Specified by:
getFormatin interfaceITypeValue- Returns:
- - Returns the
PropertyFormatTypeof value
-
get
public <T> T get(java.lang.Class<T> type)
Get the value by converting it into the given type.- Specified by:
getin 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:
getin 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 isnullany 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:
toStringin 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:
-
-