com.highdeal.pnr.hci
Class UsageRateModel

java.lang.Object
  extended by com.highdeal.pnr.hci.RateModel
      extended by com.highdeal.pnr.hci.UsageRateModel
All Implemented Interfaces:
IXMLMarshallable, XMLMarshallable, ContextualNode

public class UsageRateModel
extends RateModel

This class represents an usage rate.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="usage">
   <xs:complexType>
    <xs:sequence>
     <xs:element ref="component" minOccurs="1" maxOccurs="1"/>
    </xs:sequence>
    <xs:attribute name="ciName" type="xs:string" use="required"/>
    <xs:attribute name="name" type="xs:string"/>
    <xs:attribute name="description" type="xs:string"/>
   </xs:complexType>
 </xs:element>


Field Summary
static java.lang.String ANY_CI_NAME
          Constant for any chargeable item.
static java.lang.String TAG_NAME
          The value of that constant is the XML tag name of the usage rate.
 
Constructor Summary
UsageRateModel()
           
 
Method Summary
 java.util.List<QualifiedChargeableItemDescription> availableCINames()
          Gets available chargeable item names.
 boolean checkValidity()
          Returns true if the Usage Rate is valid.
 java.lang.String getChargeableItemName()
          Gets the chargeable item name.
 RatingContextDescription getContext(ContextualNode child)
          Gets the context for the specified child.
protected  java.lang.String getTagName()
           
 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 name)
          Sets the chargeable item name.
 
Methods inherited from class com.highdeal.pnr.hci.RateModel
addCharacterData, addChild, getDescription, getName, getParent, getRateComponent, inheritedContext, marshalAttributes, marshalChildren, remove, setDescription, setName, setParent, setRateComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
The value of that constant is the XML tag name of the usage rate.

See Also:
Constant Field Values

ANY_CI_NAME

public static final java.lang.String ANY_CI_NAME
Constant for any chargeable item.

See Also:
Constant Field Values
Constructor Detail

UsageRateModel

public UsageRateModel()
Method Detail

setChargeableItemName

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

Parameters:
name - the chargeable item name.

getChargeableItemName

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

Returns:
the chargeable item name.

checkValidity

public boolean checkValidity()
Returns true if the Usage Rate is valid. Usage rate is valid if all the following conditions are met:

Overrides:
checkValidity in class RateModel
Returns:
true if the usage rate is valid, false otherwise.

getContext

public RatingContextDescription getContext(ContextualNode child)
Gets the context for the specified child.

Parameters:
child - the child node
Returns:
the context.

availableCINames

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

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

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 RateModel
Parameters:
atts - The XML attributes of the current element

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 IXMLMarshallable
Specified by:
marshal in interface XMLMarshallable
Overrides:
marshal in class RateModel
Parameters:
output - The XML output to marshal the object into

getTagName

protected java.lang.String getTagName()

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