Package com.highdeal.pnr.hci
Class ChargeComponentModel
java.lang.Object
com.highdeal.pnr.hci.ChargeComponentModel
- All Implemented Interfaces:
ITagNameProvider,XMLMarshallable,ICatalogObject,com.highdeal.pnr.hci.IManageableByCockpit
public class ChargeComponentModel
extends Object
implements XMLMarshallable, ICatalogObject, ITagNameProvider, com.highdeal.pnr.hci.IManageableByCockpit
This
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.
Feature
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):
- If the base amount is < 0, there is a refund.
- If the base amount is > 0, there is no refund.
XML API for HCI
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>
-
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 dictionary for all charging plan.getCode()Returns the code of this charge component.Returns the currency code of this charge component.Deprecated.Returns the description of this charge component.getOwner()Returns the owner of this charge component.Returns the price plan for the creation or the modification of this charge component.Returns the price plan chronology of this charge component.Returns the product list for this charge component.Returns the reference of this charge component.Gets the XML tag name of the HCI model.booleanChecks if this charge component is compatible with charge plan.booleanChecks if this charge component is compatible with offer.booleanReturnstrueif the charge component is a dependent, elsefalse.booleanReturnstrueif this Charge is compatible with a Rate Plan.booleanReturns whether the charge component is multi-currencies.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.voidsetChargingPlanDictionary(ChargingPlanDictionaryModel chargingPlanDictionary) Sets the dictinary for all charging plan.voidSets the code for this charge component.voidsetCurrencyCode(String currencyCode) Sets the currency code of this charge component.voidsetDependent(boolean dependent) Sets this charge component as a dependent.voidsetDescription(String description) Sets the description of this charge component.voidsetIsManagedByCockpit(boolean isManagedByCockpit) Sets whether this Charge is compatible with a Rate Plan.voidsetMultiCurrencies(boolean multiCurrencies) Sets whether this charge component is multi-currencies.voidSets the owner of this charge component.voidsetPricePlan(PricePlanModel pricePlan) Sets the price plan model for the creation or the modification of the charge component.voidsetReference(String reference) Sets the reference of this charge component.
-
Field Details
-
TAG_NAME
The value of that constant is the XML tag name of the Charge Component.- See Also:
-
-
Constructor Details
-
ChargeComponentModel
public ChargeComponentModel()Builds an empty charge component model.
-
-
Method Details
-
getCode
Returns the code of this charge component.- Returns:
- This charge component code
- See Also:
-
setCode
Sets the code for this charge component.- Parameters:
code- The code of the charge component- See Also:
-
getReference
Returns the reference of this charge component.- Returns:
- This charge component reference
- See Also:
-
setReference
Sets the reference of this charge component.- Parameters:
reference- The reference of the charge component- See Also:
-
getDescription
Returns the description of this charge component.- Returns:
- This charge component description
- See Also:
-
setDescription
Sets the description of this charge component.- Parameters:
description- The description of the charge component- See Also:
-
getCurrencyCode
Returns the currency code of this charge component.- Returns:
- The currency code of this charge component, or
nullif it does not define a currency code - See Also:
-
setCurrencyCode
Sets the currency code of this charge component.- Parameters:
currencyCode- The currency code of this charge component, ornullif it does not define a currency code- See Also:
-
getCurrencyCodeFromPricePlan
Deprecated.Returns the currency code of this charge component or its price plan.- Returns:
- The currency code of this charge component, or
nullif it does not define a currency code
-
isMultiCurrencies
public boolean isMultiCurrencies()Returns whether the charge component is multi-currencies.- Returns:
trueif the charge component is multi-currencies,falseotherwise
-
setMultiCurrencies
public void setMultiCurrencies(boolean multiCurrencies) Sets whether this charge component is multi-currencies.- Parameters:
multiCurrencies-trueif the charge component is multi-currencies,falseotherwise
-
getOwner
Returns the owner of this charge component.- Specified by:
getOwnerin interfaceICatalogObject- Returns:
- This charge component owner
- See Also:
-
setOwner
Sets the owner of this charge component.- Parameters:
owner- The owner of the charge component- See Also:
-
isDependent
public boolean isDependent()Returnstrueif the charge component is a dependent, elsefalse.- Returns:
trueif the charge component is a dependent- See Also:
-
setDependent
public void setDependent(boolean dependent) Sets this charge component as a dependent.- Parameters:
dependent- true if the charge component is a dependent, false otherwise- See Also:
-
isManagedByCockpit
public boolean isManagedByCockpit()Returnstrueif this Charge is compatible with a Rate Plan.- Specified by:
isManagedByCockpitin interfacecom.highdeal.pnr.hci.IManageableByCockpit- Returns:
trueif this Charge is compatible with a Rate Plan.
-
setIsManagedByCockpit
public void setIsManagedByCockpit(boolean isManagedByCockpit) Sets whether this Charge is compatible with a Rate Plan.- Specified by:
setIsManagedByCockpitin interfacecom.highdeal.pnr.hci.IManageableByCockpit- Parameters:
isManagedByCockpit-trueif this Charge is compatible with a Rate Plan
-
getProductCodes
Returns the product list for this charge component.- Returns:
- A vector of
Stringthat represents product code for this charge component
-
getPricePlanChronology
Returns the price plan chronology of this charge component.- Returns:
- All the charge component price plan in a chronology of PricePlanModel
-
getPricePlan
Returns the price plan for the creation or the modification of this charge component.- Returns:
- The price plan for the creation or the modification of this charge component
-
setPricePlan
Sets the price plan model for the creation or the modification of the charge component.- Parameters:
pricePlan- The price plan model for the creation or the modification of the charge component
-
getChargingPlanDictionary
Returns the dictionary for all charging plan.- Returns:
- The dictionary for all charging plan
- Since:
- Transacive 4.0
-
setChargingPlanDictionary
Sets the dictinary for all charging plan.- Parameters:
chargingPlanDictionary-- Since:
- Transacive 4.0
-
isCompatibleWithChargePlan
public boolean isCompatibleWithChargePlan()Checks if this charge component is compatible with charge plan.- Returns:
- true if this could be add into a charge plan, false otherwise
-
isCompatibleWithOffer
public boolean isCompatibleWithOffer()Checks if this charge component is compatible with offer.- Returns:
- true if this could be add into a offer, false otherwise
-
getTagName
Description copied from interface:ITagNameProviderGets the XML tag name of the HCI model.- Specified by:
getTagNamein interfaceITagNameProvider- Returns:
- The XML tag name
-
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
-
getCurrencyCode()