[Webfunds-commits] java/webfunds/ricardian ContractStore.java SOXStore.java

Jeroen C. van Gelderen gelderen@cypherpunks.ai
Sun, 4 Jun 2000 23:48:17 -0400 (AST)


gelderen    00/06/04 23:48:17

  Modified:    webfunds/client AccountBrowser.java AccountBrowserImpl.java
                        CorePart.java UInterface.java WalletContext.java
                        WalletInterface.java
               webfunds/client/sox AccountStore.java ReceiptsStore.java
               webfunds/client/sun TreeTableModel.java
               webfunds/ricardian ContractStore.java SOXStore.java
  Log:
  Next step in rationalizing the source: make it compile cleanly with Jikes +P.

Revision  Changes    Path
1.7       +5 -5      java/webfunds/client/AccountBrowser.java

Index: AccountBrowser.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/AccountBrowser.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- AccountBrowser.java	1999/11/15 00:58:12	1.6
+++ AccountBrowser.java	2000/06/05 03:48:15	1.7
@@ -1,5 +1,5 @@
 /*
- * $Id: AccountBrowser.java,v 1.6 1999/11/15 00:58:12 iang Exp $
+ * $Id: AccountBrowser.java,v 1.7 2000/06/05 03:48:15 gelderen Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -12,11 +12,11 @@
     extends CorePart
 {
 
-    public void run();
+    void run();
 
-    public void setWallets(WalletInterface[] wallets);
+    void setWallets(WalletInterface[] wallets);
     
-    public void setPlugins(PluginInfo[] plugins);
-    public void setPlugins(PluginInfo[] plugins, WalletInterface wi);
+    void setPlugins(PluginInfo[] plugins);
+    void setPlugins(PluginInfo[] plugins, WalletInterface wi);
     
 }



1.73      +9 -2      java/webfunds/client/AccountBrowserImpl.java

Index: AccountBrowserImpl.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/AccountBrowserImpl.java,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- AccountBrowserImpl.java	2000/06/05 00:45:57	1.72
+++ AccountBrowserImpl.java	2000/06/05 03:48:15	1.73
@@ -1,5 +1,5 @@
 /*
- * $Id: AccountBrowserImpl.java,v 1.72 2000/06/05 00:45:57 iang Exp $
+ * $Id: AccountBrowserImpl.java,v 1.73 2000/06/05 03:48:15 gelderen Exp $
  *
  * Copyright (c) Systemics Inc 1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -95,7 +95,14 @@
     public void   setCore(Core core) { if (c == null) c = core; }
     public String getType()          { return "AccountBrowser"; }
 
-    public void wink() { try { Thread.sleep(100); } catch (Exception ex) { } };
+    public void wink() 
+    { 
+        try 
+        { 
+            Thread.sleep(100); 
+        } 
+        catch(Exception ex) { } 
+    }
 
     public void run()
     {



1.2       +7 -4      java/webfunds/client/CorePart.java

Index: CorePart.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/CorePart.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CorePart.java	1999/06/27 16:22:09	1.1
+++ CorePart.java	2000/06/05 03:48:15	1.2
@@ -1,12 +1,15 @@
+/* $Id: CorePart.java,v 1.2 2000/06/05 03:48:15 gelderen Exp $
+ * 
+ * Copyright (c) 1995-2000 Systemics Inc. on behalf of
+ * The WebFunds Development Team. All rights reserved.
+ */
 package webfunds.client;
 
 
 public interface CorePart
 {
+    void setCore(Core core);
     
-    public void setCore(Core core);
-    
-    public String getType();
-    
+    String getType();
 }
 



1.10      +13 -14    java/webfunds/client/UInterface.java

Index: UInterface.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/UInterface.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- UInterface.java	1999/06/27 14:52:47	1.9
+++ UInterface.java	2000/06/05 03:48:15	1.10
@@ -1,5 +1,5 @@
 /*
- * $Id: UInterface.java,v 1.9 1999/06/27 14:52:47 erwin Exp $
+ * $Id: UInterface.java,v 1.10 2000/06/05 03:48:15 gelderen Exp $
  *
  * Copyright (c) Systemics Ltd 1995-1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -13,33 +13,32 @@
 
 public interface UInterface extends CorePart
 {
+    int YES     = 0,
+        NO      = 1,
+        CANCEL  = 2;
     
-    public static final int YES     = 0;
-    public static final int NO      = 1;
-    public static final int CANCEL  = 2;
     
-    
     //get a X509 Certificate
-    public CertPackage getX509Certificate();
+    CertPackage getX509Certificate();
     
     //get a public/private keypair.
-    public KeyPair getKeyPair(); // Might have to change this to getKeyPair(String algo) in the future.
+    KeyPair getKeyPair(); // Might have to change this to getKeyPair(String algo) in the future.
  
     //get an yes/no answer from the user
-    public int getYesNo(String message);
+    int getYesNo(String message);
     
     //to get a yes, no cancel message.
-    public int getYesNoCanc(String message);
+    int getYesNoCanc(String message);
     
     //error/info message
-    public void errorMessage(String message);
+    void errorMessage(String message);
     
-    public void infoMessage(String message);
+    void infoMessage(String message);
     
-    public String getInput(String message);
+    String getInput(String message);
     
-    public String getPassword(String message);
+    String getPassword(String message);
     
-    public Object[] getList(String message, Object[] items, boolean multiple);
+    Object[] getList(String message, Object[] items, boolean multiple);
 
 }



1.7       +7 -7      java/webfunds/client/WalletContext.java

Index: WalletContext.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/WalletContext.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- WalletContext.java	2000/06/01 21:12:55	1.6
+++ WalletContext.java	2000/06/05 03:48:15	1.7
@@ -1,4 +1,4 @@
-/* $Id: WalletContext.java,v 1.6 2000/06/01 21:12:55 gelderen Exp $
+/* $Id: WalletContext.java,v 1.7 2000/06/05 03:48:15 gelderen Exp $
  *
  * Copyright (c) 2000 Systemics Inc. All rights reserved.
  */
@@ -16,14 +16,14 @@
 
 public interface WalletContext
 {
-    public Addressbook getAddressbook(WalletInterface wi);
-    public PluginManager getPluginManager(WalletInterface wi);
-    public SecureRandom getSecureRandom();
-    public Store getStore(WalletInterface wi) throws StoreException;
-    public UInterface getUInterface(WalletInterface wi);
+    Addressbook getAddressbook(WalletInterface wi);
+    PluginManager getPluginManager(WalletInterface wi);
+    SecureRandom getSecureRandom();
+    Store getStore(WalletInterface wi) throws StoreException;
+    UInterface getUInterface(WalletInterface wi);
 
 
     // XXX: ChangeContractStore is misnamed and prolly too specific.
-    public ChangeContractStore getContractStore(WalletInterface wi);
+    ChangeContractStore getContractStore(WalletInterface wi);
 
 }



1.35      +24 -24    java/webfunds/client/WalletInterface.java

Index: WalletInterface.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/WalletInterface.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- WalletInterface.java	2000/05/28 02:51:36	1.34
+++ WalletInterface.java	2000/06/05 03:48:15	1.35
@@ -1,5 +1,5 @@
 /*
- * $Id: WalletInterface.java,v 1.34 2000/05/28 02:51:36 iang Exp $
+ * $Id: WalletInterface.java,v 1.35 2000/06/05 03:48:15 gelderen Exp $
  *
  * Copyright (c) 1995-2000 Systemics Ltd on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -36,24 +36,24 @@
     /**
      *  Get a name for this wallet.  Only used for debugging currently.
      */
-    public String getShortName();
+    String getShortName();
 
     /**
      *  Get the protocol name.  Only used for debugging currently.
      */
-    public String getProtocol();
+    String getProtocol();
     
     /**
      *  Get the version number of the protocol.
      *  This is a high level wallet version number, not effecting
      *  protocol compatibility.  Only used for debugging currently.
      */
-    public String getVersion();
+    String getVersion();
 
     /**
      *  A debugging interface, set this PrintWriter as where logs go.
      */
-    public void debug(PrintWriter bug);
+    void debug(PrintWriter bug);
 
     /**
      *  Set the WalletContext so the WI can access the other components.
@@ -61,7 +61,7 @@
      *  Wallet gets access to ContractStore, GUI, Store, PluginManager,
      *  Addressbook, SecureRandom objects.
      */
-    public void setWalletContext(WalletContext wm);
+    void setWalletContext(WalletContext wm);
     
     /**
      *  Get the value held in a subaccount (contract) in a given account. 
@@ -72,23 +72,23 @@
      *  @param pending if true, the value of pending payments, else confirmed
      *  @return the total value if countable, else Long.MIN_VALUE on error
      */
-    public long getValue(AccountInfo account, ItemId contract,
+    long getValue(AccountInfo account, ItemId contract,
                          boolean pending);
     
     /**
      *  Get all accounts known to this wallet.
      */
-    public AccountInfo[] getAccounts();
+    AccountInfo[] getAccounts();
         
     /**
      *  Add an account.
      */
-    public AccountInfo addAccount();
+    AccountInfo addAccount();
     
     /**
      *  Get all contracts that are in this account
      */
-    public ItemId[] getContracts(AccountInfo accountInfo);
+    ItemId[] getContracts(AccountInfo accountInfo);
     
     /**
      *  Rename this account to a new String.
@@ -96,7 +96,7 @@
      *  useful for debugging.
      *  @return true if succeeded
      */
-    public boolean renameAccount(AccountInfo accountInfo, String name);
+    boolean renameAccount(AccountInfo accountInfo, String name);
     
     /**
      *  Remove this account.
@@ -104,24 +104,24 @@
      *  difficulty with removing past history of transactions.
      *  @return true if succeeded
      */
-    public boolean removeAccount(AccountInfo accountInfo);
+    boolean removeAccount(AccountInfo accountInfo);
     
     /**
      *  Remove this contract from this account.
      *  Wallet dependant.
      *  @return true if succeeded
      */
-    public boolean removeContract(AccountInfo accountInfo, ItemId contract);
+    boolean removeContract(AccountInfo accountInfo, ItemId contract);
     
     /**
      *  Add a contract to this account.
      */
-    public ItemId addContract(AccountInfo info, ItemId item);
+    ItemId addContract(AccountInfo info, ItemId item);
 
     /**
      *  Make a payment.
      */
-    public byte[] makePayment(ItemId contract,
+    byte[] makePayment(ItemId contract,
                               AccountInfo source, AccountInfo target,
                               long amount,
                               byte[] description,
@@ -135,44 +135,44 @@
      *  @param desc a text description
      *  @param target account to deposit to (may already be directed)
      */
-    public void makeDeposit(byte[] payment, AccountInfo target, byte[] desc);
+    void makeDeposit(byte[] payment, AccountInfo target, byte[] desc);
     
     /**
      *  Try to undo a given payment that this wallet has made.
      *  Transaction is a GUI level entity.
      *  Wallet dependant.
      */
-    public void cancel(Transaction transaction);
+    void cancel(Transaction transaction);
 
     /**
      *  Try to undo a batch of payments that this wallet has made.
      *  Wallet dependant.
      *  As an abstract call, it would call single Transaction many times.
      */
-    public void cancel(Transaction[] transactions);
+    void cancel(Transaction[] transactions);
 
     /**
      *  Update the subaccount with the latest info.
      *  This is a chance to go to the server and ask if anything's come in.
      *  Wallet dependant.
      */
-    public void update(AccountInfo target, ItemId contractId);
+    void update(AccountInfo target, ItemId contractId);
         
     /**
      *  Get all the Transactions for a particular sub account,
      *  for display purposes.
      */
-    public Transaction[] getTransactions(AccountInfo account, ItemId contract);
+    Transaction[] getTransactions(AccountInfo account, ItemId contract);
     
 //    /**
 //     *  Unused!
 //     */
-//    public Transaction getPaymentStatus(byte[] payment);
+//    Transaction getPaymentStatus(byte[] payment);
 
     /**
      *  Provide a help string for each of the different levels.
      */
-    public String getWalletHelp();
-    public String getAccountHelp();
-    public String getContractHelp();
+    String getWalletHelp();
+    String getAccountHelp();
+    String getContractHelp();
 }



1.8       +5 -5      java/webfunds/client/sox/AccountStore.java

Index: AccountStore.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/sox/AccountStore.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AccountStore.java	2000/05/27 03:06:14	1.7
+++ AccountStore.java	2000/06/05 03:48:16	1.8
@@ -12,19 +12,19 @@
     /**
      * @except StoreException if the accounts can't be acquired
      */
-    public Account[] getAllAccounts()
+    Account[] getAllAccounts()
         throws StoreException;
     
     /**
      * @except StoreException if the account data is duff
      */
-    public void addAccount(Account acct)
+    void addAccount(Account acct)
         throws StoreException;
     
     /**
      * @except StoreException if the account identifier was duff
      */
-    public void deleteAccount(Account acct)
+    void deleteAccount(Account acct)
         throws StoreException;
     
     /**
@@ -35,9 +35,9 @@
     // public Account getAccount(AccountInfo info)
     //     throws StoreException;
     
-    public Account getAccount(AccountId acct)
+    Account getAccount(AccountId acct)
         throws StoreException;
     
-    public boolean isChanged();
+    boolean isChanged();
     
 }



1.14      +10 -11    java/webfunds/client/sox/ReceiptsStore.java

Index: ReceiptsStore.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/sox/ReceiptsStore.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ReceiptsStore.java	2000/05/28 02:59:56	1.13
+++ ReceiptsStore.java	2000/06/05 03:48:16	1.14
@@ -1,5 +1,5 @@
 /*
- * $Id: ReceiptsStore.java,v 1.13 2000/05/28 02:59:56 iang Exp $
+ * $Id: ReceiptsStore.java,v 1.14 2000/06/05 03:48:16 gelderen Exp $
  *
  * Copyright (c) Systemics Ltd 1999 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -18,35 +18,34 @@
  */
 public interface ReceiptsStore
 {
-
-    public void addReceipt(Receipt receipt, AccountId acct)
+    void addReceipt(Receipt receipt, AccountId acct)
       throws StoreException;
 
-    public Receipt[] getReceipts(AccountId acct, ItemId item)
+    Receipt[] getReceipts(AccountId acct, ItemId item)
       throws StoreException;
 
-    public void addPendingReceipt(PendingReceipt pending, AccountId acct)
+    void addPendingReceipt(PendingReceipt pending, AccountId acct)
       throws StoreException;
 
-    public PendingReceipt[] getPendingReceipts(AccountId acct, ItemId item)
+    PendingReceipt[] getPendingReceipts(AccountId acct, ItemId item)
       throws StoreException;
 
     /**
      *  StateReceipt is a first cut at an internal state object to
      *  carry the transaction through.
      */
-    public StateReceipt getReceipt(AccountId acct, ItemId item, String pid)
+    StateReceipt getReceipt(AccountId acct, ItemId item, String pid)
         throws StoreException;
 
 // where used to count up receipts, see below
     /** checks what? */
-    public boolean isChanged(AccountId acct);
+    boolean isChanged(AccountId acct);
 
     /** checks what? */
-    public boolean isChanged(AccountId acct, ItemId item);
+    boolean isChanged(AccountId acct, ItemId item);
 
     /** @return the value of confirmed receipts within subaccount */
-    public long confirmedValue(AccountId acct, ItemId item)
+    long confirmedValue(AccountId acct, ItemId item)
         throws StoreException;
 
     /**
@@ -56,6 +55,6 @@
      * As it is a committment out, it should be negative.
      * @return the value of pending outgoing receipts within subaccount
      */
-    public long pendingValue(AccountId acct, ItemId item)
+    long pendingValue(AccountId acct, ItemId item)
         throws StoreException;
 }



1.3       +6 -6      java/webfunds/client/sun/TreeTableModel.java

Index: TreeTableModel.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/sun/TreeTableModel.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TreeTableModel.java	1999/09/26 05:26:34	1.2
+++ TreeTableModel.java	2000/06/05 03:48:17	1.3
@@ -38,33 +38,33 @@
     /**
      * Returns the number ofs availible column.
      */
-    public int getColumnCount();
+    int getColumnCount();
 
     /**
      * Returns the name for column number <code>column</code>.
      */
-    public String getColumnName(int column);
+    String getColumnName(int column);
 
     /**
      * Returns the type for column number <code>column</code>.
      */
-    public Class getColumnClass(int column);
+    Class getColumnClass(int column);
 
     /**
      * Returns the value to be displayed for node <code>node</code>, 
      * at column number <code>column</code>.
      */
-    public Object getValueAt(Object node, int column);
+    Object getValueAt(Object node, int column);
 
     /**
      * Indicates whether the the value for node <code>node</code>, 
      * at column number <code>column</code> is editable.
      */
-    public boolean isCellEditable(Object node, int column);
+    boolean isCellEditable(Object node, int column);
 
     /**
      * Sets the value for node <code>node</code>, 
      * at column number <code>column</code>.
      */
-    public void setValueAt(Object aValue, Object node, int column);
+    void setValueAt(Object aValue, Object node, int column);
 }



1.4       +16 -15    java/webfunds/ricardian/ContractStore.java

Index: ContractStore.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/ricardian/ContractStore.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ContractStore.java	1999/09/25 19:49:25	1.3
+++ ContractStore.java	2000/06/05 03:48:17	1.4
@@ -1,37 +1,38 @@
-/*
- * $Id: ContractStore.java,v 1.3 1999/09/25 19:49:25 iang Exp $
+/* $Id: ContractStore.java,v 1.4 2000/06/05 03:48:17 gelderen Exp $
  *
- * Copyright (c) Systemics Ltd 1995-1999 on behalf of
+ * Copyright (c) Systemics Inc. 1995-2000 on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
  */
 package webfunds.ricardian;
 
-import webfunds.sox.*;
-import java.util.*;
+
 import java.io.File;
 import java.net.URL;
+import java.util.*;
 
+import webfunds.sox.*;
+
+
 public interface ContractStore
 {
-
     /**
      * Add a contract to the store.
      * @except ContractException if the contract won't save into the store.
      *         Presumably this is a serious failure somewhere.
      */
-    public void addContract(Contract contract)
+    void addContract(Contract contract)
          throws ContractException;
 
     /**
      * Remove this contract from the store.
      */
-    public void removeContract(Contract remcontract);
+    void removeContract(Contract remcontract);
 
     /**
      * Return a contract named by hash.  Hash is unique.
      * @return a unique Contract which has message digest of hash
      */
-    public Contract getContract(ItemId hash);
+    Contract getContract(ItemId hash);
 
     /**
      * Return a list of contracts answering to the given name.
@@ -40,15 +41,15 @@
      * It is up to the caller to decide what to do about it.
      * @return array of unique Contract where each answers to name
      */
-    public Contract[] getContractsByName(String name);
+    Contract[] getContractsByName(String name);
 
-    public ItemId[] getIdsByName(String name);
+    ItemId[] getIdsByName(String name);
 
     /**
      * If sure of the unique name, this returns one contract.
      * @except ContractException if not unique (zero or many)
      */
-    public Contract getUniqueContract(String name)
+    Contract getUniqueContract(String name)
         throws ContractException;
 
     /**
@@ -56,19 +57,19 @@
      * One to one with getAllIds().
      * @return a list of contracts
      */
-    public Contract[] getAllContracts();
+    Contract[] getAllContracts();
 
     /**
      * One to one with getAllContracts().
      * @return a list of ItemIds for all contracts in the store.
      */
-    public ItemId[] getAllIds();
+    ItemId[] getAllIds();
 
     /**
      * There are many names for each contract, this list will be
      * larger than the number of contracts.
      * @return a list of all Names in the store.
      */
-    public String[] getAllNames();
+    String[] getAllNames();
 
 }



1.5       +12 -11    java/webfunds/ricardian/SOXStore.java

Index: SOXStore.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/ricardian/SOXStore.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- SOXStore.java	2000/04/20 00:09:06	1.4
+++ SOXStore.java	2000/06/05 03:48:17	1.5
@@ -1,28 +1,29 @@
-/*
- * $Id: SOXStore.java,v 1.4 2000/04/20 00:09:06 iang Exp $
+/* $Id: SOXStore.java,v 1.5 2000/06/05 03:48:17 gelderen Exp $
  *
- * Copyright (c) Systemics Ltd 1995-1999 on behalf of
- * the WebFunds Development Team.  All Rights Reserved.
+ * Copyright (c) Systemics Inc. 1995-2000 on behalf of
+ * The WebFunds Development Team.  All Rights Reserved.
  */
 package webfunds.ricardian;
 
-import webfunds.sox.*;
-import java.util.*;
+
 import java.io.File;
 import java.net.URL;
+import java.util.*;
 
+import webfunds.sox.*;
+
+
 public interface SOXStore
 {
-
     /**
      * @return a SOX server file for this contract.
      */
-    public SOXServer getSOXServer(Contract contract)
+    SOXServer getSOXServer(Contract contract)
         throws SOXLaterException, SOXServerException;
     /**
      * @return an Issuer for this contract.
      */
-    public Issuer getIssuer(Contract contract)
+    Issuer getIssuer(Contract contract)
         throws SOXLaterException, SOXIssuerException;
 
 
@@ -31,13 +32,13 @@
      * Return all SOXServers in the store.
      * @return a list of SOXServers
      */
-    public SOXServer[] getAllSOXServers();
+    SOXServer[] getAllSOXServers();
 
     /**
      * There are many names for each SOXServer.
      * This list will be larger than the number of SOXServers.
      * @return a list of all Names in the store.
      */
-    public String[] getAllNames();
+    String[] getAllNames();
 
 }