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-07 16:16:01
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/entities
In directory sc8-pr-cvs1:/tmp/cvs-serv10668/src/java/org/neuclear/commons/sql/entities
Modified Files:
ColumnDefinition.java
Log Message:
I have updated all the current schemas, cleaned out the defunct ones and "completed"
the xfer and exch schemas.
Index: ColumnDefinition.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/entities/ColumnDefinition.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ColumnDefinition.java 31 Dec 2003 00:39:29 -0000 1.2
--- ColumnDefinition.java 7 Jan 2004 16:15:56 -0000 1.3
***************
*** 21,24 ****
--- 21,28 ----
$Id$
$Log$
+ Revision 1.3 2004/01/07 16:15:56 pelle
+ I have updated all the current schemas, cleaned out the defunct ones and "completed"
+ the xfer and exch schemas.
+
Revision 1.2 2003/12/31 00:39:29 pelle
Added Drivers for handling different Database dialects in the entity model.
***************
*** 84,87 ****
--- 88,93 ----
public static final int FIELD_LONG=13;
public static final int FIELD_BYTE=14;
+ public static final int FIELD_SHA1=15;
+
|
|
From: <pe...@us...> - 2004-01-07 16:16:01
|
Update of /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/entities/drivers
In directory sc8-pr-cvs1:/tmp/cvs-serv10668/src/java/org/neuclear/commons/sql/entities/drivers
Modified Files:
DDLDriver.java
Log Message:
I have updated all the current schemas, cleaned out the defunct ones and "completed"
the xfer and exch schemas.
Index: DDLDriver.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-commons/src/java/org/neuclear/commons/sql/entities/drivers/DDLDriver.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** DDLDriver.java 31 Dec 2003 00:39:29 -0000 1.1
--- DDLDriver.java 7 Jan 2004 16:15:56 -0000 1.2
***************
*** 27,30 ****
--- 27,34 ----
$Id$
$Log$
+ Revision 1.2 2004/01/07 16:15:56 pelle
+ I have updated all the current schemas, cleaned out the defunct ones and "completed"
+ the xfer and exch schemas.
+
Revision 1.1 2003/12/31 00:39:29 pelle
Added Drivers for handling different Database dialects in the entity model.
***************
*** 69,72 ****
--- 73,79 ----
buf.append(" NOT NULL");
}
+ protected void appendSHA1(StringBuffer buf){
+ appendString(buf,20);
+ }
protected void appendDefault(StringBuffer buf){
appendString(buf,50);
***************
*** 136,139 ****
--- 143,149 ----
case ColumnDefinition.FIELD_CHARACTER:
appendCharacter(buf);
+ break;
+ case ColumnDefinition.FIELD_SHA1:
+ appendSHA1(buf);
break;
default:
|
|
From: <pe...@us...> - 2004-01-07 16:15:53
|
Update of /cvsroot/neuclear/neuclear-pay/src/schemas In directory sc8-pr-cvs1:/tmp/cvs-serv10643/src/schemas Modified Files: exch.xsd xfer.xsd Log Message: I have updated all the current schemas, cleaned out the defunct ones and "completed" the xfer and exch schemas. Index: exch.xsd =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/schemas/exch.xsd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** exch.xsd 6 Jan 2004 23:26:49 -0000 1.1 --- exch.xsd 7 Jan 2004 16:15:50 -0000 1.2 *************** *** 0 **** --- 1,114 ---- + <?xml version="1.0" encoding="utf-8"?> + <!-- + $Id$ + $Log$ + Revision 1.2 2004/01/07 16:15:50 pelle + I have updated all the current schemas, cleaned out the defunct ones and "completed" + the xfer and exch schemas. + + --> + <xs:schema targetNamespace="http://neuclear.org/neu/exch.xsd" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns="http://neuclear.org/neu/exch.xsd" + xmlns:xfer="http://neuclear.org/neu/xfer.xsd" + xmlns:neuid="http://neuclear.org/neu/neuid.xsd" + elementFormDefault="qualified" version="0.3" id="xfer"> + <xs:import namespace="http://neuclear.org/neu/neuid.xsd" schemaLocation="../../../neuclear-id/src/schemas/neuid.xsd" /> + <xs:import namespace="http://neuclear.org/neu/xfer.xsd" schemaLocation="xfer.xsd"/> + + <xs:element name="Agent" type="neuid:NamedObjectReference" nillable="false"/> + <xs:element name="SettlementAsset" type="neuid:NamedObjectReference" nillable="false"/> + <xs:element name="BidAsset" type="neuid:NamedObjectReference" nillable="false"/> + + <xs:element name="ExchangeOrderRef" type="neuid:NamedObjectReference" nillable="false"/> + + <xs:element name="ExchangeOrder" nillable="false"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Provides a signed request from an account holder to an asset controller to prepare an exchange transaction. + This holds the specific funds to the expiry date set in the Order and transfers it to the ExchangeAgent, + who attempts to match the exchange. + </xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:complexContent> + <xs:extension base="neuid:NamedObjectType"> + <xs:sequence> + <xs:element ref="Agent" minOccurs="1" maxOccurs="1" /> + <xs:element ref="SettlementAsset" minOccurs="1" maxOccurs="1" /> + <xs:element ref="BidAsset" minOccurs="1" maxOccurs="1" /> + <xs:element name="Amount" type="xs:double" minOccurs="1" maxOccurs="1" nillable="false" /> + <xs:element name="Comment" type="xs:string" minOccurs="0" maxOccurs="1" nillable="true" /> + <xs:element name="expires" type="xs:dateTime" minOccurs="1" maxOccurs="1" nillable="false"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:complexType name="ExchangeOrderActionType"> + <xs:complexContent> + <xs:extension base="neuid:NamedObjectType"> + <xs:sequence> + <xs:element ref="ExchangeOrderRef" minOccurs="1" maxOccurs="1"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:element name="CancelExchangeOrder" type="ExchangeOrderActionType" nillable="false"/> + + <xs:element name="ExchangeCompletionOrder" nillable="false"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="ExchangeOrderActionType"> + <xs:sequence> + <xs:element name="Amount" type="xs:double" minOccurs="1" maxOccurs="1" nillable="false" /> + <xs:element name="ExchangeTime" type="xs:dateTime" minOccurs="1" maxOccurs="1" nillable="false"/> + <xs:element ref="ExchangeOrderReceipt" minOccurs="1" maxOccurs="1"/> + <xs:element name="Comment" type="xs:string" minOccurs="0" maxOccurs="1" nillable="true" /> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="ExchangeOrderReceipt" nillable="false"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="neuid:NamedObjectType"> + <xs:sequence> + <xs:element ref="ExchangeOrder" minOccurs="1" maxOccurs="1"/> + </xs:sequence> + <xs:attribute name="valuetime" type="xs:dateTime" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="CancelExchangeOrderReceipt" nillable="false" > + <xs:complexType> + <xs:complexContent> + <xs:extension base="neuid:NamedObjectType"> + <xs:sequence> + <xs:element ref="CancelExchangeOrder" minOccurs="1" maxOccurs="1"/> + </xs:sequence> + <xs:attribute name="valuetime" type="xs:dateTime" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="ExchangeCompletedReceiptType" nillable="false"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="neuid:NamedObjectType"> + <xs:sequence> + <xs:element ref="ExchangeCompletionOrder" minOccurs="1" maxOccurs="1"/> + </xs:sequence> + <xs:attribute name="valuetime" type="xs:dateTime" use="required"/> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + </xs:schema> Index: xfer.xsd =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/schemas/xfer.xsd,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** xfer.xsd 6 Jan 2004 23:26:49 -0000 1.1 --- xfer.xsd 7 Jan 2004 16:15:50 -0000 1.2 *************** *** 3,6 **** --- 3,10 ---- $Id$ $Log$ + Revision 1.2 2004/01/07 16:15:50 pelle + I have updated all the current schemas, cleaned out the defunct ones and "completed" + the xfer and exch schemas. + Revision 1.1 2004/01/06 23:26:49 pelle Started restructuring the original xml schemas. *************** *** 11,36 **** xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://neuclear.org/neu/xfer.xsd" elementFormDefault="qualified" version="0.3" id="xfer"> ! <xs:complexType name="TransferOrderType"> ! <xs:complexContent> ! <xs:extension base="neuid:NamedObjectType"> ! <xs:sequence> ! <xs:element name="Recipient" type="xs:anyURI" minOccurs="1" maxOccurs="1" nillable="false"/> ! <xs:element name="Asset" type="xs:anyURI" minOccurs="1" maxOccurs="1" nillable="false" /> ! <xs:element name="Amount" type="xs:double" minOccurs="1" maxOccurs="1" nillable="false" /> ! <xs:element name="Comment" type="xs:text" minOccurs="0" maxOccurs="1" nillable="true" /> ! </xs:sequence> ! </xs:extension> ! </xs:complexContent> ! </xs:complexType> ! <xs:complexType name="TransferReceiptType"> ! <xs:sequence> ! <xs:element ref="TransferOrder"/> ! </xs:sequence> ! <xs:attribute name="valuetime" type="xs:dateTime" use="required"/> ! </xs:complexType> ! <xs:element name="TransferOrder" type="TransferOrderType" nillable="false"/> ! <xs:element name="TransferReceipt" type="TransferReceiptType" nillable="false"/> </xs:schema> --- 15,50 ---- xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://neuclear.org/neu/xfer.xsd" + xmlns:neuid="http://neuclear.org/neu/neuid.xsd" elementFormDefault="qualified" version="0.3" id="xfer"> + <xs:import namespace="http://neuclear.org/neu/neuid.xsd" schemaLocation="../../../neuclear-id/src/schemas/neuid.xsd" /> ! <xs:element name="Recipient" type="neuid:NamedObjectReference" nillable="false"/> + <xs:element name="TransferOrder" nillable="false"> + <xs:complexType> + <xs:complexContent> + <xs:extension base="neuid:NamedObjectType"> + <xs:sequence> + <xs:element name="Recipient" type="neuid:NamedObjectReference" minOccurs="1" maxOccurs="1" nillable="false"/> + <xs:element ref="Asset" minOccurs="1" maxOccurs="1"/> + <xs:element name="Amount" type="xs:double" minOccurs="1" maxOccurs="1" nillable="false" /> + <xs:element name="Comment" type="xs:string" minOccurs="0" maxOccurs="1" nillable="true" /> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> + + <xs:element name="TransferReceipt" nillable="false"> + <xs:complexType > + <xs:complexContent> + <xs:extension base="neuid:NamedObjectType"> + <xs:sequence> + <xs:element name="ValueTime" type="xs:dateTime" minOccurs="1" maxOccurs="1"/> + <xs:element ref="TransferOrder" minOccurs="1" maxOccurs="1"/> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + </xs:element> </xs:schema> |
|
From: <pe...@us...> - 2004-01-06 23:27:23
|
Update of /cvsroot/neuclear/neuclear-id/src/schemas In directory sc8-pr-cvs1:/tmp/cvs-serv4802/src/schemas Added Files: neuid.xsd Removed Files: nsdl.xsd Log Message: Started restructuring the original xml schemas. Updated the Exchange and transfer orders. --- NEW FILE: neuid.xsd --- <?xml version="1.0" encoding="utf-8"?> <!-- By Pelle Braendgaard (Antilles Software Ventures SA) --> <!--$Id: neuid.xsd,v 1.1 2004/01/06 23:27:20 pelle Exp $ $Log: neuid.xsd,v $ Revision 1.1 2004/01/06 23:27:20 pelle Started restructuring the original xml schemas. Updated the Exchange and transfer orders. --> <xs:schema targetNamespace="http://neuclear.org/neu/neuid.xsd" xmlns:nsdl="http://neuclear.org/neu/neuid.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns="http://neuclear.org/neu/neuid.xsd" elementFormDefault="qualified" version="0.6" id="neuid"> <xs:complexType name="NamedObjectType"> <xs:sequence> <!-- I think we dont need this --> <!-- <xs:any namespace="##any"/>--> <xs:element name="Targets" type="TargetList"/> <xs:element ref="ds:Signature" maxOccurs="1" minOccurs="1"/> </xs:sequence> <xs:attribute name="name" type="xs:string"/> <xs:attribute name="timestamp" type="xs:time" /> </xs:complexType> <xs:complexType name="TargetType"> <xs:attribute name="href" type="xs:anyURI"/> <xs:attribute name="type" type="xs:string"/> </xs:complexType> <xs:element name="Target" type= "TargetType"/> <xs:complexType name="KeyHolder"> <xs:sequence> <xs:element ref="ds:KeyInfo" maxOccurs="unbounded"/> </xs:sequence> <xs:attribute name="ns" type="xs:string"/> </xs:complexType> <xs:complexType name="IdentityType"> <xs:complexContent> <xs:extension base="NamedObjectType"> <xs:sequence> <xs:element name="Allow" type="KeyHolder" maxOccurs="unbounded"/> </xs:sequence> <!-- Default WebServices for this namespace. These can be specified using either HTTP to a SOAP web port or given a neu://etc/etc... URI they can read the definition from a public definition. --> <!-- The Repository for this NameSpace --> <xs:attribute name="repository" type="xs:anyURI"/> <!-- The Receiver for this NameSpace --> <xs:attribute name="receiver" type="xs:anyURI"/> <!-- The store for this NameSpace --> <xs:attribute name="store" type="xs:anyURI"/> <!-- The interactive signer for this NameSpace. If Empty the NameSpace doesn't allow interactive signing. --> <xs:attribute name="signer" type="xs:anyURI"/> <!-- The Logging Service for this NameSpace --> <xs:attribute name="logger" type="xs:anyURI"/> </xs:extension> </xs:complexContent> </xs:complexType> <xs:element name="Identity" type="IdentityType"/> <xs:complexType name="TargetList"> <xs:sequence> <xs:element ref="Target" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:schema> --- nsdl.xsd DELETED --- |
|
From: <pe...@us...> - 2004-01-06 23:26:52
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/orders
In directory sc8-pr-cvs1:/tmp/cvs-serv4675/src/java/org/neuclear/exchange/orders
Modified Files:
CancelExchangeOrder.java CancelExchangeReceipt.java
ExchangeCompletionOrder.java ExchangeOrder.java
ExchangeOrderReceipt.java
Added Files:
ExchangeCompletedReceipt.java ExchangeGlobals.java
ExchangeTransactionContract.java
Log Message:
Started restructuring the original xml schemas.
Updated the Exchange and transfer orders.
--- NEW FILE: ExchangeCompletedReceipt.java ---
package org.neuclear.exchange.orders;
import org.neuclear.id.SignedNamedCore;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.exchange.contracts.ExchangeAgent;
/*
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: ExchangeCompletedReceipt.java,v 1.1 2004/01/06 23:26:48 pelle Exp $
$Log: ExchangeCompletedReceipt.java,v $
Revision 1.1 2004/01/06 23:26:48 pelle
Started restructuring the original xml schemas.
Updated the Exchange and transfer orders.
*/
/**
* User: pelleb
* Date: Jan 6, 2004
* Time: 7:38:36 PM
*/
public final class ExchangeCompletedReceipt extends ExchangeTransactionContract{
public ExchangeCompletedReceipt(SignedNamedCore core, Asset asset, ExchangeAgent agent, double settledAmount, long valuetime) {
super(core, asset, agent);
this.settledAmount = settledAmount;
this.valuetime = valuetime;
}
private final double settledAmount;
private final long valuetime;
}
--- NEW FILE: ExchangeGlobals.java ---
package org.neuclear.exchange.orders;
import org.dom4j.*;
import org.neuclear.id.verifier.VerifyingReader;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.orders.TransferGlobals;
/*
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: ExchangeGlobals.java,v 1.1 2004/01/06 23:26:48 pelle Exp $
$Log: ExchangeGlobals.java,v $
Revision 1.1 2004/01/06 23:26:48 pelle
Started restructuring the original xml schemas.
Updated the Exchange and transfer orders.
Revision 1.1 2004/01/05 23:47:09 pelle
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.
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.
Revision 1.4 2003/11/22 00:22:28 pelle
All unit tests in commons, id and xmlsec now work.
AssetController now successfully processes payments in the unit test.
Payment Web App has working form that creates a TransferOrder presents it to the signer
and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust.
Revision 1.3 2003/11/21 04:43:04 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Revision 1.2 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.1 2003/11/09 03:32:56 pelle
More missing files from earlier commits. IDEA is acting strangly.
Revision 1.3 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.2 2003/10/25 00:38:43 pelle
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
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.
PaymentReceiver 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 PaymentReceiver.
*/
/**
* User: pelleb
* Date: Oct 3, 2003
* Time: 3:55:06 PM
*/
public final class ExchangeGlobals {
private ExchangeGlobals() {
// Instantiation is not allowed
}
public static Namespace createNameSpace() {
return DocumentHelper.createNamespace(EX_NSPREFIX, EX_NSURI);
}
public static QName createQName(final String name) {
return DocumentHelper.createQName(name, createNameSpace());
}
public static Attribute createAttribute(final Element elem, final String name, final String value) {
return DocumentHelper.createAttribute(elem, createQName(name), value);
}
public static Element createElement(final String name, final String value) {
Element elem = createElement(name);
elem.setText(value);
return elem;
}
public static Element createElement(final String name) {
return DocumentHelper.createElement(createQName(name));
}
public static void registerReaders() {
VerifyingReader.getInstance().registerReader(ExchangeGlobals.CANCEL_TAGNAME, new AssetTransactionContract.Reader());
VerifyingReader.getInstance().registerReader(ExchangeGlobals.CANCEL_RCPT_TAGNAME, new AssetTransactionContract.Reader());
VerifyingReader.getInstance().registerReader(ExchangeGlobals.EXCHANGE_TAGNAME, new AssetTransactionContract.Reader());
VerifyingReader.getInstance().registerReader(ExchangeGlobals.EXCHANGE_RCPT_TAGNAME, new AssetTransactionContract.Reader());
VerifyingReader.getInstance().registerReader(ExchangeGlobals.COMPLETE_TAGNAME, new AssetTransactionContract.Reader());
VerifyingReader.getInstance().registerReader(ExchangeGlobals.COMPLETE_RCPT_TAGNAME, new AssetTransactionContract.Reader());
}
static {
registerReaders();
}
public static final String EXCHANGE_TAGNAME = "ExchangeOrder";
public static final String EXCHANGE_RCPT_TAGNAME = "ExchangeOrderReceipt";
public static final String COMPLETE_TAGNAME = "ExchangeCompletionOrder";
public static final String COMPLETE_RCPT_TAGNAME = "ExchangeCompletedReceipt";
public static final String CANCEL_TAGNAME = "CancelExchangeOrder";
public static final String CANCEL_RCPT_TAGNAME = "CancelExchangeReceipt";
public static final String EX_NSPREFIX = "ex";
public static final String EX_NSURI = "http://neuclear.org/neu/exch";
}
--- NEW FILE: ExchangeTransactionContract.java ---
package org.neuclear.exchange.orders;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.id.SignedNamedCore;
import org.neuclear.exchange.contracts.ExchangeAgent;
/*
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: ExchangeTransactionContract.java,v 1.1 2004/01/06 23:26:48 pelle Exp $
$Log: ExchangeTransactionContract.java,v $
Revision 1.1 2004/01/06 23:26:48 pelle
Started restructuring the original xml schemas.
Updated the Exchange and transfer orders.
*/
/**
* User: pelleb
* Date: Jan 6, 2004
* Time: 7:31:15 PM
*/
public abstract class ExchangeTransactionContract extends AssetTransactionContract{
ExchangeTransactionContract(SignedNamedCore core, Asset asset,ExchangeAgent agent) {
super(core, asset);
this.agent=agent;
}
public final ExchangeAgent getAgent(){
return agent;
}
private final ExchangeAgent agent;
}
Index: CancelExchangeOrder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/orders/CancelExchangeOrder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CancelExchangeOrder.java 5 Jan 2004 23:47:10 -0000 1.1
--- CancelExchangeOrder.java 6 Jan 2004 23:26:48 -0000 1.2
***************
*** 7,10 ****
--- 7,11 ----
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.contracts.Asset;
+ import org.neuclear.exchange.contracts.ExchangeAgent;
import java.sql.Timestamp;
***************
*** 16,23 ****
* Time: 5:35:26 PM
*/
! public final class CancelExchangeOrder extends AssetTransactionContract{
! private CancelExchangeOrder(final SignedNamedCore core, final Asset asset, final String exchangeid) {
! super(core, asset);
this.exchangeid = exchangeid;
}
--- 17,24 ----
* Time: 5:35:26 PM
*/
! public final class CancelExchangeOrder extends ExchangeTransactionContract{
! private CancelExchangeOrder(final SignedNamedCore core, final Asset asset,final ExchangeAgent agent, final String exchangeid) {
! super(core, asset,agent);
this.exchangeid = exchangeid;
}
Index: CancelExchangeReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/orders/CancelExchangeReceipt.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CancelExchangeReceipt.java 5 Jan 2004 23:47:10 -0000 1.1
--- CancelExchangeReceipt.java 6 Jan 2004 23:26:48 -0000 1.2
***************
*** 10,13 ****
--- 10,14 ----
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.exchange.orders.CancelExchangeOrder;
+ import org.neuclear.exchange.contracts.ExchangeAgent;
import java.sql.Timestamp;
***************
*** 19,26 ****
* Time: 5:35:26 PM
*/
! public final class CancelExchangeReceipt extends AssetTransactionContract{
! private CancelExchangeReceipt(final SignedNamedCore core, final Asset asset, final Date canceltime,final String exchangeid, final String cancelid) {
! super(core, asset);
this.canceltime=canceltime.getTime();
this.exchangeid=exchangeid;
--- 20,27 ----
* Time: 5:35:26 PM
*/
! public final class CancelExchangeReceipt extends ExchangeTransactionContract{
! private CancelExchangeReceipt(final SignedNamedCore core, final Asset asset, ExchangeAgent agent,final Date canceltime,final String exchangeid, final String cancelid) {
! super(core, asset,agent);
this.canceltime=canceltime.getTime();
this.exchangeid=exchangeid;
Index: ExchangeCompletionOrder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/orders/ExchangeCompletionOrder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ExchangeCompletionOrder.java 5 Jan 2004 23:47:10 -0000 1.1
--- ExchangeCompletionOrder.java 6 Jan 2004 23:26:48 -0000 1.2
***************
*** 7,10 ****
--- 7,11 ----
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.contracts.Asset;
+ import org.neuclear.exchange.contracts.ExchangeAgent;
import java.sql.Timestamp;
***************
*** 16,22 ****
* Time: 5:35:26 PM
*/
! public final class ExchangeCompletionOrder extends AssetTransactionContract {
! public ExchangeCompletionOrder(final SignedNamedCore core, final Asset asset, final Date valuetime, final double amount, final String holdid, final String counterpartyid) {
! super(core, asset);
this.valuetime = valuetime.getTime();
this.amount = amount;
--- 17,23 ----
* Time: 5:35:26 PM
*/
! public final class ExchangeCompletionOrder extends ExchangeTransactionContract {
! private ExchangeCompletionOrder(final SignedNamedCore core, final Asset asset, final ExchangeAgent agent, final Date valuetime, final double amount, final String holdid, final String counterpartyid) {
! super(core, asset,agent);
this.valuetime = valuetime.getTime();
this.amount = amount;
Index: ExchangeOrder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/orders/ExchangeOrder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ExchangeOrder.java 5 Jan 2004 23:47:10 -0000 1.1
--- ExchangeOrder.java 6 Jan 2004 23:26:48 -0000 1.2
***************
*** 20,28 ****
* Time: 12:01:03 PM
*/
! public final class ExchangeOrder extends AssetTransactionContract {
private ExchangeOrder(final SignedNamedCore core,
final Asset bidAsset, final ExchangeAgent agent, final double bid,
final Asset neededAsset, final double neededAmount, final String comment, final Date expires) {
! super(core, bidAsset);
this.neededAsset = neededAsset;
this.neededAmount = neededAmount;
--- 20,28 ----
* Time: 12:01:03 PM
*/
! public final class ExchangeOrder extends ExchangeTransactionContract {
private ExchangeOrder(final SignedNamedCore core,
final Asset bidAsset, final ExchangeAgent agent, final double bid,
final Asset neededAsset, final double neededAmount, final String comment, final Date expires) {
! super(core, bidAsset,agent);
this.neededAsset = neededAsset;
this.neededAmount = neededAmount;
***************
*** 30,34 ****
this.comment = (comment != null) ? comment : "";
this.expires = expires.getTime();
- this.agent = agent;
}
--- 30,33 ----
***************
*** 57,64 ****
}
- public ExchangeAgent getAgent() {
- return agent;
- }
-
private final Asset neededAsset;
private final double neededAmount;
--- 56,59 ----
***************
*** 66,70 ****
private final String comment;
private final long expires;
- private final ExchangeAgent agent;
}
--- 61,64 ----
Index: ExchangeOrderReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/orders/ExchangeOrderReceipt.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ExchangeOrderReceipt.java 5 Jan 2004 23:47:10 -0000 1.1
--- ExchangeOrderReceipt.java 6 Jan 2004 23:26:48 -0000 1.2
***************
*** 1,11 ****
package org.neuclear.exchange.orders;
- import org.neuclear.commons.NeuClearException;
- import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedCore;
- import org.neuclear.asset.orders.exchanges.Exchange;
- import org.neuclear.asset.orders.TransferContract;
- import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.contracts.Asset;
import java.sql.Timestamp;
--- 1,7 ----
package org.neuclear.exchange.orders;
import org.neuclear.id.SignedNamedCore;
import org.neuclear.asset.contracts.Asset;
+ import org.neuclear.exchange.contracts.ExchangeAgent;
import java.sql.Timestamp;
***************
*** 17,25 ****
* Time: 11:59:36 AM
*/
! public final class ExchangeOrderReceipt extends AssetTransactionContract {
! private ExchangeOrderReceipt(final SignedNamedCore core, final Asset asset, Identity agent, String orderid, Date valuetime, Asset neededAsset, double neededAmount, double bidAmount, String comment, Date expires) {
! super(core, asset);
! this.agent = agent;
this.orderid = orderid;
this.valuetime = valuetime.getTime();
--- 13,20 ----
* Time: 11:59:36 AM
*/
! public final class ExchangeOrderReceipt extends ExchangeTransactionContract {
! private ExchangeOrderReceipt(final SignedNamedCore core, final Asset asset, final ExchangeAgent agent, final String orderid, final Date valuetime, Asset neededAsset, double neededAmount, double bidAmount, final String comment, final Date expires) {
! super(core, asset,agent);
this.orderid = orderid;
this.valuetime = valuetime.getTime();
***************
*** 35,41 ****
}
- public Identity getAgent() {
- return agent;
- }
public String getOrderid() {
--- 30,33 ----
***************
*** 67,71 ****
}
- private final Identity agent;
private final String orderid;
private final long valuetime;
--- 59,62 ----
|
|
From: <pe...@us...> - 2004-01-06 23:26:52
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/orders
In directory sc8-pr-cvs1:/tmp/cvs-serv4675/src/java/org/neuclear/asset/orders
Modified Files:
TransferGlobals.java TransferReceipt.java
Removed Files:
TransferContract.java
Log Message:
Started restructuring the original xml schemas.
Updated the Exchange and transfer orders.
Index: TransferGlobals.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/orders/TransferGlobals.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TransferGlobals.java 5 Jan 2004 23:47:09 -0000 1.1
--- TransferGlobals.java 6 Jan 2004 23:26:48 -0000 1.2
***************
*** 26,29 ****
--- 26,33 ----
$Id$
$Log$
+ Revision 1.2 2004/01/06 23:26:48 pelle
+ Started restructuring the original xml schemas.
+ Updated the Exchange and transfer orders.
+
Revision 1.1 2004/01/05 23:47:09 pelle
Create new Document classification "order", which is really just inherint in the new
***************
*** 116,127 ****
public static void registerReaders() {
! VerifyingReader.getInstance().registerReader(TransferGlobals.CANCEL_RCPT_TAGNAME, new AssetTransactionContract.Reader());
! VerifyingReader.getInstance().registerReader(TransferGlobals.CANCEL_TAGNAME, new AssetTransactionContract.Reader());
! VerifyingReader.getInstance().registerReader(TransferGlobals.XFER_TAGNAME, new AssetTransactionContract.Reader());
! VerifyingReader.getInstance().registerReader(TransferGlobals.HELD_XFER_TAGNAME, new AssetTransactionContract.Reader());
! VerifyingReader.getInstance().registerReader(TransferGlobals.XFER_RCPT_TAGNAME, new AssetTransactionContract.Reader());
! VerifyingReader.getInstance().registerReader(TransferGlobals.HELD_XFER_RCPT_TAGNAME, new AssetTransactionContract.Reader());
! VerifyingReader.getInstance().registerReader(TransferGlobals.COMPLETE_TAGNAME, new AssetTransactionContract.Reader());
!
}
--- 120,125 ----
public static void registerReaders() {
! VerifyingReader.getInstance().registerReader(TransferGlobals.XFER_TAGNAME, new TransferOrder.Reader());
! VerifyingReader.getInstance().registerReader(TransferGlobals.XFER_RCPT_TAGNAME, new TransferReceipt.Reader());
}
***************
*** 132,141 ****
public static final String XFER_TAGNAME = "TransferOrder";
public static final String XFER_RCPT_TAGNAME = "TransferReceipt";
- public static final String HELD_XFER_TAGNAME = "ExchangeOrder";
- public static final String HELD_XFER_RCPT_TAGNAME = "ExchangeOrderReceipt";
- public static final String COMPLETE_TAGNAME = "CompleteHoldRequest";
- public static final String CANCEL_TAGNAME = "CancelHoldRequest";
- public static final String CANCEL_RCPT_TAGNAME = "CancelHoldReceipt";
public static final String XFER_NSPREFIX = "xfer";
! public static final String XFER_NSURI = "http://neuclear.org/neu/xfer";
}
--- 130,134 ----
public static final String XFER_TAGNAME = "TransferOrder";
public static final String XFER_RCPT_TAGNAME = "TransferReceipt";
public static final String XFER_NSPREFIX = "xfer";
! public static final String XFER_NSURI = "http://neuclear.org/neu/xfer.xsd";
}
Index: TransferReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/orders/TransferReceipt.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** TransferReceipt.java 5 Jan 2004 23:47:09 -0000 1.1
--- TransferReceipt.java 6 Jan 2004 23:26:48 -0000 1.2
***************
*** 22,45 ****
public class TransferReceipt extends AssetTransactionContract {
! private 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);
! this.from = from;
! this.reqid = reqid;
! this.to=to;
this.valuetime=valuetime.getTime();
! this.amount = amount;
! this.comment = (comment != null) ? comment : "";
! }
!
! public final Identity getFrom() {
! return from;
! }
!
! public final String getRequestId() {
! return reqid;
}
! public final Identity getTo() {
! return to;
}
public final Date getValueTime() {
--- 22,33 ----
public class TransferReceipt extends AssetTransactionContract {
! private TransferReceipt(final SignedNamedCore core, final TransferOrder order, final Date valuetime) {
! super(core, order.getAsset());
this.valuetime=valuetime.getTime();
! this.order=order;
}
! public final TransferOrder getOrder(){
! return order;
}
public final Date getValueTime() {
***************
*** 47,65 ****
}
- public final double getAmount() {
- return amount;
- }
-
- public final String getComment() {
- return comment;
- }
-
-
- private final double amount;
- private final String comment;
private final long valuetime;
! private final Identity from;
! private final String reqid;
! private final Identity to;
public static final class Reader implements NamedObjectReader {
/**
--- 35,41 ----
}
private final long valuetime;
! private final TransferOrder order;
!
public static final class Reader implements NamedObjectReader {
/**
--- TransferContract.java DELETED ---
|
|
From: <pe...@us...> - 2004-01-06 23:26:52
|
Update of /cvsroot/neuclear/neuclear-pay/src/schemas In directory sc8-pr-cvs1:/tmp/cvs-serv4675/src/schemas Added Files: asset.xsd exch.xsd xfer.xsd Log Message: Started restructuring the original xml schemas. Updated the Exchange and transfer orders. --- NEW FILE: asset.xsd --- --- NEW FILE: exch.xsd --- --- NEW FILE: xfer.xsd --- <?xml version="1.0" encoding="utf-8"?> <!-- $Id: xfer.xsd,v 1.1 2004/01/06 23:26:49 pelle Exp $ $Log: xfer.xsd,v $ Revision 1.1 2004/01/06 23:26:49 pelle Started restructuring the original xml schemas. Updated the Exchange and transfer orders. --> <xs:schema targetNamespace="http://neuclear.org/neu/xfer.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://neuclear.org/neu/xfer.xsd" elementFormDefault="qualified" version="0.3" id="xfer"> <xs:complexType name="TransferOrderType"> <xs:complexContent> <xs:extension base="neuid:NamedObjectType"> <xs:sequence> <xs:element name="Recipient" type="xs:anyURI" minOccurs="1" maxOccurs="1" nillable="false"/> <xs:element name="Asset" type="xs:anyURI" minOccurs="1" maxOccurs="1" nillable="false" /> <xs:element name="Amount" type="xs:double" minOccurs="1" maxOccurs="1" nillable="false" /> <xs:element name="Comment" type="xs:text" minOccurs="0" maxOccurs="1" nillable="true" /> </xs:sequence> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="TransferReceiptType"> <xs:sequence> <xs:element ref="TransferOrder"/> </xs:sequence> <xs:attribute name="valuetime" type="xs:dateTime" use="required"/> </xs:complexType> <xs:element name="TransferOrder" type="TransferOrderType" nillable="false"/> <xs:element name="TransferReceipt" type="TransferReceiptType" nillable="false"/> </xs:schema> |
|
From: <pe...@us...> - 2004-01-06 20:51:39
|
Update of /cvsroot/neuclear/neuclear-pay/src/samples In directory sc8-pr-cvs1:/tmp/cvs-serv1760/src/samples Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/samples added to the repository |
|
From: <pe...@us...> - 2004-01-06 20:46:59
|
Update of /cvsroot/neuclear/neuclear-pay/src/schemas In directory sc8-pr-cvs1:/tmp/cvs-serv32654/src/schemas Log Message: Directory /cvsroot/neuclear/neuclear-pay/src/schemas added to the repository |
|
From: <pe...@us...> - 2004-01-05 23:47:35
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/contracts
In directory sc8-pr-cvs1:/tmp/cvs-serv15468/src/java/org/neuclear/contracts
Added Files:
Clause.java SuperClause.java TextClause.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.
--- NEW FILE: Clause.java ---
package org.neuclear.contracts;
/*
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: Clause.java,v 1.1 2004/01/05 23:47:32 pelle Exp $
$Log: Clause.java,v $
Revision 1.1 2004/01/05 23:47:32 pelle
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.
*/
/**
* User: pelleb
* Date: Jan 5, 2004
* Time: 7:21:00 PM
*/
public abstract class Clause {
protected Clause(String title){
this.title=title;
}
abstract public String getText();
public String getTitle() {
return title;
}
private final String title;
}
--- NEW FILE: SuperClause.java ---
package org.neuclear.contracts;
import org.neuclear.contracts.Clause;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
/*
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: SuperClause.java,v 1.1 2004/01/05 23:47:32 pelle Exp $
$Log: SuperClause.java,v $
Revision 1.1 2004/01/05 23:47:32 pelle
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.
*/
/**
* User: pelleb
* Date: Jan 5, 2004
* Time: 7:45:09 PM
*/
public class SuperClause extends Clause {
public SuperClause(String title, List subclauses) {
super(title);
// Create new List
this.subclauses = new ArrayList(subclauses.size());
// Copy
for (int i = 0; i < subclauses.size(); i++)
this.subclauses.add(subclauses.get(i));
}
public String getText() {
StringBuffer buf=new StringBuffer(subclauses.size()*80);
for (int i = 0; i < subclauses.size(); i++) {
buf.append(((Clause) subclauses.get(i)).getText());
}
return buf.toString();
}
private final List subclauses;
}
--- NEW FILE: TextClause.java ---
package org.neuclear.contracts;
import org.neuclear.contracts.Clause;
/*
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: TextClause.java,v 1.1 2004/01/05 23:47:32 pelle Exp $
$Log: TextClause.java,v $
Revision 1.1 2004/01/05 23:47:32 pelle
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.
*/
/**
* User: pelleb
* Date: Jan 5, 2004
* Time: 7:42:48 PM
*/
public class TextClause extends Clause {
public TextClause(String title, String text) {
super(title);
this.text = text;
}
public String getText() {
return null;
}
private final String text;
}
|
|
From: <pe...@us...> - 2004-01-05 23:47:15
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/controllers/currency
In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/test/org/neuclear/asset/controllers/currency
Modified Files:
CurrencyTests.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: CurrencyTests.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/controllers/currency/CurrencyTests.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CurrencyTests.java 3 Jan 2004 20:36:26 -0000 1.4
--- CurrencyTests.java 5 Jan 2004 23:47:10 -0000 1.5
***************
*** 4,9 ****
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;
import org.neuclear.ledger.*;
--- 4,9 ----
import org.neuclear.asset.*;
import org.neuclear.asset.controllers.currency.CurrencyController;
! import org.neuclear.exchange.orders.ExchangeOrderReceipt;
! import org.neuclear.asset.orders.TransferReceipt;
import org.neuclear.commons.configuration.ConfigurationException;
import org.neuclear.ledger.*;
***************
*** 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);
--- 108,112 ----
assertEquals(bob.getBalance(t1), initial, 0);
! ExchangeOrderReceipt hold = bob.hold(alice, payment, t2, t4, "Test Hold");
assertEquals(bob.getBalance(t2), initial, 0);
assertEquals(bob.getBalance(t3), initial, 0);
|
|
From: <pe...@us...> - 2004-01-05 23:47:15
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/receiver
In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/test/org/neuclear/asset/receiver
Modified Files:
PaymentReceiverTest.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: PaymentReceiverTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/receiver/PaymentReceiverTest.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** PaymentReceiverTest.java 3 Jan 2004 20:36:26 -0000 1.11
--- PaymentReceiverTest.java 5 Jan 2004 23:47:10 -0000 1.12
***************
*** 2,10 ****
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.contracts.AssetGlobals;
! import org.neuclear.asset.contracts.TransferGlobals;
! import org.neuclear.asset.contracts.TransferRequest;
! import org.neuclear.asset.contracts.builders.TransferRequestBuilder;
import org.neuclear.asset.controllers.currency.CurrencyController;
import org.neuclear.commons.NeuClearException;
--- 2,13 ----
import org.neuclear.asset.InvalidTransferException;
+ import org.neuclear.asset.orders.transfers.TransferGlobals;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.contracts.AssetGlobals;
! import org.neuclear.asset.orders.TransferGlobals;
! import org.neuclear.asset.orders.TransferOrder;
! import org.neuclear.asset.orders.TransferOrder;
! import org.neuclear.asset.orders.builders.TransferRequestBuilder;
! import org.neuclear.asset.orders.builders.TransferRequestBuilder;
import org.neuclear.asset.controllers.currency.CurrencyController;
import org.neuclear.commons.NeuClearException;
***************
*** 48,51 ****
--- 51,59 ----
$Id$
$Log$
+ Revision 1.12 2004/01/05 23:47:10 pelle
+ 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.
+
Revision 1.11 2004/01/03 20:36:26 pelle
Renamed HeldTransfer to Exchange
***************
*** 69,73 ****
All unit tests in commons, id and xmlsec now work.
AssetController now successfully processes payments in the unit test.
! Payment Web App has working form that creates a TransferRequest presents it to the signer
and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust.
--- 77,81 ----
All unit tests in commons, id and xmlsec now work.
AssetController now successfully processes payments in the unit test.
! Payment Web App has working form that creates a TransferOrder presents it to the signer
and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust.
***************
*** 112,117 ****
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.
--- 120,125 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferOrder/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
! their matching TransferOrder/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.
***************
*** 189,194 ****
public final Object getPreTransactionState(final SignedNamedObject obj) throws Exception {
! if (obj instanceof TransferRequest) {
! final TransferRequest transfer = (TransferRequest) obj;
final double fromBalance = proc.getBalance(transfer.getFrom(), transfer.getTimeStamp());
final double toBalance = proc.getBalance(transfer.getTo(), transfer.getTimeStamp());
--- 197,202 ----
public final Object getPreTransactionState(final SignedNamedObject obj) throws Exception {
! if (obj instanceof TransferOrder) {
! final TransferOrder transfer = (TransferOrder) obj;
final double fromBalance = proc.getBalance(transfer.getFrom(), transfer.getTimeStamp());
final double toBalance = proc.getBalance(transfer.getTo(), transfer.getTimeStamp());
***************
*** 201,206 ****
public final boolean verifyTransaction(final SignedNamedObject obj, final Object state) throws Exception {
! if (obj instanceof TransferRequest) {
! final TransferRequest transfer = (TransferRequest) obj;
final double fromBalance = proc.getBalance(transfer.getFrom(), transfer.getTimeStamp());
final double toBalance = proc.getBalance(transfer.getTo(), transfer.getTimeStamp());
--- 209,214 ----
public final boolean verifyTransaction(final SignedNamedObject obj, final Object state) throws Exception {
! if (obj instanceof TransferOrder) {
! final TransferOrder transfer = (TransferOrder) obj;
final double fromBalance = proc.getBalance(transfer.getFrom(), transfer.getTimeStamp());
final double toBalance = proc.getBalance(transfer.getTo(), transfer.getTimeStamp());
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/orders
In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/java/org/neuclear/exchange/orders
Added Files:
CancelExchangeOrder.java CancelExchangeReceipt.java
ExchangeCompletionOrder.java ExchangeOrder.java
ExchangeOrderReceipt.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.
--- NEW FILE: CancelExchangeOrder.java ---
package org.neuclear.exchange.orders;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.SignedNamedCore;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.contracts.Asset;
import java.sql.Timestamp;
import java.util.Date;
/**
* User: pelleb
* Date: Jul 21, 2003
* Time: 5:35:26 PM
*/
public final class CancelExchangeOrder extends AssetTransactionContract{
private CancelExchangeOrder(final SignedNamedCore core, final Asset asset, final String exchangeid) {
super(core, asset);
this.exchangeid = exchangeid;
}
public ExchangeOrderReceipt getExchangeReceipt(){
//TODO Implement
return null;
}
public String getExchangeid() {
return exchangeid;
}
private final String exchangeid;
}
--- NEW FILE: CancelExchangeReceipt.java ---
package org.neuclear.exchange.orders;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.SignedNamedCore;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.exchange.orders.CancelExchangeOrder;
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{
private CancelExchangeReceipt(final SignedNamedCore core, final Asset asset, final Date canceltime,final String exchangeid, final String cancelid) {
super(core, asset);
this.canceltime=canceltime.getTime();
this.exchangeid=exchangeid;
this.cancelid=cancelid;
}
public CancelExchangeOrder getCancellationOrder(){
//TODO implement
return null;
}
public CancelExchangeOrder getExchangeReceipt(){
//TODO implement
return null;
}
public Timestamp getCanceltime() {
return new Timestamp(canceltime);
}
public String getExchangeid() {
return exchangeid;
}
public String getCancelid() {
return cancelid;
}
private final long canceltime;
private final String exchangeid;
private final String cancelid;
}
--- NEW FILE: ExchangeCompletionOrder.java ---
package org.neuclear.exchange.orders;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedCore;
import org.neuclear.asset.orders.TransferContract;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.contracts.Asset;
import java.sql.Timestamp;
import java.util.Date;
/**
* User: pelleb
* Date: Jul 21, 2003
* Time: 5:35:26 PM
*/
public final class ExchangeCompletionOrder extends AssetTransactionContract {
public ExchangeCompletionOrder(final SignedNamedCore core, final Asset asset, final Date valuetime, final double amount, final String holdid, final String counterpartyid) {
super(core, asset);
this.valuetime = valuetime.getTime();
this.amount = amount;
this.holdid = holdid;
this.counterpartyid = counterpartyid;
}
public Timestamp getValuetime() {
return new Timestamp(valuetime);
}
public double getAmount() {
return amount;
}
public String getHoldid() {
return holdid;
}
public String getCounterpartyid() {
return counterpartyid;
}
private final long valuetime;
private final double amount;
private final String holdid;
private final String counterpartyid;
}
--- NEW FILE: ExchangeOrder.java ---
package org.neuclear.exchange.orders;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedCore;
import org.neuclear.asset.orders.exchanges.Exchange;
import org.neuclear.asset.orders.TransferContract;
import org.neuclear.asset.orders.TransferContract;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.exchange.contracts.ExchangeAgent;
import org.neuclear.exchange.contracts.ExchangeAgent;
import java.sql.Timestamp;
import java.util.Date;
/**
* User: pelleb
* Date: Jul 30, 2003
* Time: 12:01:03 PM
*/
public final class ExchangeOrder extends AssetTransactionContract {
private ExchangeOrder(final SignedNamedCore core,
final Asset bidAsset, final ExchangeAgent agent, final double bid,
final Asset neededAsset, final double neededAmount, final String comment, final Date expires) {
super(core, bidAsset);
this.neededAsset = neededAsset;
this.neededAmount = neededAmount;
this.bidAmount = bid;
this.comment = (comment != null) ? comment : "";
this.expires = expires.getTime();
this.agent = agent;
}
public final Date getExpiry() {
return new Timestamp(expires);
}
public final Identity getBidder() {
return getSignatory();
}
public Asset getNeededAsset() {
return neededAsset;
}
public double getNeededAmount() {
return neededAmount;
}
public double getBidAmount() {
return bidAmount;
}
public String getComment() {
return comment;
}
public ExchangeAgent getAgent() {
return agent;
}
private final Asset neededAsset;
private final double neededAmount;
private final double bidAmount;
private final String comment;
private final long expires;
private final ExchangeAgent agent;
}
--- NEW FILE: ExchangeOrderReceipt.java ---
package org.neuclear.exchange.orders;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedCore;
import org.neuclear.asset.orders.exchanges.Exchange;
import org.neuclear.asset.orders.TransferContract;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.contracts.Asset;
import java.sql.Timestamp;
import java.util.Date;
/**
* User: pelleb
* Date: Jul 30, 2003
* Time: 11:59:36 AM
*/
public final class ExchangeOrderReceipt extends AssetTransactionContract {
private ExchangeOrderReceipt(final SignedNamedCore core, final Asset asset, Identity agent, String orderid, Date valuetime, Asset neededAsset, double neededAmount, double bidAmount, String comment, Date expires) {
super(core, asset);
this.agent = agent;
this.orderid = orderid;
this.valuetime = valuetime.getTime();
this.neededAsset = neededAsset;
this.neededAmount = neededAmount;
this.bidAmount = bidAmount;
this.comment = comment;
this.expires = expires.getTime();
}
public ExchangeOrder getExchangeOrder(){
//TODO Implement
return null;
}
public Identity getAgent() {
return agent;
}
public String getOrderid() {
return orderid;
}
public Timestamp getValuetime() {
return new Timestamp(valuetime);
}
public Asset getNeededAsset() {
return neededAsset;
}
public double getNeededAmount() {
return neededAmount;
}
public double getBidAmount() {
return bidAmount;
}
public String getComment() {
return comment;
}
public Timestamp getExpires() {
return new Timestamp(expires);
}
private final Identity agent;
private final String orderid;
private final long valuetime;
private final Asset neededAsset;
private final double neededAmount;
private final double bidAmount;
private final String comment;
private final long expires;
}
|
|
From: <pe...@us...> - 2004-01-05 23:47:15
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/orders/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/java/org/neuclear/exchange/orders/builders
Added Files:
CancelExchangeBuilder.java CancelExchangeReceiptBuilder.java
CancelExchangeRequestBuilder.java
CompleteExchangeRequestBuilder.java
ExchangeReceiptBuilder.java ExchangeRequestBuilder.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.
--- NEW FILE: CancelExchangeBuilder.java ---
package org.neuclear.exchange.orders.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.orders.transfers.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/05 23:47:10 pelle Exp $
$Log: CancelExchangeBuilder.java,v $
Revision 1.1 2004/01/05 23:47:10 pelle
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.
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.exchange.orders.builders;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.exchange.orders.CancelExchangeOrder;
import org.neuclear.exchange.orders.CancelExchangeOrder;
import org.neuclear.exchange.orders.builders.CancelExchangeBuilder;
import org.neuclear.asset.orders.TransferGlobals;
import org.neuclear.asset.orders.transfers.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/05 23:47:10 pelle Exp $
* $Log: CancelExchangeReceiptBuilder.java,v $
* Revision 1.1 2004/01/05 23:47:10 pelle
* 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.
*
* 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 CancelExchangeOrder 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.exchange.orders.builders;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.exchange.orders.ExchangeOrderReceipt;
import org.neuclear.exchange.orders.ExchangeOrderReceipt;
import org.neuclear.exchange.orders.builders.CancelExchangeBuilder;
import org.neuclear.asset.orders.transfers.TransferGlobals;
import org.neuclear.asset.orders.transfers.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/05 23:47:10 pelle Exp $
* $Log: CancelExchangeRequestBuilder.java,v $
* Revision 1.1 2004/01/05 23:47:10 pelle
* 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.
*
* 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 ExchangeOrderReceipt 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.exchange.orders.builders;
import org.dom4j.Element;
import org.neuclear.asset.orders.TransferReceipt;
import org.neuclear.asset.orders.transfers.TransferGlobals;
import org.neuclear.asset.orders.TransferOrder;
import org.neuclear.asset.orders.builders.TransferBuilder;
import org.neuclear.exchange.orders.ExchangeOrderReceipt;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.asset.orders.builders.TransferBuilder;
import org.neuclear.exchange.orders.ExchangeOrderReceipt;
import org.neuclear.asset.orders.transfers.TransferGlobals;
import org.neuclear.id.Identity;
import org.neuclear.commons.NeuClearException;
import org.neuclear.exchange.orders.ExchangeOrderReceipt;
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/05 23:47:10 pelle Exp $
$Log: CompleteExchangeRequestBuilder.java,v $
Revision 1.1 2004/01/05 23:47:10 pelle
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.
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 ExchangeOrderReceipt 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.exchange.orders.builders;
import org.dom4j.Element;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.asset.orders.builders.TransferBuilder;
import org.neuclear.asset.orders.exchanges.ExchangeOrder;
import org.neuclear.asset.orders.transfers.TransferGlobals;
import org.neuclear.asset.orders.transfers.TransferGlobals;
import org.neuclear.asset.orders.builders.TransferBuilder;
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/05 23:47:10 pelle Exp $
$Log: ExchangeReceiptBuilder.java,v $
Revision 1.1 2004/01/05 23:47:10 pelle
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.
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.
TransferOrder/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferOrder/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 ExchangeOrder 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.exchange.orders.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.orders.builders.TransferBuilder;
import org.neuclear.asset.orders.transfers.TransferGlobals;
import org.neuclear.asset.orders.builders.TransferBuilder;
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/05 23:47:10 pelle Exp $
$Log: ExchangeRequestBuilder.java,v $
Revision 1.1 2004/01/05 23:47:10 pelle
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.
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.
TransferOrder/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
their matching TransferOrder/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()));
}
}
|
|
From: <pe...@us...> - 2004-01-05 23:47:15
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/contracts
In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/java/org/neuclear/exchange/contracts
Added Files:
ExchangeAgent.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.
--- NEW FILE: ExchangeAgent.java ---
package org.neuclear.exchange.contracts;
import org.neuclear.id.Identity;
import org.neuclear.id.SignedNamedCore;
import java.security.PublicKey;
/*
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: ExchangeAgent.java,v 1.1 2004/01/05 23:47:10 pelle Exp $
$Log: ExchangeAgent.java,v $
Revision 1.1 2004/01/05 23:47:10 pelle
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.
*/
/**
* User: pelleb
* Date: Jan 5, 2004
* Time: 11:04:32 PM
*/
public class ExchangeAgent extends Identity{
public ExchangeAgent(SignedNamedCore core, String repository, String signer, String logger, String receiver, PublicKey pub) {
super(core, repository, signer, logger, receiver, pub);
}
}
|
|
From: <pe...@us...> - 2004-01-05 23:47:13
|
Update of /cvsroot/neuclear/neuclear-pay/src/webapp/SECURE
In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/webapp/SECURE
Modified Files:
transfer.jsp
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: transfer.jsp
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/webapp/SECURE/transfer.jsp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** transfer.jsp 17 Dec 2003 23:52:57 -0000 1.5
--- transfer.jsp 5 Jan 2004 23:47:10 -0000 1.6
***************
*** 1,5 ****
<%@ page import="org.neuclear.id.Identity,
org.neuclear.commons.Utility,
! org.neuclear.asset.contracts.builders.TransferRequestBuilder,
org.neuclear.id.resolver.NSResolver,
org.neuclear.asset.contracts.Asset,
--- 1,5 ----
<%@ page import="org.neuclear.id.Identity,
org.neuclear.commons.Utility,
! org.neuclear.asset.orders.builders.TransferRequestBuilder,
org.neuclear.id.resolver.NSResolver,
org.neuclear.asset.contracts.Asset,
***************
*** 7,15 ****
org.neuclear.id.builders.SignatureRequestBuilder,
org.neuclear.asset.contracts.AssetGlobals,
! org.neuclear.asset.contracts.TransferGlobals,
org.neuclear.asset.receiver.servlet.AssetControllerServlet,
org.neuclear.id.SignedNamedObject,
org.neuclear.commons.crypto.Base64,
! org.neuclear.commons.servlets.ServletTools"%>
<%
AssetGlobals.registerReaders();
--- 7,16 ----
org.neuclear.id.builders.SignatureRequestBuilder,
org.neuclear.asset.contracts.AssetGlobals,
! org.neuclear.asset.orders.transfers.TransferGlobals,
org.neuclear.asset.receiver.servlet.AssetControllerServlet,
org.neuclear.id.SignedNamedObject,
org.neuclear.commons.crypto.Base64,
! org.neuclear.commons.servlets.ServletTools,
! org.neuclear.asset.orders.transfers.TransferGlobals"%>
<%
AssetGlobals.registerReaders();
|
|
From: <pe...@us...> - 2004-01-05 23:47:13
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset
In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/java/org/neuclear/asset
Modified Files:
AssetController.java ExpiredHeldTransferException.java
InvalidTransferException.java TransferDeniedException.java
TransferLargerThanHeldException.java
TransferNotStartedException.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: AssetController.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/AssetController.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** AssetController.java 3 Jan 2004 20:36:25 -0000 1.9
--- AssetController.java 5 Jan 2004 23:47:10 -0000 1.10
***************
*** 2,8 ****
import org.neuclear.asset.contracts.*;
! import org.neuclear.asset.contracts.builders.CancelExchangeReceiptBuilder;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.builders.NamedObjectBuilder;
/*
--- 2,17 ----
import org.neuclear.asset.contracts.*;
! import org.neuclear.exchange.orders.builders.CancelExchangeReceiptBuilder;
! import org.neuclear.asset.orders.exchanges.ExchangeOrder;
! import org.neuclear.asset.orders.AssetTransactionContract;
! import org.neuclear.asset.orders.TransferOrder;
! import org.neuclear.asset.orders.AssetTransactionContract;
! import org.neuclear.asset.orders.TransferOrder;
import org.neuclear.commons.NeuClearException;
import org.neuclear.id.builders.NamedObjectBuilder;
+ import org.neuclear.exchange.orders.CancelExchangeOrder;
+ import org.neuclear.exchange.orders.ExchangeCompletionOrder;
+ import org.neuclear.exchange.orders.*;
+ import org.neuclear.exchange.orders.builders.CancelExchangeReceiptBuilder;
/*
***************
*** 26,29 ****
--- 35,43 ----
$Id$
$Log$
+ Revision 1.10 2004/01/05 23:47:10 pelle
+ 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.
+
Revision 1.9 2004/01/03 20:36:25 pelle
Renamed HeldTransfer to Exchange
***************
*** 34,38 ****
All unit tests in commons, id and xmlsec now work.
AssetController now successfully processes payments in the unit test.
! Payment Web App has working form that creates a TransferRequest presents it to the signer
and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust.
--- 48,52 ----
All unit tests in commons, id and xmlsec now work.
AssetController now successfully processes payments in the unit test.
! Payment Web App has working form that creates a TransferOrder presents it to the signer
and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust.
***************
*** 66,71 ****
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.
--- 80,85 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferOrder/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
! their matching TransferOrder/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.
***************
*** 99,110 ****
*/
public final NamedObjectBuilder process(final AssetTransactionContract contract) throws TransferDeniedException, LowLevelPaymentException, InvalidTransferException, NeuClearException {
! 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;
--- 113,124 ----
*/
public final NamedObjectBuilder process(final AssetTransactionContract contract) throws TransferDeniedException, LowLevelPaymentException, InvalidTransferException, NeuClearException {
! if (contract instanceof TransferOrder)
! return process((TransferOrder) contract);
! if (contract instanceof org.neuclear.exchange.orders.ExchangeOrder)
! return process((ExchangeOrder) contract);
! if (contract instanceof ExchangeCompletionOrder)
! return process((ExchangeCompletionOrder) contract);
! if (contract instanceof CancelExchangeOrder)
! return process((CancelExchangeOrder) contract);
return null;
***************
*** 123,127 ****
* Performs an assetName transfer.
*
! * @param req TransferRequest
* @return Unsigned Receipt
* @throws LowLevelPaymentException
--- 137,141 ----
* Performs an assetName transfer.
*
! * @param req TransferOrder
* @return Unsigned Receipt
* @throws LowLevelPaymentException
***************
*** 129,133 ****
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.TransferReceiptBuilder process(TransferRequest req) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
--- 143,147 ----
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.orders.builders.TransferReceiptBuilder process(TransferOrder req) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
***************
*** 136,140 ****
* HeldTransfer Object.
*
! * @param req Valid ExchangeRequest
* @return Unsigned ExchangeReceiptBuilder
* @throws LowLevelPaymentException
--- 150,154 ----
* HeldTransfer Object.
*
! * @param req Valid ExchangeOrder
* @return Unsigned ExchangeReceiptBuilder
* @throws LowLevelPaymentException
***************
*** 142,146 ****
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.ExchangeReceiptBuilder process(ExchangeRequest req) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
--- 156,160 ----
* @throws InvalidTransferException
*/
! public abstract org.neuclear.exchange.orders.builders.ExchangeReceiptBuilder process(ExchangeOrder req) 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;
/**
--- 167,171 ----
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.orders.builders.TransferReceiptBuilder process(ExchangeCompletionOrder complete) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
***************
*** 165,169 ****
*/
! public abstract CancelExchangeReceiptBuilder process(CancelExchangeRequest cancel) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
--- 179,183 ----
*/
! public abstract CancelExchangeReceiptBuilder process(CancelExchangeOrder 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.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ExpiredHeldTransferException.java 3 Jan 2004 20:36:26 -0000 1.5
--- ExpiredHeldTransferException.java 5 Jan 2004 23:47:10 -0000 1.6
***************
*** 1,6 ****
package org.neuclear.asset;
! import org.neuclear.asset.contracts.Exchange;
! import org.neuclear.asset.contracts.CompleteExchangeRequest;
import java.util.Date;
--- 1,8 ----
package org.neuclear.asset;
! import org.neuclear.asset.orders.exchanges.Exchange;
! import org.neuclear.exchange.orders.ExchangeCompletionOrder;
! import org.neuclear.exchange.orders.ExchangeCompletionOrder;
! import org.neuclear.exchange.orders.ExchangeCompletionOrder;
import java.util.Date;
***************
*** 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;
}
--- 14,25 ----
*/
public final class ExpiredHeldTransferException extends InvalidTransferException {
! public ExpiredHeldTransferException(final ExchangeCompletionOrder held) {
super("expired");
this.held = held;
}
! private final ExchangeCompletionOrder held;
! public ExchangeCompletionOrder getRequest() {
return held;
}
Index: InvalidTransferException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/InvalidTransferException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** InvalidTransferException.java 3 Jan 2004 20:36:26 -0000 1.3
--- InvalidTransferException.java 5 Jan 2004 23:47:10 -0000 1.4
***************
*** 21,24 ****
--- 21,29 ----
$Id$
$Log$
+ Revision 1.4 2004/01/05 23:47:10 pelle
+ 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.
+
Revision 1.3 2004/01/03 20:36:26 pelle
Renamed HeldTransfer to Exchange
***************
*** 39,44 ****
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.
--- 44,49 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferOrder/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
! their matching TransferOrder/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.
Index: TransferDeniedException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/TransferDeniedException.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TransferDeniedException.java 3 Jan 2004 20:36:26 -0000 1.5
--- TransferDeniedException.java 5 Jan 2004 23:47:10 -0000 1.6
***************
*** 1,7 ****
package org.neuclear.asset;
! import org.neuclear.asset.contracts.TransferRequest;
! import org.neuclear.asset.contracts.CancelExchangeRequest;
! import org.neuclear.asset.contracts.AssetTransactionContract;
import org.neuclear.id.SignedNamedObject;
--- 1,8 ----
package org.neuclear.asset;
! import org.neuclear.asset.orders.TransferOrder;
! import org.neuclear.exchange.orders.CancelExchangeOrder;
! import org.neuclear.asset.orders.AssetTransactionContract;
! import org.neuclear.exchange.orders.CancelExchangeOrder;
import org.neuclear.id.SignedNamedObject;
***************
*** 26,29 ****
--- 27,35 ----
$Id$
$Log$
+ Revision 1.6 2004/01/05 23:47:10 pelle
+ 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.
+
Revision 1.5 2004/01/03 20:36:26 pelle
Renamed HeldTransfer to Exchange
***************
*** 49,54 ****
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.
--- 55,60 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferOrder/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
! their matching TransferOrder/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.
***************
*** 72,76 ****
this.req = req;
}
! public TransferDeniedException(final CancelExchangeRequest req) {
this.req = req;
}
--- 78,82 ----
this.req = req;
}
! public TransferDeniedException(final CancelExchangeOrder req) {
this.req = req;
}
Index: TransferLargerThanHeldException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/TransferLargerThanHeldException.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TransferLargerThanHeldException.java 3 Jan 2004 20:36:26 -0000 1.5
--- TransferLargerThanHeldException.java 5 Jan 2004 23:47:10 -0000 1.6
***************
*** 2,7 ****
! import org.neuclear.asset.contracts.ExchangeReceipt;
! import org.neuclear.asset.contracts.CompleteExchangeRequest;
/**
--- 2,8 ----
! import org.neuclear.exchange.orders.ExchangeOrderReceipt;
! import org.neuclear.exchange.orders.ExchangeCompletionOrder;
! import org.neuclear.exchange.orders.ExchangeCompletionOrder;
/**
***************
*** 11,15 ****
*/
public final class TransferLargerThanHeldException extends InvalidTransferException {
! public TransferLargerThanHeldException(final CompleteExchangeRequest complete,final double amount) {
super("amount too large");
this.complete = complete;
--- 12,16 ----
*/
public final class TransferLargerThanHeldException extends InvalidTransferException {
! public TransferLargerThanHeldException(final ExchangeCompletionOrder complete,final double amount) {
super("amount too large");
this.complete = complete;
***************
*** 18,25 ****
}
! private final CompleteExchangeRequest complete;
private final double amount;
! public final CompleteExchangeRequest getRequest() {
return complete;
}
--- 19,26 ----
}
! private final ExchangeCompletionOrder complete;
private final double amount;
! public final ExchangeCompletionOrder getRequest() {
return complete;
}
Index: TransferNotStartedException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/TransferNotStartedException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TransferNotStartedException.java 21 Nov 2003 04:43:04 -0000 1.3
--- TransferNotStartedException.java 5 Jan 2004 23:47:10 -0000 1.4
***************
*** 1,5 ****
package org.neuclear.asset;
! import org.neuclear.asset.contracts.TransferReceipt;
import java.util.Date;
--- 1,6 ----
package org.neuclear.asset;
! import org.neuclear.asset.orders.TransferReceipt;
! import org.neuclear.asset.orders.TransferReceipt;
import java.util.Date;
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/java/org/neuclear/exchange Removed Files: ExchangeAgent.java ExchangeOrder.java ExchangeOrderReceipt.java ExchangePerformedException.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. --- ExchangeAgent.java DELETED --- --- ExchangeOrder.java DELETED --- --- ExchangeOrderReceipt.java DELETED --- --- ExchangePerformedException.java DELETED --- |
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/orders
In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/java/org/neuclear/asset/orders
Added Files:
AssetTransactionContract.java TransferContract.java
TransferGlobals.java TransferOrder.java TransferReceipt.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.
--- NEW FILE: AssetTransactionContract.java ---
package org.neuclear.asset.orders;
import org.dom4j.Element;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.Utility;
import org.neuclear.commons.time.TimeTools;
import org.neuclear.id.*;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.receiver.UnsupportedTransaction;
import org.neuclear.asset.orders.exchanges.*;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.contracts.AssetGlobals;
import org.neuclear.exchange.orders.CancelExchangeOrder;
import org.neuclear.exchange.orders.CancelExchangeReceipt;
import org.neuclear.exchange.orders.ExchangeCompletionOrder;
import org.neuclear.exchange.orders.ExchangeOrderReceipt;
import java.util.Date;
import java.text.ParseException;
/**
* (C) 2003 Antilles Software Ventures SA
* User: pelleb
* Date: Nov 10, 2003
* Time: 11:06:37 AM
* $Id: AssetTransactionContract.java,v 1.1 2004/01/05 23:47:09 pelle Exp $
* $Log: AssetTransactionContract.java,v $
* Revision 1.1 2004/01/05 23:47:09 pelle
* 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.
*
* 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:
* - For most cases the main exception to worry about now is InvalidNamedObjectException.
* - Most lowerlevel exception that cant be handled meaningful are now wrapped in the LowLevelException, a
* runtime exception.
* - Source and Store patterns each now have their own exceptions that generalizes the various physical
* exceptions that can happen in that area.
*
* Revision 1.9 2003/12/10 23:52:39 pelle
* Did some cleaning up in the builders
* Fixed some stuff in IdentityCreator
* New maven goal to create executable jarapp
* We are close to 0.8 final of ID, 0.11 final of XMLSIG and 0.5 of commons.
* Will release shortly.
*
* Revision 1.8 2003/11/28 00:11:50 pelle
* Getting the NeuClear web transactions working.
* <p/>
* Revision 1.7 2003/11/22 00:22:28 pelle
* All unit tests in commons, id and xmlsec now work.
* AssetController now successfully processes payments in the unit test.
* Payment Web App has working form that creates a TransferOrder presents it to the signer
* and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust.
* <p/>
* Revision 1.6 2003/11/21 04:43:04 pelle
* EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
* Otherwise You will Finaliate.
* Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
* This should hopefully make everything more stable (and secure).
* <p/>
* Revision 1.5 2003/11/20 16:01:59 pelle
* Updated all the Contracts to use the new security model.
* <p/>
* Revision 1.4 2003/11/19 23:32:20 pelle
* Signers now can generatekeys via the generateKey() method.
* Refactored the relationship between SignedNamedObject and NamedObjectBuilder a bit.
* SignedNamedObject now contains the full xml which is returned with getEncoded()
* This means that it is now possible to further receive on or process a SignedNamedObject, leaving
* NamedObjectBuilder for its original purposes of purely generating new Contracts.
* NamedObjectBuilder.sign() now returns a SignedNamedObject which is the prefered way of processing it.
* Updated all major interfaces that used the old model to use the new model.
* <p/>
* 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.
* <p/>
* 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.
* <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 abstract class AssetTransactionContract extends SignedNamedObject {
private final Asset asset;
protected AssetTransactionContract(final SignedNamedCore core, final Asset asset) {
super(core);
this.asset = asset;
}
public final Asset getAsset() {
return asset;
}
public static final class Reader implements NamedObjectReader {
/**
* Read object from Element and fill in its details
*
* @param elem
* @return
*/
public final SignedNamedObject read(final SignedNamedCore core, final Element elem) throws InvalidNamedObjectException {
if (!elem.getNamespace().equals(AssetGlobals.NS_ASSET))
throw new InvalidNamedObjectException(core.getName(),"Not in XML NameSpace: "+AssetGlobals.NS_ASSET.getURI());
try {
//TODO Validate properly
final Asset asset = (Asset) NSResolver.resolveIdentity(elem.attributeValue("assetName"));
final String holdid = elem.attributeValue("holdid");
if (elem.getName().equals(TransferGlobals.CANCEL_TAGNAME))
return new CancelExchangeOrder(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"));
final Date valuetime = TimeTools.parseTimeStamp(elem.attributeValue("valuetime"));
final Identity to = NSResolver.resolveIdentity(elem.attributeValue("recipient"));
final Element commentElement = elem.element(TransferGlobals.createQName("comment"));
final String comment = (commentElement != null) ? commentElement.getText() : "";
if (elem.getName().equals(TransferGlobals.XFER_TAGNAME))
return new TransferOrder(core, asset, to, amount, comment);
Date helduntil = null;
if (!Utility.isEmpty(elem.attributeValue("valuetime")))
helduntil = TimeTools.parseTimeStamp(elem.attributeValue("valuetime"));
if (elem.getName().equals(TransferGlobals.HELD_XFER_TAGNAME))
return new ExchangeOrder(core, asset, to, amount, comment, helduntil);
final Identity from = NSResolver.resolveIdentity(elem.attributeValue("sender"));
final String reqid = elem.attributeValue("reqid");
if (elem.getName().equals(TransferGlobals.XFER_RCPT_TAGNAME))
return new TransferReceipt(core, asset, from, to, reqid, amount, valuetime, comment);
if (elem.getName().equals(TransferGlobals.HELD_XFER_RCPT_TAGNAME))
return new ExchangeOrderReceipt(core, asset, from, to, reqid, amount, valuetime, comment, helduntil);
if (elem.getName().equals(TransferGlobals.COMPLETE_TAGNAME))
return new ExchangeCompletionOrder(core, asset, from, to, amount, valuetime, comment, holdid);
} catch (ParseException e) {
throw new InvalidNamedObjectException(core.getName(),e);
} catch (NameResolutionException e) {
throw new InvalidNamedObjectException(core.getName(),e);
}
throw new InvalidNamedObjectException(core.getName(),"Not Matched");
}
}
}
--- NEW FILE: TransferContract.java ---
package org.neuclear.asset.orders;
import org.dom4j.Element;
import org.neuclear.id.Identity;
import org.neuclear.id.NamedObjectReader;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.SignedNamedCore;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.receiver.UnsupportedTransaction;
import org.neuclear.commons.NeuClearException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.commons.time.TimeTools;
import org.neuclear.commons.Utility;
import org.neuclear.xml.XMLTools;
import java.sql.Timestamp;
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
*/
/**
*
* User: pelleb
* Date: Sep 23, 2003
* Time: 3:07:54 PM
*/
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 : "";
}
public final double getAmount() {
return amount;
}
public final String getComment() {
return comment;
}
private final double amount;
private final String comment;
}
--- NEW FILE: TransferGlobals.java ---
package org.neuclear.asset.orders;
import org.dom4j.*;
import org.neuclear.id.verifier.VerifyingReader;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.orders.AssetTransactionContract;
/*
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: TransferGlobals.java,v 1.1 2004/01/05 23:47:09 pelle Exp $
$Log: TransferGlobals.java,v $
Revision 1.1 2004/01/05 23:47:09 pelle
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.
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.
Revision 1.4 2003/11/22 00:22:28 pelle
All unit tests in commons, id and xmlsec now work.
AssetController now successfully processes payments in the unit test.
Payment Web App has working form that creates a TransferOrder presents it to the signer
and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust.
Revision 1.3 2003/11/21 04:43:04 pelle
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Revision 1.2 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.1 2003/11/09 03:32:56 pelle
More missing files from earlier commits. IDEA is acting strangly.
Revision 1.3 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.2 2003/10/25 00:38:43 pelle
Fixed SmtpSender it now sends the messages.
Refactored CommandLineSigner. Now it simply signs files read from command line. However new class IdentityCreator
is subclassed and creates new Identities. You can subclass CommandLineSigner to create your own variants.
Several problems with configuration. Trying to solve at the moment. Updated PicoContainer to beta-2
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.
PaymentReceiver 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 PaymentReceiver.
*/
/**
* User: pelleb
* Date: Oct 3, 2003
* Time: 3:55:06 PM
*/
public final class TransferGlobals {
private TransferGlobals() {
// Instantiation is not allowed
}
public static Namespace createNameSpace() {
return DocumentHelper.createNamespace(XFER_NSPREFIX, XFER_NSURI);
}
public static QName createQName(final String name) {
return DocumentHelper.createQName(name, createNameSpace());
}
public static Attribute createAttribute(final Element elem, final String name, final String value) {
return DocumentHelper.createAttribute(elem, createQName(name), value);
}
public static Element createElement(final String name, final String value) {
Element elem = createElement(name);
elem.setText(value);
return elem;
}
public static Element createElement(final String name) {
return DocumentHelper.createElement(createQName(name));
}
public static void registerReaders() {
VerifyingReader.getInstance().registerReader(TransferGlobals.CANCEL_RCPT_TAGNAME, new AssetTransactionContract.Reader());
VerifyingReader.getInstance().registerReader(TransferGlobals.CANCEL_TAGNAME, new AssetTransactionContract.Reader());
VerifyingReader.getInstance().registerReader(TransferGlobals.XFER_TAGNAME, new AssetTransactionContract.Reader());
VerifyingReader.getInstance().registerReader(TransferGlobals.HELD_XFER_TAGNAME, new AssetTransactionContract.Reader());
VerifyingReader.getInstance().registerReader(TransferGlobals.XFER_RCPT_TAGNAME, new AssetTransactionContract.Reader());
VerifyingReader.getInstance().registerReader(TransferGlobals.HELD_XFER_RCPT_TAGNAME, new AssetTransactionContract.Reader());
VerifyingReader.getInstance().registerReader(TransferGlobals.COMPLETE_TAGNAME, new AssetTransactionContract.Reader());
}
static {
registerReaders();
}
public static final String XFER_TAGNAME = "TransferOrder";
public static final String XFER_RCPT_TAGNAME = "TransferReceipt";
public static final String HELD_XFER_TAGNAME = "ExchangeOrder";
public static final String HELD_XFER_RCPT_TAGNAME = "ExchangeOrderReceipt";
public static final String COMPLETE_TAGNAME = "CompleteHoldRequest";
public static final String CANCEL_TAGNAME = "CancelHoldRequest";
public static final String CANCEL_RCPT_TAGNAME = "CancelHoldReceipt";
public static final String XFER_NSPREFIX = "xfer";
public static final String XFER_NSURI = "http://neuclear.org/neu/xfer";
}
--- NEW FILE: TransferOrder.java ---
package org.neuclear.asset.orders;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.Utility;
import org.neuclear.commons.time.TimeTools;
import org.neuclear.id.*;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.asset.orders.TransferContract;
import org.neuclear.asset.orders.exchanges.*;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.contracts.AssetGlobals;
import org.dom4j.Element;
import java.sql.Timestamp;
import java.util.Date;
import java.text.ParseException;
/**
* User: pelleb
* Date: Jul 21, 2003
* Time: 5:35:26 PM
*/
public class TransferOrder extends AssetTransactionContract {
private TransferOrder(final SignedNamedCore core, final Asset asset, final Identity to, final double amount, final String comment) {
super(core, asset);
this.amount = amount;
this.comment = (comment != null) ? comment : "";
this.to=to;
}
public final Identity getFrom() {
return getSignatory();
}
public final Identity getTo() {
return to;
}
public final double getAmount() {
return amount;
}
public final String getComment() {
return comment;
}
private final Identity to;
private final double amount;
private final String comment;
public static final class Reader implements NamedObjectReader {
/**
* Read object from Element and fill in its details
*
* @param elem
* @return
*/
public final SignedNamedObject read(final SignedNamedCore core, final Element elem) throws InvalidNamedObjectException {
if (!elem.getNamespace().equals(AssetGlobals.NS_ASSET))
throw new InvalidNamedObjectException(core.getName(),"Not in XML NameSpace: "+AssetGlobals.NS_ASSET.getURI());
if (elem.getName().equals(TransferGlobals.XFER_TAGNAME))
throw new InvalidNamedObjectException(core.getName(),"Incorrect XML Tagname for reader: "+TransferGlobals.XFER_TAGNAME);
try {
//TODO Validate properly
final Asset asset = (Asset) NSResolver.resolveIdentity(elem.attributeValue("assetName"));
final double amount = Double.parseDouble(elem.attributeValue("amount"));
final Identity to = NSResolver.resolveIdentity(elem.attributeValue("recipient"));
final Element commentElement = elem.element(TransferGlobals.createQName("comment"));
final String comment = (commentElement != null) ? commentElement.getText() : "";
return new TransferOrder(core, asset, to, amount, comment);
} catch (NameResolutionException e) {
throw new InvalidNamedObjectException(core.getName(),e);
}
}
}
}
--- NEW FILE: TransferReceipt.java ---
package org.neuclear.asset.orders;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.time.TimeTools;
import org.neuclear.id.*;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.asset.orders.TransferContract;
import org.neuclear.asset.orders.AssetTransactionContract;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.contracts.AssetGlobals;
import org.dom4j.Element;
import java.sql.Timestamp;
import java.util.Date;
import java.text.ParseException;
/**
* User: pelleb
* Date: Jul 21, 2003
* Time: 5:37:10 PM
*/
public class TransferReceipt extends AssetTransactionContract {
private 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);
this.from = from;
this.reqid = reqid;
this.to=to;
this.valuetime=valuetime.getTime();
this.amount = amount;
this.comment = (comment != null) ? comment : "";
}
public final Identity getFrom() {
return from;
}
public final String getRequestId() {
return reqid;
}
public final Identity getTo() {
return to;
}
public final Date getValueTime() {
return new Timestamp(valuetime);
}
public final double getAmount() {
return amount;
}
public final String getComment() {
return comment;
}
private final double amount;
private final String comment;
private final long valuetime;
private final Identity from;
private final String reqid;
private final Identity to;
public static final class Reader implements NamedObjectReader {
/**
* Read object from Element and fill in its details
*
* @param elem
* @return
*/
public final SignedNamedObject read(final SignedNamedCore core, final Element elem) throws InvalidNamedObjectException {
if (!elem.getNamespace().equals(AssetGlobals.NS_ASSET))
throw new InvalidNamedObjectException(core.getName(),"Not in XML NameSpace: "+AssetGlobals.NS_ASSET.getURI());
if (elem.getName().equals(TransferGlobals.XFER_TAGNAME))
throw new InvalidNamedObjectException(core.getName(),"Incorrect XML Tagname for reader: "+TransferGlobals.XFER_TAGNAME);
try {
//TODO Validate properly
final Asset asset = (Asset) NSResolver.resolveIdentity(elem.attributeValue("assetName"));
final double amount = Double.parseDouble(elem.attributeValue("amount"));
final Identity to = NSResolver.resolveIdentity(elem.attributeValue("recipient"));
final Element commentElement = elem.element(TransferGlobals.createQName("comment"));
final Date valuetime = TimeTools.parseTimeStamp(elem.attributeValue("valuetime"));
final Identity from = NSResolver.resolveIdentity(elem.attributeValue("sender"));
final String reqid = elem.attributeValue("reqid");
final String comment = (commentElement != null) ? commentElement.getText() : "";
return new TransferReceipt(core, asset, from, to, reqid, amount, valuetime, comment);
} catch (NameResolutionException e) {
throw new InvalidNamedObjectException(core.getName(),e);
} catch (ParseException e) {
throw new InvalidNamedObjectException(core.getName(),e);
}
}
}
}
|
|
From: <pe...@us...> - 2004-01-05 23:47:13
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/remote
In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/java/org/neuclear/asset/remote
Modified Files:
AssetControlClient.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: AssetControlClient.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/remote/AssetControlClient.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** AssetControlClient.java 3 Jan 2004 20:36:25 -0000 1.9
--- AssetControlClient.java 5 Jan 2004 23:47:10 -0000 1.10
***************
*** 1,12 ****
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.*;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.signers.Signer;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.xml.XMLException;
/*
--- 1,20 ----
package org.neuclear.asset.remote;
! import org.neuclear.exchange.orders.CancelExchangeReceipt;
! import org.neuclear.exchange.orders.ExchangeOrderReceipt;
! import org.neuclear.asset.orders.TransferReceipt;
import org.neuclear.asset.contracts.builders.*;
+ import org.neuclear.exchange.orders.CancelExchangeReceipt;
+ import org.neuclear.asset.orders.TransferReceipt;
+ import org.neuclear.asset.orders.builders.TransferBuilder;
+ import org.neuclear.asset.orders.builders.TransferRequestBuilder;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.signers.Signer;
import org.neuclear.id.SignedNamedObject;
import org.neuclear.xml.XMLException;
+ import org.neuclear.exchange.orders.CancelExchangeReceipt;
+ import org.neuclear.exchange.orders.builders.CancelExchangeRequestBuilder;
+ import org.neuclear.exchange.orders.builders.CompleteExchangeRequestBuilder;
+ import org.neuclear.exchange.orders.builders.ExchangeRequestBuilder;
/*
***************
*** 30,33 ****
--- 38,46 ----
$Id$
$Log$
+ Revision 1.10 2004/01/05 23:47:10 pelle
+ 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.
+
Revision 1.9 2004/01/03 20:36:25 pelle
Renamed HeldTransfer to Exchange
***************
*** 89,94 ****
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.
--- 102,107 ----
Issuer is now Asset which is a subclass of Identity
AssetController supports more than one Asset. Which is important for most non ecurrency implementations.
! TransferOrder/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use
! their matching TransferOrder/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.
***************
*** 116,121 ****
! public final ExchangeReceipt performHeldTransfer(final ExchangeRequestBuilder req) throws NeuClearException, XMLException {
! return (ExchangeReceipt) send(req);
}
--- 129,134 ----
! public final ExchangeOrderReceipt performHeldTransfer(final ExchangeRequestBuilder req) throws NeuClearException, XMLException {
! return (ExchangeOrderReceipt) send(req);
}
|
|
From: <pe...@us...> - 2004-01-05 23:47:13
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/receiver
In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/java/org/neuclear/asset/receiver
Modified Files:
AssetControllerReceiver.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: AssetControllerReceiver.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/receiver/AssetControllerReceiver.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** AssetControllerReceiver.java 12 Dec 2003 21:12:54 -0000 1.8
--- AssetControllerReceiver.java 5 Jan 2004 23:47:09 -0000 1.9
***************
*** 3,6 ****
--- 3,10 ----
import org.neuclear.asset.AssetController;
import org.neuclear.asset.TransferException;
+ import org.neuclear.asset.orders.transfers.TransferGlobals;
+ import org.neuclear.asset.orders.AssetTransactionContract;
+ import org.neuclear.asset.orders.TransferContract;
+ import org.neuclear.asset.orders.*;
import org.neuclear.asset.contracts.*;
import org.neuclear.commons.NeuClearException;
***************
*** 84,88 ****
VerifyingReader.getInstance().registerReader(TransferGlobals.XFER_TAGNAME, new TransferContract.Reader());
VerifyingReader.getInstance().registerReader(TransferGlobals.COMPLETE_TAGNAME, new TransferContract.Reader());
! VerifyingReader.getInstance().registerReader(TransferGlobals.CANCEL_TAGNAME, new TransferContract.Reader());
VerifyingReader.getInstance().registerReader(TransferGlobals.XFER_RCPT_TAGNAME, new TransferContract.Reader());
VerifyingReader.getInstance().registerReader(TransferGlobals.HELD_XFER_TAGNAME, new TransferContract.Reader());
--- 88,92 ----
VerifyingReader.getInstance().registerReader(TransferGlobals.XFER_TAGNAME, new TransferContract.Reader());
VerifyingReader.getInstance().registerReader(TransferGlobals.COMPLETE_TAGNAME, new TransferContract.Reader());
! VerifyingReader.getInstance().registerReader(org.neuclear.asset.orders.TransferGlobals.CANCEL_TAGNAME, new TransferContract.Reader());
VerifyingReader.getInstance().registerReader(TransferGlobals.XFER_RCPT_TAGNAME, new TransferContract.Reader());
VerifyingReader.getInstance().registerReader(TransferGlobals.HELD_XFER_TAGNAME, new TransferContract.Reader());
|
|
From: <pe...@us...> - 2004-01-05 23:47:13
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/receiver/servlet In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/java/org/neuclear/asset/receiver/servlet Modified Files: AssetControllerServlet.java TransferRequestServlet.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: AssetControllerServlet.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/receiver/servlet/AssetControllerServlet.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AssetControllerServlet.java 2 Jan 2004 23:18:06 -0000 1.8 --- AssetControllerServlet.java 5 Jan 2004 23:47:09 -0000 1.9 *************** *** 3,9 **** import org.neuclear.asset.contracts.Asset; import org.neuclear.asset.contracts.AssetGlobals; ! import org.neuclear.asset.contracts.TransferGlobals; import org.neuclear.asset.controllers.currency.CurrencyController; import org.neuclear.asset.receiver.AssetControllerReceiver; import org.neuclear.commons.crypto.signers.TestCaseSigner; import org.neuclear.commons.sql.JNDIConnectionSource; --- 3,10 ---- import org.neuclear.asset.contracts.Asset; import org.neuclear.asset.contracts.AssetGlobals; ! import org.neuclear.asset.orders.transfers.TransferGlobals; import org.neuclear.asset.controllers.currency.CurrencyController; import org.neuclear.asset.receiver.AssetControllerReceiver; + import org.neuclear.asset.orders.transfers.TransferGlobals; import org.neuclear.commons.crypto.signers.TestCaseSigner; import org.neuclear.commons.sql.JNDIConnectionSource; *************** *** 37,40 **** --- 38,46 ---- $Id$ $Log$ + Revision 1.9 2004/01/05 23:47:09 pelle + 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. + Revision 1.8 2004/01/02 23:18:06 pelle Added StatementFactory pattern and refactored the ledger to use it. *************** *** 58,62 **** All unit tests in commons, id and xmlsec now work. AssetController now successfully processes payments in the unit test. ! Payment Web App has working form that creates a TransferRequest presents it to the signer and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust. --- 64,68 ---- All unit tests in commons, id and xmlsec now work. AssetController now successfully processes payments in the unit test. ! Payment Web App has working form that creates a TransferOrder presents it to the signer and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust. Index: TransferRequestServlet.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/receiver/servlet/TransferRequestServlet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TransferRequestServlet.java 20 Dec 2003 00:17:41 -0000 1.1 --- TransferRequestServlet.java 5 Jan 2004 23:47:09 -0000 1.2 *************** *** 9,13 **** import org.neuclear.commons.Utility; import org.neuclear.commons.time.TimeTools; ! import org.neuclear.asset.contracts.builders.TransferRequestBuilder; import org.neuclear.asset.contracts.Asset; import org.neuclear.asset.InvalidTransferException; --- 9,13 ---- import org.neuclear.commons.Utility; import org.neuclear.commons.time.TimeTools; ! import org.neuclear.asset.orders.builders.TransferRequestBuilder; import org.neuclear.asset.contracts.Asset; import org.neuclear.asset.InvalidTransferException; *************** *** 35,38 **** --- 35,43 ---- $Id$ $Log$ + Revision 1.2 2004/01/05 23:47:09 pelle + 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. + Revision 1.1 2003/12/20 00:17:41 pelle overwrote the standard Object.toString(), hashCode() and equals() methods for SignedNamedObject/Core |
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/orders/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/java/org/neuclear/asset/orders/builders
Added Files:
TransferBuilder.java TransferReceiptBuilder.java
TransferRequestBuilder.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.
--- NEW FILE: TransferBuilder.java ---
package org.neuclear.asset.orders.builders;
import org.dom4j.Element;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.asset.orders.transfers.TransferGlobals;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.orders.transfers.TransferGlobals;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.Utility;
import org.neuclear.commons.time.TimeTools;
import org.neuclear.id.Identity;
import org.neuclear.id.NSTools;
import org.neuclear.id.builders.NamedObjectBuilder;
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: TransferBuilder.java,v 1.1 2004/01/05 23:47:09 pelle Exp $
$Log: TransferBuilder.java,v $
Revision 1.1 2004/01/05 23:47:09 pelle
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.
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.
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.7 2003/11/28 00:11:50 pelle
Getting the NeuClear web transactions working.
Revision 1.6 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.5 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.4 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.3 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 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)
throw new NegativeTransferException(amount);
if (Utility.isEmpty(asset))
throw new InvalidTransferException("assetName");
if (to == null)
throw new InvalidTransferException("to");
this.asset = asset;
final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "recipient", to.getName()));
element.add(TransferGlobals.createAttribute(element, "assetName", asset.getName()));
element.add(TransferGlobals.createAttribute(element, "amount", Double.toString(amount)));
if (!Utility.isEmpty(comment))
element.add(TransferGlobals.createElement("comment", comment));
}
public final Asset getAsset() {
return asset;
}
private final Asset asset;
}
--- NEW FILE: TransferReceiptBuilder.java ---
package org.neuclear.asset.orders.builders;
import org.dom4j.Element;
import org.neuclear.asset.contracts.*;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.exchange.orders.ExchangeCompletionOrder;
import org.neuclear.asset.orders.TransferGlobals;
import org.neuclear.asset.orders.TransferOrder;
import org.neuclear.asset.orders.TransferOrder;
import org.neuclear.asset.orders.builders.TransferBuilder;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.time.TimeTools;
import org.neuclear.exchange.orders.ExchangeCompletionOrder;
import java.util.Date;
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: TransferReceiptBuilder.java,v 1.1 2004/01/05 23:47:09 pelle Exp $
$Log: TransferReceiptBuilder.java,v $
Revision 1.1 2004/01/05 23:47:09 pelle
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.
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.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Revision 1.3 2003/11/10 17:42:07 pelle
The AssetController interface has been more or less finalized.
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 class TransferReceiptBuilder extends TransferBuilder {
public TransferReceiptBuilder(final ExchangeCompletionOrder 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, "holdid", req.getHoldId()));
}
public TransferReceiptBuilder(final TransferOrder 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()));
}
}
--- NEW FILE: TransferRequestBuilder.java ---
package org.neuclear.asset.orders.builders;
import org.neuclear.asset.orders.transfers.TransferGlobals;
import org.neuclear.asset.contracts.Asset;
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.asset.orders.transfers.TransferGlobals;
import org.neuclear.asset.orders.builders.TransferBuilder;
import org.neuclear.id.Identity;
import org.neuclear.id.NSTools;
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: TransferRequestBuilder.java,v 1.1 2004/01/05 23:47:09 pelle Exp $
$Log: TransferRequestBuilder.java,v $
Revision 1.1 2004/01/05 23:47:09 pelle
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.
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.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Revision 1.3 2003/11/10 17:42:07 pelle
The AssetController interface has been more or less finalized.
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:26:13 PM
*/
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);
}
}
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/java/org/neuclear/asset/contracts Modified Files: AssetGlobals.java Removed Files: AssetTransactionContract.java CancelExchangeReceipt.java CancelExchangeRequest.java CompleteExchangeRequest.java Exchange.java ExchangeReceipt.java ExchangeRequest.java TransferContract.java TransferGlobals.java TransferReceipt.java TransferRequest.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: AssetGlobals.java =================================================================== RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/AssetGlobals.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** AssetGlobals.java 3 Jan 2004 20:36:25 -0000 1.8 --- AssetGlobals.java 5 Jan 2004 23:47:09 -0000 1.9 *************** *** 24,27 **** --- 24,32 ---- $Id$ $Log$ + Revision 1.9 2004/01/05 23:47:09 pelle + 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. + Revision 1.8 2004/01/03 20:36:25 pelle Renamed HeldTransfer to Exchange *************** *** 40,44 **** All unit tests in commons, id and xmlsec now work. AssetController now successfully processes payments in the unit test. ! Payment Web App has working form that creates a TransferRequest presents it to the signer and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust. --- 45,49 ---- All unit tests in commons, id and xmlsec now work. AssetController now successfully processes payments in the unit test. ! Payment Web App has working form that creates a TransferOrder presents it to the signer and forwards it to AssetControlServlet. (Which throws an XML Parser Exception) I think the XMLReaderServlet is bust. *************** *** 68,73 **** 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. --- 73,78 ---- Issuer is now Asset which is a subclass of Identity AssetController supports more than one Asset. Which is important for most non ecurrency implementations. ! TransferOrder/Receipt and its Exchange companions are now SignedNamedObjects. Thus to create them you must use ! their matching TransferOrder/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. --- AssetTransactionContract.java DELETED --- --- CancelExchangeReceipt.java DELETED --- --- CancelExchangeRequest.java DELETED --- --- CompleteExchangeRequest.java DELETED --- --- Exchange.java DELETED --- --- ExchangeReceipt.java DELETED --- --- ExchangeRequest.java DELETED --- --- TransferContract.java DELETED --- --- TransferGlobals.java DELETED --- --- TransferReceipt.java DELETED --- --- TransferRequest.java DELETED --- |
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders In directory sc8-pr-cvs1:/tmp/cvs-serv15193/src/java/org/neuclear/asset/contracts/builders Removed Files: CancelExchangeBuilder.java CancelExchangeReceiptBuilder.java CancelExchangeRequestBuilder.java CompleteExchangeRequestBuilder.java ExchangeReceiptBuilder.java ExchangeRequestBuilder.java TransferBuilder.java TransferReceiptBuilder.java TransferRequestBuilder.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. --- CancelExchangeBuilder.java DELETED --- --- CancelExchangeReceiptBuilder.java DELETED --- --- CancelExchangeRequestBuilder.java DELETED --- --- CompleteExchangeRequestBuilder.java DELETED --- --- ExchangeReceiptBuilder.java DELETED --- --- ExchangeRequestBuilder.java DELETED --- --- TransferBuilder.java DELETED --- --- TransferReceiptBuilder.java DELETED --- --- TransferRequestBuilder.java DELETED --- |