Package com.highdeal.pnr.hci
Class ChargingMappingModel
java.lang.Object
com.highdeal.pnr.hci.ChargingMappingModel
- All Implemented Interfaces:
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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String name, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.Returns the code of charging reference.Returns a list of credit limit balances code.Returns the code of the external account.Returns the code of the prepaid account.booleanReturns true if the mapping references a external account, false otherwise.booleanReturns true if the mapping references a prepaid account, false otherwise.booleanisValid()Returns true if the model is valid, false otherwise.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetChargingReferenceCode(String chargingReferenceCode) Sets the code of charging reference.voidsetCreditLimitBalances(List<String> creditLimits) Sets the list of credit limit balances.voidsetExternalAccountCode(String externalAccountCode) Sets the code of the external account.voidsetPrepaidAccountCode(String prepaidAccountCode) Sets the code of the prepaid account.
-
Field Details
-
MODEL_NAME
- See Also:
-
CREDIT_LIMIT_NAME
- See Also:
-
DEFAULT_REFERENCE
- See Also:
-
-
Constructor Details
-
ChargingMappingModel
public ChargingMappingModel()Constructs an empty charging model. -
ChargingMappingModel
public ChargingMappingModel(String chargingReference, String prepaidAccount, String externalAccount, Vector<String> creditLimits) Initializes a subscriber account with its owner, its code and its subscriber.- Parameters:
chargingReference- the code of the charging referenceprepaidAccount- the prepaid account of the subscriber accountexternalAccount- the external account of the subscriber accountcreditLimits- the list of credit limit balance codes
-
-
Method Details
-
getChargingReferenceCode
Returns the code of charging reference.- Returns:
- This charging reference code.
- See Also:
-
setChargingReferenceCode
Sets the code of charging reference.- Parameters:
chargingReferenceCode- String code which represents the code of charging reference.- See Also:
-
getCreditLimitBalances
Returns a list of credit limit balances code.- Returns:
- The list of credit limit balances code.
-
setCreditLimitBalances
Sets the list of credit limit balances.- Parameters:
creditLimits- ListcreditLimits which represents the list of credit limit balances code.
-
getExternalAccountCode
Returns the code of the external account.- Returns:
- The external account code.
-
setExternalAccountCode
Sets the code of the external account.- Parameters:
externalAccountCode- String code which represents the code of the external account.
-
getPrepaidAccountCode
Returns the code of the prepaid account.- Returns:
- The prepaid account code.
-
setPrepaidAccountCode
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
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
name- The name of tag for the childchild- The child to be added
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-