Package com.highdeal.pnr.hci
Class AccountEventRefillModel
java.lang.Object
com.highdeal.pnr.hci.RateModel
com.highdeal.pnr.hci.AccountEventRefillModel
- All Implemented Interfaces:
IXMLMarshallable,XMLMarshallable,ContextualNode
This class represents a refill which is triggered by an event associated to an account.
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:simpleType name="accountEventNameType">
<xs:restriction base="xs:string">
<xs:enumeration value="_balance_falls_under_threshold_event_"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="accountEventRefill">
<xs:complexType>
<xs:sequence>
<xs:element ref="component" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="accountEventName" type="accountEventNameType" use="required"/>
<xs:attribute name="threshold" type="xs:decimal" use="optional"/>
<xs:attribute name="thresholdPropertyName" type="xs:string" use="optional"/>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="description" type="xs:string"/>
</xs:complexType>
</xs:element>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThis constant contains the name of the XML attribute related to the account event name.static final StringThis constant contains the name of the XML attribute related to the amount threshold of the account event.static final StringThis constant contains the name of the XML attribute related to the property which represents the amount threshold.static final StringEvent name for the balance falling under threshold.static final StringThis constant contains the name of the XML attribute related to the account event refill. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the name of the account event which triggered this refill.getContext(ContextualNode child) Gets the context description for the specified child; The context description contains all the context properties.Gets the threshold of the account event refill.Gets the name of the property which represents the amount threshold.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAccountEventName(String name) Sets the name of the account event which triggered this refill.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetThreshold(BigDecimal threshold) Sets the threshold amount of the account event refill.voidsetThresholdPropertyName(String thresholdPropertyName) Sets the name of the numeric property which comes from the refill context and contains the threshold amount value.Methods inherited from class com.highdeal.pnr.hci.RateModel
addCharacterData, addChild, checkValidity, getDescription, getName, getParent, getRateComponent, inheritedContext, marshalAttributes, marshalChildren, remove, setDescription, setName, setParent, setRateComponent
-
Field Details
-
TAG_NAME
This constant contains the name of the XML attribute related to the account event refill.- See Also:
-
ATTRIBUTE_ACCOUNT_EVENT_NAME
This constant contains the name of the XML attribute related to the account event name.- See Also:
-
ATTRIBUTE_THRESHOLD
This constant contains the name of the XML attribute related to the amount threshold of the account event.- See Also:
-
ATTRIBUTE_THRESHOLD_PROPERTY_NAME
This constant contains the name of the XML attribute related to the property which represents the amount threshold.- See Also:
-
BALANCE_FALLS_UNDER_THRESHOLD_EVENT
Event name for the balance falling under threshold.- See Also:
-
-
Constructor Details
-
AccountEventRefillModel
public AccountEventRefillModel()
-
-
Method Details
-
getAccountEventName
Gets the name of the account event which triggered this refill. Returned values are :- Returns:
- the name of the account event.
-
getThreshold
Gets the threshold of the account event refill.- Returns:
- the threshold.
-
getThresholdPropertyName
Gets the name of the property which represents the amount threshold.- Returns:
- the name of the property.
-
setAccountEventName
Sets the name of the account event which triggered this refill.- Parameters:
name- the name of the account event. Allowed values are :
-
setThreshold
Sets the threshold amount of the account event refill.- Parameters:
threshold- the threshold of the account event to set
-
setThresholdPropertyName
Sets the name of the numeric property which comes from the refill context and contains the threshold amount value.- Parameters:
thresholdPropertyName- the name of the property which represents the amount threshold
-
getContext
Description copied from interface:ContextualNodeGets the context description for the specified child; The context description contains all the context properties.- Parameters:
child- The child node- Returns:
- The context description
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Overrides:
setAttributesin classRateModel- Parameters:
atts- TheXML attributesof the current element
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceIXMLMarshallable- Specified by:
marshalin interfaceXMLMarshallable- Overrides:
marshalin classRateModel- Parameters:
output- TheXML outputto marshal the object into
-