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...> - 2003-11-21 04:43:24
|
Update of /cvsroot/neuclear/neuclear-ledger/src/test/org/neuclear/ledger/implementations
In directory sc8-pr-cvs1:/tmp/cvs-serv10452/src/test/org/neuclear/ledger/implementations
Modified Files:
EntityLedgerTest.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: EntityLedgerTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-ledger/src/test/org/neuclear/ledger/implementations/EntityLedgerTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** EntityLedgerTest.java 20 Nov 2003 23:41:12 -0000 1.1
--- EntityLedgerTest.java 21 Nov 2003 04:43:21 -0000 1.2
***************
*** 3,10 ****
import junit.framework.TestCase;
import org.neuclear.commons.time.TimeTools;
- import org.ofbiz.core.entity.GenericDelegator;
- import org.ofbiz.core.entity.GenericEntityException;
- import org.ofbiz.core.entity.GenericValue;
- import org.ofbiz.core.util.UtilMisc;
/*
--- 3,6 ----
***************
*** 28,31 ****
--- 24,33 ----
$Id$
$Log$
+ Revision 1.2 2003/11/21 04:43:21 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/20 23:41:12 pelle
Getting all the tests to work in id
***************
*** 41,47 ****
* Time: 2:20:13 PM
*/
! public class EntityLedgerTest extends TestCase {
! public void testEntityEngine() throws GenericEntityException {
//Instantiate the delegator.
GenericDelegator delegator = GenericDelegator.getGenericDelegator("default");
--- 43,49 ----
* Time: 2:20:13 PM
*/
! public final class EntityLedgerTest extends TestCase {
! /* public void testEntityEngine() throws GenericEntityException {
//Instantiate the delegator.
GenericDelegator delegator = GenericDelegator.getGenericDelegator("default");
***************
*** 59,62 ****
UtilMisc.toMap("id", "neu://test"));
assertNotNull("Couldn't find Ledger", foundBook);
! }
}
--- 61,64 ----
UtilMisc.toMap("id", "neu://test"));
assertNotNull("Couldn't find Ledger", foundBook);
! }*/
}
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset
In directory sc8-pr-cvs1:/tmp/cvs-serv10286/src/java/org/neuclear/asset
Modified Files:
AssetController.java ExpiredHeldTransferException.java
InsufficientFundsException.java InvalidTransferException.java
LowLevelPaymentException.java NegativeTransferException.java
NonExistantHoldException.java TransferDeniedException.java
TransferException.java TransferLargerThanHeldException.java
TransferNotStartedException.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AssetController.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/AssetController.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** AssetController.java 12 Nov 2003 23:47:05 -0000 1.6
--- AssetController.java 21 Nov 2003 04:43:04 -0000 1.7
***************
*** 4,7 ****
--- 4,8 ----
import org.neuclear.asset.contracts.builders.CancelHeldTransferReceiptBuilder;
import org.neuclear.id.builders.NamedObjectBuilder;
+ import org.neuclear.commons.NeuClearException;
/*
***************
*** 25,28 ****
--- 26,35 ----
$Id$
$Log$
+ Revision 1.7 2003/11/21 04:43:04 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.6 2003/11/12 23:47:05 pelle
Much work done in creating good test environment.
***************
*** 80,84 ****
* @throws InvalidTransferException
*/
! public final NamedObjectBuilder process(AssetTransactionContract contract) throws TransferDeniedException, LowLevelPaymentException, InvalidTransferException {
if (contract instanceof TransferRequest)
return processTransfer((TransferRequest) contract);
--- 87,91 ----
* @throws InvalidTransferException
*/
! public final NamedObjectBuilder process(final AssetTransactionContract contract) throws TransferDeniedException, LowLevelPaymentException, InvalidTransferException, NeuClearException {
if (contract instanceof TransferRequest)
return processTransfer((TransferRequest) contract);
***************
*** 111,115 ****
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.TransferReceiptBuilder processTransfer(TransferRequest req) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException;
/**
--- 118,122 ----
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.TransferReceiptBuilder processTransfer(TransferRequest req) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
***************
*** 124,128 ****
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.HeldTransferReceiptBuilder processHeldTransfer(HeldTransferRequest req) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException;
/**
--- 131,135 ----
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.HeldTransferReceiptBuilder processHeldTransfer(HeldTransferRequest req) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
***************
*** 135,139 ****
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.TransferReceiptBuilder processCompleteHold(CompleteHeldTransferRequest complete) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException;
/**
--- 142,146 ----
* @throws InvalidTransferException
*/
! public abstract org.neuclear.asset.contracts.builders.TransferReceiptBuilder processCompleteHold(CompleteHeldTransferRequest complete) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
/**
***************
*** 147,151 ****
*/
! public abstract CancelHeldTransferReceiptBuilder processCancelHold(CancelHeldTransferRequest cancel) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException;
//TODO Add getBalance
--- 154,158 ----
*/
! public abstract CancelHeldTransferReceiptBuilder processCancelHold(CancelHeldTransferRequest cancel) throws LowLevelPaymentException, TransferDeniedException, InvalidTransferException, NeuClearException;
//TODO Add getBalance
Index: ExpiredHeldTransferException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/ExpiredHeldTransferException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ExpiredHeldTransferException.java 10 Nov 2003 17:42:07 -0000 1.3
--- ExpiredHeldTransferException.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 11,21 ****
* Time: 11:38:10 AM
*/
! public class ExpiredHeldTransferException extends InvalidTransferException {
! public ExpiredHeldTransferException(CompleteHeldTransferRequest held) {
super("expired");
this.held = held;
}
! private CompleteHeldTransferRequest held;
public CompleteHeldTransferRequest getRequest() {
--- 11,21 ----
* Time: 11:38:10 AM
*/
! public final class ExpiredHeldTransferException extends InvalidTransferException {
! public ExpiredHeldTransferException(final CompleteHeldTransferRequest held) {
super("expired");
this.held = held;
}
! private final CompleteHeldTransferRequest held;
public CompleteHeldTransferRequest getRequest() {
Index: InsufficientFundsException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/InsufficientFundsException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** InsufficientFundsException.java 10 Nov 2003 17:42:07 -0000 1.2
--- InsufficientFundsException.java 21 Nov 2003 04:43:04 -0000 1.3
***************
*** 9,14 ****
* Time: 11:38:10 AM
*/
! public class InsufficientFundsException extends TransferException {
! public InsufficientFundsException(AssetController proc, Identity account, double amount) {
super(proc);
this.account = account;
--- 9,14 ----
* Time: 11:38:10 AM
*/
! public final class InsufficientFundsException extends TransferException {
! public InsufficientFundsException(final AssetController proc, final Identity account, final double amount) {
super(proc);
this.account = account;
***************
*** 16,31 ****
}
! private Identity account;
! private double amount;
! public Identity getAccount() {
return account;
}
! public double getAmount() {
return amount;
}
! public String getSubMessage() {
return "Insufficient Funds in Account: " + account.getName() + " to pay: " + amount;
}
--- 16,31 ----
}
! private final Identity account;
! private final double amount;
! public final Identity getAccount() {
return account;
}
! public final double getAmount() {
return amount;
}
! public final String getSubMessage() {
return "Insufficient Funds in Account: " + account.getName() + " to pay: " + amount;
}
Index: InvalidTransferException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/InvalidTransferException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** InvalidTransferException.java 8 Nov 2003 01:39:58 -0000 1.1
--- InvalidTransferException.java 21 Nov 2003 04:43:04 -0000 1.2
***************
*** 21,24 ****
--- 21,30 ----
$Id$
$Log$
+ Revision 1.2 2003/11/21 04:43:04 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.1 2003/11/08 01:39:58 pelle
WARNING this rev is majorly unstable and will almost certainly not compile.
***************
*** 41,45 ****
*/
public class InvalidTransferException extends TransferException {
! public InvalidTransferException(String missing) {
super();
this.missing = missing;
--- 47,51 ----
*/
public class InvalidTransferException extends TransferException {
! public InvalidTransferException(final String missing) {
super();
this.missing = missing;
***************
*** 50,53 ****
}
! private String missing;
}
--- 56,59 ----
}
! private final String missing;
}
Index: LowLevelPaymentException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/LowLevelPaymentException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** LowLevelPaymentException.java 10 Nov 2003 17:42:07 -0000 1.1
--- LowLevelPaymentException.java 21 Nov 2003 04:43:04 -0000 1.2
***************
*** 9,12 ****
--- 9,18 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/11/21 04:43:04 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.1 2003/11/10 17:42:07 pelle
* The AssetController interface has been more or less finalized.
***************
*** 15,24 ****
*
*/
! public class LowLevelPaymentException extends TransferException{
! public LowLevelPaymentException(Throwable e) {
super(e);
}
! public String getSubMessage() {
return "Caused by: "+getCause().getLocalizedMessage();
}
--- 21,30 ----
*
*/
! public final class LowLevelPaymentException extends TransferException{
! public LowLevelPaymentException(final Throwable e) {
super(e);
}
! public final String getSubMessage() {
return "Caused by: "+getCause().getLocalizedMessage();
}
Index: NegativeTransferException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/NegativeTransferException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NegativeTransferException.java 10 Nov 2003 17:42:07 -0000 1.3
--- NegativeTransferException.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 7,24 ****
* Time: 11:38:10 AM
*/
! public class NegativeTransferException extends InvalidTransferException {
! public NegativeTransferException(double amount) {
super("negative amount");
this.amount = amount;
}
! private double amount;
! public double getAmount() {
return amount;
}
! public String getSubMessage() {
return "Not possible to perform payment of negative amount: " + amount;
}
--- 7,24 ----
* Time: 11:38:10 AM
*/
! public final class NegativeTransferException extends InvalidTransferException {
! public NegativeTransferException(final double amount) {
super("negative amount");
this.amount = amount;
}
! private final double amount;
! public final double getAmount() {
return amount;
}
! public final String getSubMessage() {
return "Not possible to perform payment of negative amount: " + amount;
}
Index: NonExistantHoldException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/NonExistantHoldException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NonExistantHoldException.java 10 Nov 2003 17:42:07 -0000 1.1
--- NonExistantHoldException.java 21 Nov 2003 04:43:04 -0000 1.2
***************
*** 7,10 ****
--- 7,16 ----
* $Id$
* $Log$
+ * Revision 1.2 2003/11/21 04:43:04 pelle
+ * EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ * Otherwise You will Finaliate.
+ * Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ * This should hopefully make everything more stable (and secure).
+ *
* Revision 1.1 2003/11/10 17:42:07 pelle
* The AssetController interface has been more or less finalized.
***************
*** 13,18 ****
*
*/
! public class NonExistantHoldException extends InvalidTransferException{
! public NonExistantHoldException(String holdid) {
super("Held transaction:"+holdid+" doesnt exist");
}
--- 19,24 ----
*
*/
! public final class NonExistantHoldException extends InvalidTransferException{
! public NonExistantHoldException(final String holdid) {
super("Held transaction:"+holdid+" doesnt exist");
}
Index: TransferDeniedException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/TransferDeniedException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TransferDeniedException.java 10 Nov 2003 17:42:07 -0000 1.3
--- TransferDeniedException.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 26,29 ****
--- 26,35 ----
$Id$
$Log$
+ Revision 1.4 2003/11/21 04:43:04 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.3 2003/11/10 17:42:07 pelle
The AssetController interface has been more or less finalized.
***************
*** 57,69 ****
* Time: 6:18:11 PM
*/
! public class TransferDeniedException extends TransferException {
! public TransferDeniedException(AssetTransactionContract req) {
this.req = req;
}
! public TransferDeniedException(CancelHeldTransferRequest req) {
this.req = req;
}
! public String getSubMessage() {
return "No permission to perform action for :"+req.getSignatory().getName();
}
--- 63,75 ----
* Time: 6:18:11 PM
*/
! public final class TransferDeniedException extends TransferException {
! public TransferDeniedException(final AssetTransactionContract req) {
this.req = req;
}
! public TransferDeniedException(final CancelHeldTransferRequest req) {
this.req = req;
}
! public final String getSubMessage() {
return "No permission to perform action for :"+req.getSignatory().getName();
}
Index: TransferException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/TransferException.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TransferException.java 11 Nov 2003 21:17:19 -0000 1.4
--- TransferException.java 21 Nov 2003 04:43:04 -0000 1.5
***************
*** 10,14 ****
*/
public abstract class TransferException extends Exception {
! public TransferException(AssetController proc) {
this.proc = proc;
}
--- 10,14 ----
*/
public abstract class TransferException extends Exception {
! public TransferException(final AssetController proc) {
this.proc = proc;
}
***************
*** 18,30 ****
}
! protected TransferException(Throwable cause) {
super(cause);
}
! public AssetController getProc() {
return proc;
}
! public String getMessage() {
return "NeuClear Transfer Exception: " + Utility.denullString(proc.toString()) + "\n" + getSubMessage();
}
--- 18,30 ----
}
! protected TransferException(final Throwable cause) {
super(cause);
}
! public final AssetController getProc() {
return proc;
}
! public final String getMessage() {
return "NeuClear Transfer Exception: " + Utility.denullString(proc.toString()) + "\n" + getSubMessage();
}
Index: TransferLargerThanHeldException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/TransferLargerThanHeldException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TransferLargerThanHeldException.java 10 Nov 2003 17:42:07 -0000 1.3
--- TransferLargerThanHeldException.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 10,15 ****
* Time: 11:38:10 AM
*/
! public class TransferLargerThanHeldException extends InvalidTransferException {
! public TransferLargerThanHeldException(CompleteHeldTransferRequest complete,double amount) {
super("amount too large");
this.complete = complete;
--- 10,15 ----
* Time: 11:38:10 AM
*/
! public final class TransferLargerThanHeldException extends InvalidTransferException {
! public TransferLargerThanHeldException(final CompleteHeldTransferRequest complete,final double amount) {
super("amount too large");
this.complete = complete;
***************
*** 18,25 ****
}
! private CompleteHeldTransferRequest complete;
! private double amount;
! public CompleteHeldTransferRequest getRequest() {
return complete;
}
--- 18,25 ----
}
! private final CompleteHeldTransferRequest complete;
! private final double amount;
! public final CompleteHeldTransferRequest getRequest() {
return complete;
}
***************
*** 31,39 ****
! public double getAmount(){
return amount;
}
! public String getSubMessage() {
return "Transfer requested: " + complete.getAmount()+ " is larger than held amount: " + amount;
}
--- 31,39 ----
! public final double getAmount(){
return amount;
}
! public final String getSubMessage() {
return "Transfer requested: " + complete.getAmount()+ " is larger than held amount: " + amount;
}
Index: TransferNotStartedException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/TransferNotStartedException.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TransferNotStartedException.java 8 Nov 2003 01:39:58 -0000 1.2
--- TransferNotStartedException.java 21 Nov 2003 04:43:04 -0000 1.3
***************
*** 10,15 ****
* Time: 11:38:10 AM
*/
! public class TransferNotStartedException extends TransferException {
! public TransferNotStartedException(AssetController proc, TransferReceipt pmt, Date time) {
super(proc);
this.pmt = pmt;
--- 10,15 ----
* Time: 11:38:10 AM
*/
! public final class TransferNotStartedException extends TransferException {
! public TransferNotStartedException(final AssetController proc, final TransferReceipt pmt, final Date time) {
super(proc);
this.pmt = pmt;
***************
*** 17,32 ****
}
! private TransferReceipt pmt;
! private Date time;
! public TransferReceipt getPayment() {
return pmt;
}
! public Date getTime() {
return time;
}
! public String getSubMessage() {
return "This payment commences at: " + pmt.getValueTime() + ". Action attempted at: " + time;
}
--- 17,32 ----
}
! private final TransferReceipt pmt;
! private final Date time;
! public final TransferReceipt getPayment() {
return pmt;
}
! public final Date getTime() {
return time;
}
! public final String getSubMessage() {
return "This payment commences at: " + pmt.getValueTime() + ". Action attempted at: " + time;
}
|
|
From: <pe...@us...> - 2003-11-21 04:43:09
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/receiver
In directory sc8-pr-cvs1:/tmp/cvs-serv10286/src/test/org/neuclear/asset/receiver
Modified Files:
CreateTestPayments.java PaymentReceiverTest.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: CreateTestPayments.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/receiver/CreateTestPayments.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CreateTestPayments.java 12 Nov 2003 23:47:05 -0000 1.3
--- CreateTestPayments.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 36,39 ****
--- 36,45 ----
$Id$
$Log$
+ Revision 1.4 2003/11/21 04:43:04 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.3 2003/11/12 23:47:05 pelle
Much work done in creating good test environment.
***************
*** 78,90 ****
* Time: 11:50:47 AM
*/
! public class CreateTestPayments extends CommandLineSigner {
! public CreateTestPayments(String[] args) throws ParseException, NoSuchAlgorithmException, CertificateException, IOException, KeyStoreException, ConfigurationException {
super(args);
}
! public NamedObjectBuilder build() throws Exception {
! String to = cmd.getOptionValue("r");
! String asset = cmd.getOptionValue("c");
! double amount = Double.parseDouble(cmd.getOptionValue("x"));
return new TransferRequestBuilder(
--- 84,96 ----
* Time: 11:50:47 AM
*/
! public final class CreateTestPayments extends CommandLineSigner {
! public CreateTestPayments(final String[] args) throws ParseException, NoSuchAlgorithmException, CertificateException, IOException, KeyStoreException, ConfigurationException {
super(args);
}
! public final NamedObjectBuilder build() throws Exception {
! final String to = cmd.getOptionValue("r");
! final String asset = cmd.getOptionValue("c");
! final double amount = Double.parseDouble(cmd.getOptionValue("x"));
return new TransferRequestBuilder(
***************
*** 98,104 ****
}
! public static void main(String args[]) {
try {
! CreateTestPayments signer = new CreateTestPayments(args);
signer.execute();
} catch (Exception e) {
--- 104,110 ----
}
! public static void main(final String[] args) {
try {
! final CreateTestPayments signer = new CreateTestPayments(args);
signer.execute();
} catch (Exception e) {
***************
*** 107,119 ****
}
! protected String getExtraHelp() {
return "[--assetName neu://verax/pay --payee neu://bob@verax --amount 20.00]";
}
! protected boolean hasArguments() {
return (cmd.hasOption("a") && cmd.hasOption("c") && cmd.hasOption("r") && cmd.hasOption("x"));
}
! protected void getLocalOptions(Options options) {
options.addOption("c", "assetName", true, "specify id of assetName");
options.addOption("r", "payee", true, "specify id of payee");
--- 113,125 ----
}
! protected final String getExtraHelp() {
return "[--assetName neu://verax/pay --payee neu://bob@verax --amount 20.00]";
}
! protected final boolean hasArguments() {
return (cmd.hasOption("a") && cmd.hasOption("c") && cmd.hasOption("r") && cmd.hasOption("x"));
}
! protected final void getLocalOptions(final Options options) {
options.addOption("c", "assetName", true, "specify id of assetName");
options.addOption("r", "payee", true, "specify id of payee");
Index: PaymentReceiverTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/receiver/PaymentReceiverTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** PaymentReceiverTest.java 19 Nov 2003 23:32:20 -0000 1.5
--- PaymentReceiverTest.java 21 Nov 2003 04:43:04 -0000 1.6
***************
*** 44,47 ****
--- 44,53 ----
$Id$
$Log$
+ 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).
+
Revision 1.5 2003/11/19 23:32:20 pelle
Signers now can generatekeys via the generateKey() method.
***************
*** 112,117 ****
* Time: 11:20:31 AM
*/
! public class PaymentReceiverTest extends AbstractReceiverTest {
! public PaymentReceiverTest(String string) throws NeuClearException, GeneralSecurityException, UnknownLedgerException, LowlevelLedgerException, BookExistsException, IOException, InvalidTransferException, XMLException {
super(string);
asset = (Asset) NSResolver.resolveIdentity(assetName);
--- 118,123 ----
* Time: 11:20:31 AM
*/
! public final class PaymentReceiverTest extends AbstractReceiverTest {
! public PaymentReceiverTest(final String string) throws NeuClearException, GeneralSecurityException, UnknownLedgerException, LowlevelLedgerException, BookExistsException, IOException, InvalidTransferException, XMLException {
super(string);
asset = (Asset) NSResolver.resolveIdentity(assetName);
***************
*** 131,143 ****
}
! public void testSimple() throws Exception, DocumentException, NeuClearException, XMLException {
runDirectoryTest(directory.getAbsolutePath());
}
! public Receiver getReceiver() {
return receiver;
}
! public String getExtension() {
return ".xml";
}
--- 137,149 ----
}
! public final void testSimple() throws Exception, DocumentException, NeuClearException, XMLException {
runDirectoryTest(directory.getAbsolutePath());
}
! public final Receiver getReceiver() {
return receiver;
}
! public final String getExtension() {
return ".xml";
}
***************
*** 147,156 ****
}
! public Object getPreTransactionState(SignedNamedObject obj) throws Exception {
if (obj instanceof TransferRequest) {
! TransferRequest transfer = (TransferRequest) obj;
! double fromBalance = proc.getBalance(transfer.getFrom(), transfer.getTimeStamp());
! double toBalance = proc.getBalance(transfer.getTo(), transfer.getTimeStamp());
return new double[]{fromBalance, toBalance};
--- 153,162 ----
}
! 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());
return new double[]{fromBalance, toBalance};
***************
*** 160,168 ****
}
! public boolean verifyTransaction(final SignedNamedObject obj, final Object state) throws Exception {
if (obj instanceof TransferRequest) {
! TransferRequest transfer = (TransferRequest) obj;
! double fromBalance = proc.getBalance(transfer.getFrom(), transfer.getTimeStamp());
! double toBalance = proc.getBalance(transfer.getTo(), transfer.getTimeStamp());
final double prebalances[] = (double[]) state;
--- 166,174 ----
}
! 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());
final double prebalances[] = (double[]) state;
***************
*** 173,180 ****
}
! public void createPayments(Identity from, Identity to, double amount) throws InvalidTransferException, XMLException, NeuClearException, IOException, UnsupportedEncodingException {
! TransferRequestBuilder transfer = new TransferRequestBuilder(asset, from, to, 100, TimeTools.now(), "Test One");
! SignedNamedObject signed = transfer.sign(getSigner());
! OutputStream out = new BufferedOutputStream(new FileOutputStream(directory.getAbsolutePath() + "/" + transfer.getLocalName() + ".xml"));
out.write(signed.getEncoded().getBytes("UTF-8"));
--- 179,186 ----
}
! public final void createPayments(final Identity from, final Identity to, final double amount) throws InvalidTransferException, XMLException, NeuClearException, IOException, UnsupportedEncodingException {
! final TransferRequestBuilder transfer = new TransferRequestBuilder(asset, from, to, 100, TimeTools.now(), "Test One");
! final SignedNamedObject signed = transfer.sign(getSigner());
! final OutputStream out = new BufferedOutputStream(new FileOutputStream(directory.getAbsolutePath() + "/" + transfer.getLocalName() + ".xml"));
out.write(signed.getEncoded().getBytes("UTF-8"));
***************
*** 187,190 ****
private final Receiver receiver;
private final CurrencyController proc;
! private double balance = 0.0;
}
--- 193,196 ----
private final Receiver receiver;
private final CurrencyController proc;
! private final double balance = 0.0;
}
|
|
From: <pe...@us...> - 2003-11-21 04:43:09
|
Update of /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/controllers/currency
In directory sc8-pr-cvs1:/tmp/cvs-serv10286/src/test/org/neuclear/asset/controllers/currency
Modified Files:
CurrencyTests.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: CurrencyTests.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/test/org/neuclear/asset/controllers/currency/CurrencyTests.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CurrencyTests.java 10 Nov 2003 17:42:08 -0000 1.2
--- CurrencyTests.java 21 Nov 2003 04:43:04 -0000 1.3
***************
*** 21,26 ****
* Time: 6:05:04 PM
*/
! public class CurrencyTests extends TestCase {
! public CurrencyTests(String s) throws SQLException, IOException, LowlevelLedgerException, BookExistsException, LedgerCreationException, ConfigurationException {
super(s);
// proc = CurrencyController.getInstance();
--- 21,26 ----
* Time: 6:05:04 PM
*/
! public final class CurrencyTests extends TestCase {
! public CurrencyTests(final String s) throws SQLException, IOException, LowlevelLedgerException, BookExistsException, LedgerCreationException, ConfigurationException {
super(s);
// proc = CurrencyController.getInstance();
|
|
From: <pe...@us...> - 2003-11-21 04:43:09
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange
In directory sc8-pr-cvs1:/tmp/cvs-serv10286/src/java/org/neuclear/exchange
Modified Files:
ExchangeOrder.java ExchangeOrderReceipt.java
ExchangePerformedException.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: ExchangeOrder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/ExchangeOrder.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ExchangeOrder.java 10 Nov 2003 17:42:08 -0000 1.3
--- ExchangeOrder.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 23,26 ****
--- 23,32 ----
$Id$
$Log$
+ Revision 1.4 2003/11/21 04:43:04 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.3 2003/11/10 17:42:08 pelle
The AssetController interface has been more or less finalized.
***************
*** 54,59 ****
* Time: 5:28:20 PM
*/
! public class ExchangeOrder {
! public ExchangeOrder(HeldTransferReceipt bid, String requestedAsset, double amount) {
this.bid = bid;
this.requestedAsset = requestedAsset;
--- 60,65 ----
* Time: 5:28:20 PM
*/
! public final class ExchangeOrder {
! public ExchangeOrder(final HeldTransferReceipt bid, final String requestedAsset, final double amount) {
this.bid = bid;
this.requestedAsset = requestedAsset;
***************
*** 61,73 ****
}
! public HeldTransferReceipt getBid() {
return bid;
}
! public String getRequestedAsset() {
return requestedAsset;
}
! public double getAmount() {
return amount;
}
--- 67,79 ----
}
! public final HeldTransferReceipt getBid() {
return bid;
}
! public final String getRequestedAsset() {
return requestedAsset;
}
! public final double getAmount() {
return amount;
}
Index: ExchangeOrderReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/ExchangeOrderReceipt.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ExchangeOrderReceipt.java 10 Nov 2003 17:42:08 -0000 1.3
--- ExchangeOrderReceipt.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 23,26 ****
--- 23,32 ----
$Id$
$Log$
+ Revision 1.4 2003/11/21 04:43:04 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.3 2003/11/10 17:42:08 pelle
The AssetController interface has been more or less finalized.
***************
*** 54,61 ****
* Time: 5:40:46 PM
*/
! public class ExchangeOrderReceipt {
! public ExchangeOrderReceipt(ExchangeAgent agent, String id, ExchangeOrder order) {
this.agent = agent;
this.id = id;
--- 60,67 ----
* Time: 5:40:46 PM
*/
! public final class ExchangeOrderReceipt {
! public ExchangeOrderReceipt(final ExchangeAgent agent, final String id, final ExchangeOrder order) {
this.agent = agent;
this.id = id;
***************
*** 85,89 ****
}
! public void cancel() throws ExchangePerformedException {
agent.cancel(this);
}
--- 91,95 ----
}
! public final void cancel() throws ExchangePerformedException {
agent.cancel(this);
}
Index: ExchangePerformedException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/exchange/ExchangePerformedException.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ExchangePerformedException.java 10 Nov 2003 17:42:08 -0000 1.3
--- ExchangePerformedException.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 21,24 ****
--- 21,30 ----
$Id$
$Log$
+ Revision 1.4 2003/11/21 04:43:04 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.3 2003/11/10 17:42:08 pelle
The AssetController interface has been more or less finalized.
***************
*** 52,57 ****
* Time: 5:54:44 PM
*/
! public class ExchangePerformedException extends Exception {
! public ExchangePerformedException(String string) {
super(string);
}
--- 58,63 ----
* Time: 5:54:44 PM
*/
! public final class ExchangePerformedException extends Exception {
! public ExchangePerformedException(final String string) {
super(string);
}
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts
In directory sc8-pr-cvs1:/tmp/cvs-serv10286/src/java/org/neuclear/asset/contracts
Modified Files:
Asset.java AssetGlobals.java AssetTransactionContract.java
CancelHeldTransferReceipt.java CancelHeldTransferRequest.java
CompleteHeldTransferRequest.java HeldTransferReceipt.java
HeldTransferRequest.java TransferContract.java
TransferGlobals.java TransferReceipt.java TransferRequest.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: Asset.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/Asset.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Asset.java 20 Nov 2003 16:01:59 -0000 1.8
--- Asset.java 21 Nov 2003 04:43:04 -0000 1.9
***************
*** 6,9 ****
--- 6,10 ----
import org.neuclear.commons.Utility;
import org.neuclear.id.*;
+ import org.neuclear.id.verifier.VerifyingReader;
import org.neuclear.senders.SoapSender;
import org.neuclear.xml.xmlsec.KeyInfo;
***************
*** 34,37 ****
--- 35,44 ----
$Id$
$Log$
+ Revision 1.9 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.8 2003/11/20 16:01:59 pelle
Updated all the Contracts to use the new security model.
***************
*** 90,95 ****
* @see org.neuclear.asset.contracts.builders.AssetBuilder
*/
! public class Asset extends Identity {
! protected Asset(SignedNamedCore core, String repository, String signer, String logger, String receiver, PublicKey pub, String assetController, int decimal, double minimumTransaction) throws NeuClearException {
super(core, repository, signer, logger, receiver, pub);
this.assetController = assetController;
--- 97,102 ----
* @see org.neuclear.asset.contracts.builders.AssetBuilder
*/
! public final class Asset extends Identity {
! protected Asset(final SignedNamedCore core, final String repository, final String signer, final String logger, final String receiver, final PublicKey pub, final String assetController, final int decimal, final double minimumTransaction) throws NeuClearException {
super(core, repository, signer, logger, receiver, pub);
this.assetController = assetController;
***************
*** 111,115 ****
* @throws NeuClearException
*/
! public final SignedNamedObject send(SignedNamedObject obj) throws NeuClearException {
return SoapSender.quickSend(assetController, obj);
}
--- 118,122 ----
* @throws NeuClearException
*/
! public final SignedNamedObject send(final SignedNamedObject obj) throws NeuClearException {
return SoapSender.quickSend(assetController, obj);
}
***************
*** 121,125 ****
* @return
*/
! public final boolean isValidAmount(double amount) {
return amount >= minimumTransaction;
}
--- 128,132 ----
* @return
*/
! public final boolean isValidAmount(final double amount) {
return amount >= minimumTransaction;
}
***************
*** 131,135 ****
* @return
*/
! public final double round(double amount) {
if (amount < minimumTransaction)
return minimumTransaction;
--- 138,142 ----
* @return
*/
! public final double round(final double amount) {
if (amount < minimumTransaction)
return minimumTransaction;
***************
*** 147,166 ****
* @return
*/
! public final SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException, XMLSecurityException {
if (!elem.getNamespace().equals(AssetGlobals.createNameSpace()))
throw new UnsupportedOperationException("");
! String assetController = elem.attributeValue("controller");
! String repository = elem.attributeValue(DocumentHelper.createQName("repository", NSTools.NS_NEUID));
! String signer = elem.attributeValue(DocumentHelper.createQName("signer", NSTools.NS_NEUID));
! String logger = elem.attributeValue(DocumentHelper.createQName("logger", NSTools.NS_NEUID));
! String receiver = elem.attributeValue(DocumentHelper.createQName("receiver", NSTools.NS_NEUID));
! Element allowElement = elem.element(DocumentHelper.createQName("allow", NSTools.NS_NEUID));
! KeyInfo ki = new KeyInfo(allowElement.element(XMLSecTools.createQName("KeyInfo")));
! PublicKey pub = ki.getPublicKey();
! String dec = elem.attributeValue("decimalpoints");
! int decimal = (!Utility.isEmpty(dec)) ? Integer.parseInt(dec) : 0;
! String min = elem.attributeValue("minimumxact");
! double minimum = (!Utility.isEmpty(min)) ? Double.parseDouble(min) : 0;
return new Asset(core, repository, signer, logger, receiver, pub, assetController, decimal, minimum);
--- 154,173 ----
* @return
*/
! public final SignedNamedObject read(final SignedNamedCore core, final Element elem) throws NeuClearException, XMLSecurityException {
if (!elem.getNamespace().equals(AssetGlobals.createNameSpace()))
throw new UnsupportedOperationException("");
! final String assetController = elem.attributeValue("controller");
! final String repository = elem.attributeValue(DocumentHelper.createQName("repository", NSTools.NS_NEUID));
! final String signer = elem.attributeValue(DocumentHelper.createQName("signer", NSTools.NS_NEUID));
! final String logger = elem.attributeValue(DocumentHelper.createQName("logger", NSTools.NS_NEUID));
! final String receiver = elem.attributeValue(DocumentHelper.createQName("receiver", NSTools.NS_NEUID));
! final Element allowElement = elem.element(DocumentHelper.createQName("allow", NSTools.NS_NEUID));
! final KeyInfo ki = new KeyInfo(allowElement.element(XMLSecTools.createQName("KeyInfo")));
! final PublicKey pub = ki.getPublicKey();
! final String dec = elem.attributeValue("decimalpoints");
! final int decimal = (!Utility.isEmpty(dec)) ? Integer.parseInt(dec) : 0;
! final String min = elem.attributeValue("minimumxact");
! final double minimum = (!Utility.isEmpty(min)) ? Double.parseDouble(min) : 0;
return new Asset(core, repository, signer, logger, receiver, pub, assetController, decimal, minimum);
Index: AssetGlobals.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/AssetGlobals.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AssetGlobals.java 12 Nov 2003 23:47:04 -0000 1.4
--- AssetGlobals.java 21 Nov 2003 04:43:04 -0000 1.5
***************
*** 2,5 ****
--- 2,6 ----
import org.dom4j.*;
+ import org.neuclear.id.verifier.VerifyingReader;
/*
***************
*** 23,26 ****
--- 24,33 ----
$Id$
$Log$
+ Revision 1.5 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.4 2003/11/12 23:47:04 pelle
Much work done in creating good test environment.
***************
*** 85,97 ****
}
! public static QName createQName(String name) {
return DocumentHelper.createQName(name, createNameSpace());
}
! public static Attribute createAttribute(Element elem, String name, String value) {
return DocumentHelper.createAttribute(elem, createQName(name), value);
}
! public static Element createElement(String name, String value) {
return DocumentHelper.createElement(createQName(name));
}
--- 92,104 ----
}
! 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) {
return DocumentHelper.createElement(createQName(name));
}
***************
*** 99,102 ****
public static final String ASSET_TAGNAME = "Asset";
public static final String XFER_ASSETS = "http://neuclear.org/neu/assets";
! public static final String ASSET_NSPREFIX = "assetName";
}
--- 106,113 ----
public static final String ASSET_TAGNAME = "Asset";
public static final String XFER_ASSETS = "http://neuclear.org/neu/assets";
! public static final String ASSET_NSPREFIX = "asset";
! static {
! VerifyingReader.getInstance().registerReader(AssetGlobals.ASSET_TAGNAME,new Asset.Reader());
! }
!
}
Index: AssetTransactionContract.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/AssetTransactionContract.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** AssetTransactionContract.java 20 Nov 2003 16:01:59 -0000 1.5
--- AssetTransactionContract.java 21 Nov 2003 04:43:04 -0000 1.6
***************
*** 9,12 ****
--- 9,13 ----
import org.neuclear.id.SignedNamedObject;
import org.neuclear.id.SignedNamedCore;
+ import org.neuclear.id.verifier.VerifyingReader;
import org.neuclear.id.resolver.NSResolver;
import org.neuclear.receiver.UnsupportedTransaction;
***************
*** 22,25 ****
--- 23,32 ----
* $Id$
* $Log$
+ * 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).
+ *
* Revision 1.5 2003/11/20 16:01:59 pelle
* Updated all the Contracts to use the new security model.
***************
*** 52,56 ****
private final Asset asset;
! AssetTransactionContract(SignedNamedCore core, Asset asset) throws NeuClearException {
super(core);
this.asset = asset;
--- 59,63 ----
private final Asset asset;
! AssetTransactionContract(final SignedNamedCore core, final Asset asset) throws NeuClearException {
super(core);
this.asset = asset;
***************
*** 62,66 ****
}
! public static class Reader implements NamedObjectReader {
/**
* Read object from Element and fill in its details
--- 69,73 ----
}
! public static final class Reader implements NamedObjectReader {
/**
* Read object from Element and fill in its details
***************
*** 69,78 ****
* @return
*/
! public final SignedNamedObject read(SignedNamedCore core, Element elem) throws NeuClearException {
if (elem.getNamespaceURI().equals(TransferGlobals.XFER_NSURI))
throw new UnsupportedTransaction(null);
! Asset asset = (Asset) NSResolver.resolveIdentity(elem.attributeValue("assetName"));
! String holdid = elem.attributeValue("holdid");
if (elem.getName().equals(TransferGlobals.CANCEL_TAGNAME))
return new CancelHeldTransferRequest(core, asset, holdid);
--- 76,85 ----
* @return
*/
! public final SignedNamedObject read(final SignedNamedCore core, final Element elem) throws NeuClearException {
if (elem.getNamespaceURI().equals(TransferGlobals.XFER_NSURI))
throw new UnsupportedTransaction(null);
! final Asset asset = (Asset) NSResolver.resolveIdentity(elem.attributeValue("assetName"));
! final String holdid = elem.attributeValue("holdid");
if (elem.getName().equals(TransferGlobals.CANCEL_TAGNAME))
return new CancelHeldTransferRequest(core, asset, holdid);
***************
*** 80,87 ****
return new CancelHeldTransferReceipt(core, asset, holdid);
! double amount = Double.parseDouble(elem.attributeValue("amount"));
! Date valuetime = TimeTools.parseTimeStamp(elem.attributeValue("valuetime"));
! Identity to = NSResolver.resolveIdentity(elem.attributeValue("recipient"));
! String comment = elem.attributeValue("comment");
if (elem.getName().equals(TransferGlobals.XFER_TAGNAME))
return new TransferRequest(core, asset, to, amount, valuetime, comment);
--- 87,94 ----
return new CancelHeldTransferReceipt(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 String comment = elem.attributeValue("comment");
if (elem.getName().equals(TransferGlobals.XFER_TAGNAME))
return new TransferRequest(core, asset, to, amount, valuetime, comment);
***************
*** 93,98 ****
return new HeldTransferRequest(core, asset, to, amount, valuetime, comment, helduntil);
! Identity from = NSResolver.resolveIdentity(elem.attributeValue("sender"));
! String reqid = elem.attributeValue("reqid");
if (elem.getName().equals(TransferGlobals.XFER_RCPT_TAGNAME))
return new TransferReceipt(core, asset, from, to, reqid, amount, valuetime, comment);
--- 100,105 ----
return new HeldTransferRequest(core, asset, to, amount, valuetime, 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);
***************
*** 108,110 ****
--- 115,119 ----
}
+
+
}
Index: CancelHeldTransferReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/CancelHeldTransferReceipt.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CancelHeldTransferReceipt.java 20 Nov 2003 16:01:59 -0000 1.2
--- CancelHeldTransferReceipt.java 21 Nov 2003 04:43:04 -0000 1.3
***************
*** 16,20 ****
public final class CancelHeldTransferReceipt extends AssetTransactionContract{
! CancelHeldTransferReceipt(SignedNamedCore core, Asset asset, String holdid) throws NeuClearException {
super(core, asset);
this.holdid = holdid;
--- 16,20 ----
public final class CancelHeldTransferReceipt extends AssetTransactionContract{
! CancelHeldTransferReceipt(final SignedNamedCore core, final Asset asset, final String holdid) throws NeuClearException {
super(core, asset);
this.holdid = holdid;
Index: CancelHeldTransferRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/CancelHeldTransferRequest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CancelHeldTransferRequest.java 20 Nov 2003 16:01:59 -0000 1.2
--- CancelHeldTransferRequest.java 21 Nov 2003 04:43:04 -0000 1.3
***************
*** 16,20 ****
public final class CancelHeldTransferRequest extends AssetTransactionContract{
! CancelHeldTransferRequest(SignedNamedCore core, Asset asset, String holdid) throws NeuClearException {
super(core, asset);
this.holdid = holdid;
--- 16,20 ----
public final class CancelHeldTransferRequest extends AssetTransactionContract{
! CancelHeldTransferRequest(final SignedNamedCore core, final Asset asset, final String holdid) throws NeuClearException {
super(core, asset);
this.holdid = holdid;
Index: CompleteHeldTransferRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/CompleteHeldTransferRequest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CompleteHeldTransferRequest.java 20 Nov 2003 16:01:59 -0000 1.2
--- CompleteHeldTransferRequest.java 21 Nov 2003 04:43:04 -0000 1.3
***************
*** 14,18 ****
*/
public final class CompleteHeldTransferRequest extends TransferContract {
! CompleteHeldTransferRequest(SignedNamedCore core, Asset asset, Identity from, Identity to, double amount, Date valuetime, String comment, String holdid) throws NeuClearException {
super(core, asset, to, amount, valuetime, comment);
this.from = from;
--- 14,18 ----
*/
public final class CompleteHeldTransferRequest extends TransferContract {
! CompleteHeldTransferRequest(final SignedNamedCore core, final Asset asset, final Identity from, final Identity to, final double amount, final Date valuetime, final String comment, final String holdid) throws NeuClearException {
super(core, asset, to, amount, valuetime, comment);
this.from = from;
Index: HeldTransferReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/HeldTransferReceipt.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** HeldTransferReceipt.java 20 Nov 2003 16:01:59 -0000 1.3
--- HeldTransferReceipt.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 15,19 ****
public final class HeldTransferReceipt extends TransferReceipt implements Held {
! HeldTransferReceipt(SignedNamedCore core, Asset asset, Identity from, Identity to, String reqid, double amount, Date valuetime, String comment, Date helduntil) throws NeuClearException {
super(core, asset, from, to, reqid, amount, valuetime, comment);
this.helduntil = helduntil;
--- 15,19 ----
public final class HeldTransferReceipt extends TransferReceipt implements Held {
! HeldTransferReceipt(final SignedNamedCore core, final Asset asset, final Identity from, final Identity to, final String reqid, final double amount, final Date valuetime, final String comment, final Date helduntil) throws NeuClearException {
super(core, asset, from, to, reqid, amount, valuetime, comment);
this.helduntil = helduntil;
Index: HeldTransferRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/HeldTransferRequest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HeldTransferRequest.java 20 Nov 2003 16:01:59 -0000 1.2
--- HeldTransferRequest.java 21 Nov 2003 04:43:04 -0000 1.3
***************
*** 14,18 ****
*/
public final class HeldTransferRequest extends TransferRequest implements Held {
! HeldTransferRequest(SignedNamedCore core, Asset asset, Identity to, double amount, Date valuetime, String comment, Date helduntil) throws NeuClearException {
super(core, asset, to, amount, valuetime, comment);
this.helduntil = helduntil;
--- 14,18 ----
*/
public final class HeldTransferRequest extends TransferRequest implements Held {
! HeldTransferRequest(final SignedNamedCore core, final Asset asset, final Identity to, final double amount, final Date valuetime, final String comment, final Date helduntil) throws NeuClearException {
super(core, asset, to, amount, valuetime, comment);
this.helduntil = helduntil;
Index: TransferContract.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/TransferContract.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** TransferContract.java 20 Nov 2003 16:01:59 -0000 1.4
--- TransferContract.java 21 Nov 2003 04:43:04 -0000 1.5
***************
*** 45,49 ****
*/
public abstract class TransferContract extends AssetTransactionContract {
! TransferContract(SignedNamedCore core, Asset asset, Identity to, double amount, Date valuetime, String comment) throws NeuClearException {
super(core, asset);
this.amount = amount;
--- 45,49 ----
*/
public abstract class TransferContract extends AssetTransactionContract {
! TransferContract(final SignedNamedCore core, final Asset asset, final Identity to, final double amount, final Date valuetime, final String comment) throws NeuClearException {
super(core, asset);
this.amount = amount;
Index: TransferGlobals.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/TransferGlobals.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** TransferGlobals.java 10 Nov 2003 17:42:07 -0000 1.2
--- TransferGlobals.java 21 Nov 2003 04:43:04 -0000 1.3
***************
*** 2,5 ****
--- 2,6 ----
import org.dom4j.*;
+ import org.neuclear.id.verifier.VerifyingReader;
/*
***************
*** 23,26 ****
--- 24,33 ----
$Id$
$Log$
+ 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.
***************
*** 69,82 ****
}
! public static QName createQName(String name) {
return DocumentHelper.createQName(name, createNameSpace());
}
! public static Attribute createAttribute(Element elem, String name, String value) {
return DocumentHelper.createAttribute(elem, createQName(name), value);
}
! public static Element createElement(String name, String value) {
return DocumentHelper.createElement(createQName(name));
}
--- 76,99 ----
}
! 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) {
return DocumentHelper.createElement(createQName(name));
+ }
+ static {
+ 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());
+
}
Index: TransferReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/TransferReceipt.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TransferReceipt.java 20 Nov 2003 16:01:59 -0000 1.3
--- TransferReceipt.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 17,21 ****
private final String reqid;
! TransferReceipt(SignedNamedCore core, Asset asset, Identity from, Identity to, String reqid, double amount, Date valuetime, String comment) throws NeuClearException {
super(core, asset, to, amount, valuetime, comment);
this.from = from;
--- 17,21 ----
private final String reqid;
! TransferReceipt(final SignedNamedCore core, final Asset asset, final Identity from, final Identity to, final String reqid, final double amount, final Date valuetime, final String comment) throws NeuClearException {
super(core, asset, to, amount, valuetime, comment);
this.from = from;
Index: TransferRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/TransferRequest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TransferRequest.java 20 Nov 2003 16:01:59 -0000 1.3
--- TransferRequest.java 21 Nov 2003 04:43:04 -0000 1.4
***************
*** 15,19 ****
public class TransferRequest extends TransferContract {
! TransferRequest(SignedNamedCore core, Asset asset, Identity to, double amount, Date valuetime, String comment) throws NeuClearException {
super(core, asset, to, amount, valuetime, comment);
}
--- 15,19 ----
public class TransferRequest extends TransferContract {
! TransferRequest(final SignedNamedCore core, final Asset asset, final Identity to, final double amount, final Date valuetime, final String comment) throws NeuClearException {
super(core, asset, to, amount, valuetime, comment);
}
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders
In directory sc8-pr-cvs1:/tmp/cvs-serv10286/src/java/org/neuclear/asset/contracts/builders
Modified Files:
AssetBuilder.java CancelHeldTransferBuilder.java
CancelHeldTransferReceiptBuilder.java
CancelHeldTransferRequestBuilder.java
CompleteHeldTransferRequestBuilder.java
HeldTransferReceiptBuilder.java
HeldTransferRequestBuilder.java TransferBuilder.java
TransferReceiptBuilder.java TransferRequestBuilder.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AssetBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/AssetBuilder.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** AssetBuilder.java 20 Nov 2003 23:40:50 -0000 1.3
--- AssetBuilder.java 21 Nov 2003 04:43:03 -0000 1.4
***************
*** 8,11 ****
--- 8,12 ----
import org.neuclear.commons.crypto.signers.TestCaseSigner;
import org.neuclear.id.builders.IdentityBuilder;
+ import org.neuclear.id.SignedNamedObject;
import org.neuclear.store.FileStore;
import org.neuclear.store.Store;
***************
*** 35,38 ****
--- 36,45 ----
$Id$
$Log$
+ 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/20 23:40:50 pelle
Getting all the tests to work in id
***************
*** 84,88 ****
* Time: 3:13:27 PM
*/
! public class AssetBuilder extends IdentityBuilder {
/**
* Used to create new Assets
--- 91,95 ----
* Time: 3:13:27 PM
*/
! public final class AssetBuilder extends IdentityBuilder {
/**
* Used to create new Assets
***************
*** 97,103 ****
* @param minimum Minimum transaction size
*/
! public AssetBuilder(String name, PublicKey allow, String repository, String signer, String logger, String receiver, String controller, int decimal, double minimum) {
super(AssetGlobals.createQName(AssetGlobals.ASSET_TAGNAME), name, allow, repository, signer, logger, receiver);
! Element elem = getElement();
AssetGlobals.createAttribute(elem, "controller", controller);
AssetGlobals.createAttribute(elem, "decimalpoints", Integer.toString(decimal));
--- 104,110 ----
* @param minimum Minimum transaction size
*/
! public AssetBuilder(final String name, final PublicKey allow, final String repository, final String signer, final String logger, final String receiver, final String controller, final int decimal, final double minimum) throws NeuClearException {
super(AssetGlobals.createQName(AssetGlobals.ASSET_TAGNAME), name, allow, repository, signer, logger, receiver);
! final Element elem = getElement();
AssetGlobals.createAttribute(elem, "controller", controller);
AssetGlobals.createAttribute(elem, "decimalpoints", Integer.toString(decimal));
***************
*** 106,117 ****
}
! public static void main(String args[]) {
try {
! JCESigner signer = new TestCaseSigner();
String assetname = "neu://test/bux";
if (args.length > 0)
assetname = args[0];
! AssetBuilder assetraw = new AssetBuilder(assetname,
signer.getPublicKey(assetname),
"http://repository.neuclear.org/",
--- 113,124 ----
}
! public static void main(final String[] args) {
try {
! final JCESigner signer = new TestCaseSigner();
String assetname = "neu://test/bux";
if (args.length > 0)
assetname = args[0];
! final AssetBuilder assetraw = new AssetBuilder(assetname,
signer.getPublicKey(assetname),
"http://repository.neuclear.org/",
***************
*** 123,128 ****
0.01
);
! Asset asset = (Asset) assetraw.sign(signer);
! Store store = new FileStore("target/testdata/assets");
store.receive(asset);
} catch (GeneralSecurityException e) {
--- 130,135 ----
0.01
);
! final Asset asset= (Asset) assetraw.sign(signer);
! final Store store = new FileStore("target/testdata/repository");
store.receive(asset);
} catch (GeneralSecurityException e) {
Index: CancelHeldTransferBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/CancelHeldTransferBuilder.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** CancelHeldTransferBuilder.java 12 Nov 2003 23:47:04 -0000 1.3
--- CancelHeldTransferBuilder.java 21 Nov 2003 04:43:03 -0000 1.4
***************
*** 7,10 ****
--- 7,11 ----
import org.neuclear.asset.contracts.TransferGlobals;
import org.neuclear.id.builders.NamedObjectBuilder;
+ import org.neuclear.commons.NeuClearException;
/*
***************
*** 28,31 ****
--- 29,38 ----
$Id$
$Log$
+ 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.
***************
*** 73,77 ****
*/
public abstract class CancelHeldTransferBuilder extends NamedObjectBuilder {
! protected CancelHeldTransferBuilder(String tagname, String name, Asset asset, String holdid) throws InvalidTransferException, NegativeTransferException {
super(name, TransferGlobals.createQName(tagname));
if (asset == null)
--- 80,84 ----
*/
public abstract class CancelHeldTransferBuilder extends NamedObjectBuilder {
! protected CancelHeldTransferBuilder(final String tagname, final String name, final Asset asset, final String holdid) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(name, TransferGlobals.createQName(tagname));
if (asset == null)
***************
*** 81,85 ****
this.asset = asset;
! Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "assetName", asset.getName()));
element.add(TransferGlobals.createAttribute(element, "holdid", holdid));
--- 88,92 ----
this.asset = asset;
! final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "assetName", asset.getName()));
element.add(TransferGlobals.createAttribute(element, "holdid", holdid));
Index: CancelHeldTransferReceiptBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/CancelHeldTransferReceiptBuilder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CancelHeldTransferReceiptBuilder.java 10 Nov 2003 17:42:07 -0000 1.1
--- CancelHeldTransferReceiptBuilder.java 21 Nov 2003 04:43:03 -0000 1.2
***************
*** 9,12 ****
--- 9,13 ----
import org.neuclear.id.Identity;
import org.neuclear.id.NSTools;
+ import org.neuclear.commons.NeuClearException;
/**
***************
*** 17,20 ****
--- 18,27 ----
* $Id$
* $Log$
+ * 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.
***************
*** 23,28 ****
*
*/
! public class CancelHeldTransferReceiptBuilder extends CancelHeldTransferBuilder {
! public CancelHeldTransferReceiptBuilder(CancelHeldTransferRequest req) throws InvalidTransferException, NegativeTransferException {
super(NSTools.createUniqueNamedID(req.getAsset().getName(),req.getSignatory().getName()),TransferGlobals.CANCEL_RCPT_TAGNAME, req.getAsset(),req.getHoldId());
}
--- 30,35 ----
*
*/
! public final class CancelHeldTransferReceiptBuilder extends CancelHeldTransferBuilder {
! public CancelHeldTransferReceiptBuilder(final CancelHeldTransferRequest req) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(NSTools.createUniqueNamedID(req.getAsset().getName(),req.getSignatory().getName()),TransferGlobals.CANCEL_RCPT_TAGNAME, req.getAsset(),req.getHoldId());
}
Index: CancelHeldTransferRequestBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/CancelHeldTransferRequestBuilder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CancelHeldTransferRequestBuilder.java 10 Nov 2003 17:42:07 -0000 1.1
--- CancelHeldTransferRequestBuilder.java 21 Nov 2003 04:43:03 -0000 1.2
***************
*** 8,11 ****
--- 8,12 ----
import org.neuclear.id.Identity;
import org.neuclear.id.NSTools;
+ import org.neuclear.commons.NeuClearException;
/**
***************
*** 16,19 ****
--- 17,26 ----
* $Id$
* $Log$
+ * 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.
***************
*** 22,27 ****
*
*/
! public class CancelHeldTransferRequestBuilder extends CancelHeldTransferBuilder {
! public CancelHeldTransferRequestBuilder(HeldTransferReceipt held) throws InvalidTransferException, NegativeTransferException {
super(NSTools.createUniqueNamedID(held.getTo().getName(),held.getAsset().getName()),TransferGlobals.CANCEL_TAGNAME, held.getAsset(),held.getName());
}
--- 29,34 ----
*
*/
! public final class CancelHeldTransferRequestBuilder extends CancelHeldTransferBuilder {
! public CancelHeldTransferRequestBuilder(final HeldTransferReceipt held) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(NSTools.createUniqueNamedID(held.getTo().getName(),held.getAsset().getName()),TransferGlobals.CANCEL_TAGNAME, held.getAsset(),held.getName());
}
Index: CompleteHeldTransferRequestBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/CompleteHeldTransferRequestBuilder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CompleteHeldTransferRequestBuilder.java 10 Nov 2003 17:42:07 -0000 1.1
--- CompleteHeldTransferRequestBuilder.java 21 Nov 2003 04:43:03 -0000 1.2
***************
*** 9,12 ****
--- 9,13 ----
import org.neuclear.asset.NegativeTransferException;
import org.neuclear.id.Identity;
+ import org.neuclear.commons.NeuClearException;
import java.util.Date;
***************
*** 32,35 ****
--- 33,42 ----
$Id$
$Log$
+ 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.
***************
*** 66,71 ****
* Time: 6:28:26 PM
*/
! public class CompleteHeldTransferRequestBuilder extends TransferBuilder {
! public CompleteHeldTransferRequestBuilder(HeldTransferReceipt req,Identity signatory,String id,Date valuetime,double amount, String comment) throws InvalidTransferException, NegativeTransferException {
super(TransferGlobals.COMPLETE_TAGNAME,
req.getAsset(),
--- 73,78 ----
* Time: 6:28:26 PM
*/
! public final class CompleteHeldTransferRequestBuilder extends TransferBuilder {
! public CompleteHeldTransferRequestBuilder(final HeldTransferReceipt req,final Identity signatory,final String id,final Date valuetime,final double amount, final String comment) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(TransferGlobals.COMPLETE_TAGNAME,
req.getAsset(),
***************
*** 75,79 ****
valuetime,
comment);
! Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "sender", req.getFrom().getName()));
element.add(TransferGlobals.createAttribute(element, "holdid", req.getName()));
--- 82,86 ----
valuetime,
comment);
! final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "sender", req.getFrom().getName()));
element.add(TransferGlobals.createAttribute(element, "holdid", req.getName()));
Index: HeldTransferReceiptBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/HeldTransferReceiptBuilder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HeldTransferReceiptBuilder.java 11 Nov 2003 21:17:19 -0000 1.2
--- HeldTransferReceiptBuilder.java 21 Nov 2003 04:43:03 -0000 1.3
***************
*** 7,10 ****
--- 7,11 ----
import org.neuclear.asset.contracts.TransferGlobals;
import org.neuclear.commons.time.TimeTools;
+ import org.neuclear.commons.NeuClearException;
/*
***************
*** 28,31 ****
--- 29,38 ----
$Id$
$Log$
+ 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.
***************
*** 53,60 ****
* Time: 8:05:15 PM
*/
! public class HeldTransferReceiptBuilder extends TransferReceiptBuilder {
! public HeldTransferReceiptBuilder(HeldTransferRequest req, String id) throws InvalidTransferException, NegativeTransferException {
super(TransferGlobals.HELD_XFER_RCPT_TAGNAME, req, id);
! Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "helduntil", TimeTools.formatTimeStamp(req.getHeldUntil())));
--- 60,67 ----
* Time: 8:05:15 PM
*/
! public final class HeldTransferReceiptBuilder extends TransferReceiptBuilder {
! public HeldTransferReceiptBuilder(final HeldTransferRequest req, final String id) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(TransferGlobals.HELD_XFER_RCPT_TAGNAME, req, id);
! final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "helduntil", TimeTools.formatTimeStamp(req.getHeldUntil())));
Index: HeldTransferRequestBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/HeldTransferRequestBuilder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HeldTransferRequestBuilder.java 11 Nov 2003 21:17:19 -0000 1.2
--- HeldTransferRequestBuilder.java 21 Nov 2003 04:43:03 -0000 1.3
***************
*** 8,11 ****
--- 8,12 ----
import org.neuclear.id.Identity;
import org.neuclear.commons.time.TimeTools;
+ import org.neuclear.commons.NeuClearException;
import java.util.Date;
***************
*** 31,34 ****
--- 32,41 ----
$Id$
$Log$
+ 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.
***************
*** 56,64 ****
* Time: 7:59:13 PM
*/
! public class HeldTransferRequestBuilder extends TransferRequestBuilder {
! public HeldTransferRequestBuilder(Asset asset, Identity signer, Identity to, double amount, Date valuetime, String comment, Date helduntil) throws InvalidTransferException, NegativeTransferException {
super(TransferGlobals.HELD_XFER_TAGNAME, asset, signer, to, amount, valuetime, comment);
! Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "helduntil", TimeTools.formatTimeStamp(helduntil)));
--- 63,71 ----
* Time: 7:59:13 PM
*/
! public final class HeldTransferRequestBuilder extends TransferRequestBuilder {
! public HeldTransferRequestBuilder(final Asset asset, final Identity signer, final Identity to, final double amount, final Date valuetime, final String comment, final Date helduntil) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(TransferGlobals.HELD_XFER_TAGNAME, asset, signer, to, amount, valuetime, comment);
! final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "helduntil", TimeTools.formatTimeStamp(helduntil)));
Index: TransferBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/TransferBuilder.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** TransferBuilder.java 12 Nov 2003 23:47:04 -0000 1.5
--- TransferBuilder.java 21 Nov 2003 04:43:03 -0000 1.6
***************
*** 7,10 ****
--- 7,11 ----
import org.neuclear.asset.contracts.TransferGlobals;
import org.neuclear.commons.Utility;
+ import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.time.TimeTools;
import org.neuclear.id.Identity;
***************
*** 34,37 ****
--- 35,44 ----
$Id$
$Log$
+ 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.
***************
*** 79,83 ****
*/
public abstract class TransferBuilder extends NamedObjectBuilder {
! protected TransferBuilder(String tagname, Asset asset, Identity signer, Identity to, double amount, Date valuetime, String comment) throws InvalidTransferException, NegativeTransferException {
super(NSTools.createUniqueNamedID(signer.getName(), to.getName()), TransferGlobals.createQName(tagname));
if (amount < 0)
--- 86,90 ----
*/
public abstract class TransferBuilder extends NamedObjectBuilder {
! protected TransferBuilder(final String tagname, final Asset asset, final Identity signer, final Identity to, final double amount, final Date valuetime, final String comment) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(NSTools.createUniqueNamedID(signer.getName(), to.getName()), TransferGlobals.createQName(tagname));
if (amount < 0)
***************
*** 91,95 ****
this.asset = asset;
! Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "recipient", to.getName()));
element.add(TransferGlobals.createAttribute(element, "assetName", asset.getName()));
--- 98,102 ----
this.asset = asset;
! final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "recipient", to.getName()));
element.add(TransferGlobals.createAttribute(element, "assetName", asset.getName()));
Index: TransferReceiptBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/TransferReceiptBuilder.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TransferReceiptBuilder.java 10 Nov 2003 17:42:07 -0000 1.3
--- TransferReceiptBuilder.java 21 Nov 2003 04:43:03 -0000 1.4
***************
*** 5,8 ****
--- 5,9 ----
import org.neuclear.asset.InvalidTransferException;
import org.neuclear.asset.NegativeTransferException;
+ import org.neuclear.commons.NeuClearException;
import java.util.Date;
***************
*** 28,31 ****
--- 29,38 ----
$Id$
$Log$
+ 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.
***************
*** 63,70 ****
*/
public class TransferReceiptBuilder extends TransferBuilder {
! public TransferReceiptBuilder(TransferRequest req,String id) throws InvalidTransferException, NegativeTransferException {
this(TransferGlobals.XFER_RCPT_TAGNAME,req,id);
}
! public TransferReceiptBuilder(CompleteHeldTransferRequest req,String id) throws InvalidTransferException, NegativeTransferException {
super(TransferGlobals.XFER_RCPT_TAGNAME,
req.getAsset(),
--- 70,77 ----
*/
public class TransferReceiptBuilder extends TransferBuilder {
! public TransferReceiptBuilder(final TransferRequest req,final String id) throws InvalidTransferException, NegativeTransferException, NeuClearException {
this(TransferGlobals.XFER_RCPT_TAGNAME,req,id);
}
! public TransferReceiptBuilder(final CompleteHeldTransferRequest req,final String id) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(TransferGlobals.XFER_RCPT_TAGNAME,
req.getAsset(),
***************
*** 74,83 ****
req.getValueTime(),
req.getComment());
! Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "sender", req.getFrom().getName()));
element.add(TransferGlobals.createAttribute(element, "holdid", req.getHoldId()));
}
! TransferReceiptBuilder(String tagname,TransferRequest req,String id) throws InvalidTransferException, NegativeTransferException {
super(tagname,
req.getAsset(),
--- 81,90 ----
req.getValueTime(),
req.getComment());
! final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "sender", req.getFrom().getName()));
element.add(TransferGlobals.createAttribute(element, "holdid", req.getHoldId()));
}
! TransferReceiptBuilder(final String tagname,final TransferRequest req,final String id) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(tagname,
req.getAsset(),
***************
*** 87,91 ****
req.getValueTime(),
req.getComment());
! Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "sender", req.getFrom().getName()));
element.add(TransferGlobals.createAttribute(element, "reqid", req.getName()));
--- 94,98 ----
req.getValueTime(),
req.getComment());
! final Element element = getElement();
element.add(TransferGlobals.createAttribute(element, "sender", req.getFrom().getName()));
element.add(TransferGlobals.createAttribute(element, "reqid", req.getName()));
Index: TransferRequestBuilder.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/contracts/builders/TransferRequestBuilder.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** TransferRequestBuilder.java 10 Nov 2003 17:42:07 -0000 1.3
--- TransferRequestBuilder.java 21 Nov 2003 04:43:03 -0000 1.4
***************
*** 7,10 ****
--- 7,11 ----
import org.neuclear.id.Identity;
import org.neuclear.id.NSTools;
+ import org.neuclear.commons.NeuClearException;
import java.util.Date;
***************
*** 30,33 ****
--- 31,40 ----
$Id$
$Log$
+ 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.
***************
*** 65,72 ****
*/
public class TransferRequestBuilder extends TransferBuilder {
! public TransferRequestBuilder(Asset asset, Identity signer, Identity to, double amount, Date valuetime, String comment) throws InvalidTransferException, NegativeTransferException {
this(TransferGlobals.XFER_TAGNAME, asset, signer, to, amount, valuetime, comment);
}
! TransferRequestBuilder(String tagname,Asset asset, Identity signer, Identity to, double amount, Date valuetime, String comment) throws InvalidTransferException, NegativeTransferException {
super(tagname, asset, signer, to, amount, valuetime, comment);
}
--- 72,79 ----
*/
public class TransferRequestBuilder extends TransferBuilder {
! public TransferRequestBuilder(final Asset asset, final Identity signer, final Identity to, final double amount, final Date valuetime, final String comment) throws InvalidTransferException, NegativeTransferException, NeuClearException {
this(TransferGlobals.XFER_TAGNAME, asset, signer, to, amount, valuetime, comment);
}
! TransferRequestBuilder(final String tagname,final Asset asset, final Identity signer, final Identity to, final double amount, final Date valuetime, final String comment) throws InvalidTransferException, NegativeTransferException, NeuClearException {
super(tagname, asset, signer, to, amount, valuetime, comment);
}
|
|
From: <pe...@us...> - 2003-11-21 04:43:07
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/receiver/servlet
In directory sc8-pr-cvs1:/tmp/cvs-serv10286/src/java/org/neuclear/asset/receiver/servlet
Modified Files:
AssetControllerServlet.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AssetControllerServlet.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/receiver/servlet/AssetControllerServlet.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** AssetControllerServlet.java 19 Nov 2003 23:32:20 -0000 1.2
--- AssetControllerServlet.java 21 Nov 2003 04:43:04 -0000 1.3
***************
*** 33,36 ****
--- 33,42 ----
$Id$
$Log$
+ 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/19 23:32:20 pelle
Signers now can generatekeys via the generateKey() method.
***************
*** 52,57 ****
* Time: 6:18:18 PM
*/
! public class AssetControllerServlet extends ReceiverServlet {
! public void init(ServletConfig config) throws ServletException {
super.init(config);
serviceid = config.getInitParameter("serviceid");
--- 58,63 ----
* Time: 6:18:18 PM
*/
! public final class AssetControllerServlet extends ReceiverServlet {
! public final void init(final ServletConfig config) throws ServletException {
super.init(config);
serviceid = config.getInitParameter("serviceid");
***************
*** 59,63 ****
try {
asset = (Asset) NSResolver.resolveIdentity(serviceid);
! AssetControllerReceiver receiver = new AssetControllerReceiver(
new CurrencyController(
new SQLLedger(
--- 65,69 ----
try {
asset = (Asset) NSResolver.resolveIdentity(serviceid);
! final AssetControllerReceiver receiver = new AssetControllerReceiver(
new CurrencyController(
new SQLLedger(
***************
*** 76,80 ****
}
! public Asset getAsset() {
final byte test[] = "one two three".getBytes();
test[0] = 0;
--- 82,86 ----
}
! public final Asset getAsset() {
final byte test[] = "one two three".getBytes();
test[0] = 0;
***************
*** 83,91 ****
}
! public String getServiceid() {
return serviceid;
}
! public String getDatasource() {
return datasource;
}
--- 89,97 ----
}
! public final String getServiceid() {
return serviceid;
}
! public final String getDatasource() {
return datasource;
}
|
|
From: <pe...@us...> - 2003-11-21 04:43:07
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/controllers/currency
In directory sc8-pr-cvs1:/tmp/cvs-serv10286/src/java/org/neuclear/asset/controllers/currency
Modified Files:
CurrencyController.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: CurrencyController.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/controllers/currency/CurrencyController.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CurrencyController.java 12 Nov 2003 23:47:04 -0000 1.5
--- CurrencyController.java 21 Nov 2003 04:43:04 -0000 1.6
***************
*** 24,28 ****
// this(LedgerFactory.getInstance().getLedger(ledgername),title,reserve);
// }
! public CurrencyController(Ledger ledger, String assetname) throws LowlevelLedgerException, BookExistsException, NeuClearException {
super();
this.ledger = ledger;
--- 24,28 ----
// this(LedgerFactory.getInstance().getLedger(ledgername),title,reserve);
// }
! public CurrencyController(final Ledger ledger, final String assetname) throws LowlevelLedgerException, BookExistsException, NeuClearException {
super();
this.ledger = ledger;
***************
*** 38,53 ****
}
! public boolean canProcess(Asset asset) {
return this.asset.getName().equals(asset.getName());
}
! public final TransferReceiptBuilder processTransfer(TransferRequest req) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException {
try {
if (!req.getSignatory().equals(req.getFrom()))
throw new TransferDeniedException(req);
! Book from = getBook(req.getFrom());
! Book to = getBook(req.getTo());
! PostedTransaction posted = from.transfer(to, req.getAmount(), req.getComment(), req.getValueTime());
return new TransferReceiptBuilder(req, createTransactionId(req, posted));
} catch (UnknownBookException e) {
--- 38,53 ----
}
! public boolean canProcess(final Asset asset) {
return this.asset.getName().equals(asset.getName());
}
! public final TransferReceiptBuilder processTransfer(final TransferRequest req) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException, NeuClearException {
try {
if (!req.getSignatory().equals(req.getFrom()))
throw new TransferDeniedException(req);
! final Book from = getBook(req.getFrom());
! final Book to = getBook(req.getTo());
! final PostedTransaction posted = from.transfer(to, req.getAmount(), req.getComment(), req.getValueTime());
return new TransferReceiptBuilder(req, createTransactionId(req, posted));
} catch (UnknownBookException e) {
***************
*** 64,72 ****
}
! private String createTransactionId(TransferRequest req, PostedTransaction posted) {
return req.getAsset().getName() + "/" + posted.getXid();
}
! private Book getBook(Identity id) throws UnknownBookException, LowlevelLedgerException {
return ledger.getBook(id.getName());
}
--- 64,72 ----
}
! private String createTransactionId(final TransferRequest req, final PostedTransaction posted) {
return req.getAsset().getName() + "/" + posted.getXid();
}
! private Book getBook(final Identity id) throws UnknownBookException, LowlevelLedgerException {
return ledger.getBook(id.getName());
}
***************
*** 80,84 ****
* @throws LowLevelPaymentException
*/
! public double getBalance(Identity id, Date time) throws LowLevelPaymentException {
try {
return getBook(id).getBalance(time);
--- 80,84 ----
* @throws LowLevelPaymentException
*/
! public double getBalance(final Identity id, final Date time) throws LowLevelPaymentException {
try {
return getBook(id).getBalance(time);
***************
*** 90,101 ****
}
! public final HeldTransferReceiptBuilder processHeldTransfer(HeldTransferRequest req) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException {
try {
if (!req.getSignatory().equals(req.getFrom()))
throw new TransferDeniedException(req);
! Book from = getBook(req.getFrom());
! Book to = getBook(req.getTo());
! PostedHeldTransaction posted = from.hold(to, req.getAmount(), req.getComment(), req.getValueTime(), req.getHeldUntil());
--- 90,101 ----
}
! public final HeldTransferReceiptBuilder processHeldTransfer(final HeldTransferRequest req) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException, NeuClearException {
try {
if (!req.getSignatory().equals(req.getFrom()))
throw new TransferDeniedException(req);
! final Book from = getBook(req.getFrom());
! final Book to = getBook(req.getTo());
! final PostedHeldTransaction posted = from.hold(to, req.getAmount(), req.getComment(), req.getValueTime(), req.getHeldUntil());
***************
*** 114,126 ****
}
! public final TransferReceiptBuilder processCompleteHold(CompleteHeldTransferRequest complete) throws LowLevelPaymentException, InvalidTransferException, TransferDeniedException {
try {
if (!complete.getSignatory().equals(complete.getTo()))
throw new TransferDeniedException(complete);
! PostedHeldTransaction heldTran = ledger.findHeldTransaction(complete.getName());
if (heldTran == null)
throw new InvalidTransferException("holdid");
! double amount = getTransactionAmount(heldTran);
if (amount > complete.getAmount())
throw new TransferLargerThanHeldException(complete, amount);
--- 114,126 ----
}
! public final TransferReceiptBuilder processCompleteHold(final CompleteHeldTransferRequest complete) throws LowLevelPaymentException, InvalidTransferException, TransferDeniedException, NeuClearException {
try {
if (!complete.getSignatory().equals(complete.getTo()))
throw new TransferDeniedException(complete);
! final PostedHeldTransaction heldTran = ledger.findHeldTransaction(complete.getName());
if (heldTran == null)
throw new InvalidTransferException("holdid");
! final double amount = getTransactionAmount(heldTran);
if (amount > complete.getAmount())
throw new TransferLargerThanHeldException(complete, amount);
***************
*** 130,134 ****
throw new ExpiredHeldTransferException(complete);
! PostedTransaction tran = heldTran.complete(complete.getAmount(), complete.getValueTime(), complete.getComment());
return new TransferReceiptBuilder(complete, tran.getXid());
} catch (UnknownTransactionException e) {
--- 130,134 ----
throw new ExpiredHeldTransferException(complete);
! final PostedTransaction tran = heldTran.complete(complete.getAmount(), complete.getValueTime(), complete.getComment());
return new TransferReceiptBuilder(complete, tran.getXid());
} catch (UnknownTransactionException e) {
***************
*** 143,149 ****
}
! public final CancelHeldTransferReceiptBuilder processCancelHold(CancelHeldTransferRequest cancel) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException {
try {
! PostedHeldTransaction heldTran = ledger.findHeldTransaction(cancel.getHoldId());
if (!isRecipient(cancel.getSignatory(), heldTran))
throw new TransferDeniedException(cancel);
--- 143,149 ----
}
! public final CancelHeldTransferReceiptBuilder processCancelHold(final CancelHeldTransferRequest cancel) throws InvalidTransferException, LowLevelPaymentException, TransferDeniedException, NeuClearException {
try {
! final PostedHeldTransaction heldTran = ledger.findHeldTransaction(cancel.getHoldId());
if (!isRecipient(cancel.getSignatory(), heldTran))
throw new TransferDeniedException(cancel);
***************
*** 164,172 ****
* @return
*/
! private static double getTransactionAmount(PostedTransaction tran) {
! Iterator iter = tran.getItems();
double amount = 0;
while (iter.hasNext()) {
! TransactionItem item = (TransactionItem) iter.next();
if (item.getAmount() > 0)
amount += item.getAmount();
--- 164,172 ----
* @return
*/
! private static double getTransactionAmount(final PostedTransaction tran) {
! final Iterator iter = tran.getItems();
double amount = 0;
while (iter.hasNext()) {
! final TransactionItem item = (TransactionItem) iter.next();
if (item.getAmount() > 0)
amount += item.getAmount();
***************
*** 182,189 ****
* @return
*/
! private static boolean isRecipient(Identity id, PostedTransaction tran) {
! Iterator iter = tran.getItems();
while (iter.hasNext()) {
! TransactionItem item = (TransactionItem) iter.next();
if (item.getAmount() >= 0 && item.getBook().getBookID().equals(id.getName()))
return true;
--- 182,189 ----
* @return
*/
! private static boolean isRecipient(final Identity id, final PostedTransaction tran) {
! final Iterator iter = tran.getItems();
while (iter.hasNext()) {
! final TransactionItem item = (TransactionItem) iter.next();
if (item.getAmount() >= 0 && item.getBook().getBookID().equals(id.getName()))
return true;
|
|
From: <pe...@us...> - 2003-11-21 04:43:07
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/remote
In directory sc8-pr-cvs1:/tmp/cvs-serv10286/src/java/org/neuclear/asset/remote
Modified Files:
AssetControlClient.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AssetControlClient.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/remote/AssetControlClient.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** AssetControlClient.java 19 Nov 2003 23:32:20 -0000 1.6
--- AssetControlClient.java 21 Nov 2003 04:43:04 -0000 1.7
***************
*** 30,33 ****
--- 30,39 ----
$Id$
$Log$
+ Revision 1.7 2003/11/21 04:43:04 pelle
+ EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
+ Otherwise You will Finaliate.
+ Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
+ This should hopefully make everything more stable (and secure).
+
Revision 1.6 2003/11/19 23:32:20 pelle
Signers now can generatekeys via the generateKey() method.
***************
*** 88,114 ****
* This client can be used to perform all the major Asset Transfer functionality using the Assets remote assetName server.
*/
! public class AssetControlClient {
! public AssetControlClient(Signer signer) throws NeuClearException {
this.signer = signer;
}
! public TransferReceipt performTransfer(TransferRequestBuilder req) throws NeuClearException, XMLException {
return (TransferReceipt) send(req);
}
! public HeldTransferReceipt performHeldTransfer(HeldTransferRequestBuilder req) throws NeuClearException, XMLException {
return (HeldTransferReceipt) send(req);
}
! public TransferReceipt performCompleteHeld(CompleteHeldTransferRequestBuilder req) throws NeuClearException, XMLException {
return (TransferReceipt) send(req);
}
! public CancelHeldTransferReceipt performCancelHeld(CancelHeldTransferRequestBuilder req) throws NeuClearException, XMLException {
return (CancelHeldTransferReceipt) req.getAsset().send(req.sign(signer));
}
! private SignedNamedObject send(TransferBuilder req) throws NeuClearException, XMLException {
return req.getAsset().send(req.sign(signer));
}
--- 94,120 ----
* This client can be used to perform all the major Asset Transfer functionality using the Assets remote assetName server.
*/
! public final class AssetControlClient {
! public AssetControlClient(final Signer signer) throws NeuClearException {
this.signer = signer;
}
! public final TransferReceipt performTransfer(final TransferRequestBuilder req) throws NeuClearException, XMLException {
return (TransferReceipt) send(req);
}
! public final HeldTransferReceipt performHeldTransfer(final HeldTransferRequestBuilder req) throws NeuClearException, XMLException {
return (HeldTransferReceipt) send(req);
}
! public final TransferReceipt performCompleteHeld(final CompleteHeldTransferRequestBuilder req) throws NeuClearException, XMLException {
return (TransferReceipt) send(req);
}
! public final CancelHeldTransferReceipt performCancelHeld(final CancelHeldTransferRequestBuilder req) throws NeuClearException, XMLException {
return (CancelHeldTransferReceipt) req.getAsset().send(req.sign(signer));
}
! private SignedNamedObject send(final TransferBuilder req) throws NeuClearException, XMLException {
return req.getAsset().send(req.sign(signer));
}
|
|
From: <pe...@us...> - 2003-11-21 04:43:07
|
Update of /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/receiver
In directory sc8-pr-cvs1:/tmp/cvs-serv10286/src/java/org/neuclear/asset/receiver
Modified Files:
AssetControllerReceiver.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AssetControllerReceiver.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-pay/src/java/org/neuclear/asset/receiver/AssetControllerReceiver.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** AssetControllerReceiver.java 11 Nov 2003 21:17:19 -0000 1.4
--- AssetControllerReceiver.java 21 Nov 2003 04:43:04 -0000 1.5
***************
*** 16,19 ****
--- 16,20 ----
import org.neuclear.commons.crypto.signers.Signer;
import org.neuclear.commons.crypto.CryptoException;
+ import org.neuclear.commons.NeuClearException;
import org.neuclear.xml.ElementProxy;
import org.neuclear.xml.xmlsec.XMLSecurityException;
***************
*** 44,50 ****
* Time: 3:03:03 PM
*/
! public class AssetControllerReceiver implements Receiver {
! public AssetControllerReceiver(AssetController proc, Signer signer) {
this.proc = proc;
this.signer = signer;
--- 45,51 ----
* Time: 3:03:03 PM
*/
! public final class AssetControllerReceiver implements Receiver {
! public AssetControllerReceiver(final AssetController proc, final Signer signer) {
this.proc = proc;
this.signer = signer;
***************
*** 57,68 ****
* @throws UnsupportedTransaction
*/
! public final ElementProxy receive(SignedNamedObject obj) throws UnsupportedTransaction {
if (obj instanceof AssetTransactionContract) {
! TransferContract transfer = (TransferContract) obj;
if (!proc.canProcess(transfer.getAsset()))
throw new UnsupportedTransaction(obj);
try {
! NamedObjectBuilder sigReceipt = proc.process(transfer);
sigReceipt.sign(transfer.getAsset().getName(), signer);
return sigReceipt;
--- 58,69 ----
* @throws UnsupportedTransaction
*/
! public final ElementProxy receive(final SignedNamedObject obj) throws UnsupportedTransaction {
if (obj instanceof AssetTransactionContract) {
! final TransferContract transfer = (TransferContract) obj;
if (!proc.canProcess(transfer.getAsset()))
throw new UnsupportedTransaction(obj);
try {
! final NamedObjectBuilder sigReceipt = proc.process(transfer);
sigReceipt.sign(transfer.getAsset().getName(), signer);
return sigReceipt;
***************
*** 78,81 ****
--- 79,84 ----
e.printStackTrace(); //TODO Handle exception
} catch (CryptoException e) {
+ e.printStackTrace(); //TODO Handle exception
+ } catch (NeuClearException e) {
e.printStackTrace(); //TODO Handle exception
}
|
Update of /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet
In directory sc8-pr-cvs1:/tmp/cvs-serv10206/src/java/org/neuclear/bet
Modified Files:
BetLostException.java BetNotFoundException.java
BetProcessor.java BetReceipt.java BetRequest.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: BetLostException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/BetLostException.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** BetLostException.java 20 Sep 2003 23:19:21 -0000 1.1.1.1
--- BetLostException.java 21 Nov 2003 04:42:46 -0000 1.2
***************
*** 7,11 ****
* Time: 5:48:25 PM
*/
! public class BetLostException extends Exception{
}
--- 7,11 ----
* Time: 5:48:25 PM
*/
! public final class BetLostException extends Exception{
}
Index: BetNotFoundException.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/BetNotFoundException.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** BetNotFoundException.java 20 Sep 2003 23:19:21 -0000 1.1.1.1
--- BetNotFoundException.java 21 Nov 2003 04:42:46 -0000 1.2
***************
*** 7,10 ****
* Time: 5:47:24 PM
*/
! public class BetNotFoundException extends Exception{
}
--- 7,10 ----
* Time: 5:47:24 PM
*/
! public final class BetNotFoundException extends Exception{
}
Index: BetProcessor.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/BetProcessor.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** BetProcessor.java 9 Nov 2003 03:26:39 -0000 1.6
--- BetProcessor.java 21 Nov 2003 04:42:46 -0000 1.7
***************
*** 28,32 ****
* This Class manages the betting process.
*/
! public class BetProcessor implements ResultListener {
/**
* Instantiates the BetProcessor with the required CurrencyController to use for
--- 28,32 ----
* This Class manages the betting process.
*/
! public final class BetProcessor implements ResultListener {
/**
* Instantiates the BetProcessor with the required CurrencyController to use for
***************
*** 35,39 ****
* @param pay
*/
! public BetProcessor(Totalizer tote, CurrencyController pay, String title, String id) {
this.pay = pay;
this.title = title;
--- 35,39 ----
* @param pay
*/
! public BetProcessor(final Totalizer tote, final CurrencyController pay, final String title, final String id) {
this.pay = pay;
this.title = title;
***************
*** 45,62 ****
}
! private CurrencyController pay;
! private String title;
! private String id;
! private Totalizer tote;
! public String getTitle() {
return title;
}
! public String getId() {
return id;
}
! public CurrencyController getPaymentProcessor() {
return pay;
}
--- 45,62 ----
}
! private final CurrencyController pay;
! private final String title;
! private final String id;
! private final Totalizer tote;
! public final String getTitle() {
return title;
}
! public final String getId() {
return id;
}
! public final CurrencyController getPaymentProcessor() {
return pay;
}
***************
*** 68,76 ****
* @return BetReceipt
*/
! public BetReceipt processBet(BetRequest req) throws LowlevelLedgerException, BettingEventExpired {
try {
! HeldTransferReceipt held = getPaymentProcessor().processHeldTransfer(new HeldTransferRequest(req.getBettor(), getPoolAccountID(req.getOutcome()), req.getAmount(), new Date(), req.getOutcome().getEvent().getClosingTime(), req.getComment()));
try {
! String ticket = req.getOutcome().bet(req.getAmount());
tickets.put(ticket, held);
return new BetReceipt(req, ticket);
--- 68,76 ----
* @return BetReceipt
*/
! public final BetReceipt processBet(final BetRequest req) throws LowlevelLedgerException, BettingEventExpired {
try {
! final HeldTransferReceipt held = getPaymentProcessor().processHeldTransfer(new HeldTransferRequest(req.getBettor(), getPoolAccountID(req.getOutcome()), req.getAmount(), new Date(), req.getOutcome().getEvent().getClosingTime(), req.getComment()));
try {
! final String ticket = req.getOutcome().bet(req.getAmount());
tickets.put(ticket, held);
return new BetReceipt(req, ticket);
***************
*** 93,97 ****
! public boolean hasWon(BetReceipt receipt) {
return false;
}
--- 93,97 ----
! public final boolean hasWon(final BetReceipt receipt) {
return false;
}
***************
*** 101,105 ****
}
! private Account getPoolAccountID(EventOutcome outcome) throws LowlevelLedgerException {
try {
return pay.getAccount(getId() + "/" + outcome.getId());
--- 101,105 ----
}
! private Account getPoolAccountID(final EventOutcome outcome) throws LowlevelLedgerException {
try {
return pay.getAccount(getId() + "/" + outcome.getId());
***************
*** 118,133 ****
* @param winSrc
*/
! public void win(EventOutcome winSrc) throws LowlevelLedgerException {
! BettableOutcome winner = tote.makeBettable(winSrc);
! BettingEvent event = winner.getEvent();
//First complete hold of all loosers
! Iterator outcomes = event.listOutcomes();
while (outcomes.hasNext()) {
! BettableOutcome outcome = (BettableOutcome) outcomes.next();
if (!outcome.equals(winner)) {
! Iterator loosers = outcome.listBets();
while (loosers.hasNext()) {
! String ticket = (String) loosers.next();
! HeldTransferReceipt held = (HeldTransferReceipt) tickets.get(ticket);
try {
held.complete(tote.getCurrentTime(), held.getAmount(), "Lost Bet: " + ticket + " on: " + outcome.getId() + " at: " + event.getId());
--- 118,133 ----
* @param winSrc
*/
! public final void win(final EventOutcome winSrc) throws LowlevelLedgerException {
! final BettableOutcome winner = tote.makeBettable(winSrc);
! final BettingEvent event = winner.getEvent();
//First complete hold of all loosers
! final Iterator outcomes = event.listOutcomes();
while (outcomes.hasNext()) {
! final BettableOutcome outcome = (BettableOutcome) outcomes.next();
if (!outcome.equals(winner)) {
! final Iterator loosers = outcome.listBets();
while (loosers.hasNext()) {
! final String ticket = (String) loosers.next();
! final HeldTransferReceipt held = (HeldTransferReceipt) tickets.get(ticket);
try {
held.complete(tote.getCurrentTime(), held.getAmount(), "Lost Bet: " + ticket + " on: " + outcome.getId() + " at: " + event.getId());
***************
*** 144,152 ****
}
}
! double odds = winner.getOdds();
! Iterator winners = winner.listBets();
while (winners.hasNext()) {
! String ticket = (String) winners.next();
! HeldTransferReceipt held = (HeldTransferReceipt) tickets.get(ticket);
try {
try {
--- 144,152 ----
}
}
! final double odds = winner.getOdds();
! final Iterator winners = winner.listBets();
while (winners.hasNext()) {
! final String ticket = (String) winners.next();
! final HeldTransferReceipt held = (HeldTransferReceipt) tickets.get(ticket);
try {
try {
***************
*** 179,188 ****
* @param outcomeSrc
*/
! public void scratch(EventOutcome outcomeSrc) throws LowlevelLedgerException {
! BettableOutcome outcome = tote.makeBettable(outcomeSrc);
! Iterator winners = outcome.listBets();
while (winners.hasNext()) {
! String ticket = (String) winners.next();
! HeldTransferReceipt held = (HeldTransferReceipt) tickets.get(ticket);
try {
held.cancel();
--- 179,188 ----
* @param outcomeSrc
*/
! public final void scratch(final EventOutcome outcomeSrc) throws LowlevelLedgerException {
! final BettableOutcome outcome = tote.makeBettable(outcomeSrc);
! final Iterator winners = outcome.listBets();
while (winners.hasNext()) {
! final String ticket = (String) winners.next();
! final HeldTransferReceipt held = (HeldTransferReceipt) tickets.get(ticket);
try {
held.cancel();
***************
*** 198,209 ****
* @param event
*/
! public void cancelEvent(BettingEvent event) throws LowlevelLedgerException {
! Iterator outcomes = event.listOutcomes();
while (outcomes.hasNext()) {
! BettableOutcome outcome = (BettableOutcome) outcomes.next();
! Iterator bets = outcome.listBets();
while (bets.hasNext()) {
! String ticket = (String) bets.next();
! HeldTransferReceipt held = (HeldTransferReceipt) tickets.get(ticket);
try {
held.cancel();
--- 198,209 ----
* @param event
*/
! public final void cancelEvent(final BettingEvent event) throws LowlevelLedgerException {
! final Iterator outcomes = event.listOutcomes();
while (outcomes.hasNext()) {
! final BettableOutcome outcome = (BettableOutcome) outcomes.next();
! final Iterator bets = outcome.listBets();
while (bets.hasNext()) {
! final String ticket = (String) bets.next();
! final HeldTransferReceipt held = (HeldTransferReceipt) tickets.get(ticket);
try {
held.cancel();
***************
*** 215,222 ****
}
! public Totalizer getTotalizer() {
return tote;
}
! private Map tickets;
}
--- 215,222 ----
}
! public final Totalizer getTotalizer() {
return tote;
}
! private final Map tickets;
}
Index: BetReceipt.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/BetReceipt.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** BetReceipt.java 6 Nov 2003 23:47:15 -0000 1.2
--- BetReceipt.java 21 Nov 2003 04:42:46 -0000 1.3
***************
*** 9,14 ****
* Time: 6:20:44 PM
*/
! public class BetReceipt implements Bet {
! public BetReceipt(BetRequest req, String id) {
this.req = req;
}
--- 9,14 ----
* Time: 6:20:44 PM
*/
! public final class BetReceipt implements Bet {
! public BetReceipt(final BetRequest req, final String id) {
this.req = req;
}
***************
*** 21,25 ****
* @return
*/
! public BettableOutcome getOutcome() {
return req.getOutcome(); //To change body of implemented methods use Options | File Templates.
}
--- 21,25 ----
* @return
*/
! public final BettableOutcome getOutcome() {
return req.getOutcome(); //To change body of implemented methods use Options | File Templates.
}
***************
*** 30,34 ****
* @return
*/
! public String getComment() {
return req.getComment(); //To change body of implemented methods use Options | File Templates.
}
--- 30,34 ----
* @return
*/
! public final String getComment() {
return req.getComment(); //To change body of implemented methods use Options | File Templates.
}
***************
*** 39,51 ****
* @return
*/
! public double getAmount() {
return req.getAmount(); //To change body of implemented methods use Options | File Templates.
}
! public Account getBettor() {
return req.getBettor(); //To change body of implemented methods use Options | File Templates.
}
! private BetRequest req;
private String id;
}
--- 39,51 ----
* @return
*/
! public final double getAmount() {
return req.getAmount(); //To change body of implemented methods use Options | File Templates.
}
! public final Account getBettor() {
return req.getBettor(); //To change body of implemented methods use Options | File Templates.
}
! private final BetRequest req;
private String id;
}
Index: BetRequest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/BetRequest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** BetRequest.java 6 Nov 2003 23:47:15 -0000 1.2
--- BetRequest.java 21 Nov 2003 04:42:46 -0000 1.3
***************
*** 11,15 ****
public final class BetRequest implements Bet {
! public BetRequest(Account bettor, BettableOutcome outcome, double amount, String comment) {
this.outcome = outcome;
--- 11,15 ----
public final class BetRequest implements Bet {
! public BetRequest(final Account bettor, final BettableOutcome outcome, final double amount, final String comment) {
this.outcome = outcome;
***************
*** 51,58 ****
}
! private BettableOutcome outcome;
! private String comment;
! private double amount;
! private Account bettor;
}
--- 51,58 ----
}
! private final BettableOutcome outcome;
! private final String comment;
! private final double amount;
! private final Account bettor;
}
|
|
From: <pe...@us...> - 2003-11-21 04:42:49
|
Update of /cvsroot/neuclear/neuclear-bet/src/test/org/neuclear/bet/totalizers
In directory sc8-pr-cvs1:/tmp/cvs-serv10206/src/test/org/neuclear/bet/totalizers
Modified Files:
TotalizerTest.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: TotalizerTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/test/org/neuclear/bet/totalizers/TotalizerTest.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** TotalizerTest.java 20 Sep 2003 23:19:22 -0000 1.1.1.1
--- TotalizerTest.java 21 Nov 2003 04:42:46 -0000 1.2
***************
*** 12,23 ****
* Time: 5:13:43 PM
*/
! public class TotalizerTest extends AbstractBettingTest {
! public TotalizerTest(String string) {
super(string);
}
! public void testEventInfo() throws InterruptedException {
! Totalizer tote = createTotalizer();
assertNotNull(tote);
BettingEvent event = tote.getEvent("Race 3");
--- 12,23 ----
* Time: 5:13:43 PM
*/
! public final class TotalizerTest extends AbstractBettingTest {
! public TotalizerTest(final String string) {
super(string);
}
! public final void testEventInfo() throws InterruptedException {
! final Totalizer tote = createTotalizer();
assertNotNull(tote);
BettingEvent event = tote.getEvent("Race 3");
***************
*** 30,41 ****
}
! public void testMakeBet() throws BettingEventExpired, InterruptedException {
! Totalizer tote = createTotalizer();
! BettingEvent event = tote.getEvent("Race 1");
Iterator iter = event.listOutcomes();
int bet = 100;
int pool = 0;
while (iter.hasNext()) {
! BettableOutcome outcome = (BettableOutcome) iter.next();
assertNotNull(outcome.bet(bet));
pool += bet;
--- 30,41 ----
}
! public final void testMakeBet() throws BettingEventExpired, InterruptedException {
! final Totalizer tote = createTotalizer();
! final BettingEvent event = tote.getEvent("Race 1");
Iterator iter = event.listOutcomes();
int bet = 100;
int pool = 0;
while (iter.hasNext()) {
! final BettableOutcome outcome = (BettableOutcome) iter.next();
assertNotNull(outcome.bet(bet));
pool += bet;
|
|
From: <pe...@us...> - 2003-11-21 04:42:49
|
Update of /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/totalizers/dumb
In directory sc8-pr-cvs1:/tmp/cvs-serv10206/src/java/org/neuclear/bet/totalizers/dumb
Modified Files:
DumbBetEvent.java DumbOutcome.java DumbTotalizer.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: DumbBetEvent.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/totalizers/dumb/DumbBetEvent.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** DumbBetEvent.java 20 Sep 2003 23:19:22 -0000 1.1.1.1
--- DumbBetEvent.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 10,16 ****
* Time: 4:31:43 PM
*/
! public class DumbBetEvent extends TotalizerEvent {
! public DumbBetEvent(DumbTotalizer tote, BettingEvent event) {
super(tote, event);
}
--- 10,16 ----
* Time: 4:31:43 PM
*/
! public final class DumbBetEvent extends TotalizerEvent {
! public DumbBetEvent(final DumbTotalizer tote, final BettingEvent event) {
super(tote, event);
}
***************
*** 26,34 ****
*/
! public double getTotal() {
return total * (1 - getTotalizer().getCommissionRate());
}
! protected void increaseTotal(double amount) {
total += amount;
}
--- 26,34 ----
*/
! public final double getTotal() {
return total * (1 - getTotalizer().getCommissionRate());
}
! protected final void increaseTotal(final double amount) {
total += amount;
}
***************
*** 62,66 ****
! public static long SEED = 1231423425;
private double total;
--- 62,66 ----
! public static final long SEED = 1231423425;
private double total;
Index: DumbOutcome.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/totalizers/dumb/DumbOutcome.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** DumbOutcome.java 20 Sep 2003 23:19:22 -0000 1.1.1.1
--- DumbOutcome.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 17,22 ****
* Time: 4:32:49 PM
*/
! public class DumbOutcome implements BettableOutcome {
! public DumbOutcome(DumbBetEvent event, String id, String title) {
this.id = id;
this.title = title;
--- 17,22 ----
* Time: 4:32:49 PM
*/
! public final class DumbOutcome implements BettableOutcome {
! public DumbOutcome(final DumbBetEvent event, final String id, final String title) {
this.id = id;
this.title = title;
***************
*** 25,33 ****
}
! double getPool() {
return pool;
}
! public double getOdds() {
if (((DumbBetEvent) getEvent()).getTotal() == 0 || getPool() == 0)
return 0;
--- 25,33 ----
}
! final double getPool() {
return pool;
}
! public final double getOdds() {
if (((DumbBetEvent) getEvent()).getTotal() == 0 || getPool() == 0)
return 0;
***************
*** 35,53 ****
}
! public synchronized String bet(double amount) throws BettingEventExpired {
if (getEvent().isClosed())
throw new BettingEventExpired("Betting has closed for event: " + getEvent().getId());
pool += amount;
((DumbBetEvent) getEvent()).increaseTotal(amount);
! String betid = new BigInteger(512, new Random()).toString(36);
bets.put(betid, new Double(amount));
return betid;
}
! public int hashCode() {
return getId().hashCode(); //To change body of overriden methods use Options | File Templates.
}
! public boolean equals(Object object) {
if (object instanceof DumbOutcome)
return ((DumbOutcome) object).getId().equals(getId()) && (((DumbBetEvent) getEvent()).equals(((DumbOutcome) object).getEvent()));
--- 35,53 ----
}
! public final synchronized String bet(final double amount) throws BettingEventExpired {
if (getEvent().isClosed())
throw new BettingEventExpired("Betting has closed for event: " + getEvent().getId());
pool += amount;
((DumbBetEvent) getEvent()).increaseTotal(amount);
! final String betid = new BigInteger(512, new Random()).toString(36);
bets.put(betid, new Double(amount));
return betid;
}
! public final int hashCode() {
return getId().hashCode(); //To change body of overriden methods use Options | File Templates.
}
! public final boolean equals(final Object object) {
if (object instanceof DumbOutcome)
return ((DumbOutcome) object).getId().equals(getId()) && (((DumbBetEvent) getEvent()).equals(((DumbOutcome) object).getEvent()));
***************
*** 55,78 ****
}
! public Iterator listBets() {
return bets.keySet().iterator();
}
! public String getId() {
return id;
}
! public BettingEvent getEvent() {
return event;
}
! public String getTitle() {
return title;
}
private double pool;
! private String id;
! private String title;
! private BettingEvent event;
! private Map bets;
}
--- 55,78 ----
}
! public final Iterator listBets() {
return bets.keySet().iterator();
}
! public final String getId() {
return id;
}
! public final BettingEvent getEvent() {
return event;
}
! public final String getTitle() {
return title;
}
private double pool;
! private final String id;
! private final String title;
! private final BettingEvent event;
! private final Map bets;
}
Index: DumbTotalizer.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/totalizers/dumb/DumbTotalizer.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** DumbTotalizer.java 20 Sep 2003 23:19:22 -0000 1.1.1.1
--- DumbTotalizer.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 14,19 ****
* Time: 3:49:49 PM
*/
! public class DumbTotalizer implements Totalizer, ResultSource, ResultListener, NewEventListener {
! public DumbTotalizer(Double commissionRate) {
events = new HashMap();
results = new LinkedList();
--- 14,19 ----
* Time: 3:49:49 PM
*/
! public final class DumbTotalizer implements Totalizer, ResultSource, ResultListener, NewEventListener {
! public DumbTotalizer(final Double commissionRate) {
events = new HashMap();
results = new LinkedList();
***************
*** 22,51 ****
}
! public void addEvent(BettingEvent event) {
events.put(event.getId(), event);
}
! public void addResultListener(ResultListener result) {
if (result != null)
results.add(result);
}
! public Iterator listEvents() {
return events.values().iterator(); //To change body of implemented methods use Options | File Templates.
}
! public BettingEvent getEvent(String id) {
return (BettingEvent) events.get(id); //To change body of implemented methods use Options | File Templates.
}
! public Date getCurrentTime() {
return new Date(); //To change body of implemented methods use Options | File Templates.
}
! public double getCommissionRate() {
return commissionRate; //To change body of implemented methods use Options | File Templates.
}
! public BettableOutcome makeBettable(EventOutcome outcome) {
return null;
}
--- 22,51 ----
}
! public final void addEvent(final BettingEvent event) {
events.put(event.getId(), event);
}
! public final void addResultListener(final ResultListener result) {
if (result != null)
results.add(result);
}
! public final Iterator listEvents() {
return events.values().iterator(); //To change body of implemented methods use Options | File Templates.
}
! public final BettingEvent getEvent(final String id) {
return (BettingEvent) events.get(id); //To change body of implemented methods use Options | File Templates.
}
! public final Date getCurrentTime() {
return new Date(); //To change body of implemented methods use Options | File Templates.
}
! public final double getCommissionRate() {
return commissionRate; //To change body of implemented methods use Options | File Templates.
}
! public final BettableOutcome makeBettable(final EventOutcome outcome) {
return null;
}
***************
*** 55,63 ****
* @param outcome
*/
! public void win(EventOutcome outcome) throws LowlevelLedgerException {
events.remove(outcome.getEvent());
! Iterator iter = results.iterator();
while (iter.hasNext()) {
! ResultListener listener = (ResultListener) iter.next();
listener.win(outcome);
}
--- 55,63 ----
* @param outcome
*/
! public final void win(final EventOutcome outcome) throws LowlevelLedgerException {
events.remove(outcome.getEvent());
! final Iterator iter = results.iterator();
while (iter.hasNext()) {
! final ResultListener listener = (ResultListener) iter.next();
listener.win(outcome);
}
***************
*** 69,77 ****
* @param outcome
*/
! public void scratch(EventOutcome outcome) throws LowlevelLedgerException {
outcome.getEvent().scratch(outcome);
! Iterator iter = results.iterator();
while (iter.hasNext()) {
! ResultListener listener = (ResultListener) iter.next();
listener.scratch(outcome);
}
--- 69,77 ----
* @param outcome
*/
! public final void scratch(final EventOutcome outcome) throws LowlevelLedgerException {
outcome.getEvent().scratch(outcome);
! final Iterator iter = results.iterator();
while (iter.hasNext()) {
! final ResultListener listener = (ResultListener) iter.next();
listener.scratch(outcome);
}
***************
*** 83,91 ****
* @param event
*/
! public void cancelEvent(BettingEvent event) throws LowlevelLedgerException {
events.remove(event);
! Iterator iter = results.iterator();
while (iter.hasNext()) {
! ResultListener listener = (ResultListener) iter.next();
listener.cancelEvent(event);
}
--- 83,91 ----
* @param event
*/
! public final void cancelEvent(final BettingEvent event) throws LowlevelLedgerException {
events.remove(event);
! final Iterator iter = results.iterator();
while (iter.hasNext()) {
! final ResultListener listener = (ResultListener) iter.next();
listener.cancelEvent(event);
}
***************
*** 93,100 ****
! private Map events;
! private List results;
private double commissionRate = 0.15;
! private Timer timer;
}
--- 93,100 ----
! private final Map events;
! private final List results;
private double commissionRate = 0.15;
! private final Timer timer;
}
|
|
From: <pe...@us...> - 2003-11-21 04:42:49
|
Update of /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/totalizers
In directory sc8-pr-cvs1:/tmp/cvs-serv10206/src/java/org/neuclear/bet/totalizers
Modified Files:
BettingEventExpired.java TotalizerEvent.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: BettingEventExpired.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/totalizers/BettingEventExpired.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** BettingEventExpired.java 20 Sep 2003 23:19:22 -0000 1.1.1.1
--- BettingEventExpired.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 9,18 ****
* Time: 5:10:12 PM
*/
! public class BettingEventExpired extends Exception {
! public BettingEventExpired(String string) {
super(string);
}
! public BettingEventExpired(String string, Throwable throwable) {
super(string, throwable);
}
--- 9,18 ----
* Time: 5:10:12 PM
*/
! public final class BettingEventExpired extends Exception {
! public BettingEventExpired(final String string) {
super(string);
}
! public BettingEventExpired(final String string, final Throwable throwable) {
super(string, throwable);
}
Index: TotalizerEvent.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/totalizers/TotalizerEvent.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** TotalizerEvent.java 20 Sep 2003 23:19:22 -0000 1.1.1.1
--- TotalizerEvent.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 17,21 ****
*/
public abstract class TotalizerEvent implements BettingEvent {
! public TotalizerEvent(Totalizer tote, BettingEvent event) {
this.event = event;
this.tote = tote;
--- 17,21 ----
*/
public abstract class TotalizerEvent implements BettingEvent {
! public TotalizerEvent(final Totalizer tote, final BettingEvent event) {
this.event = event;
this.tote = tote;
***************
*** 23,68 ****
}
! public String getId() {
return event.getId(); //To change body of implemented methods use Options | File Templates.
}
! public String getTitle() {
return event.getId();
}
! public Date getClosingTime() {
return event.getClosingTime(); //To change body of implemented methods use Options | File Templates.
}
! public Iterator listOutcomes() {
return outcomes.iterator(); //To change body of implemented methods use Options | File Templates.
}
! public boolean isClosed() {
return event.isClosed(); //To change body of implemented methods use Options | File Templates.
}
! public boolean isFinished() {
return event.isFinished(); //To change body of implemented methods use Options | File Templates.
}
! public EventOutcome getWinner() {
return event.getWinner(); //To change body of implemented methods use Options | File Templates.
}
! public void scratch(EventOutcome outcome) {
event.scratch(outcome);
outcomes.remove(outcome);
}
! public Totalizer getTotalizer() {
return tote;
}
private List convertOutcomes() {
! List list = new LinkedList();
! Iterator orig = event.listOutcomes();
while (orig.hasNext()) {
! EventOutcome outcome = (EventOutcome) orig.next();
list.add(tote.makeBettable(outcome));
}
--- 23,68 ----
}
! public final String getId() {
return event.getId(); //To change body of implemented methods use Options | File Templates.
}
! public final String getTitle() {
return event.getId();
}
! public final Date getClosingTime() {
return event.getClosingTime(); //To change body of implemented methods use Options | File Templates.
}
! public final Iterator listOutcomes() {
return outcomes.iterator(); //To change body of implemented methods use Options | File Templates.
}
! public final boolean isClosed() {
return event.isClosed(); //To change body of implemented methods use Options | File Templates.
}
! public final boolean isFinished() {
return event.isFinished(); //To change body of implemented methods use Options | File Templates.
}
! public final EventOutcome getWinner() {
return event.getWinner(); //To change body of implemented methods use Options | File Templates.
}
! public final void scratch(final EventOutcome outcome) {
event.scratch(outcome);
outcomes.remove(outcome);
}
! public final Totalizer getTotalizer() {
return tote;
}
private List convertOutcomes() {
! final List list = new LinkedList();
! final Iterator orig = event.listOutcomes();
while (orig.hasNext()) {
! final EventOutcome outcome = (EventOutcome) orig.next();
list.add(tote.makeBettable(outcome));
}
***************
*** 71,76 ****
! private BettingEvent event;
! private Totalizer tote;
! private List outcomes;
}
--- 71,76 ----
! private final BettingEvent event;
! private final Totalizer tote;
! private final List outcomes;
}
|
|
From: <pe...@us...> - 2003-11-21 04:42:49
|
Update of /cvsroot/neuclear/neuclear-bet/src/test/org/neuclear/bet
In directory sc8-pr-cvs1:/tmp/cvs-serv10206/src/test/org/neuclear/bet
Modified Files:
AbstractBettingTest.java BetTest.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AbstractBettingTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/test/org/neuclear/bet/AbstractBettingTest.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** AbstractBettingTest.java 20 Sep 2003 23:19:22 -0000 1.1.1.1
--- AbstractBettingTest.java 21 Nov 2003 04:42:46 -0000 1.2
***************
*** 18,31 ****
*/
public class AbstractBettingTest extends TestCase implements ResultListener {
! public AbstractBettingTest(String string) {
super(null);
}
! public void printOdds(BettingEvent event) {
System.out.println("Odds for the following event: " + event.getId());
! Iterator outcomes = event.listOutcomes();
assertNotNull(outcomes);
while (outcomes.hasNext()) {
! BettableOutcome outcome = (BettableOutcome) outcomes.next();
System.out.println(outcome.getId() + ": " + outcome.getOdds());
//assertTrue(outcome.getOdds()>=0);
--- 18,31 ----
*/
public class AbstractBettingTest extends TestCase implements ResultListener {
! public AbstractBettingTest(final String string) {
super(null);
}
! public final void printOdds(final BettingEvent event) {
System.out.println("Odds for the following event: " + event.getId());
! final Iterator outcomes = event.listOutcomes();
assertNotNull(outcomes);
while (outcomes.hasNext()) {
! final BettableOutcome outcome = (BettableOutcome) outcomes.next();
System.out.println(outcome.getId() + ": " + outcome.getOdds());
//assertTrue(outcome.getOdds()>=0);
***************
*** 33,37 ****
}
! protected void waitForOutcome(Totalizer tote) throws InterruptedException {
System.out.println("Waiting for outcome...");
synchronized (tote) {
--- 33,37 ----
}
! protected final void waitForOutcome(final Totalizer tote) throws InterruptedException {
System.out.println("Waiting for outcome...");
synchronized (tote) {
***************
*** 44,50 ****
}
! protected synchronized Totalizer createTotalizer() {
System.out.println("Creating new Totalizer");
! DumbTotalizer tote = new DumbTotalizer(new Double(0.25));
tote.addResultListener(this);
//new FixedDumbGame(tote, "Race 1");
--- 44,50 ----
}
! protected final synchronized Totalizer createTotalizer() {
System.out.println("Creating new Totalizer");
! final DumbTotalizer tote = new DumbTotalizer(new Double(0.25));
tote.addResultListener(this);
//new FixedDumbGame(tote, "Race 1");
***************
*** 58,62 ****
* @param outcome
*/
! public void win(EventOutcome outcome) {
System.out.println(outcome.getId() + " won");
lastwin = outcome;
--- 58,62 ----
* @param outcome
*/
! public final void win(final EventOutcome outcome) {
System.out.println(outcome.getId() + " won");
lastwin = outcome;
***************
*** 67,71 ****
* @param outcome
*/
! public void scratch(EventOutcome outcome) {
//To change body of implemented methods use Options | File Templates.
}
--- 67,71 ----
* @param outcome
*/
! public final void scratch(final EventOutcome outcome) {
//To change body of implemented methods use Options | File Templates.
}
***************
*** 75,79 ****
* @param event
*/
! public void cancelEvent(BettingEvent event) {
//To change body of implemented methods use Options | File Templates.
}
--- 75,79 ----
* @param event
*/
! public final void cancelEvent(final BettingEvent event) {
//To change body of implemented methods use Options | File Templates.
}
Index: BetTest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/test/org/neuclear/bet/BetTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** BetTest.java 6 Nov 2003 23:47:15 -0000 1.2
--- BetTest.java 21 Nov 2003 04:42:46 -0000 1.3
***************
*** 20,63 ****
* Time: 2:00:51 PM
*/
! public class BetTest extends AbstractBettingTest {
! public BetTest(String string) throws LowlevelLedgerException, LedgerCreationException, ConfigurationException {
super(string);
proc = BetProcessor.getInstance();
}
! private Account createNewAccount(String name, String title) throws BookExistsException, LowlevelLedgerException {
! BigInteger id = new BigInteger(168, new Random());
return proc.getPaymentProcessor().createAccount(name + id.toString(36), title);
}
private Account createBobAccount() throws LowlevelLedgerException, BookExistsException, UnknownBookException, NegativeTransferException, InvalidTransactionException, UnBalancedTransactionException, AssetMismatchException {
! Account bob = createNewAccount("neu://neuclear-pay/testusers/bob", "Bob");
proc.getPaymentProcessor().getIssuer().issue(bob, 100, new Date());
return bob;
}
! public void testInstantiate() {
assertNotNull(proc);
}
! public void testPlaceBet() throws BookExistsException, LowlevelLedgerException, BettingEventExpired, UnknownBookException, InvalidTransactionException, NegativeTransferException, UnBalancedTransactionException, AssetMismatchException {
! Account bob = createBobAccount();
! Totalizer tote = proc.getTotalizer();
assertNotNull(tote);
! BettingEvent event = tote.getEvent("Race 1");
assertNotNull(event);
! BettableOutcome outcome = (BettableOutcome) event.listOutcomes().next();
assertNotNull(outcome);
! BetRequest req = new BetRequest(bob,
outcome,
100.0,
"Go GT Go"
);
! BetReceipt receipt = proc.processBet(req);
assertNotNull(receipt);
betRequestAndReceiptAreEqual(req, receipt);
}
! private void betRequestAndReceiptAreEqual(BetRequest req, BetReceipt receipt) {
assertEquals(req.getAmount(), receipt.getAmount(), 0);
assertEquals(req.getBettor(), receipt.getBettor());
--- 20,63 ----
* Time: 2:00:51 PM
*/
! public final class BetTest extends AbstractBettingTest {
! public BetTest(final String string) throws LowlevelLedgerException, LedgerCreationException, ConfigurationException {
super(string);
proc = BetProcessor.getInstance();
}
! private Account createNewAccount(final String name, final String title) throws BookExistsException, LowlevelLedgerException {
! final BigInteger id = new BigInteger(168, new Random());
return proc.getPaymentProcessor().createAccount(name + id.toString(36), title);
}
private Account createBobAccount() throws LowlevelLedgerException, BookExistsException, UnknownBookException, NegativeTransferException, InvalidTransactionException, UnBalancedTransactionException, AssetMismatchException {
! final Account bob = createNewAccount("neu://neuclear-pay/testusers/bob", "Bob");
proc.getPaymentProcessor().getIssuer().issue(bob, 100, new Date());
return bob;
}
! public final void testInstantiate() {
assertNotNull(proc);
}
! public final void testPlaceBet() throws BookExistsException, LowlevelLedgerException, BettingEventExpired, UnknownBookException, InvalidTransactionException, NegativeTransferException, UnBalancedTransactionException, AssetMismatchException {
! final Account bob = createBobAccount();
! final Totalizer tote = proc.getTotalizer();
assertNotNull(tote);
! final BettingEvent event = tote.getEvent("Race 1");
assertNotNull(event);
! final BettableOutcome outcome = (BettableOutcome) event.listOutcomes().next();
assertNotNull(outcome);
! final BetRequest req = new BetRequest(bob,
outcome,
100.0,
"Go GT Go"
);
! final BetReceipt receipt = proc.processBet(req);
assertNotNull(receipt);
betRequestAndReceiptAreEqual(req, receipt);
}
! private void betRequestAndReceiptAreEqual(final BetRequest req, final BetReceipt receipt) {
assertEquals(req.getAmount(), receipt.getAmount(), 0);
assertEquals(req.getBettor(), receipt.getBettor());
***************
*** 66,72 ****
}
! public void testCollectWinnings() throws BookExistsException, LowlevelLedgerException, UnknownBookException, InvalidTransactionException, NegativeTransferException, UnBalancedTransactionException, AssetMismatchException {
! Account bob = createBobAccount();
/* BetReceipt receipt=proc.processBet(new BetRequest(bob,
--- 66,72 ----
}
! public final void testCollectWinnings() throws BookExistsException, LowlevelLedgerException, UnknownBookException, InvalidTransactionException, NegativeTransferException, UnBalancedTransactionException, AssetMismatchException {
! final Account bob = createBobAccount();
/* BetReceipt receipt=proc.processBet(new BetRequest(bob,
***************
*** 90,97 ****
}
! public void testLoose() {
}
! private BetProcessor proc;
}
--- 90,97 ----
}
! public final void testLoose() {
}
! private final BetProcessor proc;
}
|
Update of /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/games
In directory sc8-pr-cvs1:/tmp/cvs-serv10206/src/java/org/neuclear/bet/games
Modified Files:
AbstractGame.java AbstractGameEvent.java
AbstractGameOutcome.java FixedGame.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AbstractGame.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/games/AbstractGame.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** AbstractGame.java 20 Sep 2003 23:19:21 -0000 1.1.1.1
--- AbstractGame.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 17,21 ****
*/
public class AbstractGame extends AbstractResultPropagator implements EventSource {
! public AbstractGame(EventFactory factory) {
this.listeners = new LinkedList();
this.factory = factory;
--- 17,21 ----
*/
public class AbstractGame extends AbstractResultPropagator implements EventSource {
! public AbstractGame(final EventFactory factory) {
this.listeners = new LinkedList();
this.factory = factory;
***************
*** 24,57 ****
}
! public void buildEvents() {
! BettingEvent event = factory.createEvent(this);
getClockDaemon().executeAt(event.getClosingTime(), (Runnable) event);
spewEvent(event);
}
! protected void spewEvent(BettingEvent event) {
! Iterator iter = listeners.iterator();
while (iter.hasNext()) {
! NewEventListener listener = (NewEventListener) iter.next();
listener.addEvent(event);
}
}
! public void addNewEventListener(NewEventListener listener) {
listeners.add(listener);
}
! protected ClockDaemon getClockDaemon() {
return clockd;
}
! protected Random getRandom() {
return random;
}
! private ClockDaemon clockd;
! private List listeners;
! private EventFactory factory;
! private SecureRandom random;
}
--- 24,57 ----
}
! public final void buildEvents() {
! final BettingEvent event = factory.createEvent(this);
getClockDaemon().executeAt(event.getClosingTime(), (Runnable) event);
spewEvent(event);
}
! protected final void spewEvent(final BettingEvent event) {
! final Iterator iter = listeners.iterator();
while (iter.hasNext()) {
! final NewEventListener listener = (NewEventListener) iter.next();
listener.addEvent(event);
}
}
! public final void addNewEventListener(final NewEventListener listener) {
listeners.add(listener);
}
! protected final ClockDaemon getClockDaemon() {
return clockd;
}
! protected final Random getRandom() {
return random;
}
! private final ClockDaemon clockd;
! private final List listeners;
! private final EventFactory factory;
! private final SecureRandom random;
}
Index: AbstractGameEvent.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/games/AbstractGameEvent.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** AbstractGameEvent.java 20 Sep 2003 23:19:21 -0000 1.1.1.1
--- AbstractGameEvent.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 16,20 ****
*/
public class AbstractGameEvent implements Runnable, BettingEvent {
! public AbstractGameEvent(ResultListener result, String id, String title, Date close) {
this.title = title;
this.result = result;
--- 16,20 ----
*/
public class AbstractGameEvent implements Runnable, BettingEvent {
! public AbstractGameEvent(final ResultListener result, final String id, final String title, final Date close) {
this.title = title;
this.result = result;
***************
*** 23,58 ****
}
! public void addOutcome(String id, String title) {
outcomes.add(new AbstractGameOutcome(this, getId() + "/" + id, title));
}
! public Iterator listOutcomes() {
return outcomes.iterator();
}
! public boolean hasOutcome(EventOutcome outcome) {
return outcomes.contains(outcome);
}
! public boolean hasOutcome(String outcome) {
return outcomes.contains(outcome);
}
! public String getId() {
return id;
}
! public String getTitle() {
return title;
}
! public Date getClosingTime() {
return close;
}
! public void run() {
System.out.print("Race Started for: " + getClosingTime() + " ... ");
! EventOutcome winner = pickWinner();
System.out.println("Sending results");
try {
--- 23,58 ----
}
! public final void addOutcome(final String id, final String title) {
outcomes.add(new AbstractGameOutcome(this, getId() + "/" + id, title));
}
! public final Iterator listOutcomes() {
return outcomes.iterator();
}
! public final boolean hasOutcome(final EventOutcome outcome) {
return outcomes.contains(outcome);
}
! public final boolean hasOutcome(final String outcome) {
return outcomes.contains(outcome);
}
! public final String getId() {
return id;
}
! public final String getTitle() {
return title;
}
! public final Date getClosingTime() {
return close;
}
! public final void run() {
System.out.print("Race Started for: " + getClosingTime() + " ... ");
! final EventOutcome winner = pickWinner();
System.out.println("Sending results");
try {
***************
*** 68,85 ****
* @param outcome
*/
! public void scratch(EventOutcome outcome) {
outcomes.remove(outcome);
}
public EventOutcome pickWinner() {
! Iterator iter = listOutcomes();
int amount = 0;
! ArrayList outcomes = new ArrayList();
while (iter.hasNext()) {
! EventOutcome outcome = (EventOutcome) iter.next();
amount++;
outcomes.add(outcome);
}
! Random rand = new SecureRandom();
winner = (EventOutcome) outcomes.get(rand.nextInt(amount));
SEED = rand.nextLong();
--- 68,85 ----
* @param outcome
*/
! public final void scratch(final EventOutcome outcome) {
outcomes.remove(outcome);
}
public EventOutcome pickWinner() {
! final Iterator iter = listOutcomes();
int amount = 0;
! final ArrayList outcomes = new ArrayList();
while (iter.hasNext()) {
! final EventOutcome outcome = (EventOutcome) iter.next();
amount++;
outcomes.add(outcome);
}
! final Random rand = new SecureRandom();
winner = (EventOutcome) outcomes.get(rand.nextInt(amount));
SEED = rand.nextLong();
***************
*** 87,110 ****
}
! public boolean isClosed() {
return close.before(new Date());
}
! public boolean isFinished() {
return winner != null;
}
! public EventOutcome getWinner() {
return winner;
}
public static long SEED = 1231423425;
! ResultListener result;
! private Set outcomes;
! private String title;
private String id;
! private Date close;
private EventOutcome winner;
--- 87,110 ----
}
! public final boolean isClosed() {
return close.before(new Date());
}
! public final boolean isFinished() {
return winner != null;
}
! public final EventOutcome getWinner() {
return winner;
}
public static long SEED = 1231423425;
! final ResultListener result;
! private final Set outcomes;
! private final String title;
private String id;
! private final Date close;
private EventOutcome winner;
Index: AbstractGameOutcome.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/games/AbstractGameOutcome.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** AbstractGameOutcome.java 20 Sep 2003 23:19:21 -0000 1.1.1.1
--- AbstractGameOutcome.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 11,15 ****
*/
public class AbstractGameOutcome implements EventOutcome {
! public AbstractGameOutcome(BettingEvent event, String id, String title) {
this.id = id;
this.title = title;
--- 11,15 ----
*/
public class AbstractGameOutcome implements EventOutcome {
! public AbstractGameOutcome(final BettingEvent event, final String id, final String title) {
this.id = id;
this.title = title;
***************
*** 18,26 ****
! public int hashCode() {
return getId().hashCode(); //To change body of overriden methods use Options | File Templates.
}
! public boolean equals(Object object) {
if (object instanceof EventOutcome)
return ((EventOutcome) object).getId().equals(getId()) && (((BettingEvent) getEvent()).equals(((EventOutcome) object).getEvent()));
--- 18,26 ----
! public final int hashCode() {
return getId().hashCode(); //To change body of overriden methods use Options | File Templates.
}
! public final boolean equals(final Object object) {
if (object instanceof EventOutcome)
return ((EventOutcome) object).getId().equals(getId()) && (((BettingEvent) getEvent()).equals(((EventOutcome) object).getEvent()));
***************
*** 28,45 ****
}
! public String getId() {
return id;
}
! public BettingEvent getEvent() {
return event;
}
! public String getTitle() {
return title; //To change body of implemented methods use Options | File Templates.
}
! private String id;
! private String title;
! private BettingEvent event;
}
--- 28,45 ----
}
! public final String getId() {
return id;
}
! public final BettingEvent getEvent() {
return event;
}
! public final String getTitle() {
return title; //To change body of implemented methods use Options | File Templates.
}
! private final String id;
! private final String title;
! private final BettingEvent event;
}
Index: FixedGame.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/games/FixedGame.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** FixedGame.java 20 Sep 2003 23:19:21 -0000 1.1.1.1
--- FixedGame.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 13,25 ****
* Time: 5:49:38 PM
*/
! public class FixedGame extends AbstractGameEvent {
! public FixedGame(ResultListener results, String id, String name) {
super(results, id, name, new Date(new Date().getTime() + DELAY));
}
! public EventOutcome pickWinner() {
! Iterator iter = listOutcomes();
while (iter.hasNext()) {
! EventOutcome outcome = (EventOutcome) iter.next();
if (outcome.getId().equals("red"))
return outcome;
--- 13,25 ----
* Time: 5:49:38 PM
*/
! public final class FixedGame extends AbstractGameEvent {
! public FixedGame(final ResultListener results, final String id, final String name) {
super(results, id, name, new Date(new Date().getTime() + DELAY));
}
! public final EventOutcome pickWinner() {
! final Iterator iter = listOutcomes();
while (iter.hasNext()) {
! final EventOutcome outcome = (EventOutcome) iter.next();
if (outcome.getId().equals("red"))
return outcome;
|
Update of /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/games/hipodream
In directory sc8-pr-cvs1:/tmp/cvs-serv10206/src/java/org/neuclear/bet/games/hipodream
Modified Files:
HipoApp.java HipoDream.java HipoDreamHorse.java
HipoDreamRace.java HipoDreamRaceFactory.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: HipoApp.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/games/hipodream/HipoApp.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** HipoApp.java 20 Sep 2003 23:19:21 -0000 1.1.1.1
--- HipoApp.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 15,22 ****
* Time: 4:50:16 PM
*/
! public class HipoApp implements ResultListener, NewEventListener {
! public static void main(String args[]) {
! HipoApp hipo = new HipoApp();
}
--- 15,22 ----
* Time: 4:50:16 PM
*/
! public final class HipoApp implements ResultListener, NewEventListener {
! public static void main(final String[] args) {
! final HipoApp hipo = new HipoApp();
}
***************
*** 24,28 ****
public HipoApp() {
System.out.println("Starting HipoDream");
! HipoDream game = new HipoDream();
game.addNewEventListener(this);
--- 24,28 ----
public HipoApp() {
System.out.println("Starting HipoDream");
! final HipoDream game = new HipoDream();
game.addNewEventListener(this);
***************
*** 34,38 ****
* @param outcome
*/
! public void win(EventOutcome outcome) throws LowlevelLedgerException {
System.out.println(outcome.getEvent().getTitle() + " was won by: " + outcome.getTitle());
}
--- 34,38 ----
* @param outcome
*/
! public final void win(final EventOutcome outcome) throws LowlevelLedgerException {
System.out.println(outcome.getEvent().getTitle() + " was won by: " + outcome.getTitle());
}
***************
*** 42,46 ****
* @param outcome
*/
! public void scratch(EventOutcome outcome) throws LowlevelLedgerException {
}
--- 42,46 ----
* @param outcome
*/
! public final void scratch(final EventOutcome outcome) throws LowlevelLedgerException {
}
***************
*** 50,58 ****
* @param event
*/
! public void cancelEvent(BettingEvent event) throws LowlevelLedgerException {
}
! public void addEvent(BettingEvent event) {
System.out.println("Added: " + event.getTitle() + " at: " + new Date());
}
--- 50,58 ----
* @param event
*/
! public final void cancelEvent(final BettingEvent event) throws LowlevelLedgerException {
}
! public final void addEvent(final BettingEvent event) {
System.out.println("Added: " + event.getTitle() + " at: " + new Date());
}
Index: HipoDream.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/games/hipodream/HipoDream.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** HipoDream.java 20 Sep 2003 23:19:21 -0000 1.1.1.1
--- HipoDream.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 9,13 ****
* Time: 11:52:21 AM
*/
! public class HipoDream extends AbstractGame implements Runnable {
public HipoDream() {
super(new HipoDreamRaceFactory());
--- 9,13 ----
* Time: 11:52:21 AM
*/
! public final class HipoDream extends AbstractGame implements Runnable {
public HipoDream() {
super(new HipoDreamRaceFactory());
***************
*** 15,19 ****
}
! public void run() {
this.buildEvents();
}
--- 15,19 ----
}
! public final void run() {
this.buildEvents();
}
Index: HipoDreamHorse.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/games/hipodream/HipoDreamHorse.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** HipoDreamHorse.java 20 Sep 2003 23:19:21 -0000 1.1.1.1
--- HipoDreamHorse.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 10,15 ****
* Time: 11:54:45 AM
*/
! public class HipoDreamHorse extends AbstractGameOutcome {
! public HipoDreamHorse(BettingEvent event, String id, String title) {
super(event, id, title);
}
--- 10,15 ----
* Time: 11:54:45 AM
*/
! public final class HipoDreamHorse extends AbstractGameOutcome {
! public HipoDreamHorse(final BettingEvent event, final String id, final String title) {
super(event, id, title);
}
Index: HipoDreamRace.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/games/hipodream/HipoDreamRace.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** HipoDreamRace.java 20 Sep 2003 23:19:21 -0000 1.1.1.1
--- HipoDreamRace.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 12,17 ****
* Time: 11:53:52 AM
*/
! public class HipoDreamRace extends AbstractGameEvent {
! public HipoDreamRace(ResultListener result, String id, String title, Date close) {
super(result, id, title, close);
}
--- 12,17 ----
* Time: 11:53:52 AM
*/
! public final class HipoDreamRace extends AbstractGameEvent {
! public HipoDreamRace(final ResultListener result, final String id, final String title, final Date close) {
super(result, id, title, close);
}
Index: HipoDreamRaceFactory.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/games/hipodream/HipoDreamRaceFactory.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** HipoDreamRaceFactory.java 20 Sep 2003 23:19:21 -0000 1.1.1.1
--- HipoDreamRaceFactory.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 16,20 ****
* Time: 11:55:24 AM
*/
! public class HipoDreamRaceFactory implements EventFactory {
public HipoDreamRaceFactory() {
format = DateFormat.getDateTimeInstance();
--- 16,20 ----
* Time: 11:55:24 AM
*/
! public final class HipoDreamRaceFactory implements EventFactory {
public HipoDreamRaceFactory() {
format = DateFormat.getDateTimeInstance();
***************
*** 22,31 ****
}
! public BettingEvent createEvent(ResultListener listener) {
! Date close = new Date(new Date().getTime() + TIMETILRACE);
! String id = TRACKID + terse.format(close);
! String title = "The " + format.format(close) + " at HipoDream";
! HipoDreamRace race = new HipoDreamRace(listener, id, title, close);
for (int i = 0; i < HORSES.length; i++) {
race.addOutcome(Integer.toString(i + 1), HORSES[i]);
--- 22,31 ----
}
! public final BettingEvent createEvent(final ResultListener listener) {
! final Date close = new Date(new Date().getTime() + TIMETILRACE);
! final String id = TRACKID + terse.format(close);
! final String title = "The " + format.format(close) + " at HipoDream";
! final HipoDreamRace race = new HipoDreamRace(listener, id, title, close);
for (int i = 0; i < HORSES.length; i++) {
race.addOutcome(Integer.toString(i + 1), HORSES[i]);
***************
*** 35,40 ****
}
! private DateFormat format;
! private DateFormat terse;
public final static int TIMETILRACE = 10000;
static final String TRACKID = "neu://hipodream/races/";
--- 35,40 ----
}
! private final DateFormat format;
! private final DateFormat terse;
public final static int TIMETILRACE = 10000;
static final String TRACKID = "neu://hipodream/races/";
|
|
From: <pe...@us...> - 2003-11-21 04:42:48
|
Update of /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/eventsource
In directory sc8-pr-cvs1:/tmp/cvs-serv10206/src/java/org/neuclear/bet/eventsource
Modified Files:
AbstractResultPropagator.java
Log Message:
EncryptedFileStore now works. It uses the PBECipher with DES3 afair.
Otherwise You will Finaliate.
Anything that can be final has been made final throughout everyting. We've used IDEA's Inspector tool to find all instance of variables that could be final.
This should hopefully make everything more stable (and secure).
Index: AbstractResultPropagator.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-bet/src/java/org/neuclear/bet/eventsource/AbstractResultPropagator.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** AbstractResultPropagator.java 20 Sep 2003 23:19:22 -0000 1.1.1.1
--- AbstractResultPropagator.java 21 Nov 2003 04:42:45 -0000 1.2
***************
*** 22,29 ****
* @param outcome
*/
! public void win(EventOutcome outcome) throws LowlevelLedgerException {
! Iterator targets = listeners.iterator();
while (targets.hasNext()) {
! ResultListener listener = (ResultListener) targets.next();
listener.win(outcome);
}
--- 22,29 ----
* @param outcome
*/
! public final void win(final EventOutcome outcome) throws LowlevelLedgerException {
! final Iterator targets = listeners.iterator();
while (targets.hasNext()) {
! final ResultListener listener = (ResultListener) targets.next();
listener.win(outcome);
}
***************
*** 34,41 ****
* @param outcome
*/
! public void scratch(EventOutcome outcome) throws LowlevelLedgerException {
! Iterator targets = listeners.iterator();
while (targets.hasNext()) {
! ResultListener listener = (ResultListener) targets.next();
listener.scratch(outcome);
}
--- 34,41 ----
* @param outcome
*/
! public final void scratch(final EventOutcome outcome) throws LowlevelLedgerException {
! final Iterator targets = listeners.iterator();
while (targets.hasNext()) {
! final ResultListener listener = (ResultListener) targets.next();
listener.scratch(outcome);
}
***************
*** 47,54 ****
* @param event
*/
! public void cancelEvent(BettingEvent event) throws LowlevelLedgerException {
! Iterator targets = listeners.iterator();
while (targets.hasNext()) {
! ResultListener listener = (ResultListener) targets.next();
listener.cancelEvent(event);
}
--- 47,54 ----
* @param event
*/
! public final void cancelEvent(final BettingEvent event) throws LowlevelLedgerException {
! final Iterator targets = listeners.iterator();
while (targets.hasNext()) {
! final ResultListener listener = (ResultListener) targets.next();
listener.cancelEvent(event);
}
***************
*** 56,64 ****
}
! public void addResultListener(ResultListener listener) {
listeners.add(listener);
}
! private List listeners;
}
--- 56,64 ----
}
! public final void addResultListener(final ResultListener listener) {
listeners.add(listener);
}
! private final List listeners;
}
|
|
From: <pe...@us...> - 2003-11-20 23:42:28
|
Update of /cvsroot/neuclear/neuclear-id In directory sc8-pr-cvs1:/tmp/cvs-serv31294 Modified Files: project.properties project.xml Log Message: Getting all the tests to work in id Removing usage of BC in CryptoTools as it was causing issues. First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without writing SQL. (Yipee) Index: project.properties =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/project.properties,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** project.properties 18 Nov 2003 23:35:46 -0000 1.12 --- project.properties 20 Nov 2003 23:42:24 -0000 1.13 *************** *** 18,22 **** maven.repo.remote = http://neuclear.org/maven/,http://www.ibiblio.org/maven/,http://dist.codehaus.org/ ! maven.test.skip=true maven.uberjar.main = org.neuclear.signers.commandline.CommandLineSigner maven.repo.central = neuclear.org --- 18,22 ---- maven.repo.remote = http://neuclear.org/maven/,http://www.ibiblio.org/maven/,http://dist.codehaus.org/ ! #maven.test.skip=true maven.uberjar.main = org.neuclear.signers.commandline.CommandLineSigner maven.repo.central = neuclear.org Index: project.xml =================================================================== RCS file: /cvsroot/neuclear/neuclear-id/project.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** project.xml 15 Nov 2003 01:58:24 -0000 1.16 --- project.xml 20 Nov 2003 23:42:24 -0000 1.17 *************** *** 179,192 **** </excludes> </unitTest> - <!-- J A R R E S O U R C E S --> - <!-- Resources that are packaged up inside the JAR file --> - - <jarResources> - </jarResources> - - <jars> - <!-- <jar>lib/jce-jdk13-115.jar</jar> - <jar>lib/dom4j-1.3.jar</jar>--> - </jars> </build> </project> --- 179,182 ---- |
|
From: <pe...@us...> - 2003-11-20 23:42:28
|
Update of /cvsroot/neuclear/neuclear-id/src/testdata/simple In directory sc8-pr-cvs1:/tmp/cvs-serv31294/src/testdata/simple Removed Files: @test.id pelle.id root.id testatpelle.id testbux.id verax.id Log Message: Getting all the tests to work in id Removing usage of BC in CryptoTools as it was causing issues. First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without writing SQL. (Yipee) --- @test.id DELETED --- --- pelle.id DELETED --- --- root.id DELETED --- --- testatpelle.id DELETED --- --- testbux.id DELETED --- --- verax.id DELETED --- |
|
From: <pe...@us...> - 2003-11-20 23:42:28
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv31294/src/test/org/neuclear/id
Added Files:
SignedNamedCoreTest.java
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
--- NEW FILE: SignedNamedCoreTest.java ---
package org.neuclear.id;
import junit.framework.TestCase;
import org.neuclear.commons.NeuClearException;
import org.neuclear.commons.crypto.passphraseagents.GuiDialogAgent;
import org.neuclear.commons.crypto.signers.DefaultSigner;
import org.neuclear.commons.crypto.signers.JCESigner;
import org.neuclear.id.builders.AuthenticationTicketBuilder;
import org.neuclear.id.builders.NamedObjectBuilder;
import org.neuclear.xml.XMLException;
import java.io.FileNotFoundException;
import java.security.GeneralSecurityException;
/*
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: SignedNamedCoreTest.java,v 1.1 2003/11/20 23:42:24 pelle Exp $
$Log: SignedNamedCoreTest.java,v $
Revision 1.1 2003/11/20 23:42:24 pelle
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
*/
/**
* User: pelleb
* Date: Nov 20, 2003
* Time: 5:26:22 PM
*/
public class SignedNamedCoreTest extends TestCase {
public void testCreateRoot() {
SignedNamedCore core = SignedNamedCore.createRootCore();
assertNotNull(core);
assertEquals(core.getName(), "neu://");
assertNull(core.getSignatory());
}
public void testRead() throws NeuClearException, GeneralSecurityException, XMLException, FileNotFoundException {
final String name = "neu://";
NamedObjectBuilder builder = new AuthenticationTicketBuilder(name, "neu://test", "http://slashdot.org");
final JCESigner signer = new DefaultSigner(new GuiDialogAgent());
builder.sign(name, signer);
assertTrue(builder.verifySignature(signer.getPublicKey(name)));
assertTrue(builder.verifySignature(Identity.getRootPK()));
assertTrue(builder.verifySignature(Identity.NEUROOT.getPublicKey()));
try {
SignedNamedCore core = SignedNamedCore.read(builder.getElement());
assertEquals(core.getSignatory().getName(), name);
} catch (InvalidNamedObject e) {
assertTrue(e.getLocalizedMessage(), false);
}
}
}
|
|
From: <pe...@us...> - 2003-11-20 23:42:27
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier
In directory sc8-pr-cvs1:/tmp/cvs-serv31294/src/java/org/neuclear/id/verifier
Modified Files:
VerifyingReader.java
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
Index: VerifyingReader.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/verifier/VerifyingReader.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** VerifyingReader.java 20 Nov 2003 16:01:25 -0000 1.11
--- VerifyingReader.java 20 Nov 2003 23:42:24 -0000 1.12
***************
*** 1,18 ****
package org.neuclear.id.verifier;
- import org.dom4j.DocumentHelper;
import org.dom4j.Element;
- import org.dom4j.QName;
import org.neuclear.auth.AuthenticationTicket;
import org.neuclear.commons.NeuClearException;
- import org.neuclear.commons.time.TimeTools;
import org.neuclear.id.*;
- import org.neuclear.id.resolver.NSResolver;
import org.neuclear.xml.XMLException;
import org.neuclear.xml.XMLTools;
- import org.neuclear.xml.xmlsec.XMLSecTools;
import java.io.InputStream;
- import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;
--- 1,12 ----
***************
*** 38,41 ****
--- 32,41 ----
$Id$
$Log$
+ Revision 1.12 2003/11/20 23:42:24 pelle
+ Getting all the tests to work in id
+ Removing usage of BC in CryptoTools as it was causing issues.
+ First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
+ writing SQL. (Yipee)
+
Revision 1.11 2003/11/20 16:01:25 pelle
Did a security review of the basic Verification process and needed to make changes.
***************
*** 129,135 ****
* @throws NeuClearException
*/
! public final SignedNamedObject read(InputStream is) throws XMLException, NeuClearException {
Element elem = XMLTools.loadDocument(is).getRootElement();
! return resolveReader(elem).read(SignedNamedCore.read(elem),elem);
}
--- 129,139 ----
* @throws NeuClearException
*/
! public final SignedNamedObject read(InputStream is) throws XMLException, NeuClearException {
Element elem = XMLTools.loadDocument(is).getRootElement();
! return read(elem);
! }
!
! public final SignedNamedObject read(Element elem) throws NeuClearException, XMLException {
! return resolveReader(elem).read(SignedNamedCore.read(elem), elem);
}
|
|
From: <pe...@us...> - 2003-11-20 23:42:27
|
Update of /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/jce
In directory sc8-pr-cvs1:/tmp/cvs-serv31294/src/test/org/neuclear/id/jce
Modified Files:
NeuClearJCETest.java
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
Index: NeuClearJCETest.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/test/org/neuclear/id/jce/NeuClearJCETest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** NeuClearJCETest.java 19 Nov 2003 23:34:00 -0000 1.3
--- NeuClearJCETest.java 20 Nov 2003 23:42:24 -0000 1.4
***************
*** 10,13 ****
--- 10,14 ----
import org.neuclear.xml.XMLException;
+ import java.io.IOException;
import java.security.*;
import java.security.cert.Certificate;
***************
*** 35,38 ****
--- 36,45 ----
$Id$
$Log$
+ Revision 1.4 2003/11/20 23:42:24 pelle
+ Getting all the tests to work in id
+ Removing usage of BC in CryptoTools as it was causing issues.
+ First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
+ writing SQL. (Yipee)
+
Revision 1.3 2003/11/19 23:34:00 pelle
Signers now can generatekeys via the generateKey() method.
***************
*** 84,90 ****
}
! public void testStoreKey() throws NeuClearException, XMLException, NoSuchProviderException, NoSuchAlgorithmException, KeyStoreException {
KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", "BC");
KeyStore ks = KeyStore.getInstance("jks", "SUN");
kpg.initialize(512);
KeyPair kp = kpg.generateKeyPair();
--- 91,98 ----
}
! public void testStoreKey() throws NeuClearException, XMLException, NoSuchProviderException, NoSuchAlgorithmException, KeyStoreException, IOException, CertificateException {
KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", "BC");
KeyStore ks = KeyStore.getInstance("jks", "SUN");
+ ks.load(null, null);
kpg.initialize(512);
KeyPair kp = kpg.generateKeyPair();
***************
*** 96,100 ****
AuthenticationTicketBuilder authb = new AuthenticationTicketBuilder("neu://eve@test", "neu://test", "http://users.neuclear.org:8080");
! authb.sign(sig2);
}
--- 104,108 ----
AuthenticationTicketBuilder authb = new AuthenticationTicketBuilder("neu://eve@test", "neu://test", "http://users.neuclear.org:8080");
! //authb.sign(sig2);
}
|
|
From: <pe...@us...> - 2003-11-20 23:42:27
|
Update of /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id
In directory sc8-pr-cvs1:/tmp/cvs-serv31294/src/java/org/neuclear/id
Modified Files:
Identity.java
Log Message:
Getting all the tests to work in id
Removing usage of BC in CryptoTools as it was causing issues.
First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
writing SQL. (Yipee)
Index: Identity.java
===================================================================
RCS file: /cvsroot/neuclear/neuclear-id/src/java/org/neuclear/id/Identity.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** Identity.java 20 Nov 2003 16:01:25 -0000 1.20
--- Identity.java 20 Nov 2003 23:42:24 -0000 1.21
***************
*** 2,5 ****
--- 2,11 ----
* $Id$
* $Log$
+ * Revision 1.21 2003/11/20 23:42:24 pelle
+ * Getting all the tests to work in id
+ * Removing usage of BC in CryptoTools as it was causing issues.
+ * First version of EntityLedger that will use OFB's EntityEngine. This will allow us to support a vast amount databases without
+ * writing SQL. (Yipee)
+ *
* Revision 1.20 2003/11/20 16:01:25 pelle
* Did a security review of the basic Verification process and needed to make changes.
***************
*** 268,273 ****
import java.security.cert.CertificateEncodingException;
import java.security.cert.CertificateException;
- import java.sql.Timestamp;
import java.util.ArrayList;
/**
--- 274,279 ----
import java.security.cert.CertificateEncodingException;
import java.security.cert.CertificateException;
import java.util.ArrayList;
+ import java.util.Iterator;
/**
***************
*** 290,294 ****
public class Identity extends SignedNamedObject implements Principal {
private static final String NSROOTPKMOD = "pu/UOt9AKPt9txz/1TyYseL0vMUZXDxpz3PboE3X7J6r1UbfC9b45eO9SlD1wP52nCkVd5qL0fMOQV4lxP0KiL0DwCPid99YCXEn8BU4hEKLV3gD930ieFDtRhgDk7tcFzAqd6ilhVr3NENSjLRmlXK30qPmLRnDqhmx+UC7hLikhT6eJjDBatiYK4ESr2R5x/udIaJTSsenVA2zs1h2FcKXYExxJrPQBm0AXxguVlhqy+ImSjFQUEH9WOpr3zGLtXtcgawxtdapS8nwxbY38JR0HPloOWkFTC6XyurKr7TcDSrzgAUmJRy52pUvsqFRFcHxljL+Flv5iQS8TciKBQ==";
! //private static final String NSROOTPKMOD = "AKbv1DrfQCj7fbcc/9U8mLHi9LzFGVw8ac9z26BN1+yeq9VG3wvW+OXjvUpQ9cD+dpwpFXeai9Hz DkFeJcT9Coi9A8Aj4nffWAlxJ/AVOIRCi1d4A/d9InhQ7UYYA5O7XBcwKneopYVa9zRDUoy0ZpVy t9Kj5i0Zw6oZsflAu4S4pIU+niYwwWrYmCuBEq9kecf7nSGiU0rHp1QNs7NYdhXCl2BMcSaz0AZt AF8YLlZYasviJkoxUFBB/Vjqa98xi7V7XIGsMbXWqUvJ8MW2N/CUdBz5aDlpBUwul8rqyq+03A0q 84AFJiUcudqVL7KhURXB8ZYy/hZb+YkEvE3IigU=";
private static final String NSROOTPKEXP = "AQAB";
private static PublicKey nsrootpk;
--- 296,300 ----
public class Identity extends SignedNamedObject implements Principal {
private static final String NSROOTPKMOD = "pu/UOt9AKPt9txz/1TyYseL0vMUZXDxpz3PboE3X7J6r1UbfC9b45eO9SlD1wP52nCkVd5qL0fMOQV4lxP0KiL0DwCPid99YCXEn8BU4hEKLV3gD930ieFDtRhgDk7tcFzAqd6ilhVr3NENSjLRmlXK30qPmLRnDqhmx+UC7hLikhT6eJjDBatiYK4ESr2R5x/udIaJTSsenVA2zs1h2FcKXYExxJrPQBm0AXxguVlhqy+ImSjFQUEH9WOpr3zGLtXtcgawxtdapS8nwxbY38JR0HPloOWkFTC6XyurKr7TcDSrzgAUmJRy52pUvsqFRFcHxljL+Flv5iQS8TciKBQ==";
! // private static final String NSROOTPKMOD = "AKbv1DrfQCj7fbcc/9U8mLHi9LzFGVw8ac9z26BN1+yeq9VG3wvW+OXjvUpQ9cD+dpwpFXeai9Hz DkFeJcT9Coi9A8Aj4nffWAlxJ/AVOIRCi1d4A/d9InhQ7UYYA5O7XBcwKneopYVa9zRDUoy0ZpVy t9Kj5i0Zw6oZsflAu4S4pIU+niYwwWrYmCuBEq9kecf7nSGiU0rHp1QNs7NYdhXCl2BMcSaz0AZt AF8YLlZYasviJkoxUFBB/Vjqa98xi7V7XIGsMbXWqUvJ8MW2N/CUdBz5aDlpBUwul8rqyq+03A0q 84AFJiUcudqVL7KhURXB8ZYy/hZb+YkEvE3IigU=";
private static final String NSROOTPKEXP = "AQAB";
private static PublicKey nsrootpk;
***************
*** 316,328 ****
}
! public final String getSigner() {
return signer;
}
! public final String getLogger() {
return logger;
}
! public SignedNamedObject send(SignedNamedObject obj) throws NeuClearException {
if (!Utility.isEmpty(receiver))
return Sender.quickSend(receiver, obj);
--- 322,334 ----
}
! public final String getSigner() {
return signer;
}
! public final String getLogger() {
return logger;
}
! public SignedNamedObject send(SignedNamedObject obj) throws NeuClearException {
if (!Utility.isEmpty(receiver))
return Sender.quickSend(receiver, obj);
***************
*** 331,335 ****
}
! final void log(SignedNamedObject obj) throws NeuClearException {
if (!Utility.isEmpty(logger))
Sender.quickSend(logger, obj);
--- 337,341 ----
}
! final void log(SignedNamedObject obj) throws NeuClearException {
if (!Utility.isEmpty(logger))
Sender.quickSend(logger, obj);
***************
*** 340,344 ****
}
! public final Certificate getCertificate() {
return new NeuClearCertificate();
}
--- 346,350 ----
}
! public final java.security.cert.Certificate getCertificate() {
return new NeuClearCertificate();
}
***************
*** 365,378 ****
public static final Identity NEUROOT = createRootIdentity();
! public final Certificate[] getCertificateChain() {
ArrayList certs = new ArrayList(3);
Identity id = this;
! while (id != null || id.getName().equals("neu://")) {
certs.add(id.getCertificate());
id = id.getSignatory();
}
! certs.add(NEUROOT);
certs.trimToSize();
! return (Certificate[]) certs.toArray();
}
--- 371,391 ----
public static final Identity NEUROOT = createRootIdentity();
! public final java.security.cert.Certificate[] getCertificateChain() {
ArrayList certs = new ArrayList(3);
Identity id = this;
! while (id != null) {
certs.add(id.getCertificate());
id = id.getSignatory();
}
! certs.add(NEUROOT.getCertificate());
certs.trimToSize();
! Certificate cert[] = new Certificate[certs.size()];
! Iterator iter = certs.iterator();
! int i = 0;
! while (iter.hasNext()) {
! Certificate certificate = (java.security.cert.Certificate) iter.next();
! cert[i++] = certificate;
! }
! return cert;
}
***************
*** 380,384 ****
* Returns the fixed Root PublicKey
*/
! private final static PublicKey getRootPK() throws CryptoException {
if (nsrootpk == null)
nsrootpk = CryptoTools.createPK(NSROOTPKMOD, NSROOTPKEXP);
--- 393,397 ----
* Returns the fixed Root PublicKey
*/
! final static PublicKey getRootPK() throws CryptoException {
if (nsrootpk == null)
nsrootpk = CryptoTools.createPK(NSROOTPKMOD, NSROOTPKEXP);
***************
*** 409,417 ****
*
* @param publicKey
! * @throws CertificateException
! * @throws NoSuchAlgorithmException
! * @throws InvalidKeyException
! * @throws NoSuchProviderException
! * @throws SignatureException
*/
public final void verify(PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
--- 422,434 ----
*
* @param publicKey
! * @throws CertificateException
! * @throws java.security.NoSuchAlgorithmException
! *
! * @throws java.security.InvalidKeyException
! *
! * @throws java.security.NoSuchProviderException
! *
! * @throws java.security.SignatureException
! *
*/
public final void verify(PublicKey publicKey) throws CertificateException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException {
***************
*** 424,428 ****
}
! public final PublicKey getPublicKey() {
return pub;
}
--- 441,445 ----
}
! public final PublicKey getPublicKey() {
return pub;
}
***************
*** 451,455 ****
KeyInfo ki = new KeyInfo(allowElement.element(XMLSecTools.createQName("KeyInfo")));
PublicKey pub = ki.getPublicKey();
! return new Identity(core, repository, signer, logger, receiver, pub); }
}
--- 468,473 ----
KeyInfo ki = new KeyInfo(allowElement.element(XMLSecTools.createQName("KeyInfo")));
PublicKey pub = ki.getPublicKey();
! return new Identity(core, repository, signer, logger, receiver, pub);
! }
}
|