Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset
In directory sc8-pr-cvs1:/tmp/cvs-serv10286/src/java/org/neuclear/asset
Modified Files:
AssetController.java ExpiredHeldTransferException.java
InsufficientFundsException.java InvalidTransferException.java
LowLevelPaymentException.java NegativeTransferException.java
NonExistantHoldException.java TransferDeniedException.java
TransferException.java TransferLargerThanHeldException.java
TransferNotStartedException.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AssetController.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/AssetController.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** AssetController.java 12 Nov 2003 23:47:05 -0000 1.6
--- AssetController.java 21 Nov 2003 04:43:04 -0000 1.7
***************
*** 4,7 ****
--- 4,8 ----
import org.neuclear.asset.contracts.builders.CancelHeldTransferReceiptBuilder;
import org.neuclear.id.builders.NamedObjectBuilder;
+ import org.neuclear.commons.NeuClearException;
/*
***************
*** 25,28 ****
--- 26,35 ----
$Id$
$Log$
+ Revision 1.7 2003/11/21 04:43:04 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.6 2003/11/12 23:47:05 pelle
Much work done in creating good test environment.
***************
*** 80,84 ****
* @throws InvalidTransferException
*/
! public final NamedObjectBuilder process(AssetTransactionContract contract) throws TransferDeniedException, LowLevelPaymentException, InvalidTransferException {
if (contract instanceof TransferRequest)
return processTransfer((TransferRequest) contract);
--- 87,91 ----
* @throws InvalidTransferException
*/
! public final NamedObjectBuilder process(final AssetTransactionContract contract) throws TransferDeniedException, LowLevelPaymentException, InvalidTransferException, NeuClearException {
if (contract instanceof TransferRequest)
return processTransfer((TransferRequest) contract);
***************
*** 111,115 ****
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.TransferReceiptBuilder processTransfer(TransferRequest req) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException;
/**
--- 118,122 ----
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.TransferReceiptBuilder processTransfer(TransferRequest req) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
***************
*** 124,128 ****
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.HeldTransferReceiptBuilder processHeldTransfer(HeldTransferRequest req) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException;
/**
--- 131,135 ----
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.HeldTransferReceiptBuilder processHeldTransfer(HeldTransferRequest req) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
***************
*** 135,139 ****
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.TransferReceiptBuilder processCompleteHold(CompleteHeldTransferRequest complete) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException;
/**
--- 142,146 ----
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.TransferReceiptBuilder processCompleteHold(CompleteHeldTransferRequest complete) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
***************
*** 147,151 ****
*/
! public abstract CancelHeldTransferReceiptBuilder processCancelHold(CancelHeldTransferRequest cancel) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException;
//TODO Add getBalance
--- 154,158 ----
*/
! public abstract CancelHeldTransferReceiptBuilder processCancelHold(CancelHeldTransferRequest cancel) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
//TODO Add getBalance
Index: ExpiredHeldTransferException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/ExpiredHeldTransferException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ExpiredHeldTransferException.java 10 Nov 2003 17:42:07 -0000 1.3
--- ExpiredHeldTransferException.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 11,21 ****
* Time: 11:38:10 AM
*/
! public class ExpiredHeldTransferException extends InvalidTransferException {
! public ExpiredHeldTransferException(CompleteHeldTransferRequest held) {
super("expired");
this.held = held;
}
! private CompleteHeldTransferRequest held;
public CompleteHeldTransferRequest getRequest() {
--- 11,21 ----
* Time: 11:38:10 AM
*/
! public final class ExpiredHeldTransferException extends InvalidTransferException {
! public ExpiredHeldTransferException(final CompleteHeldTransferRequest held) {
super("expired");
this.held = held;
}
! private final CompleteHeldTransferRequest held;
public CompleteHeldTransferRequest getRequest() {
Index: InsufficientFundsException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/InsufficientFundsException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** InsufficientFundsException.java 10 Nov 2003 17:42:07 -0000 1.2
--- InsufficientFundsException.java 21 Nov 2003 04:43:04 -0000 1.3
***************
*** 9,14 ****
* Time: 11:38:10 AM
*/
! public class InsufficientFundsException extends TransferException {
! public InsufficientFundsException(AssetController proc, Identity account, double amount) {
super(proc);
this.account = account;
--- 9,14 ----
* Time: 11:38:10 AM
*/
! public final class InsufficientFundsException extends TransferException {
! public InsufficientFundsException(final AssetController proc, final Identity account, final double amount) {
super(proc);
this.account = account;
***************
*** 16,31 ****
}
! private Identity account;
! private double amount;
! public Identity getAccount() {
return account;
}
! public double getAmount() {
return amount;
}
! public String getSubMessage() {
return "Insufficient Funds in Account: " + account.getName() + " to pay: " + amount;
}
--- 16,31 ----
}
! private final Identity account;
! private final double amount;
! public final Identity getAccount() {
return account;
}
! public final double getAmount() {
return amount;
}
! public final String getSubMessage() {
return "Insufficient Funds in Account: " + account.getName() + " to pay: " + amount;
}
Index: InvalidTransferException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/InvalidTransferException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** InvalidTransferException.java 8 Nov 2003 01:39:58 -0000 1.1
--- InvalidTransferException.java 21 Nov 2003 04:43:04 -0000 1.2
***************
*** 21,24 ****
--- 21,30 ----
$Id$
$Log$
+ Revision 1.2 2003/11/21 04:43:04 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.1 2003/11/08 01:39:58 pelle
WARNING this rev is majorly unstable and will almost certainly not compile.
***************
*** 41,45 ****
*/
public class InvalidTransferException extends TransferException {
! public InvalidTransferException(String missing) {
super();
this.missing = missing;
--- 47,51 ----
*/
public class InvalidTransferException extends TransferException {
! public InvalidTransferException(final String missing) {
super();
this.missing = missing;
***************
*** 50,53 ****
}
! private String missing;
}
--- 56,59 ----
}
! private final String missing;
}
Index: LowLevelPaymentException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/LowLevelPaymentException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** LowLevelPaymentException.java 10 Nov 2003 17:42:07 -0000 1.1
--- LowLevelPaymentException.java 21 Nov 2003 04:43:04 -0000 1.2
***************
*** 9,12 ****
--- 9,18 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/11/21 04:43:04 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.1 2003/11/10 17:42:07 pelle
* The AssetController interface has been more or less finalized.
***************
*** 15,24 ****
*
*/
! public class LowLevelPaymentException extends TransferException{
! public LowLevelPaymentException(Throwable e) {
super(e);
}
! public String getSubMessage() {
return "Caused by: "+getCause().getLocalizedMessage();
}
--- 21,30 ----
*
*/
! public final class LowLevelPaymentException extends TransferException{
! public LowLevelPaymentException(final Throwable e) {
super(e);
}
! public final String getSubMessage() {
return "Caused by: "+getCause().getLocalizedMessage();
}
Index: NegativeTransferException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/NegativeTransferException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NegativeTransferException.java 10 Nov 2003 17:42:07 -0000 1.3
--- NegativeTransferException.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 7,24 ****
* Time: 11:38:10 AM
*/
! public class NegativeTransferException extends InvalidTransferException {
! public NegativeTransferException(double amount) {
super("negative amount");
this.amount = amount;
}
! private double amount;
! public double getAmount() {
return amount;
}
! public String getSubMessage() {
return "Not possible to perform payment of negative amount: " + amount;
}
--- 7,24 ----
* Time: 11:38:10 AM
*/
! public final class NegativeTransferException extends InvalidTransferException {
! public NegativeTransferException(final double amount) {
super("negative amount");
this.amount = amount;
}
! private final double amount;
! public final double getAmount() {
return amount;
}
! public final String getSubMessage() {
return "Not possible to perform payment of negative amount: " + amount;
}
Index: NonExistantHoldException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/NonExistantHoldException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NonExistantHoldException.java 10 Nov 2003 17:42:07 -0000 1.1
--- NonExistantHoldException.java 21 Nov 2003 04:43:04 -0000 1.2
***************
*** 7,10 ****
--- 7,16 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/11/21 04:43:04 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.1 2003/11/10 17:42:07 pelle
* The AssetController interface has been more or less finalized.
***************
*** 13,18 ****
*
*/
! public class NonExistantHoldException extends InvalidTransferException{
! public NonExistantHoldException(String holdid) {
super("Held transaction:"+holdid+" doesnt exist");
}
--- 19,24 ----
*
*/
! public final class NonExistantHoldException extends InvalidTransferException{
! public NonExistantHoldException(final String holdid) {
super("Held transaction:"+holdid+" doesnt exist");
}
Index: TransferDeniedException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/TransferDeniedException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TransferDeniedException.java 10 Nov 2003 17:42:07 -0000 1.3
--- TransferDeniedException.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 26,29 ****
--- 26,35 ----
$Id$
$Log$
+ Revision 1.4 2003/11/21 04:43:04 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.3 2003/11/10 17:42:07 pelle
The AssetController interface has been more or less finalized.
***************
*** 57,69 ****
* Time: 6:18:11 PM
*/
! public class TransferDeniedException extends TransferException {
! public TransferDeniedException(AssetTransactionContract req) {
this.req = req;
}
! public TransferDeniedException(CancelHeldTransferRequest req) {
this.req = req;
}
! public String getSubMessage() {
return "No permission to perform action for :"+req.getSignatory().getName();
}
--- 63,75 ----
* Time: 6:18:11 PM
*/
! public final class TransferDeniedException extends TransferException {
! public TransferDeniedException(final AssetTransactionContract req) {
this.req = req;
}
! public TransferDeniedException(final CancelHeldTransferRequest req) {
this.req = req;
}
! public final String getSubMessage() {
return "No permission to perform action for :"+req.getSignatory().getName();
}
Index: TransferException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/TransferException.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TransferException.java 11 Nov 2003 21:17:19 -0000 1.4
--- TransferException.java 21 Nov 2003 04:43:04 -0000 1.5
***************
*** 10,14 ****
*/
public abstract class TransferException extends Exception {
! public TransferException(AssetController proc) {
this.proc = proc;
}
--- 10,14 ----
*/
public abstract class TransferException extends Exception {
! public TransferException(final AssetController proc) {
this.proc = proc;
}
***************
*** 18,30 ****
}
! protected TransferException(Throwable cause) {
super(cause);
}
! public AssetController getProc() {
return proc;
}
! public String getMessage() {
return "NeuClear Transfer Exception: " + Utility.denullString(proc.toString()) + "\n" + getSubMessage();
}
--- 18,30 ----
}
! protected TransferException(final Throwable cause) {
super(cause);
}
! public final AssetController getProc() {
return proc;
}
! public final String getMessage() {
return "NeuClear Transfer Exception: " + Utility.denullString(proc.toString()) + "\n" + getSubMessage();
}
Index: TransferLargerThanHeldException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/TransferLargerThanHeldException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TransferLargerThanHeldException.java 10 Nov 2003 17:42:07 -0000 1.3
--- TransferLargerThanHeldException.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 10,15 ****
* Time: 11:38:10 AM
*/
! public class TransferLargerThanHeldException extends InvalidTransferException {
! public TransferLargerThanHeldException(CompleteHeldTransferRequest complete,double amount) {
super("amount too large");
this.complete = complete;
--- 10,15 ----
* Time: 11:38:10 AM
*/
! public final class TransferLargerThanHeldException extends InvalidTransferException {
! public TransferLargerThanHeldException(final CompleteHeldTransferRequest complete,final double amount) {
super("amount too large");
this.complete = complete;
***************
*** 18,25 ****
}
! private CompleteHeldTransferRequest complete;
! private double amount;
! public CompleteHeldTransferRequest getRequest() {
return complete;
}
--- 18,25 ----
}
! private final CompleteHeldTransferRequest complete;
! private final double amount;
! public final CompleteHeldTransferRequest getRequest() {
return complete;
}
***************
*** 31,39 ****
! public double getAmount(){
return amount;
}
! public String getSubMessage() {
return "Transfer requested: " + complete.getAmount()+ " is larger than held amount: " + amount;
}
--- 31,39 ----
! public final double getAmount(){
return amount;
}
! public final String getSubMessage() {
return "Transfer requested: " + complete.getAmount()+ " is larger than held amount: " + amount;
}
Index: TransferNotStartedException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/TransferNotStartedException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TransferNotStartedException.java 8 Nov 2003 01:39:58 -0000 1.2
--- TransferNotStartedException.java 21 Nov 2003 04:43:04 -0000 1.3
***************
*** 10,15 ****
* Time: 11:38:10 AM
*/
! public class TransferNotStartedException extends TransferException {
! public TransferNotStartedException(AssetController proc, TransferReceipt pmt, Date time) {
super(proc);
this.pmt = pmt;
--- 10,15 ----
* Time: 11:38:10 AM
*/
! public final class TransferNotStartedException extends TransferException {
! public TransferNotStartedException(final AssetController proc, final TransferReceipt pmt, final Date time) {
super(proc);
this.pmt = pmt;
***************
*** 17,32 ****
}
! private TransferReceipt pmt;
! private Date time;
! public TransferReceipt getPayment() {
return pmt;
}
! public Date getTime() {
return time;
}
! public String getSubMessage() {
return "This payment commences at: " + pmt.getValueTime() + ". Action attempted at: " + time;
}
--- 17,32 ----
}
! private final TransferReceipt pmt;
! private final Date time;
! public final TransferReceipt getPayment() {
return pmt;
}
! public final Date getTime() {
return time;
}
! public final String getSubMessage() {
return "This payment commences at: " + pmt.getValueTime() + ". Action attempted at: " + time;
}
|