com.highdeal.pnr.tif
Class ChargedTransactionSet

java.lang.Object
  extended by com.highdeal.pnr.tif.ChargedTransactionSet
All Implemented Interfaces:
XMLMarshallable

public class ChargedTransactionSet
extends java.lang.Object
implements XMLMarshallable

This Java class describes a set of grouped charged transactions that must be cleared to be taken into account in a billing system; It includes also the source rated transaction relating to the dynamic pricing (rating) of a customer service use (usage, periodic, or one-off).

See Also:
ITransactionProcessor

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="chargedTransactionSet">
   <xs:complexType>
    <xs:sequence>
       <xs:element ref="entry" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="transactionSetId" type="xs:long"/>
    <xs:attribute name="transactionSetIdType" type="xs:string"/>
   </xs:complexType>
  </xs:element>
<xs:element name="entry">
   <xs:complexType>
    <xs:sequence>
       <xs:element ref="transac" minOccurs="1" maxOccurs="1"/>
       <xs:element ref="taxedAmount" minOccurs="0" maxOccurs="1"/>
       <xs:element ref="chargedTransaction" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="chargeType" type="ChargeTypeType"/>
    <xs:attribute name="isMaster" type="xs:boolean"/>
    <xs:attribute name="label" type="xs:string"/>
   </xs:complexType>
  </xs:element>
<xs:simpleType name="ChargeTypeType">
   <xs:restriction base="xs:string">
      <xs:enumeration value="closing"/>
      <xs:enumeration value="refill"/>
      <xs:enumeration value="internalCharge"/>
      <xs:enumeration value="externalCharge"/>
      <xs:enumeration value="notCharged"/>
   </xs:restriction>
 </xs:simpleType>


Nested Class Summary
static class ChargedTransactionSet.ChargedTransactionSetEntry
          This Java class represents an entry in the charged transaction set; An entry is used to group multiple charged transactions to be cleared
static class ChargedTransactionSet.ChargeType
           
static interface ChargedTransactionSet.IChargedTransactionSetIdentifierGenerator
          This Java interface is used to generate an identifier for a charged transaction set.
 
Constructor Summary
ChargedTransactionSet(ChargedTransactionSet.ChargedTransactionSetEntry master, ChargeableItem inputChargeableItem, OperationExecutionContext context)
          Initializes a charged transaction set with the master transaction of the set and the chargeable item.
ChargedTransactionSet(ChargedTransactionSet.ChargedTransactionSetEntry master, OperationExecutionContext context)
          Initializes a charged transaction set with the master transaction of the set
ChargedTransactionSet(OperationExecutionContext context)
          Initializes an empty charged transaction set
 
Method Summary
 void adaptTransactionAmounts()
           
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 java.util.List<ChargedTransactionSet.ChargedTransactionSetEntry> getDependents()
          Returns the list of the dependent related to the masters
 OperationExecutionContext getExecutionContext()
           
 ChargeableItem getInputChargeableItem()
          Gets the input chargeable item of this transaction set
 ChargedTransactionSet.ChargedTransactionSetEntry getMaster()
          Returns the master of this transaction set
 java.util.Date getProcessingDate()
          Returns the date when the date when the charging process was executed by the SAP CC system
 TransactionSet getTransactionSet()
           
 java.lang.Long getTransactionSetID()
          Returns the transaction set ID
 java.lang.String getTransactionSetIDType()
          Returns the transaction set ID type
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setProcessingDate(java.util.Date processingDate)
          Sets the date when the charging process was executed by the SAP CC system
 void setTransactionSetID(java.lang.Long id)
          Sets the transaction set ID
 void setTransactionSetIDGenerator(ChargedTransactionSet.IChargedTransactionSetIdentifierGenerator idGenerator)
          Sets the generator used to generate an identifier for the charged transaction set; It will be used to generate an identifier only if the charged transaction set has not been given an identifier with a call to setTransactionSetID(Long).
 void setTransactionSetIDType(java.lang.String type)
          Sets the transaction set ID type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChargedTransactionSet

public ChargedTransactionSet(OperationExecutionContext context)
Initializes an empty charged transaction set


ChargedTransactionSet

public ChargedTransactionSet(ChargedTransactionSet.ChargedTransactionSetEntry master,
                             OperationExecutionContext context)
Initializes a charged transaction set with the master transaction of the set

Parameters:
master - The master transaction of this transaction set
Throws:
java.lang.IllegalArgumentException - if master is null

ChargedTransactionSet

public ChargedTransactionSet(ChargedTransactionSet.ChargedTransactionSetEntry master,
                             ChargeableItem inputChargeableItem,
                             OperationExecutionContext context)
Initializes a charged transaction set with the master transaction of the set and the chargeable item.

Parameters:
master - The master transaction of this transaction set
inputChargeableItem - The input chargeable item relating to this transaction set
Throws:
java.lang.IllegalArgumentException - if master is null
Method Detail

getTransactionSetID

public java.lang.Long getTransactionSetID()
Returns the transaction set ID

Returns:
The transaction set identifier if it is set, null otherwise

setTransactionSetID

public void setTransactionSetID(java.lang.Long id)
Sets the transaction set ID

Parameters:
id - The transaction set identifier

setTransactionSetIDGenerator

public void setTransactionSetIDGenerator(ChargedTransactionSet.IChargedTransactionSetIdentifierGenerator idGenerator)
Sets the generator used to generate an identifier for the charged transaction set; It will be used to generate an identifier only if the charged transaction set has not been given an identifier with a call to setTransactionSetID(Long).

Parameters:
idGenerator - The generator used to generate an identifier for the charged transaction set

getTransactionSetIDType

public java.lang.String getTransactionSetIDType()
Returns the transaction set ID type

Returns:
The transaction set ID type

setTransactionSetIDType

public void setTransactionSetIDType(java.lang.String type)
Sets the transaction set ID type

Parameters:
type - The transaction set ID type

getMaster

public ChargedTransactionSet.ChargedTransactionSetEntry getMaster()
Returns the master of this transaction set

Returns:
The master of this transaction set that cannot be null

getInputChargeableItem

public ChargeableItem getInputChargeableItem()
Gets the input chargeable item of this transaction set

Returns:
The input chargeable item of this charged transaction set, or null if no input chargeable item is associated to this charged transaction set

getDependents

public java.util.List<ChargedTransactionSet.ChargedTransactionSetEntry> getDependents()
Returns the list of the dependent related to the masters

Returns:
A list that can be empty but never null

getProcessingDate

public java.util.Date getProcessingDate()
Returns the date when the date when the charging process was executed by the SAP CC system

Returns:
The date when the date when the charging process was performed

setProcessingDate

public void setProcessingDate(java.util.Date processingDate)
Sets the date when the charging process was executed by the SAP CC system

Parameters:
processingDate - The date when the charging process was performed

adaptTransactionAmounts

public final void adaptTransactionAmounts()

getTransactionSet

public TransactionSet getTransactionSet()

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(java.lang.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(java.lang.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

getExecutionContext

public OperationExecutionContext getExecutionContext()

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