|
Agent System POND 1.2 (28.2.2002) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--FIM.payment.InvoiceItem
Helper class: Models a line in an invoice. Just contains a text and the price for this item.
Constructor Summary | |
InvoiceItem(Element elem)
Creates a new invoice item object from values stored in an XML Element. |
|
InvoiceItem(String item,
Price price)
Creates a new line for an invoice. |
Method Summary | |
void |
decodeXMLElement(Element elem)
Parse back the item from an XML element. |
Serializable |
getAsSerializable()
Retrieve the item as a serializable (just returns this as this object is directly serializable). |
Element |
getAsXMLElement(Document doc)
Retrieve the item as an XML element. |
String |
getItemName()
Retrieve the name of this item. |
Price |
getPrice()
Retrieve the price of this item. |
String |
toString()
Returns a strign representation for an invoice item. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public InvoiceItem(String item, Price price)
item
- the name for the itemprice
- the price for this itempublic InvoiceItem(Element elem)
elem
- the XML element to parse the values fromIllegalArgumentException
- if the price could not be parsed back completelyMethod Detail |
public String getItemName()
public Price getPrice()
public Serializable getAsSerializable()
this
as this object is directly serializable).getAsSerializable
in interface XMLEncodeable
public Element getAsXMLElement(Document doc)
getAsXMLElement
in interface XMLEncodeable
doc
- the document within which to create the elementpublic void decodeXMLElement(Element elem) throws IllegalArgumentException
decodeXMLElement
in interface XMLEncodeable
elem
- the element containing the price to parse backIllegalArgumentException
- if the element is incorrect (e. g. wrong tag name)public String toString()
toString
in interface XMLEncodeable
toString
in class Object
|
Agent System POND 1.2 (28.2.2002) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |