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 Details

    • TAG_NAME

      public static final String 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

      public String getCode()
      Returns the code of this charge component.
      Returns:
      This charge component code
      See Also:
    • setCode

      public void setCode(String code)
      Sets the code for this charge component.
      Parameters:
      code - The code of the charge component
      See Also:
    • getReference

      public String getReference()
      Returns the reference of this charge component.
      Returns:
      This charge component reference
      See Also:
    • setReference

      public void setReference(String reference)
      Sets the reference of this charge component.
      Parameters:
      reference - The reference of the charge component
      See Also:
    • getDescription

      public String getDescription()
      Returns the description of this charge component.
      Returns:
      This charge component description
      See Also:
    • setDescription

      public void setDescription(String description)
      Sets the description of this charge component.
      Parameters:
      description - The description of the charge component
      See Also:
    • getCurrencyCode

      public 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

      public void setCurrencyCode(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:
    • getCurrencyCodeFromPricePlan

      @Deprecated public String getCurrencyCodeFromPricePlan()
      Deprecated.
      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 String getOwner()
      Returns the owner of this charge component.
      Specified by:
      getOwner in interface ICatalogObject
      Returns:
      This charge component owner
      See Also:
    • setOwner

      public void setOwner(String owner)
      Sets the owner of this charge component.
      Parameters:
      owner - The owner of the charge component
      See Also:
    • 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

      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()
      Returns true if this Charge is compatible with a Rate Plan.
      Specified by:
      isManagedByCockpit in interface com.highdeal.pnr.hci.IManageableByCockpit
      Returns:
      true if 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:
      setIsManagedByCockpit in interface com.highdeal.pnr.hci.IManageableByCockpit
      Parameters:
      isManagedByCockpit - true if this Charge is compatible with a Rate Plan
    • getProductCodes

      public Vector<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 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(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(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