public class ChargingMappingModel extends java.lang.Object implements XMLMarshallable
ChargingMappingModel represents a charging mapping.
A chargingMapping is contained in a ChargeActivationModel and
managed by subscription operations.
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>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CREDIT_LIMIT_NAME |
static java.lang.String |
DEFAULT_REFERENCE |
static java.lang.String |
MODEL_NAME |
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final java.lang.String MODEL_NAME
public static final java.lang.String CREDIT_LIMIT_NAME
public static final java.lang.String DEFAULT_REFERENCE
public ChargingMappingModel()
public ChargingMappingModel(java.lang.String chargingReference,
java.lang.String prepaidAccount,
java.lang.String externalAccount,
java.util.Vector<java.lang.String> creditLimits)
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 codespublic java.lang.String getChargingReferenceCode()
setChargingReferenceCode(String)public void setChargingReferenceCode(java.lang.String chargingReferenceCode)
chargingReferenceCode - String code which represents the code of charging reference.getChargingReferenceCode()public java.util.List<java.lang.String> getCreditLimitBalances()
public void setCreditLimitBalances(java.util.List<java.lang.String> creditLimits)
creditLimits - Listpublic java.lang.String getExternalAccountCode()
public void setExternalAccountCode(java.lang.String externalAccountCode)
externalAccountCode - String code which represents the code of the external account.public java.lang.String getPrepaidAccountCode()
public void setPrepaidAccountCode(java.lang.String prepaidAccountCode)
prepaidAccountCode - String code which represents the code of the prepaid account.public boolean isPrepaidAccount()
public boolean isExternalAccount()
public boolean isValid()
public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(java.lang.String name,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallablename - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into