Author: nextgens
Date: 2007-12-03 11:13:59 +0000 (Mon, 03 Dec 2007)
New Revision: 16214

Modified:
   trunk/apps/Echo/src/plugins/echo/Echo.java
Log:
Echo: create the BASE_URL constant

Modified: trunk/apps/Echo/src/plugins/echo/Echo.java
===================================================================
--- trunk/apps/Echo/src/plugins/echo/Echo.java  2007-12-03 11:12:23 UTC (rev 
16213)
+++ trunk/apps/Echo/src/plugins/echo/Echo.java  2007-12-03 11:13:59 UTC (rev 
16214)
@@ -46,6 +46,7 @@

 public class Echo implements FredPlugin, FredPluginHTTP, 
FredPluginHTTPAdvanced, FredPluginThreadless {

+       public static final String BASE_URL = "/plugins/plugins.echo.Echo/";
        public static final File BASE_DIR = new File("plugins/Echo/");
        public static final int PROJECT_ID_LENGTH = 3;
        public static final int NODE_ID_LENGTH = 4;
@@ -142,7 +143,7 @@

        public String handleHTTPGet(HTTPRequest request) throws 
PluginHTTPException {
                if ("/plugins/plugins.echo.Echo".equals(request.getPath()))
-                       throw new RedirectPluginHTTPException("", 
"/plugins/plugins.echo.Echo/");
+                       throw new RedirectPluginHTTPException("", BASE_URL);

                String fileName = (new File(request.getPath())).getName();

@@ -165,7 +166,7 @@

                }

-               throw new PluginHTTPException("Unable to handle the request!", 
"/plugins/plugins.echo.Echo/");
+               throw new PluginHTTPException("Unable to handle the request!", 
BASE_URL);
        }

        public String handleHTTPPut(HTTPRequest request) throws 
PluginHTTPException {


Reply via email to