|
From: <pe...@us...> - 2004-01-13 15:11:20
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset
In directory sc8-pr-cvs1:/tmp/cvs-serv28986/src/java/org/neuclear/asset
Modified Files:
AssetController.java ExpiredHeldTransferException.java
Log Message:
Now builds.
Now need to do unit tests
Index: AssetController.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/AssetController.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** AssetController.java 12 Jan 2004 22:39:14 -0000 1.12
--- AssetController.java 13 Jan 2004 15:11:17 -0000 1.13
***************
*** 8,11 ****
--- 8,13 ----
import org.neuclear.exchange.orders.*;
import org.neuclear.id.SignedNamedObject;
+ import org.neuclear.receiver.Receiver;
+ import org.neuclear.receiver.UnsupportedTransaction;
/*
***************
*** 29,32 ****
--- 31,38 ----
$Id$
$Log$
+ Revision 1.13 2004/01/13 15:11:17 pelle
+ Now builds.
+ Now need to do unit tests
+
Revision 1.12 2004/01/12 22:39:14 pelle
Completed all the builders and contracts.
***************
*** 107,111 ****
* Time: 3:53:17 PM
*/
! public abstract class AssetController {
/**
--- 113,117 ----
* Time: 3:53:17 PM
*/
! public abstract class AssetController implements Receiver {
/**
***************
*** 114,130 ****
* @param contract
* @return
- * @throws TransferDeniedException
- * @throws LowLevelPaymentException
- * @throws InvalidTransferException
*/
! public final SignedNamedObject process(final AssetTransactionContract contract) throws TransferDeniedException, LowLevelPaymentException, InvalidTransferException, NeuClearException {
! if (contract instanceof TransferOrder)
! return process((TransferOrder) contract);
! if (contract instanceof org.neuclear.exchange.orders.ExchangeOrder)
! return process((ExchangeOrder) contract);
! if (contract instanceof ExchangeCompletionOrder)
! return process((ExchangeCompletionOrder) contract);
! if (contract instanceof CancelExchangeOrder)
! return process((CancelExchangeOrder) contract);
return null;
--- 120,141 ----
* @param contract
* @return
*/
! public final SignedNamedObject receive(final SignedNamedObject contract) throws UnsupportedTransaction , NeuClearException {
! try {
! if (contract instanceof TransferOrder)
! return process((TransferOrder) contract);
! if (contract instanceof ExchangeOrder)
! return process((ExchangeOrder) contract);
! if (contract instanceof ExchangeCompletionOrder)
! return process((ExchangeCompletionOrder) contract);
! if (contract instanceof CancelExchangeOrder)
! return process((CancelExchangeOrder) contract);
! } catch (LowLevelPaymentException e) {
! throw new NeuClearException(e);
! } catch (TransferDeniedException e) {
! throw new NeuClearException(e);
! } catch (InvalidTransferException e) {
! throw new NeuClearException(e);
! }
return null;
Index: ExpiredHeldTransferException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/ExpiredHeldTransferException.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ExpiredHeldTransferException.java 10 Jan 2004 00:00:45 -0000 1.7
--- ExpiredHeldTransferException.java 13 Jan 2004 15:11:17 -0000 1.8
***************
*** 21,25 ****
public String getSubMessage() {
! return "Not possible to complete held payment at this time: " + held.getValuetime();
}
}
--- 21,25 ----
public String getSubMessage() {
! return "Not possible to complete held payment at this time: " + held.getExchangeTime();
}
}
|