Author: j16sdiz
Date: 2008-12-19 15:28:01 +0000 (Fri, 19 Dec 2008)
New Revision: 24606

Added:
   trunk/plugins/XMLLibrarian/Version.java
Modified:
   trunk/plugins/XMLLibrarian/XMLLibrarian.java
Log:
make XMLLibrarian a versioned plugin

Added: trunk/plugins/XMLLibrarian/Version.java
===================================================================
--- trunk/plugins/XMLLibrarian/Version.java                             (rev 0)
+++ trunk/plugins/XMLLibrarian/Version.java     2008-12-19 15:28:01 UTC (rev 
24606)
@@ -0,0 +1,15 @@
+/* This code is part of Freenet. It is distributed under the GNU General
+ * Public License, version 2 (or at your option any later version). See
+ * http://www.gnu.org/ for further details of the GPL. */
+package plugins.XMLLibrarian;
+
+/**
+ * Necessary to be able to use pluginmanager's versions
+ */
+public class Version {
+       private static final String svnRevision = "@custom@";
+
+       static String getSvnRevision() {
+               return svnRevision;
+       }
+}

Modified: trunk/plugins/XMLLibrarian/XMLLibrarian.java
===================================================================
--- trunk/plugins/XMLLibrarian/XMLLibrarian.java        2008-12-19 15:03:16 UTC 
(rev 24605)
+++ trunk/plugins/XMLLibrarian/XMLLibrarian.java        2008-12-19 15:28:01 UTC 
(rev 24606)
@@ -44,6 +44,7 @@
 import freenet.pluginmanager.FredPlugin;
 import freenet.pluginmanager.FredPluginHTTP;
 import freenet.pluginmanager.FredPluginThreadless;
+import freenet.pluginmanager.FredPluginVersioned;
 import freenet.pluginmanager.PluginHTTPException;
 import freenet.pluginmanager.PluginRespirator;
 import freenet.support.HTMLEncoder;
@@ -66,7 +67,7 @@
  * @author swatigoyal
  *
  */
-public class XMLLibrarian implements FredPlugin, FredPluginHTTP, 
FredPluginThreadless {
+public class XMLLibrarian implements FredPlugin, FredPluginHTTP, 
FredPluginVersioned, FredPluginThreadless {
        /**
         * Gives the default index site displayed in the browser.
         * <p>Change this parameter accordingly.
@@ -79,12 +80,17 @@
         * Current configuration gets saved by default in the configfile.
         * To Save the current configuration use "Save Configuration"
         */
-       private int version = 17;
+       private int version = 18;
+       private final String plugName = "XMLLibrarian " + version;
+
+       public String getVersion() {
+               return version + " r" + Version.getSvnRevision();
+       }
+       
        private String configfile = "XMLLibrarian.xml";
        private  String DEFAULT_FILE = "index.xml";
        private volatile boolean goon = true;
-       private PluginRespirator pr;
-       private final String plugName = "XMLLibrarian "+version;
+       private PluginRespirator pr;    
        private String word ;
        private boolean processingWord ;
        

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to