com.highdeal.pnr.hci
Class AccountEventRefillModel

java.lang.Object
  extended by com.highdeal.pnr.hci.RateModel
      extended by com.highdeal.pnr.hci.AccountEventRefillModel
All Implemented Interfaces:
IXMLMarshallable, XMLMarshallable, ContextualNode

public class AccountEventRefillModel
extends RateModel

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
static java.lang.String ATTRIBUTE_ACCOUNT_EVENT_NAME
          This constant contains the name of the XML attribute related to the account event name.
static java.lang.String ATTRIBUTE_THRESHOLD
          This constant contains the name of the XML attribute related to the amount threshold of the account event.
static java.lang.String ATTRIBUTE_THRESHOLD_PROPERTY_NAME
          This constant contains the name of the XML attribute related to the property which represents the amount threshold.
static java.lang.String BALANCE_FALLS_UNDER_THRESHOLD_EVENT
          Event name for the balance falling under threshold.
static java.lang.String TAG_NAME
          This constant contains the name of the XML attribute related to the account event refill.
 
Constructor Summary
AccountEventRefillModel()
           
 
Method Summary
 java.lang.String getAccountEventName()
          Gets the name of the account event which triggered this refill.
 RatingContextDescription getContext(ContextualNode child)
          Gets the context description for the specified child; The context description contains all the context properties.
 java.math.BigDecimal getThreshold()
          Gets the threshold of the account event refill.
 java.lang.String getThresholdPropertyName()
          Gets the name of the property which represents the amount threshold.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAccountEventName(java.lang.String name)
          Sets the name of the account event which triggered this refill.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setThreshold(java.math.BigDecimal threshold)
          Sets the threshold amount of the account event refill.
 void setThresholdPropertyName(java.lang.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
This constant contains the name of the XML attribute related to the account event refill.

See Also:
Constant Field Values

ATTRIBUTE_ACCOUNT_EVENT_NAME

public static final java.lang.String ATTRIBUTE_ACCOUNT_EVENT_NAME
This constant contains the name of the XML attribute related to the account event name.

See Also:
Constant Field Values

ATTRIBUTE_THRESHOLD

public static final java.lang.String ATTRIBUTE_THRESHOLD
This constant contains the name of the XML attribute related to the amount threshold of the account event.

See Also:
Constant Field Values

ATTRIBUTE_THRESHOLD_PROPERTY_NAME

public static final java.lang.String ATTRIBUTE_THRESHOLD_PROPERTY_NAME
This constant contains the name of the XML attribute related to the property which represents the amount threshold.

See Also:
Constant Field Values

BALANCE_FALLS_UNDER_THRESHOLD_EVENT

public static final java.lang.String BALANCE_FALLS_UNDER_THRESHOLD_EVENT
Event name for the balance falling under threshold.

See Also:
Constant Field Values
Constructor Detail

AccountEventRefillModel

public AccountEventRefillModel()
Method Detail

getAccountEventName

public java.lang.String getAccountEventName()
Gets the name of the account event which triggered this refill. Returned values are :

Returns:
the name of the account event.

getThreshold

public java.math.BigDecimal getThreshold()
Gets the threshold of the account event refill.

Returns:
the threshold.

getThresholdPropertyName

public java.lang.String getThresholdPropertyName()
Gets the name of the property which represents the amount threshold.

Returns:
the name of the property.

setAccountEventName

public void setAccountEventName(java.lang.String name)
Sets the name of the account event which triggered this refill.

Parameters:
name - the name of the account event. Allowed values are :

setThreshold

public void setThreshold(java.math.BigDecimal threshold)
Sets the threshold amount of the account event refill.

Parameters:
threshold - the threshold of the account event to set

setThresholdPropertyName

public void setThresholdPropertyName(java.lang.String thresholdPropertyName)
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

public RatingContextDescription getContext(ContextualNode child)
Description copied from interface: ContextualNode
Gets 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

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Overrides:
setAttributes in class RateModel
Parameters:
atts - The XML attributes of the current element

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface IXMLMarshallable
Specified by:
marshal in interface XMLMarshallable
Overrides:
marshal in class RateModel
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)