Class ChargeActivationModel

java.lang.Object
com.highdeal.pnr.hci.ChargeActivationModel
All Implemented Interfaces:
XMLMarshallable

public class ChargeActivationModel extends Object implements XMLMarshallable
This Java class represents a charge activation in a subscription (customer master data) owned by a service provider; This data relates to the activation of charges in the subscribed offer.

Concepts and Terminology

A charge activation is an extensibility concept. The corresponding functional and business concept is the charge visible in a subscription.

Feature

A charge activation is contained in a SubscriptionModel and managed using operations related to subscriptions.

Concepts and Terminology

A charge activation with a dependent role does not have any status.

Accesses are directly managed using the CreateAccessOp, DeleteAccessOp and ModifyAccessOp operations.

Behavior of a charge activation status:

  • The initial state is neverActivated.
  • The next possible state is active.
  • After the state active, next possible states are suspended, cancelled, earlyCancelled and expired.
  • After the state suspended, next possible states are active, cancelled, earlyCancelled and expired.
  • The final states are cancelled, earlyCancelled and expired.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="chargeActivation">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="counter" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element ref="parameterSet" minOccurs="0" maxOccurs="1"/>
       <xs:element name="parameterSetChronology" minOccurs="0" maxOccurs="1">
         <xs:complexType>
           <xs:sequence>
             <xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
       <xs:element ref="translationInstanceSet" minOccurs="0" maxOccurs="1"/>
       <xs:element name="translationInstanceSetChronology" minOccurs="0" maxOccurs="1">
         <xs:complexType>
           <xs:sequence>
             <xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
       <xs:element ref="tierTableInstanceSet" minOccurs="0" maxOccurs="1"/>
       <xs:element name="tierTableInstanceSetChronology" minOccurs="0" maxOccurs="1">
         <xs:complexType>
           <xs:sequence>
             <xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
           </xs:sequence>
         </xs:complexType>
       </xs:element>
       <xs:element ref="access" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element ref="chargingMapping" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="subCode" 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="effectiveDate" type="xs:dateTime"/>
     <xs:attribute name="expirationDate" type="xs:dateTime"/>
     <xs:attribute name="lastActivationDate" type="xs:dateTime"/>
     <xs:attribute name="cancellationDate" type="xs:dateTime"/>
     <xs:attribute name="parentCode" type="xs:string"/>
     <xs:attribute name="parentRef" type="xs:string"/>
     <xs:attribute name="status" type="CAStatusType"/>
   </xs:complexType>
 </xs:element>
<xs:simpleType name="CAStatusType">
   <xs:restriction base="xs:string">
     <xs:enumeration value="neverActivated"/>
     <xs:enumeration value="active"/>
     <xs:enumeration value="suspended"/>
     <xs:enumeration value="cancelled"/>
     <xs:enumeration value="earlyCancelled"/>
     <xs:enumeration value="expired"/>
   </xs:restriction>

 </xs:simpleType>

  • Field Details

    • NO_STATUS

      public static final int NO_STATUS
      Numeric value for the status of a charge activation with no status.
      See Also:
    • NEVER_ACTIVATED

      public static final int NEVER_ACTIVATED
      Numeric value for the status of a charge activation which has never been activated.
      See Also:
    • ACTIVE

      public static final int ACTIVE
      Numeric value for the status of a charge activation which is active.
      See Also:
    • SUSPENDED

      public static final int SUSPENDED
      Numeric value for the status of a charge activation which is suspended.
      See Also:
    • CANCELLED

      public static final int CANCELLED
      Numeric value for the status of a charge activation which is cancelled.
      See Also:
    • EARLY_CANCELLED

      public static final int EARLY_CANCELLED
      Numeric value for the status of a charge activation which has been early cancelled.
      See Also:
    • EXPIRED

      public static final int EXPIRED
      Numeric value for the status of a charge activation which is expired.
      See Also:
    • NEVER_ACTIVATED_STR

      public static final String NEVER_ACTIVATED_STR
      String value for the status of a charge activation which has never been activated.
      See Also:
    • ACTIVE_STR

      public static final String ACTIVE_STR
      String value for the status of a charge activation which is active.
      See Also:
    • SUSPENDED_STR

      public static final String SUSPENDED_STR
      String value for the status of a charge activation which is suspended.
      See Also:
    • CANCELLED_STR

      public static final String CANCELLED_STR
      String value for the status of a charge activation which is cancelled.
      See Also:
    • EARLY_CANCELLED_STR

      public static final String EARLY_CANCELLED_STR
      String value for the status of a charge activation which has been early cancelled.
      See Also:
    • EXPIRED_STR

      public static final String EXPIRED_STR
      String value for the status of a charge activation which is expired.
      See Also:
  • Constructor Details

    • ChargeActivationModel

      public ChargeActivationModel()
      Constructs an empty charge activation.
  • Method Details

    • getSubCode

      public String getSubCode()
      Returns the subCode of this charge activation.
      Returns:
      This charge activation subCode.
      See Also:
    • setSubCode

      public void setSubCode(String subCode)
      Sets the subCode for this charge activation.
      Parameters:
      subCode - The sub-code of the charge activation.
      See Also:
    • getReference

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

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

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

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

      public String getCurrencyCode()
      Returns the currency code of this charge activation.
      Returns:
      the currency code of this charge activation, 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 activation.
      Parameters:
      currencyCode - the currency code of this charge activation, or null if it does not define a currency code
      See Also:
    • getEffectiveDate

      public Date getEffectiveDate()
      Returns the effective date of this charge activation.
      Returns:
      This charge activation effective date.
      See Also:
    • setEffectiveDate

      public void setEffectiveDate(Date effectiveDate)
      Sets the effective date of this charge activation.
      Parameters:
      effectiveDate - The effective date of the charge activation.
      See Also:
    • getExpirationDate

      public Date getExpirationDate()
      Returns the expiration date of this charge activation.
      Returns:
      This charge activation expiration date.
      See Also:
    • setExpirationDate

      public void setExpirationDate(Date expirationDate)
      Sets the expiration date of this charge activation. Only the server can update this information.
      Parameters:
      expirationDate - The expiration date of the charge activation.
      See Also:
    • getLastActivationDate

      public Date getLastActivationDate()
      Returns the last activation date of this charge activation.
      Returns:
      This charge activation last activation date.
      See Also:
    • setLastActivationDate

      public void setLastActivationDate(Date lastActivationDate)
      Sets the last activation date of this charge activation.
      Parameters:
      lastActivationDate - The last activation date of the charge activation.
      See Also:
    • getCancellationDate

      public Date getCancellationDate()
      Returns the cancellation date of this charge activation. The cancellation date must be after the effective date
      Returns:
      This subscription cancellation date.
      See Also:
    • setCancellationDate

      public void setCancellationDate(Date cancellationDate)
      Sets the cancellation date of this charge activation. The cancellation date must be after the effective date
      Parameters:
      cancellationDate - The cancellation date of the charge activation.
      See Also:
    • getCounters

      public Vector<CounterModel> getCounters()
      Returns the list of associated counters.
      Returns:
      a list of CounterModel.
    • getParentRef

      public String getParentRef()
      Returns the parent reference of this charge activation.
      Returns:
      the parent reference of this charge activation.
    • setParentRef

      public void setParentRef(String parentRef)
      Sets the parent reference of this charge activation.
      Parameters:
      parentRef - the parent reference of this charge activation.
    • getParentCode

      public String getParentCode()
      Returns the parent code of this charge activation.
      Returns:
      the parent code of this charge activation.
    • setParentCode

      public void setParentCode(String parentCode)
      Sets the parent code of this charge activation.
      Parameters:
      parentCode - the parent code of this charge activation.
    • getOfferCode

      public String getOfferCode()
      Returns the main offer code of the parent charge.
      Returns:
      The main offer code of the parent charge.
      See Also:
    • setOfferCode

      public void setOfferCode(String offerCode)
      Sets the main offer code of the parent charge.
      Parameters:
      offerCode - The code of the offer of the parent charge.
      See Also:
    • getParameterSet

      public ParameterSetModel getParameterSet()
      Returns the parameter set model of this charge activation.
      Returns:
      the parameter set model of this charge activation.
    • setParameterSet

      public void setParameterSet(ParameterSetModel parameterSet)
      Sets the parameter set model of this charge activation.
      Parameters:
      parameterSet - the parameter set model of this charge activation.
    • getTranslationInstanceSet

      public TranslationInstanceSetModel getTranslationInstanceSet()
      Returns the translation instance set of this charge activation.
      Returns:
      the translation instance set of this charge activation.
    • setTranslationInstanceSet

      public void setTranslationInstanceSet(TranslationInstanceSetModel translationInstanceSet)
      Sets the translation instance set of this charge activation.
      Parameters:
      translationInstanceSet - the translation instance set of this charge activation.
    • getTierTableInstanceSet

      public TierTableInstanceSetModel getTierTableInstanceSet()
      Returns the tier table instance set of this charge activation.
      Returns:
      the tier table instance set of this charge activation.
    • setTierTableInstanceSet

      public void setTierTableInstanceSet(TierTableInstanceSetModel tierTableInstanceSet)
      Sets the tier table instance set of this charge activation.
      Parameters:
      tierTableInstanceSet - the tier table instance set of this charge activation.
    • getParameterSetChronology

      public ChronologyModel getParameterSetChronology()
      Returns the parameter set chronology of this charge activation.
      Returns:
      all the charge activation parameter set in a vector of period.
    • getTranslationInstanceSetChronology

      public ChronologyModel getTranslationInstanceSetChronology()
      Returns the translation instance set chronology of this charge activation.
      Returns:
      all the charge activation translation instance set in a vector of period.
    • getTierTableInstanceSetChronology

      public ChronologyModel getTierTableInstanceSetChronology()
      Returns the tier table instance set chronology of this charge activation.
      Returns:
      all the charge activation tier table instance set in a vector of period.
    • getAccesses

      @Deprecated public Vector<AccessModel> getAccesses()
      Deprecated.
      Deprecated since former Transactive 3.3
      Returns the list of the associated accesses. This operation is avalaible only if pnr.compatibility.r32.access is true in the server config file.
      Returns:
      a list of AccessModel.
    • setAccesses

      @Deprecated public void setAccesses(Vector<AccessModel> accesses)
      Deprecated.
      Deprecated since former Transactive 3.3
      Sets the list of accesses of this charge activation. This operation is avalaible only if pnr.compatibility.r32.access is true in the server config file.
      Parameters:
      accesses - the list of AccessModels to be setted.
    • getChargingMappings

      public Vector<ChargingMappingModel> getChargingMappings()
      Returns ths list of the associated charging mappings.
      Returns:
      a list of ChargingMappingModel.
    • setChargingMappings

      public void setChargingMappings(Vector<ChargingMappingModel> mappings)
      Sets the list of charging mappings of this charge activation.
      Parameters:
      mappings - The list of ChargingMappingModel to be setted
    • getStatus

      public int getStatus()
      Returns the status of the charge activation.

      The status may be:

      Returns:
      The status of the charge activation
      See Also:
    • setStatus

      public void setStatus(int status)
      Sets the status for the charge activation; Only the SAP CC system can update this information.
      Parameters:
      status - The status of the charge activation
      See Also:
    • 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
    • getStatusStringFromValue

      public static String getStatusStringFromValue(int status)
    • getStatusValueFromString

      public static int getStatusValueFromString(String statusString)