Class StopRateResult

java.lang.Object
com.highdeal.pnr.hci.StopRateResult
All Implemented Interfaces:
OperationResult, XMLMarshallable

public class StopRateResult extends Object implements OperationResult
The result of a StopRateOp operation.
When the system parameter TRANSACTIONS_TO_CANCEL_IN_RESULT_ENABLED is set to "false", the list of transacSetToCancel is always empty and never returned. Also, the attribute amountToCancel is never present. When set to "false", this parameter completely skip the production of transactions to cancel.
The project team determines the appropriate value of this parameter when implementing the session-based charging services. If the value of this parameter is changed during the production operation phase, the impact is the following:
  • The value is changed from "true" to "false": The transactions to cancel have already been calculated for the ongoing reservation requests but they are not returned. The transactions to cancel are not computed nor returned for the reservation requests made after the change
  • The value is changed from "false" to "true": The transactions to cancel are computed and returned for the reservations requests made after this change

Example 1 - Let us consider the following sequence in the same session:
  • TRANSACTIONS_TO_CANCEL_IN_RESULT_ENABLED = TRUE
  • op1: startRate (reservation1)
  • TRANSACTIONS_TO_CANCEL_IN_RESULT_ENABLED = FALSE
  • op2: updateRate (confirmation of reservation1 + reservation2)
  • op3: stopRate (confirmation of reservation2)
The transactions to cancel corresponding to reservation1 are computed but not returned in the response of op2 because TRANSACTIONS_TO_CANCEL_IN_RESULT_ENABLED was set to "true" before op1 was executed. Then, the transactions to cancel corresponding to reservation2 are not computed nor returned in the response of op3.
Example 2 - Let us consider the following sequence in the same session:
  • TRANSACTIONS_TO_CANCEL_IN_RESULT_ENABLED = FALSE
  • op1: startRate (reservation1)
  • TRANSACTIONS_TO_CANCEL_IN_RESULT_ENABLED = TRUE
  • op2: updateRate (confirmation of reservation1 + reservation2)
  • op3: stopRate (confirmation of reservation2)

The transactions to cancel corresponding to reservation1 are not computed nor returned in the response of op2 because TRANSACTIONS_TO_CANCEL_IN_RESULT_ENABLED was set to "false" before op1 was executed. Then, the transactions to cancel corresponding to reservation2 are computed and returned in the response of op3.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="stopRateResult">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="transacSetToCleanup" type="TransactionSetType" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element name="transacSetToConfirm" type="TransactionSetType" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element name="transacSetToCancel" type="TransactionSetType" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="amountToConfirm" type="xs:string"/>
     <xs:attribute name="amountToCancel" type="xs:string"/>
     <xs:attribute name="accumulatedAmount" type="xs:string"/>
   </xs:complexType>
 </xs:element>

  • Constructor Details

    • StopRateResult

      public StopRateResult()
      Constructs an empty stop session result.
  • Method Details

    • getOperandReference

      public String getOperandReference()
      Description copied from interface: OperationResult
      Gets the code or the reference (if no code exists) that identifies the operand of the operation request; If the operation is not auditable, the operand reference is null.
      Specified by:
      getOperandReference in interface OperationResult
      Returns:
      The operand reference of the operation result
    • setOperandReference

      public void setOperandReference(String operandReference)
      Sets the reference of the operand.
      Parameters:
      operandReference - the reference of the operand.
    • getName

      public String getName()
    • getAccumulatedAmount

      public Money getAccumulatedAmount()
      Gets accumulated amount of the session.
      Returns:
      the accumulated amount.
    • setAccumulatedAmount

      public void setAccumulatedAmount(Money amount)
      Sets accumulated amount of the session.
      Parameters:
      amount - the accumulated amount.
    • getAmountToConfirm

      public Money getAmountToConfirm()
      Gets the amount to confirm.
      Returns:
      the amount to confirm.
    • setAmountToConfirm

      public void setAmountToConfirm(Money amount)
      Sets the amount to confirm.
      Parameters:
      amount - the amount to confirm.
    • getAmountToCancel

      public Money getAmountToCancel()
      Gets the amount to cancel =>CAN RETURN NULL
      Returns:
      the amount to cancel.
    • setAmountToCancel

      public void setAmountToCancel(Money amount)
      Sets the amount to cancel.
      Parameters:
      amount - the amount to cancel.
    • getTransacSetsToCleanup

      public List<TransactionSet> getTransacSetsToCleanup()
      Gets the list of transactions set to cleanup.
      Returns:
      the list of transactions set to cleanup;
    • getTransacSetsToConfirm

      public List<TransactionSet> getTransacSetsToConfirm()
      Gets the list of transactions sets to confirm.
      Returns:
      the list of transactions sets to confirm.
    • getTransacSetsToCancel

      public List<TransactionSet> getTransacSetsToCancel()
      Gets the list of transactions sets to cancel.
      Returns:
      the list of transactions sets to cancel.
    • setChargingResults

      public void setChargingResults(List<ChargingResult> chargingResults)
      Sets the list of charging results included in the session operation result
      Parameters:
      chargingResults - the list of charging results
    • getChargingResults

      public List<ChargingResult> getChargingResults()
      Gets the list of charging results included in the session operation result
      Returns:
      the list of charging results
    • 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
      Parameters:
      atts - The XML attributes of the current element
    • addChild

      public void addChild(String tagName, XMLMarshallable child)
      Description copied from interface: XMLMarshallable
      Adds a child to the object, the child representing the marshallable object which must be added to the element.
      Specified by:
      addChild in interface XMLMarshallable
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Specified by:
      addCharacterData in interface XMLMarshallable
      Parameters:
      cData - The character data to be added
    • 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 XMLMarshallable
      Parameters:
      output - The XML output to marshal the object into