|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ecash.internet.Report
A Report indicates how an operation succeeded, from the server point of view. A BuyReport is created for the bank when a buyer buyes some notes, a DepositReport is created for the bank when a seller deposits some notes and a PayReport is created for the seller when a buyer sends him some notes. This abstract class contains all the common methods used by its subclasses.
ECashGen
Method Summary | |
void |
addAmount(java.lang.String s)
Adds an amount to the amounts list. |
java.lang.String |
computeNotesExp()
Computes and returns the notes expression for the amounts list. |
java.lang.String |
computeSum()
Computes and returns the sum of all the amounts found in the amounts list. |
java.lang.String |
getAmounts()
Returns a string that represents a list of all the amounts, separated by a coma. |
int |
getResult()
Returns an int that represents how the operation succeeded. |
void |
setResult(int result)
Set the result that describes how the operation succeeded. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.lang.String getAmounts()
public int getResult()
For a buy operation (BuyReport), it can be
ECashGen.OK,
ECashGen.CHEAT_WRONG_PASSWORD,
ECashGen.CHEAT_AMOUNTS_NOT_ALL_THE_SAME or
ECashGen.CHEAT_WRONG_REVEALED_NOTES.
For a deposit operation (DepositReport) it can be
ECashGen.OK,
ECashGen.CHEAT_WRONG_PASSWORD,
ECashGen.CHEAT_WRONG_SIGNATURE,
ECashGen.CHEAT_WRONG_RIS,
ECashGen.CHEAT_NOTE_REUSED_BY_SELLER or
ECashGen.CHEAT_NOTE_REUSED_BY_BUYER.
For a pay operation (PayReport) it can be
ECashGen.OK,
ECashGen.CHEAT_WRONG_SIGNATURE or
ECashGen.CHEAT_WRONG_RIS.
ECashGen
public void addAmount(java.lang.String s)
s
- the amount to addpublic void setResult(int result)
result
- an integer describing how the operation succeededgetResult()
public java.lang.String computeSum()
public java.lang.String computeNotesExp()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |