You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(119) |
Oct
(111) |
Nov
(238) |
Dec
(395) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(239) |
Feb
(59) |
Mar
(354) |
Apr
(489) |
May
(23) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(5) |
Jun
(2) |
Jul
|
Aug
|
Sep
(3) |
Oct
(14) |
Nov
(17) |
Dec
(9) |
| 2007 |
Jan
(4) |
Feb
(3) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
(1) |
Oct
(2) |
Nov
(1) |
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
(7) |
May
(3) |
Jun
(6) |
Jul
(4) |
Aug
(3) |
Sep
(15) |
Oct
(13) |
Nov
(35) |
Dec
(40) |
| 2009 |
Jan
(19) |
Feb
(21) |
Mar
(16) |
Apr
(18) |
May
(36) |
Jun
(20) |
Jul
(32) |
Aug
(11) |
Sep
(3) |
Oct
(2) |
Nov
(2) |
Dec
(13) |
| 2010 |
Jan
(5) |
Feb
(5) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
(3) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(4) |
Nov
|
Dec
(3) |
| 2012 |
Jan
(3) |
Feb
(3) |
Mar
(1) |
Apr
(4) |
May
(8) |
Jun
(4) |
Jul
(9) |
Aug
(2) |
Sep
(8) |
Oct
(3) |
Nov
(8) |
Dec
(4) |
| 2013 |
Jan
(2) |
Feb
(1) |
Mar
(5) |
Apr
(6) |
May
(10) |
Jun
(5) |
Jul
(6) |
Aug
(7) |
Sep
(5) |
Oct
(2) |
Nov
(4) |
Dec
(4) |
| 2014 |
Jan
(13) |
Feb
(4) |
Mar
(7) |
Apr
(9) |
May
(20) |
Jun
(13) |
Jul
(10) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(2) |
Dec
(2) |
| 2015 |
Jan
(3) |
Feb
(3) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(2) |
Jul
(4) |
Aug
(3) |
Sep
(1) |
Oct
|
Nov
(1) |
Dec
(3) |
| 2016 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(4) |
Sep
(3) |
Oct
(3) |
Nov
(4) |
Dec
(2) |
| 2017 |
Jan
|
Feb
(2) |
Mar
|
Apr
(2) |
May
(1) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <pe...@us...> - 2004-01-05 23:47:12
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/controllers/currency
In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/java/org/neuclear/asset/controllers/currency
Modified Files:
CurrencyController.java
Log Message:
Create new Document classification "order", which is really just inherint in the new
package layout.
Got rid of much of the inheritance that was lying around and thought a bit further about the format of the exchange orders.
Index: CurrencyController.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/controllers/currency/CurrencyController.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** CurrencyController.java 3 Jan 2004 20:36:25 -0000 1.9
--- CurrencyController.java 5 Jan 2004 23:47:09 -0000 1.10
***************
*** 2,9 ****
import org.neuclear.asset.*;
import org.neuclear.asset.contracts.*;
! import org.neuclear.asset.contracts.builders.CancelExchangeReceiptBuilder;
! import org.neuclear.asset.contracts.builders.ExchangeReceiptBuilder;
! import org.neuclear.asset.contracts.builders.TransferReceiptBuilder;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
--- 2,16 ----
import org.neuclear.asset.*;
+ import org.neuclear.exchange.orders.CancelExchangeOrder;
+ import org.neuclear.exchange.orders.ExchangeCompletionOrder;
+ import org.neuclear.exchange.orders.ExchangeCompletionOrder;
+ import org.neuclear.exchange.orders.ExchangeOrder;
+ import org.neuclear.asset.orders.TransferOrder;
+ import org.neuclear.asset.orders.builders.TransferReceiptBuilder;
import org.neuclear.asset.contracts.*;
! import org.neuclear.exchange.orders.builders.CancelExchangeReceiptBuilder;
! import org.neuclear.exchange.orders.builders.ExchangeReceiptBuilder;
! import org.neuclear.exchange.orders.builders.ExchangeReceiptBuilder;
! import org.neuclear.asset.orders.builders.TransferReceiptBuilder;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
***************
*** 42,46 ****
}
! public final TransferReceiptBuilder process(final TransferRequest req) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException, NeuClearException {
try {
--- 49,53 ----
}
! public final TransferReceiptBuilder process(final TransferOrder req) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException, NeuClearException {
try {
***************
*** 65,69 ****
}
! private String createTransactionId(final TransferRequest req, final PostedTransaction posted) {
return req.getAsset().getName() + "/" + posted.getXid();
}
--- 72,76 ----
}
! private String createTransactionId(final TransferOrder req, final PostedTransaction posted) {
return req.getAsset().getName() + "/" + posted.getXid();
}
***************
*** 91,95 ****
}
! public final ExchangeReceiptBuilder process(final ExchangeRequest req) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException, NeuClearException {
try {
if (!req.getSignatory().equals(req.getFrom()))
--- 98,102 ----
}
! public final ExchangeReceiptBuilder process(final ExchangeOrder req) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException, NeuClearException {
try {
if (!req.getSignatory().equals(req.getFrom()))
***************
*** 115,119 ****
}
! public final TransferReceiptBuilder process(final CompleteExchangeRequest complete) throws LowLevelPaymentException, InvalidTransferException, TransferDeniedException, NeuClearException {
try {
if (!complete.getSignatory().equals(complete.getTo()))
--- 122,126 ----
}
! public final TransferReceiptBuilder process(final ExchangeCompletionOrder complete) throws LowLevelPaymentException, InvalidTransferException, TransferDeniedException, NeuClearException {
try {
if (!complete.getSignatory().equals(complete.getTo()))
***************
*** 144,148 ****
}
! public final CancelExchangeReceiptBuilder process(final CancelExchangeRequest cancel) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException, NeuClearException {
try {
final PostedHeldTransaction heldTran = ledger.findHeldTransaction(cancel.getHoldId());
--- 151,155 ----
}
! public final CancelExchangeReceiptBuilder process(final CancelExchangeOrder cancel) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException, NeuClearException {
try {
final PostedHeldTransaction heldTran = ledger.findHeldTransaction(cancel.getHoldId());
|
|
From: <pe...@us...> - 2004-01-05 23:40:23
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/orders/builders In directory sc8-pr-cvs1:/tmp/cvs-serv13936/src/java/org/neuclear/asset/orders/builders Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/orders/builders added to the repository |
|
From: <pe...@us...> - 2004-01-05 23:23:04
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/orders/builders In directory sc8-pr-cvs1:/tmp/cvs-serv9836/src/java/org/neuclear/exchange/orders/builders Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/orders/builders added to the repository |
|
From: <pe...@us...> - 2004-01-05 23:06:20
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/orders In directory sc8-pr-cvs1:/tmp/cvs-serv5581/src/java/org/neuclear/exchange/orders Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/orders added to the repository |
|
From: <pe...@us...> - 2004-01-05 19:57:38
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/contracts In directory sc8-pr-cvs1:/tmp/cvs-serv29058/src/java/org/neuclear/contracts Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/contracts added to the repository |
|
From: <pe...@us...> - 2004-01-05 19:02:18
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/orders/exchanges In directory sc8-pr-cvs1:/tmp/cvs-serv16796/src/java/org/neuclear/asset/orders/exchanges Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/orders/exchanges added to the repository |
|
From: <pe...@us...> - 2004-01-05 19:01:37
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/orders/transfers In directory sc8-pr-cvs1:/tmp/cvs-serv16671/src/java/org/neuclear/asset/orders/transfers Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/orders/transfers added to the repository |
|
From: <pe...@us...> - 2004-01-05 18:56:10
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/orders In directory sc8-pr-cvs1:/tmp/cvs-serv15542/src/java/org/neuclear/asset/orders Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/orders added to the repository |
|
From: <pe...@us...> - 2004-01-03 20:36:42
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/resolver
In directory sc8-pr-cvs1:/tmp/cvs-serv10272/src/java/org/neuclear/id/resolver
Modified Files:
NSResolver.java
Log Message:
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
Index: NSResolver.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/resolver/NSResolver.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** NSResolver.java 19 Dec 2003 18:03:34 -0000 1.17
--- NSResolver.java 3 Jan 2004 20:36:38 -0000 1.18
***************
*** 18,22 ****
*/
public final class NSResolver {
! private static final NSCache NSCACHE = NSCache.make();
public static final String NSROOTSTORE = "http://repository.neuclear.org";
--- 18,22 ----
*/
public final class NSResolver {
! private static final NSCache NSCACHE = new NSCache();
public static final String NSROOTSTORE = "http://repository.neuclear.org";
|
|
From: <pe...@us...> - 2004-01-03 20:36:42
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/cache
In directory sc8-pr-cvs1:/tmp/cvs-serv10272/src/java/org/neuclear/id/cache
Modified Files:
NSCache.java
Log Message:
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
Index: NSCache.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/cache/NSCache.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** NSCache.java 19 Dec 2003 18:03:34 -0000 1.8
--- NSCache.java 3 Jan 2004 20:36:38 -0000 1.9
***************
*** 1,6 ****
package org.neuclear.id.cache;
- import com.waterken.adt.NoSuchElement;
- import com.waterken.adt.cache.Cache;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
--- 1,4 ----
***************
*** 9,12 ****
--- 7,14 ----
import org.neuclear.id.InvalidNamedObjectException;
+ import java.util.Map;
+ import java.util.HashMap;
+ import java.lang.ref.WeakReference;
+
/**
* The Idea of the NSCache is to have a quick cache of verified public NameSpaces. This is not stored, but is created from scratch
***************
*** 16,26 ****
*/
public final class NSCache {
! private NSCache() {
! spaces = new Cache();
}
! public static final NSCache make() {
! return new NSCache();
! }
/**
--- 18,26 ----
*/
public final class NSCache {
! public NSCache() {
! spaces = new HashMap();
}
!
/**
***************
*** 31,39 ****
*/
public SignedNamedObject fetchCached(final String name) {
! try { // I dont like the way it forces me to catch this. I need to rewrite it.
! return (Identity) spaces.fetch(name);
! } catch (NoSuchElement noSuchElement) {
return null;
! }
}
--- 31,38 ----
*/
public SignedNamedObject fetchCached(final String name) {
! final WeakReference ref = (WeakReference) spaces.get(name);
! if (ref==null)
return null;
! return (SignedNamedObject) ref.get();
}
***************
*** 43,47 ****
final String parentName = NSTools.getSignatoryURI(ns.getName());
if ((fetchCached(parentName) != null) || (parentName.equals("neu://")||NSTools.isHttpScheme(ns.getName())!=null)) {
! spaces.put(ns.getName(), ns);
}
} catch (InvalidNamedObjectException e) {
--- 42,46 ----
final String parentName = NSTools.getSignatoryURI(ns.getName());
if ((fetchCached(parentName) != null) || (parentName.equals("neu://")||NSTools.isHttpScheme(ns.getName())!=null)) {
! spaces.put(ns.getName(),new WeakReference(ns));
}
} catch (InvalidNamedObjectException e) {
***************
*** 50,53 ****
}
! private final Cache spaces;
}
--- 49,52 ----
}
! private final Map spaces;
}
|
|
From: <pe...@us...> - 2004-01-03 20:36:37
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/time
In directory sc8-pr-cvs1:/tmp/cvs-serv10245/src/java/org/neuclear/commons/time
Modified Files:
TimeTools.java
Log Message:
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
Index: TimeTools.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/time/TimeTools.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** TimeTools.java 31 Dec 2003 00:39:29 -0000 1.7
--- TimeTools.java 3 Jan 2004 20:36:33 -0000 1.8
***************
*** 2,5 ****
--- 2,10 ----
* $Id$
* $Log$
+ * Revision 1.8 2004/01/03 20:36:33 pelle
+ * Renamed HeldTransfer to Exchange
+ * Dropped valuetime from the request objects.
+ * Doesnt yet compile. New commit to follow soon.
+ *
* Revision 1.7 2003/12/31 00:39:29 pelle
* Added Drivers for handling different Database dialects in the entity model.
***************
*** 74,77 ****
--- 79,83 ----
import org.neuclear.commons.NeuClearException;
+ import org.neuclear.commons.Utility;
import java.sql.Timestamp;
***************
*** 126,129 ****
--- 132,137 ----
public static Timestamp parseTimeStamp(final String ts) throws ParseException {
+ if (Utility.isEmpty(ts))
+ return null;
return convertDateToTimestamp(getDateFormatter().parse(ts));
|
|
From: <pe...@us...> - 2004-01-03 20:36:37
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql
In directory sc8-pr-cvs1:/tmp/cvs-serv10245/src/java/org/neuclear/commons/sql
Modified Files:
SQLContext.java
Log Message:
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
Index: SQLContext.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/SQLContext.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** SQLContext.java 2 Jan 2004 23:19:03 -0000 1.3
--- SQLContext.java 3 Jan 2004 20:36:33 -0000 1.4
***************
*** 27,30 ****
--- 27,35 ----
$Id$
$Log$
+ Revision 1.4 2004/01/03 20:36:33 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.3 2004/01/02 23:19:03 pelle
Added StatementFactory pattern and refactored the ledger to use it.
***************
*** 66,70 ****
* @throws SQLException
*/
! public void close() throws SQLException, IOException {
getConnection().close();
set(null);
--- 71,75 ----
* @throws SQLException
*/
! public void close() throws SQLException {
getConnection().close();
set(null);
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange
In directory sc8-pr-cvs1:/tmp/cvs-serv10127/src/java/org/neuclear/exchange
Modified Files:
ExchangeAgent.java ExchangeOrder.java
ExchangeOrderReceipt.java ExchangePerformedException.java
Log Message:
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
Index: ExchangeAgent.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/ExchangeAgent.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ExchangeAgent.java 10 Nov 2003 17:42:08 -0000 1.3
--- ExchangeAgent.java 3 Jan 2004 20:36:26 -0000 1.4
***************
*** 22,25 ****
--- 22,30 ----
$Id$
$Log$
+ Revision 1.4 2004/01/03 20:36:26 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.3 2003/11/10 17:42:08 pelle
The AssetController interface has been more or less finalized.
***************
*** 34,38 ****
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Held companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
--- 39,43 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
***************
*** 50,54 ****
/**
* The ExchangeAgent takes an ExchangeOrder containing a
! * HeldTransferReceipt as the bid and defails of what is wanted in
* exchange.
* <p/>
--- 55,59 ----
/**
* The ExchangeAgent takes an ExchangeOrder containing a
! * ExchangeReceipt as the bid and defails of what is wanted in
* exchange.
* <p/>
Index: ExchangeOrder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/ExchangeOrder.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ExchangeOrder.java 21 Nov 2003 04:43:04 -0000 1.4
--- ExchangeOrder.java 3 Jan 2004 20:36:26 -0000 1.5
***************
*** 1,5 ****
package org.neuclear.exchange;
! import org.neuclear.asset.contracts.HeldTransferReceipt;
/*
--- 1,5 ----
package org.neuclear.exchange;
! import org.neuclear.asset.contracts.ExchangeReceipt;
/*
***************
*** 23,26 ****
--- 23,31 ----
$Id$
$Log$
+ Revision 1.5 2004/01/03 20:36:26 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.4 2003/11/21 04:43:04 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 41,45 ****
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Held companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
--- 46,50 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
***************
*** 61,65 ****
*/
public final class ExchangeOrder {
! public ExchangeOrder(final HeldTransferReceipt bid, final String requestedAsset, final double amount) {
this.bid = bid;
this.requestedAsset = requestedAsset;
--- 66,70 ----
*/
public final class ExchangeOrder {
! public ExchangeOrder(final ExchangeReceipt bid, final String requestedAsset, final double amount) {
this.bid = bid;
this.requestedAsset = requestedAsset;
***************
*** 67,71 ****
}
! public final HeldTransferReceipt getBid() {
return bid;
}
--- 72,76 ----
}
! public final ExchangeReceipt getBid() {
return bid;
}
***************
*** 79,83 ****
}
! private final HeldTransferReceipt bid;
private final String requestedAsset;
private final double amount;
--- 84,88 ----
}
! private final ExchangeReceipt bid;
private final String requestedAsset;
private final double amount;
Index: ExchangeOrderReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/ExchangeOrderReceipt.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ExchangeOrderReceipt.java 21 Nov 2003 04:43:04 -0000 1.4
--- ExchangeOrderReceipt.java 3 Jan 2004 20:36:26 -0000 1.5
***************
*** 1,5 ****
package org.neuclear.exchange;
! import org.neuclear.asset.contracts.HeldTransferReceipt;
/*
--- 1,5 ----
package org.neuclear.exchange;
! import org.neuclear.asset.contracts.ExchangeReceipt;
/*
***************
*** 23,26 ****
--- 23,31 ----
$Id$
$Log$
+ Revision 1.5 2004/01/03 20:36:26 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.4 2003/11/21 04:43:04 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 41,45 ****
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Held companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
--- 46,50 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
***************
*** 79,83 ****
}
! public final HeldTransferReceipt getBid() {
return bid;
}
--- 84,88 ----
}
! public final ExchangeReceipt getBid() {
return bid;
}
***************
*** 97,101 ****
private final ExchangeAgent agent;
private final String id;
! private final HeldTransferReceipt bid;
private final String requestedAsset;
private final double amount;
--- 102,106 ----
private final ExchangeAgent agent;
private final String id;
! private final ExchangeReceipt bid;
private final String requestedAsset;
private final double amount;
Index: ExchangePerformedException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/ExchangePerformedException.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ExchangePerformedException.java 21 Nov 2003 04:43:04 -0000 1.4
--- ExchangePerformedException.java 3 Jan 2004 20:36:26 -0000 1.5
***************
*** 21,24 ****
--- 21,29 ----
$Id$
$Log$
+ Revision 1.5 2004/01/03 20:36:26 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.4 2003/11/21 04:43:04 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 39,43 ****
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Held companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
--- 44,48 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
|
|
From: <pe...@us...> - 2004-01-03 20:36:29
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset
In directory sc8-pr-cvs1:/tmp/cvs-serv10127/src/java/org/neuclear/asset
Modified Files:
AssetController.java ExpiredHeldTransferException.java
InvalidTransferException.java NonExistantHoldException.java
TransferDeniedException.java
TransferLargerThanHeldException.java
Log Message:
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
Index: AssetController.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/AssetController.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** AssetController.java 22 Nov 2003 00:22:29 -0000 1.8
--- AssetController.java 3 Jan 2004 20:36:25 -0000 1.9
***************
*** 2,6 ****
import org.neuclear.asset.contracts.*;
! import org.neuclear.asset.contracts.builders.CancelHeldTransferReceiptBuilder;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.builders.NamedObjectBuilder;
--- 2,6 ----
import org.neuclear.asset.contracts.*;
! import org.neuclear.asset.contracts.builders.CancelExchangeReceiptBuilder;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.builders.NamedObjectBuilder;
***************
*** 26,29 ****
--- 26,34 ----
$Id$
$Log$
+ Revision 1.9 2004/01/03 20:36:25 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.8 2003/11/22 00:22:29 pelle
All unit tests in commons, id and xmlsec now work.
***************
*** 61,65 ****
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Held companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
--- 66,70 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
***************
*** 96,105 ****
if (contract instanceof TransferRequest)
return process((TransferRequest) contract);
! if (contract instanceof HeldTransferRequest)
! return process((HeldTransferRequest) contract);
! if (contract instanceof CompleteHeldTransferRequest)
! return process((CompleteHeldTransferRequest) contract);
! if (contract instanceof CancelHeldTransferRequest)
! return process((CancelHeldTransferRequest) contract);
return null;
--- 101,110 ----
if (contract instanceof TransferRequest)
return process((TransferRequest) contract);
! if (contract instanceof ExchangeRequest)
! return process((ExchangeRequest) contract);
! if (contract instanceof CompleteExchangeRequest)
! return process((CompleteExchangeRequest) contract);
! if (contract instanceof CancelExchangeRequest)
! return process((CancelExchangeRequest) contract);
return null;
***************
*** 131,141 ****
* HeldTransfer Object.
*
! * @param req Valid HeldTransferRequest
! * @return Unsigned HeldTransferReceiptBuilder
* @throws LowLevelPaymentException
* @throws TransferDeniedException
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.HeldTransferReceiptBuilder process(HeldTransferRequest req) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
--- 136,146 ----
* HeldTransfer Object.
*
! * @param req Valid ExchangeRequest
! * @return Unsigned ExchangeReceiptBuilder
* @throws LowLevelPaymentException
* @throws TransferDeniedException
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.ExchangeReceiptBuilder process(ExchangeRequest req) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
***************
*** 148,152 ****
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.TransferReceiptBuilder process(CompleteHeldTransferRequest complete) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
--- 153,157 ----
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.TransferReceiptBuilder process(CompleteExchangeRequest complete) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
***************
*** 154,158 ****
*
* @param cancel
! * @return Unsigned CancelHeldTransferReceiptBuilder
* @throws LowLevelPaymentException
* @throws TransferDeniedException
--- 159,163 ----
*
* @param cancel
! * @return Unsigned CancelExchangeReceiptBuilder
* @throws LowLevelPaymentException
* @throws TransferDeniedException
***************
*** 160,164 ****
*/
! public abstract CancelHeldTransferReceiptBuilder process(CancelHeldTransferRequest cancel) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
--- 165,169 ----
*/
! public abstract CancelExchangeReceiptBuilder process(CancelExchangeRequest cancel) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
Index: ExpiredHeldTransferException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/ExpiredHeldTransferException.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ExpiredHeldTransferException.java 21 Nov 2003 04:43:04 -0000 1.4
--- ExpiredHeldTransferException.java 3 Jan 2004 20:36:26 -0000 1.5
***************
*** 1,6 ****
package org.neuclear.asset;
! import org.neuclear.asset.contracts.Held;
! import org.neuclear.asset.contracts.CompleteHeldTransferRequest;
import java.util.Date;
--- 1,6 ----
package org.neuclear.asset;
! import org.neuclear.asset.contracts.Exchange;
! import org.neuclear.asset.contracts.CompleteExchangeRequest;
import java.util.Date;
***************
*** 12,23 ****
*/
public final class ExpiredHeldTransferException extends InvalidTransferException {
! public ExpiredHeldTransferException(final CompleteHeldTransferRequest held) {
super("expired");
this.held = held;
}
! private final CompleteHeldTransferRequest held;
! public CompleteHeldTransferRequest getRequest() {
return held;
}
--- 12,23 ----
*/
public final class ExpiredHeldTransferException extends InvalidTransferException {
! public ExpiredHeldTransferException(final CompleteExchangeRequest held) {
super("expired");
this.held = held;
}
! private final CompleteExchangeRequest held;
! public CompleteExchangeRequest getRequest() {
return held;
}
Index: InvalidTransferException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/InvalidTransferException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** InvalidTransferException.java 21 Nov 2003 04:43:04 -0000 1.2
--- InvalidTransferException.java 3 Jan 2004 20:36:26 -0000 1.3
***************
*** 21,24 ****
--- 21,29 ----
$Id$
$Log$
+ Revision 1.3 2004/01/03 20:36:26 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.2 2003/11/21 04:43:04 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 34,38 ****
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Held companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
--- 39,43 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
Index: NonExistantHoldException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/NonExistantHoldException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** NonExistantHoldException.java 21 Nov 2003 04:43:04 -0000 1.2
--- NonExistantHoldException.java 3 Jan 2004 20:36:26 -0000 1.3
***************
*** 7,10 ****
--- 7,15 ----
* $Id$
* $Log$
+ * Revision 1.3 2004/01/03 20:36:26 pelle
+ * Renamed HeldTransfer to Exchange
+ * Dropped valuetime from the request objects.
+ * Doesnt yet compile. New commit to follow soon.
+ *
* Revision 1.2 2003/11/21 04:43:04 pelle
* EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 21,25 ****
public final class NonExistantHoldException extends InvalidTransferException{
public NonExistantHoldException(final String holdid) {
! super("Held transaction:"+holdid+" doesnt exist");
}
}
--- 26,30 ----
public final class NonExistantHoldException extends InvalidTransferException{
public NonExistantHoldException(final String holdid) {
! super("Exchange transaction:"+holdid+" doesnt exist");
}
}
Index: TransferDeniedException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/TransferDeniedException.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TransferDeniedException.java 21 Nov 2003 04:43:04 -0000 1.4
--- TransferDeniedException.java 3 Jan 2004 20:36:26 -0000 1.5
***************
*** 2,6 ****
import org.neuclear.asset.contracts.TransferRequest;
! import org.neuclear.asset.contracts.CancelHeldTransferRequest;
import org.neuclear.asset.contracts.AssetTransactionContract;
import org.neuclear.id.SignedNamedObject;
--- 2,6 ----
import org.neuclear.asset.contracts.TransferRequest;
! import org.neuclear.asset.contracts.CancelExchangeRequest;
import org.neuclear.asset.contracts.AssetTransactionContract;
import org.neuclear.id.SignedNamedObject;
***************
*** 26,29 ****
--- 26,34 ----
$Id$
$Log$
+ Revision 1.5 2004/01/03 20:36:26 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.4 2003/11/21 04:43:04 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 44,48 ****
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Held companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
--- 49,53 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
***************
*** 67,71 ****
this.req = req;
}
! public TransferDeniedException(final CancelHeldTransferRequest req) {
this.req = req;
}
--- 72,76 ----
this.req = req;
}
! public TransferDeniedException(final CancelExchangeRequest req) {
this.req = req;
}
Index: TransferLargerThanHeldException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/TransferLargerThanHeldException.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TransferLargerThanHeldException.java 21 Nov 2003 04:43:04 -0000 1.4
--- TransferLargerThanHeldException.java 3 Jan 2004 20:36:26 -0000 1.5
***************
*** 2,7 ****
! import org.neuclear.asset.contracts.HeldTransferReceipt;
! import org.neuclear.asset.contracts.CompleteHeldTransferRequest;
/**
--- 2,7 ----
! import org.neuclear.asset.contracts.ExchangeReceipt;
! import org.neuclear.asset.contracts.CompleteExchangeRequest;
/**
***************
*** 11,15 ****
*/
public final class TransferLargerThanHeldException extends InvalidTransferException {
! public TransferLargerThanHeldException(final CompleteHeldTransferRequest complete,final double amount) {
super("amount too large");
this.complete = complete;
--- 11,15 ----
*/
public final class TransferLargerThanHeldException extends InvalidTransferException {
! public TransferLargerThanHeldException(final CompleteExchangeRequest complete,final double amount) {
super("amount too large");
this.complete = complete;
***************
*** 18,25 ****
}
! private final CompleteHeldTransferRequest complete;
private final double amount;
! public final CompleteHeldTransferRequest getRequest() {
return complete;
}
--- 18,25 ----
}
! private final CompleteExchangeRequest complete;
private final double amount;
! public final CompleteExchangeRequest getRequest() {
return complete;
}
|
|
From: <pe...@us...> - 2004-01-03 20:36:29
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/receiver In directory sc8-pr-cvs1:/tmp/cvs-serv10127/src/test/org/neuclear/asset/receiver Modified Files: PaymentReceiverTest.java Log Message: Renamed HeldTransfer to Exchange Dropped valuetime from the request objects. Doesnt yet compile. New commit to follow soon. Index: PaymentReceiverTest.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/receiver/PaymentReceiverTest.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** PaymentReceiverTest.java 10 Dec 2003 23:52:39 -0000 1.10 --- PaymentReceiverTest.java 3 Jan 2004 20:36:26 -0000 1.11 *************** *** 48,51 **** --- 48,56 ---- $Id$ $Log$ + Revision 1.11 2004/01/03 20:36:26 pelle + Renamed HeldTransfer to Exchange + Dropped valuetime from the request objects. + Doesnt yet compile. New commit to follow soon. + Revision 1.10 2003/12/10 23:52:39 pelle Did some cleaning up in the builders *************** *** 107,111 **** Issuer is now Asset which is a subclass of Identity AssetController supports more than one Asset. Which is important for most non ecurrency implementations. ! TransferRequest/Receipt and its Held companions are now SignedNamedObjects. Thus to create them you must use their matching TransferRequest/ReceiptBuilder classes. PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController --- 112,116 ---- Issuer is now Asset which is a subclass of Identity AssetController supports more than one Asset. Which is important for most non ecurrency implementations. ! TransferRequest/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use their matching TransferRequest/ReceiptBuilder classes. PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController |
|
From: <pe...@us...> - 2004-01-03 20:36:29
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/controllers/currency
In directory sc8-pr-cvs1:/tmp/cvs-serv10127/src/test/org/neuclear/asset/controllers/currency
Modified Files:
CurrencyTests.java
Log Message:
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
Index: CurrencyTests.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/controllers/currency/CurrencyTests.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CurrencyTests.java 21 Nov 2003 04:43:04 -0000 1.3
--- CurrencyTests.java 3 Jan 2004 20:36:26 -0000 1.4
***************
*** 4,8 ****
import org.neuclear.asset.*;
import org.neuclear.asset.controllers.currency.CurrencyController;
! import org.neuclear.asset.contracts.HeldTransferReceipt;
import org.neuclear.asset.contracts.TransferReceipt;
import org.neuclear.commons.configuration.ConfigurationException;
--- 4,8 ----
import org.neuclear.asset.*;
import org.neuclear.asset.controllers.currency.CurrencyController;
! import org.neuclear.asset.contracts.ExchangeReceipt;
import org.neuclear.asset.contracts.TransferReceipt;
import org.neuclear.commons.configuration.ConfigurationException;
***************
*** 108,112 ****
assertEquals(bob.getBalance(t1), initial, 0);
! HeldTransferReceipt hold = bob.hold(alice, payment, t2, t4, "Test Hold");
assertEquals(bob.getBalance(t2), initial, 0);
assertEquals(bob.getBalance(t3), initial, 0);
--- 108,112 ----
assertEquals(bob.getBalance(t1), initial, 0);
! ExchangeReceipt hold = bob.hold(alice, payment, t2, t4, "Test Hold");
assertEquals(bob.getBalance(t2), initial, 0);
assertEquals(bob.getBalance(t3), initial, 0);
***************
*** 130,134 ****
assertTrue("Should throw TransferLargerThanHeldException", false);
} catch (TransferLargerThanHeldException e) {
! assertTrue("Got Transfer Larger Than Held Exception", true);
} catch (TransferNotStartedException e) {
--- 130,134 ----
assertTrue("Should throw TransferLargerThanHeldException", false);
} catch (TransferLargerThanHeldException e) {
! assertTrue("Got Transfer Larger Than Exchange Exception", true);
} catch (TransferNotStartedException e) {
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv10127/src/java/org/neuclear/asset/contracts/builders
Modified Files:
TransferBuilder.java TransferReceiptBuilder.java
TransferRequestBuilder.java
Added Files:
CancelExchangeBuilder.java CancelExchangeReceiptBuilder.java
CancelExchangeRequestBuilder.java
CompleteExchangeRequestBuilder.java
ExchangeReceiptBuilder.java ExchangeRequestBuilder.java
Removed Files:
CancelHeldTransferBuilder.java
CancelHeldTransferReceiptBuilder.java
CancelHeldTransferRequestBuilder.java
CompleteHeldTransferRequestBuilder.java
HeldTransferReceiptBuilder.java
HeldTransferRequestBuilder.java
Log Message:
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
--- NEW FILE: CancelExchangeBuilder.java ---
package org.neuclear.asset.contracts.builders;
import org.dom4j.Element;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.contracts.TransferGlobals;
import org.neuclear.id.builders.NamedObjectBuilder;
import org.neuclear.commons.NeuClearException;
/*
NeuClear Distributed Transaction Clearing Platform
(C) 2003 Pelle Braendgaard
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: CancelExchangeBuilder.java,v 1.1 2004/01/03 20:36:25 pelle Exp $
$Log: CancelExchangeBuilder.java,v $
Revision 1.1 2004/01/03 20:36:25 pelle
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
Revision 1.4 2003/11/21 04:43:03 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/12 23:47:04 pelle
Much work done in creating good test environment.
PaymentReceiverTest works, but needs a abit more work in its environment to succeed testing.
Revision 1.2 2003/11/11 21:17:19 pelle
Further vital reshuffling.
org.neudist.crypto.* and org.neudist.utils.* have been moved to respective areas under org.neuclear.commons
org.neuclear.signers.* as well as org.neuclear.passphraseagents have been moved under org.neuclear.commons.crypto as well.
Did a bit of work on the Canonicalizer and changed a few other minor bits.
Revision 1.1 2003/11/10 17:42:07 pelle
The AssetController interface has been more or less finalized.
CurrencyController fully implemented
AssetControlClient implementes a remote client for communicating with AssetControllers
Revision 1.2 2003/11/09 03:26:47 pelle
More house keeping and shuffling about mainly pay
Revision 1.1 2003/11/09 03:10:13 pelle
Major changes that apparently didnt get properly checked in earlier.
Revision 1.2 2003/11/06 23:47:43 pelle
Major Refactoring of CurrencyController.
Factored out AssetController to be new abstract parent class together with most of its support classes.
Created (Half way) AssetControlClient, which can perform transactions on external AssetControllers via NeuClear.
Created the first attempt at the ExchangeAgent. This will need use of the AssetControlClient.
SOAPTools was changed to return a stream. This is required by the VerifyingReader in NeuClear.
Revision 1.1 2003/10/03 23:48:29 pelle
Did various security related updates in the pay package with regards to immutability of fields etc.
AssetControllerReceiver should now be operational. Real testing needs to be done including in particular setting the
private key of the Receiver.
A new class TransferGlobals contains usefull settings for making life easier in the other contract based classes.
TransferContract the signed contract is functional and has a matching TransferRequestBuilder class for programmatically creating
TransferRequests for signing.
TransferReceiptBuilder has been created for use by Transfer processors. It is used in the AssetControllerReceiver.
*/
/**
* User: pelleb
* Date: Oct 3, 2003
* Time: 3:13:27 PM
*/
public abstract class CancelExchangeBuilder extends NamedObjectBuilder {
protected CancelExchangeBuilder(final String tagname, final String name, final Asset asset, final String holdid) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(name, TransferGlobals.createQName(tagname));
if (asset == null)
throw new InvalidTransferException("assetName");
if (holdid == null)
throw new InvalidTransferException("holdid");
this.asset = asset;
final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "assetName", asset.getName()));
element.add(TransferGlobals.createAttribute(element, "holdid", holdid));
}
public final Asset getAsset() {
return asset;
}
private final Asset asset;
}
--- NEW FILE: CancelExchangeReceiptBuilder.java ---
package org.neuclear.asset.contracts.builders;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.asset.contracts.CancelExchangeRequest;
import org.neuclear.asset.contracts.TransferGlobals;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.NSTools;
/**
* (C) 2003 Antilles Software Ventures SA
* User: pelleb
* Date: Nov 10, 2003
* Time: 10:46:12 AM
* $Id: CancelExchangeReceiptBuilder.java,v 1.1 2004/01/03 20:36:25 pelle Exp $
* $Log: CancelExchangeReceiptBuilder.java,v $
* Revision 1.1 2004/01/03 20:36:25 pelle
* Renamed HeldTransfer to Exchange
* Dropped valuetime from the request objects.
* Doesnt yet compile. New commit to follow soon.
*
* Revision 1.3 2003/12/06 00:16:10 pelle
* Updated various areas in NSTools.
* Updated URI Validation in particular to support new expanded format
* Updated createUniqueID and friends to be a lot more unique and more efficient.
* In CryptoTools updated getRandom() to finally use a SecureRandom.
* Changed CryptoTools.getFormatURLSafe to getBase36 because that is what it really is.
*
* Revision 1.2 2003/11/21 04:43:03 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).
* <p/>
* Revision 1.1 2003/11/10 17:42:07 pelle
* The AssetController interface has been more or less finalized.
* CurrencyController fully implemented
* AssetControlClient implementes a remote client for communicating with AssetControllers
*/
public final class CancelExchangeReceiptBuilder extends CancelExchangeBuilder {
public CancelExchangeReceiptBuilder(final CancelExchangeRequest req) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(NSTools.createUniqueTransactionID(req.getAsset().getName(), req.getSignatory().getName()), TransferGlobals.CANCEL_RCPT_TAGNAME, req.getAsset(), req.getHoldId());
}
}
--- NEW FILE: CancelExchangeRequestBuilder.java ---
package org.neuclear.asset.contracts.builders;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.asset.contracts.ExchangeReceipt;
import org.neuclear.asset.contracts.TransferGlobals;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.NSTools;
/**
* (C) 2003 Antilles Software Ventures SA
* User: pelleb
* Date: Nov 10, 2003
* Time: 10:46:12 AM
* $Id: CancelExchangeRequestBuilder.java,v 1.1 2004/01/03 20:36:25 pelle Exp $
* $Log: CancelExchangeRequestBuilder.java,v $
* Revision 1.1 2004/01/03 20:36:25 pelle
* Renamed HeldTransfer to Exchange
* Dropped valuetime from the request objects.
* Doesnt yet compile. New commit to follow soon.
*
* Revision 1.3 2003/12/06 00:16:10 pelle
* Updated various areas in NSTools.
* Updated URI Validation in particular to support new expanded format
* Updated createUniqueID and friends to be a lot more unique and more efficient.
* In CryptoTools updated getRandom() to finally use a SecureRandom.
* Changed CryptoTools.getFormatURLSafe to getBase36 because that is what it really is.
*
* Revision 1.2 2003/11/21 04:43:03 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).
* <p/>
* Revision 1.1 2003/11/10 17:42:07 pelle
* The AssetController interface has been more or less finalized.
* CurrencyController fully implemented
* AssetControlClient implementes a remote client for communicating with AssetControllers
*/
public final class CancelExchangeRequestBuilder extends CancelExchangeBuilder {
public CancelExchangeRequestBuilder(final ExchangeReceipt held) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(NSTools.createUniqueTransactionID(held.getAgent().getName(), held.getAsset().getName()), TransferGlobals.CANCEL_TAGNAME, held.getAsset(), held.getName());
}
}
--- NEW FILE: CompleteExchangeRequestBuilder.java ---
package org.neuclear.asset.contracts.builders;
import org.dom4j.Element;
import org.neuclear.asset.contracts.TransferReceipt;
import org.neuclear.asset.contracts.TransferGlobals;
import org.neuclear.asset.contracts.TransferRequest;
import org.neuclear.asset.contracts.ExchangeReceipt;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.id.Identity;
import org.neuclear.commons.NeuClearException;
import java.util.Date;
/*
NeuClear Distributed Transaction Clearing Platform
(C) 2003 Pelle Braendgaard
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: CompleteExchangeRequestBuilder.java,v 1.1 2004/01/03 20:36:25 pelle Exp $
$Log: CompleteExchangeRequestBuilder.java,v $
Revision 1.1 2004/01/03 20:36:25 pelle
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
Revision 1.2 2003/11/21 04:43:03 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.
CurrencyController fully implemented
AssetControlClient implementes a remote client for communicating with AssetControllers
Revision 1.2 2003/11/09 03:26:47 pelle
More house keeping and shuffling about mainly pay
Revision 1.1 2003/11/09 03:10:13 pelle
Major changes that apparently didnt get properly checked in earlier.
Revision 1.2 2003/11/06 23:47:43 pelle
Major Refactoring of CurrencyController.
Factored out AssetController to be new abstract parent class together with most of its support classes.
Created (Half way) AssetControlClient, which can perform transactions on external AssetControllers via NeuClear.
Created the first attempt at the ExchangeAgent. This will need use of the AssetControlClient.
SOAPTools was changed to return a stream. This is required by the VerifyingReader in NeuClear.
Revision 1.1 2003/10/03 23:48:29 pelle
Did various security related updates in the pay package with regards to immutability of fields etc.
AssetControllerReceiver should now be operational. Real testing needs to be done including in particular setting the
private key of the Receiver.
A new class TransferGlobals contains usefull settings for making life easier in the other contract based classes.
TransferContract the signed contract is functional and has a matching TransferRequestBuilder class for programmatically creating
TransferRequests for signing.
TransferReceiptBuilder has been created for use by Transfer processors. It is used in the AssetControllerReceiver.
*/
/**
* User: pelleb
* Date: Oct 3, 2003
* Time: 6:28:26 PM
*/
public final class CompleteExchangeRequestBuilder extends TransferBuilder {
public CompleteExchangeRequestBuilder(final ExchangeReceipt req,final Identity signatory,final String id,final double amount, final String comment) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(TransferGlobals.COMPLETE_TAGNAME,
req.getAsset(),
signatory,
req.getAgent(),
amount,
comment);
final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "sender", req.getFrom().getName()));
element.add(TransferGlobals.createAttribute(element, "holdid", req.getName()));
}
}
--- NEW FILE: ExchangeReceiptBuilder.java ---
package org.neuclear.asset.contracts.builders;
import org.dom4j.Element;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.asset.contracts.ExchangeRequest;
import org.neuclear.asset.contracts.TransferGlobals;
import org.neuclear.commons.time.TimeTools;
import org.neuclear.commons.NeuClearException;
import java.sql.Timestamp;
/*
NeuClear Distributed Transaction Clearing Platform
(C) 2003 Pelle Braendgaard
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: ExchangeReceiptBuilder.java,v 1.1 2004/01/03 20:36:25 pelle Exp $
$Log: ExchangeReceiptBuilder.java,v $
Revision 1.1 2004/01/03 20:36:25 pelle
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
Revision 1.3 2003/11/21 04:43:03 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.2 2003/11/11 21:17:19 pelle
Further vital reshuffling.
org.neudist.crypto.* and org.neudist.utils.* have been moved to respective areas under org.neuclear.commons
org.neuclear.signers.* as well as org.neuclear.passphraseagents have been moved under org.neuclear.commons.crypto as well.
Did a bit of work on the Canonicalizer and changed a few other minor bits.
Revision 1.1 2003/11/08 01:39:57 pelle
WARNING this rev is majorly unstable and will almost certainly not compile.
More major refactoring in neuclear-pay.
Got rid of neuclear-ledger like features of pay such as Account and Issuer.
Accounts have been replaced by Identity from neuclear-id
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
TransferRequest/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
which will handle all neuclear-ledger based AssetControllers.
*/
/**
* User: pelleb
* Date: Nov 7, 2003
* Time: 8:05:15 PM
*/
public final class ExchangeReceiptBuilder extends TransferBuilder {
public ExchangeReceiptBuilder(final ExchangeRequest req, final String id,Timestamp valuetime) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(TransferGlobals.HELD_XFER_RCPT_TAGNAME, req.getAsset(),req.getAsset(),req.getAmount());
final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "helduntil", TimeTools.formatTimeStamp(req.getValidTo())));
}
}
--- NEW FILE: ExchangeRequestBuilder.java ---
package org.neuclear.asset.contracts.builders;
import org.dom4j.Element;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.contracts.TransferGlobals;
import org.neuclear.id.Identity;
import org.neuclear.commons.time.TimeTools;
import org.neuclear.commons.NeuClearException;
import java.util.Date;
/*
NeuClear Distributed Transaction Clearing Platform
(C) 2003 Pelle Braendgaard
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: ExchangeRequestBuilder.java,v 1.1 2004/01/03 20:36:25 pelle Exp $
$Log: ExchangeRequestBuilder.java,v $
Revision 1.1 2004/01/03 20:36:25 pelle
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
Revision 1.3 2003/11/21 04:43:03 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.2 2003/11/11 21:17:19 pelle
Further vital reshuffling.
org.neudist.crypto.* and org.neudist.utils.* have been moved to respective areas under org.neuclear.commons
org.neuclear.signers.* as well as org.neuclear.passphraseagents have been moved under org.neuclear.commons.crypto as well.
Did a bit of work on the Canonicalizer and changed a few other minor bits.
Revision 1.1 2003/11/08 01:39:57 pelle
WARNING this rev is majorly unstable and will almost certainly not compile.
More major refactoring in neuclear-pay.
Got rid of neuclear-ledger like features of pay such as Account and Issuer.
Accounts have been replaced by Identity from neuclear-id
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
TransferRequest/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
which will handle all neuclear-ledger based AssetControllers.
*/
/**
* User: pelleb
* Date: Nov 7, 2003
* Time: 7:59:13 PM
*/
public final class ExchangeRequestBuilder extends TransferBuilder {
public ExchangeRequestBuilder(final Asset asset, final Identity signer, final Identity agent, final double amount, final String comment, final Date helduntil) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(TransferGlobals.HELD_XFER_TAGNAME, asset, signer, agent, amount, comment);
final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "helduntil", TimeTools.formatTimeStamp(helduntil)));
element.add(TransferGlobals.createAttribute(element, "agent", agent.getName()));
}
}
Index: TransferBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/TransferBuilder.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** TransferBuilder.java 6 Dec 2003 00:16:10 -0000 1.8
--- TransferBuilder.java 3 Jan 2004 20:36:25 -0000 1.9
***************
*** 35,38 ****
--- 35,43 ----
$Id$
$Log$
+ Revision 1.9 2004/01/03 20:36:25 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.8 2003/12/06 00:16:10 pelle
Updated various areas in NSTools.
***************
*** 96,100 ****
*/
public abstract class TransferBuilder extends NamedObjectBuilder {
! protected TransferBuilder(final String tagname, final Asset asset, final Identity signer, final Identity to, final double amount, final Date valuetime, final String comment) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(NSTools.createUniqueTransactionID(signer.getName(), to.getName()), TransferGlobals.createQName(tagname));
if (amount < 0)
--- 101,105 ----
*/
public abstract class TransferBuilder extends NamedObjectBuilder {
! protected TransferBuilder(final String tagname, final Asset asset, final Identity signer, final Identity to, final double amount, final String comment) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(NSTools.createUniqueTransactionID(signer.getName(), to.getName()), TransferGlobals.createQName(tagname));
if (amount < 0)
***************
*** 104,109 ****
if (to == null)
throw new InvalidTransferException("to");
- if (valuetime == null)
- throw new InvalidTransferException("valuetime");
this.asset = asset;
--- 109,112 ----
***************
*** 112,116 ****
element.add(TransferGlobals.createAttribute(element, "assetName", asset.getName()));
element.add(TransferGlobals.createAttribute(element, "amount", Double.toString(amount)));
- element.add(TransferGlobals.createAttribute(element, "valuetime", TimeTools.formatTimeStamp(valuetime)));
if (!Utility.isEmpty(comment))
element.add(TransferGlobals.createElement("comment", comment));
--- 115,118 ----
Index: TransferReceiptBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/TransferReceiptBuilder.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TransferReceiptBuilder.java 21 Nov 2003 04:43:03 -0000 1.4
--- TransferReceiptBuilder.java 3 Jan 2004 20:36:25 -0000 1.5
***************
*** 6,11 ****
--- 6,13 ----
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.commons.NeuClearException;
+ import org.neuclear.commons.time.TimeTools;
import java.util.Date;
+ import java.sql.Timestamp;
/*
***************
*** 29,32 ****
--- 31,39 ----
$Id$
$Log$
+ Revision 1.5 2004/01/03 20:36:25 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.4 2003/11/21 04:43:03 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 70,77 ****
*/
public class TransferReceiptBuilder extends TransferBuilder {
! public TransferReceiptBuilder(final TransferRequest req,final String id) throws InvalidTransferException, NegativeTransferException, NeuClearException {
! this(TransferGlobals.XFER_RCPT_TAGNAME,req,id);
! }
! public TransferReceiptBuilder(final CompleteHeldTransferRequest req,final String id) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(TransferGlobals.XFER_RCPT_TAGNAME,
req.getAsset(),
--- 77,81 ----
*/
public class TransferReceiptBuilder extends TransferBuilder {
! public TransferReceiptBuilder(final CompleteExchangeRequest req,final String id,Timestamp valuetime) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(TransferGlobals.XFER_RCPT_TAGNAME,
req.getAsset(),
***************
*** 79,98 ****
req.getTo(),
req.getAmount(),
- req.getValueTime(),
req.getComment());
final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "sender", req.getFrom().getName()));
element.add(TransferGlobals.createAttribute(element, "holdid", req.getHoldId()));
}
! TransferReceiptBuilder(final String tagname,final TransferRequest req,final String id) throws InvalidTransferException, NegativeTransferException, NeuClearException {
! super(tagname,
req.getAsset(),
req.getAsset(),
req.getTo(),
req.getAmount(),
- req.getValueTime(),
req.getComment());
final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "sender", req.getFrom().getName()));
element.add(TransferGlobals.createAttribute(element, "reqid", req.getName()));
--- 83,107 ----
req.getTo(),
req.getAmount(),
req.getComment());
final Element element = getElement();
+ if (valuetime == null)
+ throw new InvalidTransferException("valuetime");
+ element.add(TransferGlobals.createAttribute(element, "valuetime", TimeTools.formatTimeStamp(valuetime)));
+
element.add(TransferGlobals.createAttribute(element, "sender", req.getFrom().getName()));
element.add(TransferGlobals.createAttribute(element, "holdid", req.getHoldId()));
}
! public TransferReceiptBuilder(final TransferRequest req,final String id,Timestamp valuetime) throws InvalidTransferException, NegativeTransferException, NeuClearException {
! super(TransferGlobals.XFER_RCPT_TAGNAME,
req.getAsset(),
req.getAsset(),
req.getTo(),
req.getAmount(),
req.getComment());
final Element element = getElement();
+ if (valuetime == null)
+ throw new InvalidTransferException("valuetime");
+ element.add(TransferGlobals.createAttribute(element, "valuetime", TimeTools.formatTimeStamp(valuetime)));
element.add(TransferGlobals.createAttribute(element, "sender", req.getFrom().getName()));
element.add(TransferGlobals.createAttribute(element, "reqid", req.getName()));
Index: TransferRequestBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/TransferRequestBuilder.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TransferRequestBuilder.java 21 Nov 2003 04:43:03 -0000 1.4
--- TransferRequestBuilder.java 3 Jan 2004 20:36:25 -0000 1.5
***************
*** 31,34 ****
--- 31,39 ----
$Id$
$Log$
+ Revision 1.5 2004/01/03 20:36:25 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.4 2003/11/21 04:43:03 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
***************
*** 72,80 ****
*/
public class TransferRequestBuilder extends TransferBuilder {
! public TransferRequestBuilder(final Asset asset, final Identity signer, final Identity to, final double amount, final Date valuetime, final String comment) throws InvalidTransferException, NegativeTransferException, NeuClearException {
! this(TransferGlobals.XFER_TAGNAME, asset, signer, to, amount, valuetime, comment);
}
! TransferRequestBuilder(final String tagname,final Asset asset, final Identity signer, final Identity to, final double amount, final Date valuetime, final String comment) throws InvalidTransferException, NegativeTransferException, NeuClearException {
! super(tagname, asset, signer, to, amount, valuetime, comment);
}
}
--- 77,85 ----
*/
public class TransferRequestBuilder extends TransferBuilder {
! public TransferRequestBuilder(final Asset asset, final Identity signer, final Identity to, final double amount, final String comment) throws InvalidTransferException, NegativeTransferException, NeuClearException {
! this(TransferGlobals.XFER_TAGNAME, asset, signer, to, amount, comment);
}
! TransferRequestBuilder(final String tagname,final Asset asset, final Identity signer, final Identity to, final double amount, final String comment) throws InvalidTransferException, NegativeTransferException, NeuClearException {
! super(tagname, asset, signer, to, amount, comment);
}
}
--- CancelHeldTransferBuilder.java DELETED ---
--- CancelHeldTransferReceiptBuilder.java DELETED ---
--- CancelHeldTransferRequestBuilder.java DELETED ---
--- CompleteHeldTransferRequestBuilder.java DELETED ---
--- HeldTransferReceiptBuilder.java DELETED ---
--- HeldTransferRequestBuilder.java DELETED ---
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts
In directory sc8-pr-cvs1:/tmp/cvs-serv10127/src/java/org/neuclear/asset/contracts
Modified Files:
AssetGlobals.java AssetTransactionContract.java
TransferContract.java TransferGlobals.java
TransferReceipt.java TransferRequest.java
Added Files:
CancelExchangeReceipt.java CancelExchangeRequest.java
CompleteExchangeRequest.java Exchange.java
ExchangeReceipt.java ExchangeRequest.java
Removed Files:
CancelHeldTransferReceipt.java CancelHeldTransferRequest.java
CompleteHeldTransferRequest.java Held.java
HeldTransferReceipt.java HeldTransferRequest.java
Log Message:
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
--- NEW FILE: CancelExchangeReceipt.java ---
package org.neuclear.asset.contracts;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.SignedNamedCore;
import java.sql.Timestamp;
import java.util.Date;
/**
* User: pelleb
* Date: Jul 21, 2003
* Time: 5:35:26 PM
*/
public final class CancelExchangeReceipt extends AssetTransactionContract{
CancelExchangeReceipt(final SignedNamedCore core, final Asset asset, final String holdid) {
super(core, asset);
this.holdid = holdid;
}
public final String getHoldId() {
return holdid;
}
private final String holdid;
}
--- NEW FILE: CancelExchangeRequest.java ---
package org.neuclear.asset.contracts;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.SignedNamedCore;
import java.sql.Timestamp;
import java.util.Date;
/**
* User: pelleb
* Date: Jul 21, 2003
* Time: 5:35:26 PM
*/
public final class CancelExchangeRequest extends AssetTransactionContract{
CancelExchangeRequest(final SignedNamedCore core, final Asset asset, final String holdid) {
super(core, asset);
this.holdid = holdid;
}
public final String getHoldId() {
return holdid;
}
private final String holdid;
}
--- NEW FILE: CompleteExchangeRequest.java ---
package org.neuclear.asset.contracts;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedCore;
import java.sql.Timestamp;
import java.util.Date;
/**
* User: pelleb
* Date: Jul 21, 2003
* Time: 5:35:26 PM
*/
public final class CompleteExchangeRequest extends TransferContract {
CompleteExchangeRequest(final SignedNamedCore core, final Asset asset, final Identity from, final Identity to, final double amount, final Date valuetime, final String comment, final String holdid) {
super(core, asset, amount, comment);
this.from = from;
this.holdid = holdid;
this.to = to;
this.valuetime=valuetime.getTime();
}
public final Identity getFrom() {
return from;
}
public final String getHoldId() {
return holdid;
}
public final Identity getTo() {
return to;
}
public final Date getValueTime() {
return new Timestamp(valuetime);
}
private final long valuetime;
private final Identity from;
private final String holdid;
private final Identity to;
}
--- NEW FILE: Exchange.java ---
package org.neuclear.asset.contracts;
import org.neuclear.id.Identity;
import java.util.Date;
/**
* User: pelleb
* Date: Jul 30, 2003
* Time: 11:57:39 AM
*/
public interface Exchange {
public Date getValidTo();
public Identity getAgent();
}
--- NEW FILE: ExchangeReceipt.java ---
package org.neuclear.asset.contracts;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedCore;
import java.sql.Timestamp;
import java.util.Date;
/**
* User: pelleb
* Date: Jul 30, 2003
* Time: 11:59:36 AM
*/
public final class ExchangeReceipt extends TransferContract implements Exchange {
ExchangeReceipt(final SignedNamedCore core, final Asset asset, final Identity from, final Identity agent, final String reqid, final double amount, final Date valuetime, final String comment, final Date helduntil) {
super(core, asset, amount, comment);
this.from = from;
this.reqid = reqid;
this.helduntil = helduntil.getTime();
this.agent=agent;
this.valuetime=valuetime.getTime();
}
public final Date getValidTo() {
return new Timestamp(helduntil);
}
public Identity getAgent() {
return agent; //To change body of implemented methods use Options | File Templates.
}
public Identity getFrom() {
return from; //To change body of implemented methods use Options | File Templates.
}
public final Date getValueTime() {
return new Timestamp(valuetime);
}
private final long valuetime;
private final long helduntil;
private final Identity from;
private final String reqid;
private final Identity agent;
}
--- NEW FILE: ExchangeRequest.java ---
package org.neuclear.asset.contracts;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedCore;
import java.sql.Timestamp;
import java.util.Date;
/**
* User: pelleb
* Date: Jul 30, 2003
* Time: 12:01:03 PM
*/
public final class ExchangeRequest extends TransferContract implements Exchange {
ExchangeRequest(final SignedNamedCore core,
final Asset asset, final Identity agent, final double amount, final String comment, final Date helduntil) {
super(core, asset, amount, comment);
this.validto = helduntil.getTime();
this.agent=agent;
}
public final Date getValidTo() {
return new Timestamp(validto);
}
public Identity getAgent() {
return agent; //To change body of implemented methods use Options | File Templates.
}
public final Identity getFrom() {
return getSignatory();
}
private final long validto;
private final Identity agent;
}
Index: AssetGlobals.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/AssetGlobals.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** AssetGlobals.java 19 Dec 2003 18:02:35 -0000 1.7
--- AssetGlobals.java 3 Jan 2004 20:36:25 -0000 1.8
***************
*** 24,27 ****
--- 24,32 ----
$Id$
$Log$
+ Revision 1.8 2004/01/03 20:36:25 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.7 2003/12/19 18:02:35 pelle
Revamped a lot of exception handling throughout the framework, it has been simplified in most places:
***************
*** 63,67 ****
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Held companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
--- 68,72 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
Index: AssetTransactionContract.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/AssetTransactionContract.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** AssetTransactionContract.java 19 Dec 2003 18:02:35 -0000 1.10
--- AssetTransactionContract.java 3 Jan 2004 20:36:25 -0000 1.11
***************
*** 19,22 ****
--- 19,27 ----
* $Id$
* $Log$
+ * Revision 1.11 2004/01/03 20:36:25 pelle
+ * Renamed HeldTransfer to Exchange
+ * Dropped valuetime from the request objects.
+ * Doesnt yet compile. New commit to follow soon.
+ *
* Revision 1.10 2003/12/19 18:02:35 pelle
* Revamped a lot of exception handling throughout the framework, it has been simplified in most places:
***************
*** 106,112 ****
final String holdid = elem.attributeValue("holdid");
if (elem.getName().equals(TransferGlobals.CANCEL_TAGNAME))
! return new CancelHeldTransferRequest(core, asset, holdid);
if (elem.getName().equals(TransferGlobals.CANCEL_RCPT_TAGNAME))
! return new CancelHeldTransferReceipt(core, asset, holdid);
final double amount = Double.parseDouble(elem.attributeValue("amount"));
--- 111,117 ----
final String holdid = elem.attributeValue("holdid");
if (elem.getName().equals(TransferGlobals.CANCEL_TAGNAME))
! return new CancelExchangeRequest(core, asset, holdid);
if (elem.getName().equals(TransferGlobals.CANCEL_RCPT_TAGNAME))
! return new CancelExchangeReceipt(core, asset, holdid);
final double amount = Double.parseDouble(elem.attributeValue("amount"));
***************
*** 117,121 ****
final String comment = (commentElement != null) ? commentElement.getText() : "";
if (elem.getName().equals(TransferGlobals.XFER_TAGNAME))
! return new TransferRequest(core, asset, to, amount, valuetime, comment);
Date helduntil = null;
--- 122,126 ----
final String comment = (commentElement != null) ? commentElement.getText() : "";
if (elem.getName().equals(TransferGlobals.XFER_TAGNAME))
! return new TransferRequest(core, asset, to, amount, comment);
Date helduntil = null;
***************
*** 123,127 ****
helduntil = TimeTools.parseTimeStamp(elem.attributeValue("valuetime"));
if (elem.getName().equals(TransferGlobals.HELD_XFER_TAGNAME))
! return new HeldTransferRequest(core, asset, to, amount, valuetime, comment, helduntil);
final Identity from = NSResolver.resolveIdentity(elem.attributeValue("sender"));
--- 128,132 ----
helduntil = TimeTools.parseTimeStamp(elem.attributeValue("valuetime"));
if (elem.getName().equals(TransferGlobals.HELD_XFER_TAGNAME))
! return new ExchangeRequest(core, asset, to, amount, comment, helduntil);
final Identity from = NSResolver.resolveIdentity(elem.attributeValue("sender"));
***************
*** 131,138 ****
if (elem.getName().equals(TransferGlobals.HELD_XFER_RCPT_TAGNAME))
! return new HeldTransferReceipt(core, asset, from, to, reqid, amount, valuetime, comment, helduntil);
if (elem.getName().equals(TransferGlobals.COMPLETE_TAGNAME))
! return new CompleteHeldTransferRequest(core, asset, from, to, amount, valuetime, comment, holdid);
} catch (ParseException e) {
throw new InvalidNamedObjectException(core.getName(),e);
--- 136,143 ----
if (elem.getName().equals(TransferGlobals.HELD_XFER_RCPT_TAGNAME))
! return new ExchangeReceipt(core, asset, from, to, reqid, amount, valuetime, comment, helduntil);
if (elem.getName().equals(TransferGlobals.COMPLETE_TAGNAME))
! return new CompleteExchangeRequest(core, asset, from, to, amount, valuetime, comment, holdid);
} catch (ParseException e) {
throw new InvalidNamedObjectException(core.getName(),e);
Index: TransferContract.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/TransferContract.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** TransferContract.java 19 Dec 2003 18:02:35 -0000 1.7
--- TransferContract.java 3 Jan 2004 20:36:25 -0000 1.8
***************
*** 45,54 ****
*/
public abstract class TransferContract extends AssetTransactionContract {
! TransferContract(final SignedNamedCore core, final Asset asset, final Identity to, final double amount, final Date valuetime, final String comment) {
super(core, asset);
this.amount = amount;
this.comment = (comment != null) ? comment : "";
- this.to = to;
- this.valuetime = valuetime.getTime();
}
--- 45,52 ----
*/
public abstract class TransferContract extends AssetTransactionContract {
! TransferContract(final SignedNamedCore core, final Asset asset, final double amount, final String comment) {
super(core, asset);
this.amount = amount;
this.comment = (comment != null) ? comment : "";
}
***************
*** 57,67 ****
}
- public final Date getValueTime() {
- return new Timestamp(valuetime);
- }
-
- public final Identity getTo() {
- return to;
- }
public abstract Identity getFrom();
--- 55,58 ----
***************
*** 73,78 ****
private final double amount;
- private final Identity to;
- private final long valuetime;
private final String comment;
--- 64,67 ----
Index: TransferGlobals.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/TransferGlobals.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TransferGlobals.java 28 Nov 2003 00:11:50 -0000 1.5
--- TransferGlobals.java 3 Jan 2004 20:36:25 -0000 1.6
***************
*** 24,27 ****
--- 24,32 ----
$Id$
$Log$
+ Revision 1.6 2004/01/03 20:36:25 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.5 2003/11/28 00:11:50 pelle
Getting the NeuClear web transactions working.
***************
*** 120,125 ****
public static final String XFER_TAGNAME = "TransferRequest";
public static final String XFER_RCPT_TAGNAME = "TransferReceipt";
! public static final String HELD_XFER_TAGNAME = "HeldTransferRequest";
! public static final String HELD_XFER_RCPT_TAGNAME = "HeldTransferReceipt";
public static final String COMPLETE_TAGNAME = "CompleteHoldRequest";
public static final String CANCEL_TAGNAME = "CancelHoldRequest";
--- 125,130 ----
public static final String XFER_TAGNAME = "TransferRequest";
public static final String XFER_RCPT_TAGNAME = "TransferReceipt";
! public static final String HELD_XFER_TAGNAME = "ExchangeRequest";
! public static final String HELD_XFER_RCPT_TAGNAME = "ExchangeReceipt";
public static final String COMPLETE_TAGNAME = "CompleteHoldRequest";
public static final String CANCEL_TAGNAME = "CancelHoldRequest";
Index: TransferReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/TransferReceipt.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TransferReceipt.java 19 Dec 2003 18:02:35 -0000 1.5
--- TransferReceipt.java 3 Jan 2004 20:36:25 -0000 1.6
***************
*** 14,24 ****
*/
public class TransferReceipt extends TransferContract {
- private final Identity from;
- private final String reqid;
TransferReceipt(final SignedNamedCore core, final Asset asset, final Identity from, final Identity to, final String reqid, final double amount, final Date valuetime, final String comment) {
! super(core, asset, to, amount, valuetime, comment);
this.from = from;
this.reqid = reqid;
}
--- 14,24 ----
*/
public class TransferReceipt extends TransferContract {
TransferReceipt(final SignedNamedCore core, final Asset asset, final Identity from, final Identity to, final String reqid, final double amount, final Date valuetime, final String comment) {
! super(core, asset, amount, comment);
this.from = from;
this.reqid = reqid;
+ this.to=to;
+ this.valuetime=valuetime.getTime();
}
***************
*** 30,33 ****
--- 30,44 ----
return reqid;
}
+
+ public final Identity getTo() {
+ return to;
+ }
+ public final Date getValueTime() {
+ return new Timestamp(valuetime);
+ }
+ private final long valuetime;
+ private final Identity from;
+ private final String reqid;
+ private final Identity to;
}
Index: TransferRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/TransferRequest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TransferRequest.java 19 Dec 2003 18:02:35 -0000 1.5
--- TransferRequest.java 3 Jan 2004 20:36:25 -0000 1.6
***************
*** 14,24 ****
*/
public class TransferRequest extends TransferContract {
! TransferRequest(final SignedNamedCore core, final Asset asset, final Identity to, final double amount, final Date valuetime, final String comment) {
! super(core, asset, to, amount, valuetime, comment);
}
public final Identity getFrom() {
return getSignatory();
}
--- 14,30 ----
*/
public class TransferRequest extends TransferContract {
+ private final Identity to;
! TransferRequest(final SignedNamedCore core, final Asset asset, final Identity to, final double amount, final String comment) {
! super(core, asset, amount, comment);
! this.to=to;
}
public final Identity getFrom() {
return getSignatory();
+ }
+
+ public final Identity getTo() {
+ return to;
}
--- CancelHeldTransferReceipt.java DELETED ---
--- CancelHeldTransferRequest.java DELETED ---
--- CompleteHeldTransferRequest.java DELETED ---
--- Held.java DELETED ---
--- HeldTransferReceipt.java DELETED ---
--- HeldTransferRequest.java DELETED ---
|
|
From: <pe...@us...> - 2004-01-03 20:36:28
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/remote
In directory sc8-pr-cvs1:/tmp/cvs-serv10127/src/java/org/neuclear/asset/remote
Modified Files:
AssetControlClient.java
Log Message:
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
Index: AssetControlClient.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/remote/AssetControlClient.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** AssetControlClient.java 10 Dec 2003 23:52:39 -0000 1.8
--- AssetControlClient.java 3 Jan 2004 20:36:25 -0000 1.9
***************
*** 1,6 ****
package org.neuclear.asset.remote;
! import org.neuclear.asset.contracts.CancelHeldTransferReceipt;
! import org.neuclear.asset.contracts.HeldTransferReceipt;
import org.neuclear.asset.contracts.TransferReceipt;
import org.neuclear.asset.contracts.builders.*;
--- 1,6 ----
package org.neuclear.asset.remote;
! import org.neuclear.asset.contracts.CancelExchangeReceipt;
! import org.neuclear.asset.contracts.ExchangeReceipt;
import org.neuclear.asset.contracts.TransferReceipt;
import org.neuclear.asset.contracts.builders.*;
***************
*** 30,33 ****
--- 30,38 ----
$Id$
$Log$
+ Revision 1.9 2004/01/03 20:36:25 pelle
+ Renamed HeldTransfer to Exchange
+ Dropped valuetime from the request objects.
+ Doesnt yet compile. New commit to follow soon.
+
Revision 1.8 2003/12/10 23:52:39 pelle
Did some cleaning up in the builders
***************
*** 84,88 ****
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Held companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
--- 89,93 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferRequest/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferRequest/ReceiptBuilder classes.
PaymentProcessor has been renamed CurrencyController. I will extract a superclass later to be named AbstractLedgerController
***************
*** 111,124 ****
! public final HeldTransferReceipt performHeldTransfer(final HeldTransferRequestBuilder req) throws NeuClearException, XMLException {
! return (HeldTransferReceipt) send(req);
}
! public final TransferReceipt performCompleteHeld(final CompleteHeldTransferRequestBuilder req) throws NeuClearException, XMLException {
return (TransferReceipt) send(req);
}
! public final CancelHeldTransferReceipt performCancelHeld(final CancelHeldTransferRequestBuilder req) throws NeuClearException, XMLException {
! return (CancelHeldTransferReceipt) req.getAsset().receive(req.sign(signer));
}
--- 116,129 ----
! public final ExchangeReceipt performHeldTransfer(final ExchangeRequestBuilder req) throws NeuClearException, XMLException {
! return (ExchangeReceipt) send(req);
}
! public final TransferReceipt performCompleteHeld(final CompleteExchangeRequestBuilder req) throws NeuClearException, XMLException {
return (TransferReceipt) send(req);
}
! public final CancelExchangeReceipt performCancelHeld(final CancelExchangeRequestBuilder req) throws NeuClearException, XMLException {
! return (CancelExchangeReceipt) req.getAsset().receive(req.sign(signer));
}
|
|
From: <pe...@us...> - 2004-01-03 20:36:28
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/controllers/currency
In directory sc8-pr-cvs1:/tmp/cvs-serv10127/src/java/org/neuclear/asset/controllers/currency
Modified Files:
CurrencyController.java
Log Message:
Renamed HeldTransfer to Exchange
Dropped valuetime from the request objects.
Doesnt yet compile. New commit to follow soon.
Index: CurrencyController.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/controllers/currency/CurrencyController.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** CurrencyController.java 28 Nov 2003 00:11:50 -0000 1.8
--- CurrencyController.java 3 Jan 2004 20:36:25 -0000 1.9
***************
*** 3,8 ****
import org.neuclear.asset.*;
import org.neuclear.asset.contracts.*;
! import org.neuclear.asset.contracts.builders.CancelHeldTransferReceiptBuilder;
! import org.neuclear.asset.contracts.builders.HeldTransferReceiptBuilder;
import org.neuclear.asset.contracts.builders.TransferReceiptBuilder;
import org.neuclear.commons.NeuClearException;
--- 3,8 ----
import org.neuclear.asset.*;
import org.neuclear.asset.contracts.*;
! import org.neuclear.asset.contracts.builders.CancelExchangeReceiptBuilder;
! import org.neuclear.asset.contracts.builders.ExchangeReceiptBuilder;
import org.neuclear.asset.contracts.builders.TransferReceiptBuilder;
import org.neuclear.commons.NeuClearException;
***************
*** 91,95 ****
}
! public final HeldTransferReceiptBuilder process(final HeldTransferRequest req) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException, NeuClearException {
try {
if (!req.getSignatory().equals(req.getFrom()))
--- 91,95 ----
}
! public final ExchangeReceiptBuilder process(final ExchangeRequest req) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException, NeuClearException {
try {
if (!req.getSignatory().equals(req.getFrom()))
***************
*** 98,105 ****
final Book to = getBook(req.getTo());
! final PostedHeldTransaction posted = from.hold(to, req.getAmount(), req.getComment(), req.getValueTime(), req.getHeldUntil());
! return new HeldTransferReceiptBuilder(req, createTransactionId(req, posted));
} catch (UnknownBookException e) { //TODO Implement something like this eg. AccountNotValidException
throw new InvalidTransferException(e.getSubMessage());
--- 98,105 ----
final Book to = getBook(req.getTo());
! final PostedHeldTransaction posted = from.hold(to, req.getAmount(), req.getComment(), req.getValueTime(), req.getValidTo());
! return new ExchangeReceiptBuilder(req, createTransactionId(req, posted));
} catch (UnknownBookException e) { //TODO Implement something like this eg. AccountNotValidException
throw new InvalidTransferException(e.getSubMessage());
***************
*** 115,119 ****
}
! public final TransferReceiptBuilder process(final CompleteHeldTransferRequest complete) throws LowLevelPaymentException, InvalidTransferException, TransferDeniedException, NeuClearException {
try {
if (!complete.getSignatory().equals(complete.getTo()))
--- 115,119 ----
}
! public final TransferReceiptBuilder process(final CompleteExchangeRequest complete) throws LowLevelPaymentException, InvalidTransferException, TransferDeniedException, NeuClearException {
try {
if (!complete.getSignatory().equals(complete.getTo()))
***************
*** 144,148 ****
}
! public final CancelHeldTransferReceiptBuilder process(final CancelHeldTransferRequest cancel) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException, NeuClearException {
try {
final PostedHeldTransaction heldTran = ledger.findHeldTransaction(cancel.getHoldId());
--- 144,148 ----
}
! public final CancelExchangeReceiptBuilder process(final CancelExchangeRequest cancel) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException, NeuClearException {
try {
final PostedHeldTransaction heldTran = ledger.findHeldTransaction(cancel.getHoldId());
***************
*** 150,154 ****
throw new TransferDeniedException(cancel);
heldTran.cancel();
! return new CancelHeldTransferReceiptBuilder(cancel);
} catch (UnknownTransactionException e) {
throw new NonExistantHoldException(cancel.getHoldId());
--- 150,154 ----
throw new TransferDeniedException(cancel);
heldTran.cancel();
! return new CancelExchangeReceiptBuilder(cancel);
} catch (UnknownTransactionException e) {
throw new NonExistantHoldException(cancel.getHoldId());
|
|
From: <pe...@us...> - 2004-01-02 23:19:06
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql
In directory sc8-pr-cvs1:/tmp/cvs-serv16562/src/java/org/neuclear/commons/sql
Modified Files:
ConnectionSource.java DefaultConnectionSource.java
DefaultXAConnectionSource.java JNDIConnectionSource.java
SQLContext.java SimpleConnectionSource.java
XAConnectionSource.java
Log Message:
Added StatementFactory pattern and refactored the ledger to use it.
Index: ConnectionSource.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/ConnectionSource.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** ConnectionSource.java 20 Sep 2003 23:18:11 -0000 1.1.1.1
--- ConnectionSource.java 2 Jan 2004 23:19:03 -0000 1.2
***************
*** 12,15 ****
*/
public interface ConnectionSource {
! Connection getConnection() throws SQLException, IOException;
}
--- 12,15 ----
*/
public interface ConnectionSource {
! Connection getConnection() throws SQLException;
}
Index: DefaultConnectionSource.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/DefaultConnectionSource.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** DefaultConnectionSource.java 24 Dec 2003 00:25:41 -0000 1.5
--- DefaultConnectionSource.java 2 Jan 2004 23:19:03 -0000 1.6
***************
*** 2,5 ****
--- 2,6 ----
import org.neuclear.commons.NeuClearException;
+ import org.neuclear.commons.LowLevelException;
import javax.naming.NamingException;
***************
*** 16,21 ****
public final class DefaultConnectionSource implements ConnectionSource {
! public Connection getConnection() throws SQLException, IOException {
! return SQLTools.getConnection();
}
--- 17,26 ----
public final class DefaultConnectionSource implements ConnectionSource {
! public Connection getConnection() throws SQLException {
! try {
! return SQLTools.getConnection();
! } catch (IOException e) {
! throw new LowLevelException(e);
! }
}
Index: DefaultXAConnectionSource.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/DefaultXAConnectionSource.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DefaultXAConnectionSource.java 24 Dec 2003 00:25:41 -0000 1.1
--- DefaultXAConnectionSource.java 2 Jan 2004 23:19:03 -0000 1.2
***************
*** 26,30 ****
}
! public Connection getConnection() throws SQLException, IOException {
return cs.getConnection();
}
--- 26,30 ----
}
! public Connection getConnection() throws SQLException {
return cs.getConnection();
}
Index: JNDIConnectionSource.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/JNDIConnectionSource.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** JNDIConnectionSource.java 1 Dec 2003 15:44:53 -0000 1.4
--- JNDIConnectionSource.java 2 Jan 2004 23:19:03 -0000 1.5
***************
*** 28,31 ****
--- 28,34 ----
$Id$
$Log$
+ Revision 1.5 2004/01/02 23:19:03 pelle
+ Added StatementFactory pattern and refactored the ledger to use it.
+
Revision 1.4 2003/12/01 15:44:53 pelle
Added XAConnectionSources and Transaction capability through jotm.
***************
*** 57,61 ****
}
! public final Connection getConnection() throws SQLException, IOException {
return ds.getConnection();
}
--- 60,64 ----
}
! public final Connection getConnection() throws SQLException {
return ds.getConnection();
}
Index: SQLContext.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/SQLContext.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SQLContext.java 14 Dec 2003 20:52:54 -0000 1.2
--- SQLContext.java 2 Jan 2004 23:19:03 -0000 1.3
***************
*** 27,30 ****
--- 27,33 ----
$Id$
$Log$
+ Revision 1.3 2004/01/02 23:19:03 pelle
+ Added StatementFactory pattern and refactored the ledger to use it.
+
Revision 1.2 2003/12/14 20:52:54 pelle
Added ServletPassPhraseAgent which uses ThreadLocal to transfer the passphrase to the signer.
***************
*** 55,61 ****
* @return
* @throws SQLException
- * @throws IOException
*/
! public Connection getConnection() throws SQLException, IOException {
return (Connection)get();
}
--- 58,63 ----
* @return
* @throws SQLException
*/
! public Connection getConnection() throws SQLException {
return (Connection)get();
}
***************
*** 74,79 ****
return source.getConnection(); //To change body of overriden methods use Options | File Templates.
} catch (SQLException e) {
- throw new org.neuclear.commons.LowLevelException(e);
- } catch (IOException e) {
throw new org.neuclear.commons.LowLevelException(e);
}
--- 76,79 ----
Index: SimpleConnectionSource.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/SimpleConnectionSource.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SimpleConnectionSource.java 26 Dec 2003 22:51:17 -0000 1.5
--- SimpleConnectionSource.java 2 Jan 2004 23:19:03 -0000 1.6
***************
*** 34,38 ****
! public Connection getConnection() throws SQLException, IOException {
return DriverManager.getConnection(
url,
--- 34,38 ----
! public Connection getConnection() throws SQLException {
return DriverManager.getConnection(
url,
Index: XAConnectionSource.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/XAConnectionSource.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** XAConnectionSource.java 26 Dec 2003 22:51:17 -0000 1.3
--- XAConnectionSource.java 2 Jan 2004 23:19:03 -0000 1.4
***************
*** 54,58 ****
! public Connection getConnection() throws SQLException, IOException {
return xads.getXAConnection().getConnection();
}
--- 54,58 ----
! public Connection getConnection() throws SQLException {
return xads.getXAConnection().getConnection();
}
|
|
From: <pe...@us...> - 2004-01-02 23:19:06
|
Update of /cvsroot/neuclear/neuclear-commons/src/test/org/neuclear/commons/sql/entities
In directory sc8-pr-cvs1:/tmp/cvs-serv16562/src/test/org/neuclear/commons/sql/entities
Modified Files:
TableDefinitionTest.java
Log Message:
Added StatementFactory pattern and refactored the ledger to use it.
Index: TableDefinitionTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/test/org/neuclear/commons/sql/entities/TableDefinitionTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TableDefinitionTest.java 31 Dec 2003 00:39:29 -0000 1.4
--- TableDefinitionTest.java 2 Jan 2004 23:19:03 -0000 1.5
***************
*** 5,8 ****
--- 5,10 ----
import org.neuclear.commons.sql.DefaultConnectionSource;
import org.neuclear.commons.sql.TestCaseConnectionSource;
+ import org.neuclear.commons.sql.statements.StatementFactory;
+ import org.neuclear.commons.sql.statements.SimpleStatementFactory;
import org.neuclear.commons.sql.entities.drivers.DDLDriver;
import org.neuclear.commons.NeuClearException;
***************
*** 35,38 ****
--- 37,43 ----
$Id$
$Log$
+ Revision 1.5 2004/01/02 23:19:03 pelle
+ Added StatementFactory pattern and refactored the ledger to use it.
+
Revision 1.4 2003/12/31 00:39:29 pelle
Added Drivers for handling different Database dialects in the entity model.
***************
*** 116,124 ****
public void testCreateTableStructure() throws SQLException, IOException, NamingException, NeuClearException {
! final Connection con = new TestCaseConnectionSource().getConnection();
try {
! PreparedStatement stmt=con.prepareStatement("drop testtransaction");
stmt.execute();
! stmt=con.prepareStatement("drop testaccounts");
stmt.execute();
} catch (Exception e) {
--- 121,129 ----
public void testCreateTableStructure() throws SQLException, IOException, NamingException, NeuClearException {
! final StatementFactory fact = new SimpleStatementFactory(new TestCaseConnectionSource());
try {
! PreparedStatement stmt=fact.prepareStatement("drop testtransaction");
stmt.execute();
! stmt=fact.prepareStatement("drop testaccounts");
stmt.execute();
} catch (Exception e) {
***************
*** 133,137 ****
table.addMoney();
table.addComment();
! table.create(con,driver);
/* Entity entity=table.insertEntity(con,new Object[] {
"created",TimeTools.now(),
--- 138,142 ----
table.addMoney();
table.addComment();
! table.create(fact,driver);
/* Entity entity=table.insertEntity(con,new Object[] {
"created",TimeTools.now(),
***************
*** 147,152 ****
assertNotNull(entity);
*/
- con.commit();
- con.close();
}
--- 152,155 ----
|
|
From: <pe...@us...> - 2004-01-02 23:19:06
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/statements
In directory sc8-pr-cvs1:/tmp/cvs-serv16562/src/java/org/neuclear/commons/sql/statements
Added Files:
SimpleStatementFactory.java StatementFactory.java
Log Message:
Added StatementFactory pattern and refactored the ledger to use it.
--- NEW FILE: SimpleStatementFactory.java ---
package org.neuclear.commons.sql.statements;
import org.neuclear.commons.sql.statements.StatementFactory;
import org.neuclear.commons.sql.ConnectionSource;
import org.neuclear.commons.sql.SQLContext;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.io.IOException;
/*
NeuClear Distributed Transaction Clearing Platform
(C) 2003 Pelle Braendgaard
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: SimpleStatementFactory.java,v 1.1 2004/01/02 23:19:03 pelle Exp $
$Log: SimpleStatementFactory.java,v $
Revision 1.1 2004/01/02 23:19:03 pelle
Added StatementFactory pattern and refactored the ledger to use it.
*/
/**
* User: pelleb
* Date: Jan 2, 2004
* Time: 3:36:41 PM
*/
public class SimpleStatementFactory implements StatementFactory{
public SimpleStatementFactory(ConnectionSource src) {
this.src = new SQLContext(src);
}
public PreparedStatement prepareStatement(String sql) throws SQLException {
return src.getConnection().prepareStatement(sql);
}
private final SQLContext src;
}
--- NEW FILE: StatementFactory.java ---
package org.neuclear.commons.sql.statements;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.io.IOException;
/*
NeuClear Distributed Transaction Clearing Platform
(C) 2003 Pelle Braendgaard
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: StatementFactory.java,v 1.1 2004/01/02 23:19:03 pelle Exp $
$Log: StatementFactory.java,v $
Revision 1.1 2004/01/02 23:19:03 pelle
Added StatementFactory pattern and refactored the ledger to use it.
*/
/**
* User: pelleb
* Date: Jan 2, 2004
* Time: 3:35:09 PM
*/
public interface StatementFactory {
PreparedStatement prepareStatement(String sql) throws SQLException;
}
|
|
From: <pe...@us...> - 2004-01-02 23:19:06
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/entities
In directory sc8-pr-cvs1:/tmp/cvs-serv16562/src/java/org/neuclear/commons/sql/entities
Modified Files:
EntityModel.java Schema.java
Log Message:
Added StatementFactory pattern and refactored the ledger to use it.
Index: EntityModel.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/entities/EntityModel.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** EntityModel.java 31 Dec 2003 00:39:29 -0000 1.3
--- EntityModel.java 2 Jan 2004 23:19:02 -0000 1.4
***************
*** 2,5 ****
--- 2,6 ----
import org.neuclear.commons.sql.entities.drivers.DDLDriver;
+ import org.neuclear.commons.sql.statements.StatementFactory;
import java.util.*;
***************
*** 29,32 ****
--- 30,36 ----
$Id$
$Log$
+ Revision 1.4 2004/01/02 23:19:02 pelle
+ Added StatementFactory pattern and refactored the ledger to use it.
+
Revision 1.3 2003/12/31 00:39:29 pelle
Added Drivers for handling different Database dialects in the entity model.
***************
*** 63,75 ****
this(name,"id",uri);
}
! public synchronized final void create(Connection con, DDLDriver driver) {
//first lets build all the Dependencies
for (int i = 0; i < foreign.size(); i++) {
ReferenceDefinition definition = (ReferenceDefinition) foreign.get(i);
! definition.getRef().create(con,driver);
}
final String ddl = createDDL(driver);
try {
! PreparedStatement stmt=con.prepareStatement(ddl);
stmt.execute();
System.out.println("Created: "+getName());
--- 67,79 ----
this(name,"id",uri);
}
! public synchronized final void create(StatementFactory fact, DDLDriver driver) {
//first lets build all the Dependencies
for (int i = 0; i < foreign.size(); i++) {
ReferenceDefinition definition = (ReferenceDefinition) foreign.get(i);
! definition.getRef().create(fact,driver);
}
final String ddl = createDDL(driver);
try {
! PreparedStatement stmt=fact.prepareStatement(ddl);
stmt.execute();
System.out.println("Created: "+getName());
Index: Schema.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/entities/Schema.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Schema.java 31 Dec 2003 00:39:29 -0000 1.2
--- Schema.java 2 Jan 2004 23:19:02 -0000 1.3
***************
*** 2,5 ****
--- 2,6 ----
import org.neuclear.commons.sql.entities.drivers.DDLDriver;
+ import org.neuclear.commons.sql.statements.StatementFactory;
import java.util.Set;
***************
*** 28,31 ****
--- 29,35 ----
$Id$
$Log$
+ Revision 1.3 2004/01/02 23:19:02 pelle
+ Added StatementFactory pattern and refactored the ledger to use it.
+
Revision 1.2 2003/12/31 00:39:29 pelle
Added Drivers for handling different Database dialects in the entity model.
***************
*** 62,70 ****
return model;
}
! public final void create(Connection con){
Iterator iter=entities.iterator();
while (iter.hasNext()) {
EntityModel model = (EntityModel) iter.next();
! model.create(con,driver);
}
}
--- 66,74 ----
return model;
}
! public final void create(StatementFactory fact){
Iterator iter=entities.iterator();
while (iter.hasNext()) {
EntityModel model = (EntityModel) iter.next();
! model.create(fact,driver);
}
}
|
|
From: <pe...@us...> - 2004-01-02 23:18:38
|
Update of /cvsroot/neuclear/neuclear-ledger
In directory sc8-pr-cvs1:/tmp/cvs-serv16479
Modified Files:
project.xml
Log Message:
Added StatementFactory pattern and refactored the ledger to use it.
Index: project.xml
===================================================================
RCS file: /cvsroot/neuclear/neuclear-ledger/project.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** project.xml 31 Dec 2003 16:48:37 -0000 1.13
--- project.xml 2 Jan 2004 23:18:35 -0000 1.14
***************
*** 1,5 ****
<?xml version="1.0"?>
<project>
-
<name>NeuClear Ledger</name>
<id>neuclear-ledger</id>
--- 1,4 ----
***************
*** 63,71 ****
<dependencies>
<dependency>
- <<<<<<< project.xml
- <id>hsqldb</id>
- <version>1.7.1</version>
- </dependency>
- =======
<id>hsqldb</id>
<version>1.7.1</version>
--- 62,65 ----
***************
*** 74,82 ****
</properties>
</dependency>
- >>>>>>> 1.12
<dependency>
<id>neuclear-id</id>
<version>0.8.1</version>
! <properties>
<war.bundle>true</war.bundle>
</properties> </dependency>
--- 68,75 ----
</properties>
</dependency>
<dependency>
<id>neuclear-id</id>
<version>0.8.1</version>
! <properties>
<war.bundle>true</war.bundle>
</properties> </dependency>
***************
*** 110,120 ****
</dependency>
<dependency>
- <<<<<<< project.xml
- <id>neuclear-commons</id>
- <version>0.6-SNAPSHOT</version>
- =======
<id>servletapi</id>
<version>2.3</version>
- >>>>>>> 1.12
</dependency>
<dependency>
--- 103,108 ----
|