com.highdeal.pnr.hci
Class RateModel

java.lang.Object
  extended by com.highdeal.pnr.hci.RateModel
All Implemented Interfaces:
IXMLMarshallable, XMLMarshallable, ContextualNode
Direct Known Subclasses:
AccountEventRefillModel, OneShotRateModel, com.highdeal.refilllogic.hci.RefillRecurringRateModel, UsageRateModel

public abstract class RateModel
extends java.lang.Object
implements ContextualNode, IXMLMarshallable

This class is the root class for the different rates classes.


Constructor Summary
RateModel()
           
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 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.
 boolean checkValidity()
          Returns true if the rate is valid.
 java.lang.String getDescription()
          Gets the description of the rate.
 java.lang.String getName()
          Gets the name of the rate.
 ContextualNode getParent()
          Gets the parent node.
 RateComponentModel getRateComponent()
          Gets the contained rate component.
 RatingContextDescription inheritedContext()
          Gets the inherited context.
 void marshal(XMLOutputter output)
          Deprecated. 
 void marshalAttributes(XMLOutputter output)
          Gives an XML representation of the attributes of an object.
 void marshalChildren(XMLOutputter output)
          Gives an XML representation of the child objects of an object.
 void remove()
          Removes the contained rate component.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setDescription(java.lang.String description)
          Sets the description of the rate.
 void setName(java.lang.String name)
          Sets the name of the rate.
 void setParent(ContextualNode node)
          Sets the parent.
 void setRateComponent(RateComponentModel rateComponent)
          Sets the contained rate component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.highdeal.pnr.hci.ContextualNode
getContext
 

Constructor Detail

RateModel

public RateModel()
Method Detail

getName

public java.lang.String getName()
Gets the name of the rate.

Returns:
the name of the rate.

setName

public void setName(java.lang.String name)
Sets the name of the rate.

Parameters:
name - the name of the rate.

getDescription

public java.lang.String getDescription()
Gets the description of the rate.

Returns:
the description of the rate.

setDescription

public void setDescription(java.lang.String description)
Sets the description of the rate.

Parameters:
description - the description of the rate.

getRateComponent

public RateComponentModel getRateComponent()
Gets the contained rate component.

Returns:
the contained rate component.

setRateComponent

public void setRateComponent(RateComponentModel rateComponent)
Sets the contained rate component.

Parameters:
rateComponent - the contained rate component.

remove

public void remove()
Removes the contained rate component. (This is equivalent to setRateComponent(null).)


setParent

public void setParent(ContextualNode node)
Sets the parent.

Specified by:
setParent in interface ContextualNode
Parameters:
node - the parent.

getParent

public ContextualNode getParent()
Gets the parent node.

Returns:
the parent node.

inheritedContext

public RatingContextDescription inheritedContext()
Gets the inherited context.

Specified by:
inheritedContext in interface ContextualNode
Returns:
the inherited context.

checkValidity

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

Returns:
true if the rate 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
Parameters:
atts - The XML attributes of the current element

addCharacterData

public void addCharacterData(java.lang.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

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
Parameters:
tagName - The name of tag for the child
child - The child to be added

marshal

@Deprecated
public void marshal(XMLOutputter output)
Deprecated. 

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
Parameters:
output - The XML output to marshal the object into

marshalAttributes

public void marshalAttributes(XMLOutputter output)
Description copied from interface: IXMLMarshallable
Gives an XML representation of the attributes of an object.

Specified by:
marshalAttributes in interface IXMLMarshallable
Parameters:
output - The XML output to marshal the object attributes into

marshalChildren

public void marshalChildren(XMLOutputter output)
Description copied from interface: IXMLMarshallable
Gives an XML representation of the child objects of an object.

Specified by:
marshalChildren in interface IXMLMarshallable
Parameters:
output - The XML output to marshal the child objects into

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