Package com.aquima.interactions.profile
Interface IAttributeValue
- All Superinterfaces:
IEventChannel
,IPropertyContainer
,Serializable
- All Known Implementing Classes:
AttributeState
,TmsAttributeState
,TxAttributeValue
This interface defines several methods that can be used to retrieve static information about an attribute.
- Since:
- 5.0
- Author:
- O. Kerpershoek, F. v.d. Meer
-
Method Summary
Modifier and TypeMethodDescriptiongetAttachment
(String key) Returns the available attachment that this attribute value has and is located at the specified key, otherwise returns nullThis method returns the data type of the value.This method return the definition of this attribute.This method returns the domain (set of values) that is currently valid for the attribute.This method returns the source type of the value.getValue()
This states value, as defined inIEntityInstance.getValue(String)
.This method return an object containing a reference to this attribute value.boolean
This method returns a boolean indicating if this value consists of multiple primitive values.boolean
This method returns a boolean indicating if the attribute holds exactly one value.boolean
This method returns a boolean indicating if the attributes has been assigned a value.boolean
This method returns a boolean indicating if the attribute can have multiple values.boolean
This method can be used to determine if the value of the attribute is empty.void
setAttachment
(String key, Serializable attachment) Associates the specified value with the specified key in the attachments map.Methods inherited from interface com.aquima.interactions.foundation.events.IEventChannel
addEventListener, getSupportedEvents, removeEventListener
Methods inherited from interface com.aquima.interactions.foundation.IPropertyContainer
getProperty, getPropertyNames, hasProperty, setProperty
-
Method Details
-
getValueReference
ValueReference getValueReference()This method return an object containing a reference to this attribute value. The method is available to simplify interaction with legacy components using the old profile interface.- Returns:
- ValueReference object containing various ids needed to locate this specific attribute value.
-
isAnswered
boolean isAnswered()This method returns a boolean indicating if the attributes has been assigned a value.- Returns:
- boolean indicating if the attributes has been assigned a value.
-
isUnknown
boolean isUnknown()This method can be used to determine if the value of the attribute is empty. Note: An empty attribute can still be answered.- Returns:
- boolean indicating if the value of the attribute is empty.
-
isMultiValue
boolean isMultiValue()This method returns a boolean indicating if the attribute can have multiple values. Use the hasMultipleValues or hasSingleValue to determine if the attribute actually hold multiple values.- Returns:
- boolean indicating if the attribute can hold multiple values.
-
hasSingleValue
boolean hasSingleValue()This method returns a boolean indicating if the attribute holds exactly one value.- Returns:
- boolean indicating if the attribute holds exactly one value.
-
hasMultipleValues
boolean hasMultipleValues()This method returns a boolean indicating if this value consists of multiple primitive values. When this value is unknown or only represents a single value, this method will return false.- Returns:
- boolean indicating if this value contains multiple primitive values.
-
getDataType
DataType getDataType()This method returns the data type of the value.- Returns:
- the data type of the value.
-
getSourceType
SourceType getSourceType()This method returns the source type of the value. The source type can be used to identify how the attribute got it's value.- Returns:
- SourceType identifying the source of the value.
-
getValue
IValue getValue()This states value, as defined inIEntityInstance.getValue(String)
.- Returns:
- IValue containing the current value of the attribute.
-
getDefinition
IAttributeDefinition getDefinition()This method return the definition of this attribute.- Returns:
- IAttributeDefinition never null
-
getDomain
IDomain getDomain()This method returns the domain (set of values) that is currently valid for the attribute. This domain will hold at most all values from the domain definition, but this domain may also be empty when there is no value valid in the current context. The domain definition for this attribute may be requested through this domain, or by using the getDomain method from the attribute definition. This method may return null for attributes that don't have a domain.- Returns:
- The actual domain for this attribute.
- Throws:
AppException
- This exception is thrown when the domain could not be determined.
-
setAttachment
Associates the specified value with the specified key in the attachments map. If the map previously contained a mapping for the key, the old value is replaced. An attachment can be anything as long as it isSerializable
For a null key, nothing will be set- Parameters:
key
- the key for which to set the attachmentattachment
- - theSerializable
attachment to be stored
-
getAttachment
Returns the available attachment that this attribute value has and is located at the specified key, otherwise returns null- Parameters:
key
- the key for with to return the value for- Returns:
- the
Serializable
object that is stored at the specified key, if nothing found for the key,null
is returned
-