public class ChargeComponentModel extends java.lang.Object implements XMLMarshallable, ICatalogObject, ITagNameProvider, com.highdeal.pnr.hci.IManageableByCockpit
Java class represents a charge component (reusable charge) in a pricing catalog of a service provider.
Concepts and Terminology
A charge component is an extensibility concept. The corresponding functional and business concept is the reusable charge in a pricing catalog of a service provider.
The prorata mode is not available in dependent charges (or in a cost with the simulator). There is no workaround.
Refund related to a prepaid period is not available in dependent charges (or in a cost with the simulator).
A possible workaround consists in testing the base amount (which is provided by the master charge):
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="chargeComponent">
<xs:complexType>
<xs:sequence>
<xs:element ref="productCode" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="pricePlan" minOccurs="0" maxOccurs="1"/>
<xs:element ref="pricePlanChronology" minOccurs="0" maxOccurs="1"/>
<xs:element ref="chargingPlanDictionary" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="code" type="xs:string" use="required"/>
<xs:attribute name="reference" type="xs:string"/>
<xs:attribute name="description" type="xs:string"/>
<xs:attribute name="currency" type="xs:string" use="optional"/>
<xs:attribute name="multiCurrencies" type="xs:boolean" default="false"/>
<xs:attribute name="owner" type="xs:string" use="required"/>
<xs:attribute name="dependent" type="xs:boolean" default="false"/>
<xs:attribute name="managedByCockpit" type="xs:boolean" use="optional" default="false" />
</xs:complexType>
</xs:element>
<xs:element name="pricePlanChronology">
<xs:complexType>
<xs:sequence>
<xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="productCode">
<xs:complexType>
<xs:attribute name="code" type="xs:string"/>
</xs:complexType>
</xs:element>
| Constructor and Description |
|---|
ChargeComponentModel()
Builds an empty charge component model.
|
| 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. |
ChargingPlanDictionaryModel |
getChargingPlanDictionary()
Returns the dictionary for all charging plan.
|
java.lang.String |
getCode()
Returns the code of this charge component.
|
java.lang.String |
getCurrencyCode()
Returns the currency code of this charge component.
|
java.lang.String |
getCurrencyCodeFromPricePlan()
Deprecated.
|
java.lang.String |
getDescription()
Returns the description of this charge component.
|
java.lang.String |
getOwner()
Returns the owner of this charge component.
|
PricePlanModel |
getPricePlan()
Returns the price plan for the creation or the modification of this charge component.
|
ChronologyModel |
getPricePlanChronology()
Returns the price plan chronology of this charge component.
|
java.util.Vector<java.lang.String> |
getProductCodes()
Returns the product list for this charge component.
|
java.lang.String |
getReference()
Returns the reference of this charge component.
|
java.lang.String |
getTagName()
Gets the XML tag name of the HCI model.
|
boolean |
isCompatibleWithChargePlan()
Checks if this charge component is compatible with charge plan.
|
boolean |
isCompatibleWithOffer()
Checks if this charge component is compatible with offer.
|
boolean |
isDependent()
Returns
true if the charge component is a dependent,
else false. |
boolean |
isManagedByCockpit()
Returns
true if this Charge is compatible with a Rate Plan. |
boolean |
isMultiCurrencies()
Returns whether the charge component is multi-currencies.
|
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 |
setChargingPlanDictionary(ChargingPlanDictionaryModel chargingPlanDictionary)
Sets the dictinary for all charging plan.
|
void |
setCode(java.lang.String code)
Sets the code for this charge component.
|
void |
setCurrencyCode(java.lang.String currencyCode)
Sets the currency code of this charge component.
|
void |
setDependent(boolean dependent)
Sets this charge component as a dependent.
|
void |
setDescription(java.lang.String description)
Sets the description of this charge component.
|
void |
setIsManagedByCockpit(boolean isManagedByCockpit)
Sets whether this Charge is compatible with a Rate Plan.
|
void |
setMultiCurrencies(boolean multiCurrencies)
Sets whether this charge component is multi-currencies.
|
void |
setOwner(java.lang.String owner)
Sets the owner of this charge component.
|
void |
setPricePlan(PricePlanModel pricePlan)
Sets the price plan model for the creation or the modification of the charge component.
|
void |
setReference(java.lang.String reference)
Sets the reference of this charge component.
|
public ChargeComponentModel()
public java.lang.String getCode()
setCode(String)public void setCode(java.lang.String code)
code - The code of the charge componentgetCode()public java.lang.String getReference()
setReference(String)public void setReference(java.lang.String reference)
reference - The reference of the charge componentgetReference()public java.lang.String getDescription()
setDescription(String)public void setDescription(java.lang.String description)
description - The description of the charge componentgetDescription()public java.lang.String getCurrencyCode()
null if it does not define a currency codesetCurrencyCode(String)public void setCurrencyCode(java.lang.String currencyCode)
currencyCode - The currency code of this charge component, or null if it does not define a currency codegetCurrencyCode()@Deprecated public java.lang.String getCurrencyCodeFromPricePlan()
getCurrencyCode()null if it does not define a currency codepublic boolean isMultiCurrencies()
true if the charge component is multi-currencies, false otherwisepublic void setMultiCurrencies(boolean multiCurrencies)
multiCurrencies - true if the charge component is multi-currencies, false otherwisepublic java.lang.String getOwner()
getOwner in interface ICatalogObjectsetOwner(String)public void setOwner(java.lang.String owner)
owner - The owner of the charge componentgetOwner()public boolean isDependent()
true if the charge component is a dependent,
else false.true if the charge component is a dependentsetDependent(boolean)public void setDependent(boolean dependent)
dependent - true if the charge component is a dependent, false otherwiseisDependent()public boolean isManagedByCockpit()
true if this Charge is compatible with a Rate Plan.isManagedByCockpit in interface com.highdeal.pnr.hci.IManageableByCockpittrue if this Charge is compatible with a Rate Plan.public void setIsManagedByCockpit(boolean isManagedByCockpit)
setIsManagedByCockpit in interface com.highdeal.pnr.hci.IManageableByCockpitisManagedByCockpit - true if this Charge is compatible with a Rate Planpublic java.util.Vector<java.lang.String> getProductCodes()
String that
represents product code for this charge componentpublic ChronologyModel getPricePlanChronology()
public PricePlanModel getPricePlan()
public void setPricePlan(PricePlanModel pricePlan)
pricePlan - The price plan model for the creation or the modification of the charge componentpublic ChargingPlanDictionaryModel getChargingPlanDictionary()
public void setChargingPlanDictionary(ChargingPlanDictionaryModel chargingPlanDictionary)
chargingPlanDictionary - public boolean isCompatibleWithChargePlan()
public boolean isCompatibleWithOffer()
public java.lang.String getTagName()
ITagNameProvidergetTagName in interface ITagNameProviderpublic 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