Class AccountEventRefillModel

java.lang.Object
com.highdeal.pnr.hci.RateModel
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 Details

    • TAG_NAME

      public static final String TAG_NAME
      This constant contains the name of the XML attribute related to the account event refill.
      See Also:
    • ATTRIBUTE_ACCOUNT_EVENT_NAME

      public static final String ATTRIBUTE_ACCOUNT_EVENT_NAME
      This constant contains the name of the XML attribute related to the account event name.
      See Also:
    • ATTRIBUTE_THRESHOLD

      public static final String 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

      public static final 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:
    • BALANCE_FALLS_UNDER_THRESHOLD_EVENT

      public static final String BALANCE_FALLS_UNDER_THRESHOLD_EVENT
      Event name for the balance falling under threshold.
      See Also:
  • Constructor Details

    • AccountEventRefillModel

      public AccountEventRefillModel()
  • Method Details

    • getAccountEventName

      public 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 BigDecimal getThreshold()
      Gets the threshold of the account event refill.
      Returns:
      the threshold.
    • getThresholdPropertyName

      public String getThresholdPropertyName()
      Gets the name of the property which represents the amount threshold.
      Returns:
      the name of the property.
    • setAccountEventName

      public void setAccountEventName(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(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(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