anon.pay.xml
Class XMLVolumePlan

java.lang.Object
  extended by anon.pay.xml.XMLVolumePlan
All Implemented Interfaces:
IXMLEncodable

public class XMLVolumePlan
extends java.lang.Object
implements IXMLEncodable

XML representation of the data associated with a particular volume plan, similar to a payment option Example: Small 200 True 2000000 True 1

Field Summary
private  java.lang.String m_displayName
           
private  org.w3c.dom.Document m_docTheVolumePlan
           
private  int m_duration
           
private  boolean m_durationLimited
           
private  java.lang.String m_durationUnit
           
private  java.lang.String m_name
           
private  int m_price
           
private  long m_volumeKbytes
           
private  boolean m_volumeLimited
           
static java.lang.String XML_ELEMENT_NAME
           
 
Fields inherited from interface anon.util.IXMLEncodable
FIELD_XML_ELEMENT_CONTAINER_NAME, FIELD_XML_ELEMENT_NAME, XML_ATTR_ID, XML_ATTR_LANGUAGE, XML_ATTR_VERSION
 
Constructor Summary
XMLVolumePlan()
           
XMLVolumePlan(org.w3c.dom.Document doc)
           
XMLVolumePlan(org.w3c.dom.Element elemVolumePlan)
           
XMLVolumePlan(java.lang.String xml)
           
XMLVolumePlan(java.lang.String a_name, java.lang.String a_displayName, int a_price)
          duration and volume will both be unlimited
XMLVolumePlan(java.lang.String a_name, java.lang.String a_displayName, int a_price, boolean a_durationLimited, boolean a_volumeLimited, int a_duration, java.lang.String a_durationUnit, long a_volumeLimit)
          full set of parameters, as stored in database
XMLVolumePlan(java.lang.String a_name, java.lang.String a_displayName, int a_price, int a_duration, java.lang.String a_durationUnit)
          volume will be unlimited, durationLimited is automatically set to true
XMLVolumePlan(java.lang.String a_name, java.lang.String a_displayName, int a_price, int a_duration, java.lang.String a_durationUnit, long a_volumeLimit)
          regular volume plan: both volume and duration are limited
XMLVolumePlan(java.lang.String a_name, java.lang.String a_displayName, int a_price, long a_volumeLimit)
          duration will be unlimited, volumeLimited is automatically set to true
 
Method Summary
 java.lang.String getDisplayName()
           
 int getDuration()
           
 int getDurationInDays()
           
 java.lang.String getDurationUnit()
           
 java.lang.String getName()
           
 int getPrice()
           
 long getVolumeKbytes()
           
private  org.w3c.dom.Element internal_toXmlElement(org.w3c.dom.Document a_doc)
           
 boolean isDurationLimited()
           
 boolean isVolumeLimited()
           
protected  void setValues(org.w3c.dom.Element elemRoot)
           
 org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
          Return an element that can be appended to the document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_ELEMENT_NAME

public static final java.lang.String XML_ELEMENT_NAME
See Also:
Constant Field Values

m_docTheVolumePlan

private org.w3c.dom.Document m_docTheVolumePlan

m_name

private java.lang.String m_name

m_displayName

private java.lang.String m_displayName

m_price

private int m_price

m_volumeLimited

private boolean m_volumeLimited

m_durationLimited

private boolean m_durationLimited

m_volumeKbytes

private long m_volumeKbytes

m_duration

private int m_duration

m_durationUnit

private java.lang.String m_durationUnit
Constructor Detail

XMLVolumePlan

public XMLVolumePlan()

XMLVolumePlan

public XMLVolumePlan(java.lang.String xml)
              throws java.lang.Exception
Throws:
java.lang.Exception

XMLVolumePlan

public XMLVolumePlan(org.w3c.dom.Element elemVolumePlan)
              throws java.lang.Exception
Throws:
java.lang.Exception

XMLVolumePlan

public XMLVolumePlan(org.w3c.dom.Document doc)
              throws java.lang.Exception
Throws:
java.lang.Exception

XMLVolumePlan

public XMLVolumePlan(java.lang.String a_name,
                     java.lang.String a_displayName,
                     int a_price)
duration and volume will both be unlimited


XMLVolumePlan

public XMLVolumePlan(java.lang.String a_name,
                     java.lang.String a_displayName,
                     int a_price,
                     long a_volumeLimit)
duration will be unlimited, volumeLimited is automatically set to true


XMLVolumePlan

public XMLVolumePlan(java.lang.String a_name,
                     java.lang.String a_displayName,
                     int a_price,
                     int a_duration,
                     java.lang.String a_durationUnit)
volume will be unlimited, durationLimited is automatically set to true


XMLVolumePlan

public XMLVolumePlan(java.lang.String a_name,
                     java.lang.String a_displayName,
                     int a_price,
                     int a_duration,
                     java.lang.String a_durationUnit,
                     long a_volumeLimit)
regular volume plan: both volume and duration are limited


XMLVolumePlan

public XMLVolumePlan(java.lang.String a_name,
                     java.lang.String a_displayName,
                     int a_price,
                     boolean a_durationLimited,
                     boolean a_volumeLimited,
                     int a_duration,
                     java.lang.String a_durationUnit,
                     long a_volumeLimit)
full set of parameters, as stored in database

Method Detail

getName

public java.lang.String getName()

getDisplayName

public java.lang.String getDisplayName()

getPrice

public int getPrice()

isVolumeLimited

public boolean isVolumeLimited()

isDurationLimited

public boolean isDurationLimited()

getDuration

public int getDuration()

getDurationUnit

public java.lang.String getDurationUnit()

getDurationInDays

public int getDurationInDays()

getVolumeKbytes

public long getVolumeKbytes()

toXmlElement

public org.w3c.dom.Element toXmlElement(org.w3c.dom.Document a_doc)
Return an element that can be appended to the document.

Specified by:
toXmlElement in interface IXMLEncodable
Parameters:
a_doc - a document
Returns:
the interface as xml element

setValues

protected void setValues(org.w3c.dom.Element elemRoot)
                  throws java.lang.Exception
Throws:
java.lang.Exception

internal_toXmlElement

private org.w3c.dom.Element internal_toXmlElement(org.w3c.dom.Document a_doc)