[Webfunds-commits] java/webfunds/client/plugins PluginManager.java

Ian Grigg iang@cypherpunks.ai
Sun, 24 Sep 2000 19:17:02 -0400 (AST)


iang        00/09/24 19:17:02

  Modified:    webfunds/client/plugins PluginManager.java
  Log:
  moved in comment from Core only, should get this code working one day
  when WalletManager has got the formula down pat.

Revision  Changes    Path
1.15      +61 -1     java/webfunds/client/plugins/PluginManager.java

Index: PluginManager.java
===================================================================
RCS file: /home/webfunds/cvsroot/java/webfunds/client/plugins/PluginManager.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- PluginManager.java	2000/07/16 19:38:11	1.14
+++ PluginManager.java	2000/09/24 23:17:02	1.15
@@ -1,5 +1,5 @@
 /* 
- * $Id: PluginManager.java,v 1.14 2000/07/16 19:38:11 iang Exp $
+ * $Id: PluginManager.java,v 1.15 2000/09/24 23:17:02 iang Exp $
  *
  * Copyright (c) 1995-2000 Systemics Inc on behalf of
  * the WebFunds Development Team.  All Rights Reserved.
@@ -369,5 +369,65 @@
         }
         return null;
     }
+
+////////////////// from Core, should get working some time,
+////////////////// just like in WalletManager:
+//        //
+//        // Adding 3rd party file plugins
+//        //
+//        logmsg("3rd Party Plugins: ==========================");
+//
+//        String[] plugs = VersionNumbers.getListOfAddOns(pluginsDir, bug);
+//
+//        for (int i = 0; i < plugs.length; i++)
+//        {
+//            try {
+//                pm.add3rdPartyPlugin(pluginsDir, plugs[i]);
+//            } catch (Exception ex) {
+//            }
+//        }
+
+//    static String sep = System.getProperty("path.separator");
+//
+//    protected void add3rdPartyPlugin(String dir, String name)
+//    {
+//        File pugDir  = new File(dir, name);
+//        File pugSpec = new File(pugDir, Plugin.spec);
+//
+//        // Read Plugin Spec
+//        byte[] buf;
+//        try {
+//            FileInputStream fis = new FileInputStream(pugSpec);
+//            buf = new byte[fis.available()];
+//            fis.read(buf);
+//            fis.close();
+//        } catch (IOException ex) {
+//            logmsg("Plugin " + pugDir + " failed.\n" +
+//                   "Ex: " + ex + "\n" +
+//                   "Spec " + spec + " not readable!  Contact your vendor!");
+//            return ;
+//        }
+//
+//        IniFileReader ini;
+//        try {
+//            ini = new IniFileReader(buf);
+//        } catch (ContractException ex) {
+//            logmsg("Plugin " + pugDir + " failed.\n" +
+//                   "Ex: " + ex + "\n" +
+//                   "IniFile " + spec + " not readable!  Contact your vendor!")
+;
+//            return ;
+//        }
+//
+//        String main = ini.getSectionItemValue("java", "main");
+//        Properties props = System.getProperties();
+//        String classpath = System.getProperty("java.class.path");
+//        String sep = System.getProperty("line.separator");
+//        logmsg("classpath is " + classpath);
+//        classpath += sep + dir + sep + name;
+//        logmsg("new       is " + classpath);
+//        setProperty("java.class.path", classpath);
+//
+//    }  
 
 }