com.highdeal.pnr.hci
Class ChargeComponentModel

java.lang.Object
  extended by com.highdeal.pnr.hci.ChargeComponentModel
All Implemented Interfaces:
ITagNameProvider, XMLMarshallable, ICatalogObject

public class ChargeComponentModel
extends java.lang.Object
implements XMLMarshallable, ICatalogObject, ITagNameProvider

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):

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: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 Summary
ChargeComponentModel()
          Builds an empty charge component model.
 
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.
 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. Use getCurrencyCode()
 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 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 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChargeComponentModel

public ChargeComponentModel()
Builds an empty charge component model.

Method Detail

getCode

public java.lang.String getCode()
Returns the code of this charge component.

Returns:
This charge component code
See Also:
setCode(String)

setCode

public void setCode(java.lang.String code)
Sets the code for this charge component.

Parameters:
code - The code of the charge component
See Also:
getCode()

getReference

public java.lang.String getReference()
Returns the reference of this charge component.

Returns:
This charge component reference
See Also:
setReference(String)

setReference

public void setReference(java.lang.String reference)
Sets the reference of this charge component.

Parameters:
reference - The reference of the charge component
See Also:
getReference()

getDescription

public java.lang.String getDescription()
Returns the description of this charge component.

Returns:
This charge component description
See Also:
setDescription(String)

setDescription

public void setDescription(java.lang.String description)
Sets the description of this charge component.

Parameters:
description - The description of the charge component
See Also:
getDescription()

getCurrencyCode

public java.lang.String getCurrencyCode()
Returns the currency code of this charge component.

Returns:
The currency code of this charge component, or null if it does not define a currency code
See Also:
setCurrencyCode(String)

setCurrencyCode

public void setCurrencyCode(java.lang.String currencyCode)
Sets the currency code of this charge component.

Parameters:
currencyCode - The currency code of this charge component, or null if it does not define a currency code
See Also:
getCurrencyCode()

getCurrencyCodeFromPricePlan

@Deprecated
public java.lang.String getCurrencyCodeFromPricePlan()
Deprecated. Use getCurrencyCode()

Returns the currency code of this charge component or its price plan.

Returns:
The currency code of this charge component, or null if it does not define a currency code

isMultiCurrencies

public boolean isMultiCurrencies()
Returns whether the charge component is multi-currencies.

Returns:
true if the charge component is multi-currencies, false otherwise

setMultiCurrencies

public void setMultiCurrencies(boolean multiCurrencies)
Sets whether this charge component is multi-currencies.

Parameters:
multiCurrencies - true if the charge component is multi-currencies, false otherwise

getOwner

public java.lang.String getOwner()
Returns the owner of this charge component.

Specified by:
getOwner in interface ICatalogObject
Returns:
This charge component owner
See Also:
setOwner(String)

setOwner

public void setOwner(java.lang.String owner)
Sets the owner of this charge component.

Parameters:
owner - The owner of the charge component
See Also:
getOwner()

isDependent

public boolean isDependent()
Returns true if the charge component is a dependent, else false.

Returns:
true if the charge component is a dependent
See Also:
setDependent(boolean)

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:
isDependent()

getProductCodes

public java.util.Vector<java.lang.String> getProductCodes()
Returns the product list for this charge component.

Returns:
A vector of String that represents product code for this charge component

getPricePlanChronology

public ChronologyModel getPricePlanChronology()
Returns the price plan chronology of this charge component.

Returns:
All the charge component price plan in a chronology of PricePlanModel

getPricePlan

public 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

public void setPricePlan(PricePlanModel pricePlan)
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

public ChargingPlanDictionaryModel getChargingPlanDictionary()
Returns the dictionary for all charging plan.

Returns:
The dictionary for all charging plan
Since:
Transacive 4.0

setChargingPlanDictionary

public void setChargingPlanDictionary(ChargingPlanDictionaryModel chargingPlanDictionary)
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

public java.lang.String getTagName()
Description copied from interface: ITagNameProvider
Gets the XML tag name of the HCI model.

Specified by:
getTagName in interface ITagNameProvider
Returns:
The XML tag name

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)