com.highdeal.pnr.hci
Class UsageChargeModel

java.lang.Object
  extended by com.highdeal.pnr.hci.RateComponentModel
      extended by com.highdeal.pnr.hci.ChargeModel
          extended by com.highdeal.pnr.hci.UsageChargeModel
All Implemented Interfaces:
XMLMarshallable, ContextualNode

public class UsageChargeModel
extends ChargeModel

This class represents a usage charge of a charging plan.

Since:
Transactive 4.0

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="usageCharge">
  <xs:complexType>
   <xs:sequence>
    <xs:element ref="component" minOccurs="1" maxOccurs="1"/>
   </xs:sequence>
   <xs:attribute name="name" type="xs:string"/>
   <xs:attribute name="description" type="xs:string"/>
   <xs:attribute name="chargeableItemName" type="xs:string"/>
  </xs:complexType>
 </xs:element>


Field Summary
 
Fields inherited from class com.highdeal.pnr.hci.RateComponentModel
children, description, name, parent
 
Constructor Summary
UsageChargeModel()
           
 
Method Summary
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 java.util.List<QualifiedChargeableItemDescription> availableCINames()
          Gets available chargeable item names.
 boolean checkValidity()
          Returns true if the component is valid.
 java.lang.String getChargeableItemName()
          Returns the name of the chargeable item.
 RatingContextDescription getContext(ContextualNode child)
          Gets the context description for the specified child; The context description contains all the context properties.
 RatingContextDescription inheritedContext()
          Gets the inherited context; The context description contains all the context properties.
 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 setChargeableItemName(java.lang.String chargeableItemName)
          Sets the name of the chargeable item.
 
Methods inherited from class com.highdeal.pnr.hci.ChargeModel
getMaxChildCount, getRateComponent, setRateComponent
 
Methods inherited from class com.highdeal.pnr.hci.RateComponentModel
addCharacterData, getChildAt, getChildCount, getChildren, getDescription, getName, getParent, isRemoveChildAllowed, isSetChildAllowed, marshallChildren, remove, removeChild, setChild, setChild, setChildren, setDescription, setName, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsageChargeModel

public UsageChargeModel()
Method Detail

getChargeableItemName

public java.lang.String getChargeableItemName()
Returns the name of the chargeable item.

Returns:
the name of the chargeable item.

setChargeableItemName

public void setChargeableItemName(java.lang.String chargeableItemName)
Sets the name of the chargeable item.

Parameters:
chargeableItemName - Returns the name of the chargeable item.

getContext

public RatingContextDescription getContext(ContextualNode child)
Description copied from interface: ContextualNode
Gets the context description for the specified child; The context description contains all the context properties.

Specified by:
getContext in interface ContextualNode
Overrides:
getContext in class RateComponentModel
Parameters:
child - The child node
Returns:
The context description

availableCINames

public java.util.List<QualifiedChargeableItemDescription> availableCINames()
Gets available chargeable item names.

Returns:
a list of QualifiedChargeableItemDescription containing all chargeable item names.

inheritedContext

public RatingContextDescription inheritedContext()
Description copied from interface: ContextualNode
Gets the inherited context; The context description contains all the context properties.

Specified by:
inheritedContext in interface ContextualNode
Overrides:
inheritedContext in class RateComponentModel
Returns:
The inherited context

checkValidity

public boolean checkValidity()
Description copied from class: RateComponentModel
Returns true if the component is valid.

Overrides:
checkValidity in class ChargeModel
Returns:
true if the component is valid, false otherwise.

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
Overrides:
setAttributes in class RateComponentModel
Parameters:
atts - The XML attributes of the current element

addChild

public void addChild(java.lang.String tagName,
                     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
Overrides:
addChild in class RateComponentModel
Parameters:
tagName - The name of tag for the child
child - The child 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
Overrides:
marshal in class RateComponentModel
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)