public class ExtendedData
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
This class is a value object container that aggregates non-standard protocol data required in financial
transactions(FinancialTransaction
).
Plug-ins require extra protocol data that goes beyond the standard attributes
defined in the PaymentInstruction
definition. These extra attributes are
passed down from the Payment Plug-in Controller to the plug-in by means of the
ExtendedData
.
When associated with a PaymentInstruction
, the ExtendedData
is meant
to be used (potentially) by all FinancialTransaction
s executed against the
same PaymentInstruction
container.
However, ExtendedData
can also be attached to a particular
FinancialTransaction
. In this case, the extra attribute are only used in that
same FinancialTransaction
. Subsequent financial transactions could reuse the
contents of ExtendedData
if they are related to a previous
FinancialTransaction
container.
PaymentInstruction
,
FinancialTransaction
,
Serialized FormConstructor and Description |
---|
ExtendedData()
This method creates an empty
ExtendedData object. |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
This method returns a shallow copy of this
ExtendedData instance: the keys and values themselves are not cloned. |
java.math.BigDecimal |
getBigDecimal(java.lang.String name)
This method gets the decimal value associated with the specified attribute.
|
java.lang.StringBuffer |
getBinary(java.lang.String name)
This method gets the binary value associated with the specified attribute.
|
java.lang.Boolean |
getBoolean(java.lang.String name)
This method gets the boolean value associated with the specified attribute.
|
boolean |
getEncryptionRequiredFlag(java.lang.String name)
This method gets the encryption required flag for the specified attribute (name).
|
java.util.HashMap |
getExtendedDataAsHashMap()
This method gets a hash map that contains all name-value pairs.
|
java.lang.Integer |
getInteger(java.lang.String name)
This method gets the integer value associated with the specified attribute.
|
java.lang.Long |
getLong(java.lang.String name)
This method gets the long value associated with the specified attribute.
|
java.lang.String |
getString(java.lang.String name)
This method gets the string value associated with the specified attribute.
|
short |
getType(java.lang.String name)
This method gets the type of the value associated with the specified attribute (name).
|
void |
remove(java.lang.String name)
This method removes the name-value pair with the specified name.
|
void |
setBigDecimal(java.lang.String name,
java.math.BigDecimal value,
boolean encrypted)
This method sets a name-value pair where the value is a
BigDecimal . |
void |
setBinary(java.lang.String name,
java.lang.StringBuffer value,
boolean encrypted)
This method sets a name-value pair where the value is binary data (
StringBuffer ). |
void |
setBoolean(java.lang.String name,
java.lang.Boolean value,
boolean encrypted)
This method sets a name-value pair where the value is a
Boolean . |
void |
setInteger(java.lang.String name,
java.lang.Integer value,
boolean encrypted)
This method sets a name-value pair where the value is an
Integer . |
void |
setLong(java.lang.String name,
java.lang.Long value,
boolean encrypted)
This method sets a name-value pair where the value is a
Long . |
void |
setString(java.lang.String name,
java.lang.String value,
boolean encrypted)
This method sets a name-value pair where the value is a
String . |
java.lang.String |
toString()
This method obtains a human-readable representation of the
ExtendedData . |
public ExtendedData()
ExtendedData
object.public void setBigDecimal(java.lang.String name, java.math.BigDecimal value, boolean encrypted)
This method sets a name-value pair where the value is a BigDecimal
.
name
- The attribute name.value
- The decimal value that needs to be stored.encrypted
- If the value needs to be encrypted when stored.public java.math.BigDecimal getBigDecimal(java.lang.String name)
This method gets the decimal value associated with the specified attribute. If the value is stored encrypted, this method will not provide additional logic to decrypt the value.
name
- The attribute name.public void setBinary(java.lang.String name, java.lang.StringBuffer value, boolean encrypted)
This method sets a name-value pair where the value is binary data (StringBuffer
).
name
- The attribute name.value
- The binary value that needs to be stored.encrypted
- If the value needs to be encrypted when stored.public java.lang.StringBuffer getBinary(java.lang.String name)
This method gets the binary value associated with the specified attribute. If the value is stored encrypted, this method will not provide additional logic to decrypt the value.
name
- The attribute name.public void setBoolean(java.lang.String name, java.lang.Boolean value, boolean encrypted)
This method sets a name-value pair where the value is a Boolean
.
name
- The attribute name.value
- The boolean value that needs to be stored.encrypted
- If the value needs to be encrypted when stored.public java.lang.Boolean getBoolean(java.lang.String name)
This method gets the boolean value associated with the specified attribute. If the value is stored encrypted, this method will not provide additional logic to decrypt the value.
name
- The attribute name.public boolean getEncryptionRequiredFlag(java.lang.String name)
This method gets the encryption required flag for the specified attribute (name).
name
- The attribute name.public java.util.HashMap getExtendedDataAsHashMap()
This method gets a hash map that contains all name-value pairs.
Each element of the hash map is composed of the attribute name and its
value NameValueObject
.
If the value is stored encrypted, this method will not provide additional logic to decrypt the value.
public void setInteger(java.lang.String name, java.lang.Integer value, boolean encrypted)
This method sets a name-value pair where the value is an Integer
.
name
- The attribute name.value
- The integer value that needs to be stored.encrypted
- If the value needs to be encrypted when stored.public java.lang.Integer getInteger(java.lang.String name)
This method gets the integer value associated with the specified attribute. If the value is stored encrypted, this method will not provide additional logic to decrypt the value.
name
- The attribute name.public void setLong(java.lang.String name, java.lang.Long value, boolean encrypted)
This method sets a name-value pair where the value is a Long
.
name
- The attribute name.value
- The long value that needs to be stored.encrypted
- If the value needs to be encrypted when stored.public java.lang.Long getLong(java.lang.String name)
This method gets the long value associated with the specified attribute. If the value is stored encrypted, this method will not provide additional logic to decrypt the value.
name
- The attribute name.public short getType(java.lang.String name)
This method gets the type of the value associated with the specified attribute (name).
name
- the attribute name.NameValueObject
.public void setString(java.lang.String name, java.lang.String value, boolean encrypted)
This method sets a name-value pair where the value is a String
.
name
- The attribute name.value
- The string value that needs to be stored.encrypted
- If the value needs to be encrypted when stored.public java.lang.String getString(java.lang.String name)
This method gets the string value associated with the specified attribute. If the value is stored encrypted, this method will not provide additional logic to decrypt the value.
name
- The attribute name.public void remove(java.lang.String name)
This method removes the name-value pair with the specified name.
name
- The name-value pair to be removed.public java.lang.String toString()
This method obtains a human-readable representation of the ExtendedData
.
toString
in class java.lang.Object
ExtendedData
.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
This method returns a shallow copy of this ExtendedData
instance: the keys and values themselves are not cloned.
clone
in class java.lang.Object
ExtendedData
instance.java.lang.CloneNotSupportedException
- If the instance cannot be cloned.