Class UpdateRateResult

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

public class UpdateRateResult extends Object implements OperationResult
The result of a UpdateRateOp 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: UpdateRate (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: UpdateRate (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="updateRateResult">
   <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="transacSetToReserve" 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="amountToReserve" type="xs:string"/>
     <xs:attribute name="amountToCancel" type="xs:string"/>
     <xs:attribute name="accumulatedAmount" type="xs:string"/>
     <xs:attribute name="limit"  type="xs:decimal"/>
   </xs:complexType>
 </xs:element>

  • Constructor Details

    • UpdateRateResult

      public UpdateRateResult()
      Constructs an empty update 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
    • getLimit

      public BigDecimal getLimit()
      Gets the limit of the reservation in case of best effort one.
      Returns:
      The limit value
    • setLimit

      public void setLimit(BigDecimal limit)
      Sets the limit of the reservation in case of best effort one.
      Parameters:
      limit - The limit value
    • getTransacSetsToCleanup

      public List<TransactionSet> getTransacSetsToCleanup()
      Gets the list of transactions sets to cleanup.
      Returns:
      The list of transactions sets to cleanup
    • 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
    • getTransacSetsToConfirm

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

      public Money getAmountToReserve()
      Gets the amount to reserve.
      Returns:
      The amount to reserve
    • setAmountToReserve

      public void setAmountToReserve(Money amount)
      Sets the amount to reserve.
      Parameters:
      amount - The amount to reserve
    • getTransacSetsToReserve

      public List<TransactionSet> getTransacSetsToReserve()
      Gets the list of transactions sets to reserve.
      Returns:
      The list of transactions sets to reserve
    • getAmountToCancel

      public Money getAmountToCancel()
      Gets the amount to cancel.
      Returns:
      The amount to cancel
    • setAmountToCancel

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

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

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

      public List<ChargingResult> getReserveChargingResults()
      Gets the list of charging results included in the session operation result
      Returns:
      the list of charging results
    • setConfirmChargingResults

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

      public List<ChargingResult> getConfirmChargingResults()
      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
    • addStopRateResult

      public void addStopRateResult(StopRateResult stopRateResult)
    • addStartRateResult

      public void addStartRateResult(StartRateResult startRateResult)