com.highdeal.pnr.hci
Class ChargingMappingModel

java.lang.Object
  extended by com.highdeal.pnr.hci.ChargingMappingModel
All Implemented Interfaces:
XMLMarshallable

public class ChargingMappingModel
extends java.lang.Object
implements XMLMarshallable

A ChargingMappingModel represents a charging mapping. A chargingMapping is contained in a ChargeActivationModel and managed by subscription operations.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="chargingMapping">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="creditLimitItem" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="chargingReferenceCode" type="xs:string" use="required"/>
     <xs:attribute name="prepaidAccountCode" type="xs:string"/>
     <xs:attribute name="externalAccountCode" type="xs:string"/>
   </xs:complexType>
 </xs:element>

 <xs:element name="creditLimitItem">
   <xs:complexType>
     <xs:attribute name="name" type="xs:string" use="required"/>
   </xs:complexType>
 </xs:element>


Field Summary
static java.lang.String CREDIT_LIMIT_NAME
           
static java.lang.String DEFAULT_REFERENCE
           
static java.lang.String MODEL_NAME
           
 
Constructor Summary
ChargingMappingModel()
          Constructs an empty charging model.
ChargingMappingModel(java.lang.String chargingReference, java.lang.String prepaidAccount, java.lang.String externalAccount, java.util.Vector<java.lang.String> creditLimits)
          Initializes a subscriber account with its owner, its code and its subscriber.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String name, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 java.lang.String getChargingReferenceCode()
          Returns the code of charging reference.
 java.util.List<java.lang.String> getCreditLimitBalances()
          Returns a list of credit limit balances code.
 java.lang.String getExternalAccountCode()
          Returns the code of the external account.
 java.lang.String getPrepaidAccountCode()
          Returns the code of the prepaid account.
 boolean isExternalAccount()
          Returns true if the mapping references a external account, false otherwise.
 boolean isPrepaidAccount()
          Returns true if the mapping references a prepaid account, false otherwise.
 boolean isValid()
          Returns true if the model is valid, false otherwise.
 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 setChargingReferenceCode(java.lang.String chargingReferenceCode)
          Sets the code of charging reference.
 void setCreditLimitBalances(java.util.List<java.lang.String> creditLimits)
          Sets the list of credit limit balances.
 void setExternalAccountCode(java.lang.String externalAccountCode)
          Sets the code of the external account.
 void setPrepaidAccountCode(java.lang.String prepaidAccountCode)
          Sets the code of the prepaid account.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODEL_NAME

public static final java.lang.String MODEL_NAME
See Also:
Constant Field Values

CREDIT_LIMIT_NAME

public static final java.lang.String CREDIT_LIMIT_NAME
See Also:
Constant Field Values

DEFAULT_REFERENCE

public static final java.lang.String DEFAULT_REFERENCE
See Also:
Constant Field Values
Constructor Detail

ChargingMappingModel

public ChargingMappingModel()
Constructs an empty charging model.


ChargingMappingModel

public ChargingMappingModel(java.lang.String chargingReference,
                            java.lang.String prepaidAccount,
                            java.lang.String externalAccount,
                            java.util.Vector<java.lang.String> creditLimits)
Initializes a subscriber account with its owner, its code and its subscriber.

Parameters:
chargingReference - the code of the charging reference
prepaidAccount - the prepaid account of the subscriber account
externalAccount - the external account of the subscriber account
creditLimits - the list of credit limit balance codes
Method Detail

getChargingReferenceCode

public java.lang.String getChargingReferenceCode()
Returns the code of charging reference.

Returns:
This charging reference code.
See Also:
setChargingReferenceCode(String)

setChargingReferenceCode

public void setChargingReferenceCode(java.lang.String chargingReferenceCode)
Sets the code of charging reference.

Parameters:
chargingReferenceCode - String code which represents the code of charging reference.
See Also:
getChargingReferenceCode()

getCreditLimitBalances

public java.util.List<java.lang.String> getCreditLimitBalances()
Returns a list of credit limit balances code.

Returns:
The list of credit limit balances code.

setCreditLimitBalances

public void setCreditLimitBalances(java.util.List<java.lang.String> creditLimits)
Sets the list of credit limit balances.

Parameters:
creditLimits - List creditLimits which represents the list of credit limit balances code.

getExternalAccountCode

public java.lang.String getExternalAccountCode()
Returns the code of the external account.

Returns:
The external account code.

setExternalAccountCode

public void setExternalAccountCode(java.lang.String externalAccountCode)
Sets the code of the external account.

Parameters:
externalAccountCode - String code which represents the code of the external account.

getPrepaidAccountCode

public java.lang.String getPrepaidAccountCode()
Returns the code of the prepaid account.

Returns:
The prepaid account code.

setPrepaidAccountCode

public void setPrepaidAccountCode(java.lang.String prepaidAccountCode)
Sets the code of the prepaid account.

Parameters:
prepaidAccountCode - String code which represents the code of the prepaid account.

isPrepaidAccount

public boolean isPrepaidAccount()
Returns true if the mapping references a prepaid account, false otherwise.

Returns:
true if its a prepaid mapping.

isExternalAccount

public boolean isExternalAccount()
Returns true if the mapping references a external account, false otherwise.

Returns:
true if its an external mapping.

isValid

public boolean isValid()
Returns true if the model is valid, false otherwise.

Returns:
true or false.

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 name,
                     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:
name - 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

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