Package com.highdeal.pnr.hci
Class UsageChargeModel
java.lang.Object
com.highdeal.pnr.hci.RateComponentModel
com.highdeal.pnr.hci.ChargeModel
com.highdeal.pnr.hci.UsageChargeModel
- All Implemented Interfaces:
XMLMarshallable,ContextualNode
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>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.Gets available chargeable item names.booleanReturns true if the component is valid.Returns the name of the chargeable item.getContext(ContextualNode child) Gets the context description for the specified child; The context description contains all the context properties.Gets the inherited context; The context description contains all the context properties.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidsetChargeableItemName(String chargeableItemName) Sets the name of the chargeable item.Methods inherited from class com.highdeal.pnr.hci.ChargeModel
getMaxChildCount, getPropertyReferences, getRateComponent, setRateComponentMethods inherited from class com.highdeal.pnr.hci.RateComponentModel
addCharacterData, findRootRateModel, getChildAt, getChildCount, getChildren, getDescription, getName, getParent, getPropertyNames, isRemoveChildAllowed, isSetChildAllowed, remove, removeChild, setChild, setChildren, setDescription, setName, setParent
-
Constructor Details
-
UsageChargeModel
public UsageChargeModel()
-
-
Method Details
-
getChargeableItemName
Returns the name of the chargeable item.- Returns:
- the name of the chargeable item.
-
setChargeableItemName
Sets the name of the chargeable item.- Parameters:
chargeableItemName- Returns the name of the chargeable item.
-
getContext
Description copied from interface:ContextualNodeGets the context description for the specified child; The context description contains all the context properties.- Specified by:
getContextin interfaceContextualNode- Overrides:
getContextin classRateComponentModel- Parameters:
child- The child node- Returns:
- The context description
-
availableCINames
Gets available chargeable item names.- Returns:
- a list of
QualifiedChargeableItemDescriptioncontaining all chargeable item names.
-
inheritedContext
Description copied from interface:ContextualNodeGets the inherited context; The context description contains all the context properties.- Specified by:
inheritedContextin interfaceContextualNode- Overrides:
inheritedContextin classRateComponentModel- Returns:
- The inherited context
-
checkValidity
public boolean checkValidity()Description copied from class:RateComponentModelReturns true if the component is valid.- Overrides:
checkValidityin classChargeModel- Returns:
- true if the component is valid, false otherwise.
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Overrides:
setAttributesin classRateComponentModel- Parameters:
atts- TheXML attributesof the current element
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Overrides:
addChildin classRateComponentModel- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Overrides:
marshalin classRateComponentModel- Parameters:
output- TheXML outputto marshal the object into
-