SAP CC 1.0
API 4.2 (Core)

com.highdeal.tax.hci
Class TaxDataModel

java.lang.Object
  extended by com.highdeal.tax.hci.TaxDataModel
All Implemented Interfaces:
XMLMarshallable

public class TaxDataModel
extends java.lang.Object
implements XMLMarshallable

This class represents the taxation data handled by the system.

You can redefine here certain EZTax taxation data for a specific account. These taxation data can be:

Those taxation data overrides the ones which are defined in the charge. Please refer to BillSoft's product documentation to get more information about the role of these tax data.


XML Schema Fragment
<xs:element name="taxData">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="eztaxData" minOccurs="0" maxOccurs="unbounded">
         <xs:complexType>
           <xs:attribute name="name" type="xs:string"/>
           <xs:attribute name="value" type="xs:string"/>
         </xs:complexType>
       </xs:element>
     </xs:sequence>
   </xs:complexType>
 </xs:element>

Field Summary
static java.lang.String EZTAX_CUSTOMER_TYPE
           
static java.lang.String EZTAX_INC_CODE
           
static java.lang.String EZTAX_ORIGINATION
           
static java.lang.String EZTAX_RESALE_FLAG
           
static java.lang.String EZTAX_SERVICE_ADDRESS
           
static java.lang.String EZTAX_TERMINATION
           
 
Constructor Summary
TaxDataModel()
          Builds an empty tax data.
TaxDataModel(java.lang.String taxDataStr)
          Builds an empty tax data.
 
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 objects, the child represents the marshallable object to be added into the content tree.
 boolean checkIfValid()
          Returns true if the tax data is valid.
 java.util.Properties fromCSVString(java.lang.String taxDataStr)
          Returns a properties set from a CSV string representation of the tax data.
 java.util.Properties getAllTaxData()
          Returns all set tax data, as a Properties with names as key and values as values.
 java.lang.String getTaxData(java.lang.String name)
          Gets the description associated with the given language, if exists.
 boolean isEmpty()
          Returns true if the tax data is empty.
 void isValid()
          Returns true if the tax data is valid.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, and of its children.
 void removeTaxData(java.lang.String name)
          Removes a description associated with a language.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the tag beeing processed.
 void setTaxData(java.lang.String name, java.lang.String value)
          Sets a description associated with a language.
 java.lang.String toCSVString()
          Returns a CSV string representation of the tax data.
 java.lang.String toString()
          Returns a string representation of the tax data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EZTAX_ORIGINATION

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

EZTAX_TERMINATION

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

EZTAX_SERVICE_ADDRESS

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

EZTAX_CUSTOMER_TYPE

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

EZTAX_RESALE_FLAG

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

EZTAX_INC_CODE

public static final java.lang.String EZTAX_INC_CODE
See Also:
Constant Field Values
Constructor Detail

TaxDataModel

public TaxDataModel()
Builds an empty tax data.


TaxDataModel

public TaxDataModel(java.lang.String taxDataStr)
Builds an empty tax data.

Parameters:
taxDataStr - a string that contains tax data, build with {toCSVString().
Method Detail

setTaxData

public void setTaxData(java.lang.String name,
                       java.lang.String value)
Sets a description associated with a language.

Parameters:
name - the name of the tax data.
value - the value associated with the given tax data.

removeTaxData

public void removeTaxData(java.lang.String name)
Removes a description associated with a language.

Parameters:
name - the name of the tax data.

getTaxData

public java.lang.String getTaxData(java.lang.String name)
Gets the description associated with the given language, if exists.

Parameters:
name - the name of the tax data.
Returns:
the value associated with the given name, if exists, null otherwise.

getAllTaxData

public java.util.Properties getAllTaxData()
Returns all set tax data, as a Properties with names as key and values as values.

Returns:
a Properties with

isEmpty

public boolean isEmpty()
Returns true if the tax data is empty.

Returns:
true if the tax data is empty, false otherwise.

checkIfValid

public boolean checkIfValid()
Returns true if the tax data is valid. Tax data is valid if its name is not null or empty.

Returns:
true if the tax data is valid, false otherwise.

isValid

public void isValid()
             throws com.highdeal.bnr.hci.InvalidAccountException
Returns true if the tax data is valid. Tax data is valid if its name is not null or empty.

Throws:
com.highdeal.bnr.hci.InvalidAccountException - if the tax data is not valid.

toString

public java.lang.String toString()
Returns a string representation of the tax data.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the tax data.

toCSVString

public java.lang.String toCSVString()
Returns a CSV string representation of the tax data. CSV string contains only values ordered as follows: EZTAX_ORIGINATION; EZTAX_TERMINATION; EZTAX_SERVICE_ADDRESS; EZTAX_CUSTOMER_TYPE; EZTAX_RESALE_FLAG; EZTAX_INC_CODE

Returns:
a CSV string representation of the tax data.

fromCSVString

public java.util.Properties fromCSVString(java.lang.String taxDataStr)
Returns a properties set from a CSV string representation of the tax data. CSV string contains only values ordered as follows: EZTAX_ORIGINATION; EZTAX_TERMINATION; EZTAX_SERVICE_ADDRESS; EZTAX_CUSTOMER_TYPE; EZTAX_RESALE_FLAG; EZTAX_INC_CODE

Parameters:
taxDataStr - a CSV string representation
Returns:
a properties set.

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the tag beeing processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - the XML attributes of the current tag.

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the objects, the child represents the marshallable object to be added into the content tree.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - the name of tag for the child.
child - the child to be added.

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.

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, and of its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - the XML output to marshall the object into.

SAP CC 1.0
API 4.2 (Core)


API Reference - July 2009

SAP Convergent Charging 1.0 (build R4.2.1.35.0.0)
CONVERGENT CHARGING 4.2

(c) Copyright 2009 SAP AG. All rights reserved.