You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by jv...@apache.org on 2001/06/27 20:50:36 UTC

cvs commit: jakarta-turbine/src/java/org/apache/turbine/modules Module.java ModuleLoader.java ScriptableModule.java Action.java ActionEvent.java Layout.java Navigation.java Page.java ScheduledJob.java Screen.java ActionLoader.java Assembler.java GenericLoader.java LayoutLoader.java NavigationLoader.java PageLoader.java ScheduledJobLoader.java ScreenLoader.java

jvanzyl     01/06/27 11:50:35

  Modified:    src/java/org/apache/turbine/modules Action.java
                        ActionEvent.java Layout.java Navigation.java
                        Page.java ScheduledJob.java Screen.java
  Added:       src/java/org/apache/turbine/modules Module.java
                        ModuleLoader.java ScriptableModule.java
  Removed:     src/java/org/apache/turbine/modules ActionLoader.java
                        Assembler.java GenericLoader.java LayoutLoader.java
                        NavigationLoader.java PageLoader.java
                        ScheduledJobLoader.java ScreenLoader.java
  Log:
  - getting rid of all the singleton loaders and created a ModuleLoader
    that is being used in Turbine.java right now and is taking the place
    of all the loaders, but an instance of ModuleLoader will be used by
    each (sub)application running under Turbine so that an app can
    manage its own resources.
  
  - renamed Assembler to Module which more accurately reflects
    our nomenclature and doesn't affect anything.
  
  Revision  Changes    Path
  1.7       +8 -3      jakarta-turbine/src/java/org/apache/turbine/modules/Action.java
  
  Index: Action.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/modules/Action.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Action.java	2001/05/05 15:55:30	1.6
  +++ Action.java	2001/06/27 18:50:20	1.7
  @@ -54,16 +54,16 @@
    * <http://www.apache.org/>.
    */
   
  -// Turbine Utility Classes
   import org.apache.turbine.util.RunData;
   
   /**
    * Generic Action class.
    *
    * @author <a href="mailto:mbryson@mont.mindspring.com">Dave Bryson</a>
  - * @version $Id: Action.java,v 1.6 2001/05/05 15:55:30 mpoeschl Exp $
  + * @version $Id: Action.java,v 1.7 2001/06/27 18:50:20 jvanzyl Exp $
    */
  -public abstract class Action extends Assembler
  +public abstract class Action 
  +    extends Module
   {
       /**
        * A subclass must override this method to perform itself.  The
  @@ -85,5 +85,10 @@
       protected void perform( RunData data ) throws Exception
       {
           doPerform( data );
  +    }
  +
  +    public void execute(RunData data) throws Exception
  +    {
  +        doPerform(data);
       }
   }
  
  
  
  1.12      +6 -4      jakarta-turbine/src/java/org/apache/turbine/modules/ActionEvent.java
  
  Index: ActionEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/modules/ActionEvent.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ActionEvent.java	2001/05/05 15:55:30	1.11
  +++ ActionEvent.java	2001/06/27 18:50:20	1.12
  @@ -54,11 +54,8 @@
    * <http://www.apache.org/>.
    */
   
  -// JDK
   import java.lang.reflect.Method;
   import java.util.Enumeration;
  -
  -// Turbine
   import org.apache.turbine.services.resources.TurbineResources;
   import org.apache.turbine.util.ParameterParser;
   import org.apache.turbine.util.RunData;
  @@ -104,7 +101,7 @@
    * method naming in your Action class.
    *
    * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens </a>
  - * @version $Id: ActionEvent.java,v 1.11 2001/05/05 15:55:30 mpoeschl Exp $
  + * @version $Id: ActionEvent.java,v 1.12 2001/06/27 18:50:20 jvanzyl Exp $
    */
   public abstract class ActionEvent extends Action
   {
  @@ -147,6 +144,11 @@
           {
               doPerform( data );
           }
  +    }
  +
  +    public void execute(RunData data) throws Exception
  +    {
  +        perform(data);
       }
   
       /**
  
  
  
  1.6       +8 -2      jakarta-turbine/src/java/org/apache/turbine/modules/Layout.java
  
  Index: Layout.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/modules/Layout.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Layout.java	2001/05/05 15:55:31	1.5
  +++ Layout.java	2001/06/27 18:50:23	1.6
  @@ -61,9 +61,10 @@
    * This is an interface that defines what a Layout module is.
    *
    * @author <a href="mailto:mbryson@mont.mindspring.com">Dave Bryson</a>
  - * @version $Id: Layout.java,v 1.5 2001/05/05 15:55:31 mpoeschl Exp $
  + * @version $Id: Layout.java,v 1.6 2001/06/27 18:50:23 jvanzyl Exp $
    */
  -public abstract class Layout extends Assembler
  +public abstract class Layout 
  +    extends Module
   {
       /**
        * A subclass must override this method to build itself.
  @@ -89,5 +90,10 @@
           throws Exception
       {
           doBuild( data );
  +    }
  +
  +    public void execute(RunData data) throws Exception
  +    {
  +        doBuild(data);
       }
   }
  
  
  
  1.6       +13 -2     jakarta-turbine/src/java/org/apache/turbine/modules/Navigation.java
  
  Index: Navigation.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/modules/Navigation.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Navigation.java	2001/05/05 15:55:31	1.5
  +++ Navigation.java	2001/06/27 18:50:25	1.6
  @@ -66,9 +66,10 @@
    * This is an interface that defines what a Navigation module is.
    *
    * @author <a href="mailto:mbryson@mont.mindspring.com">Dave Bryson</a>
  - * @version $Id: Navigation.java,v 1.5 2001/05/05 15:55:31 mpoeschl Exp $
  + * @version $Id: Navigation.java,v 1.6 2001/06/27 18:50:25 jvanzyl Exp $
    */
  -public abstract class Navigation extends Assembler
  +public abstract class Navigation 
  +    extends Module
   {
       private static final CharacterFilter filter = htmlFilter();
   
  @@ -96,6 +97,16 @@
           throws Exception
       {
           return doBuild( data );
  +    }
  +
  +    public void execute(RunData data) throws Exception
  +    {
  +        doBuild(data);
  +    }
  +
  +    public String evaluate(RunData data) throws Exception
  +    {
  +        return doBuild(data).toString();
       }
   
       /**
  
  
  
  1.6       +8 -2      jakarta-turbine/src/java/org/apache/turbine/modules/Page.java
  
  Index: Page.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/modules/Page.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Page.java	2001/05/05 15:55:31	1.5
  +++ Page.java	2001/06/27 18:50:25	1.6
  @@ -61,9 +61,10 @@
    * This is an interface that defines what a Page module is.
    *
    * @author <a href="mailto:mbryson@mont.mindspring.com">Dave Bryson</a>
  - * @version $Id: Page.java,v 1.5 2001/05/05 15:55:31 mpoeschl Exp $
  + * @version $Id: Page.java,v 1.6 2001/06/27 18:50:25 jvanzyl Exp $
    */
  -public abstract class Page extends Assembler
  +public abstract class Page 
  +    extends Module
   {
       /**
        * A subclass must override this method to build itself.
  @@ -88,5 +89,10 @@
           throws Exception
       {
           doBuild( data );
  +    }
  +
  +    public void execute(RunData data) throws Exception
  +    {
  +        doBuild(data);
       }
   }
  
  
  
  1.5       +14 -2     jakarta-turbine/src/java/org/apache/turbine/modules/ScheduledJob.java
  
  Index: ScheduledJob.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/modules/ScheduledJob.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ScheduledJob.java	2001/05/05 15:55:32	1.4
  +++ ScheduledJob.java	2001/06/27 18:50:28	1.5
  @@ -65,9 +65,10 @@
    * register in the JobEntry.
    *
    * @author <a href="mailto:mbryson@mindspring.com">Dave Bryson</a>
  - * @version $Id: ScheduledJob.java,v 1.4 2001/05/05 15:55:32 mpoeschl Exp $
  + * @version $Id: ScheduledJob.java,v 1.5 2001/06/27 18:50:28 jvanzyl Exp $
    */
  -public abstract class ScheduledJob extends Assembler
  +public abstract class ScheduledJob 
  +    extends Module
   {
       /**
        * Run the Jobentry from the scheduler queue.
  @@ -76,4 +77,15 @@
        */
       public abstract void run( JobEntry job )
           throws Exception;
  +
  +    /**
  +     * This is a stop gap until the scheduler service
  +     * is fully decoupled from modules. Modules
  +     * are for the display system.
  +     */
  +    public void execute(JobEntry job)
  +        throws Exception
  +    {
  +        run(job);
  +    }
   }
  
  
  
  1.6       +15 -2     jakarta-turbine/src/java/org/apache/turbine/modules/Screen.java
  
  Index: Screen.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/modules/Screen.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Screen.java	2001/05/05 15:55:32	1.5
  +++ Screen.java	2001/06/27 18:50:29	1.6
  @@ -66,9 +66,10 @@
    * This is an interface that defines the Screen modules.
    *
    * @author <a href="mailto:mbryson@mont.mindspring.com">Dave Bryson</a>
  - * @version $Id: Screen.java,v 1.5 2001/05/05 15:55:32 mpoeschl Exp $
  + * @version $Id: Screen.java,v 1.6 2001/06/27 18:50:29 jvanzyl Exp $
   */
  -public abstract class Screen extends Assembler
  +public abstract class Screen 
  +    extends Module
   {
       private static final CharacterFilter filter = htmlFilter();
       private static final CharacterFilter minFilter = htmlMinFilter();
  @@ -99,6 +100,16 @@
           return doBuild( data );
       }
   
  +    public void execute(RunData data) throws Exception
  +    {
  +        doBuild(data);
  +    }        
  +
  +    public String evaluate(RunData data) throws Exception
  +    {
  +        return doBuild(data).toString();
  +    }        
  +
       /**
        * If the Layout has not been defined by the Screen then set the
        * layout to be "DefaultLayout".  The Screen object can also
  @@ -190,4 +201,6 @@
           filter.addAttribute("<", Entities.LT);
           return filter;
       }
  +
  +    
   }
  
  
  
  1.1                  jakarta-turbine/src/java/org/apache/turbine/modules/Module.java
  
  Index: Module.java
  ===================================================================
  package org.apache.turbine.modules;
  
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and 
   *    "Apache Turbine" must not be used to endorse or promote products 
   *    derived from this software without prior written permission. For 
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Turbine", nor may "Apache" appear in their name, without 
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  import org.apache.turbine.util.RunData;
  
  /**
   * This is an interface that defines what a Module is. All the
   * current modules extend off of this class. It is currently empty and
   * future use is yet to be determined.
   *
   * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
   * @version $Id: Module.java,v 1.1 2001/06/27 18:50:24 jvanzyl Exp $
   */
  public abstract class Module
  {
      public void execute(RunData data) throws Exception
      {
      }
  
      public String evaluate(RunData data) throws Exception
      {
          return "";
      }        
  }
  
  
  
  
  1.1                  jakarta-turbine/src/java/org/apache/turbine/modules/ModuleLoader.java
  
  Index: ModuleLoader.java
  ===================================================================
  package org.apache.turbine.modules;
  
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *    "Apache Turbine" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Turbine", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  import java.util.Iterator;
  import java.util.List;
  import java.util.Vector;
  import java.util.Map;
  import org.apache.turbine.Turbine;
  import org.apache.turbine.modules.ScriptableModule;
  import org.apache.turbine.util.RunData;
  import org.apache.commons.collections.FastArrayList;
  import org.apache.commons.collections.FastHashMap;
  import org.apache.turbine.util.Log;
  
  /**
   * Load modules for use in the view pipeline.
   *
   * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
   * @version $Id: ModuleLoader.java,v 1.1 2001/06/27 18:50:24 jvanzyl Exp $
   */
  public class ModuleLoader
  {
      /**
       * Controls the caching of modules in the system.
       */
      protected boolean cacheEnabled;
  
      /**
       * Cache for processed modules.
       */
      protected Map moduleCache;    
  
      /**
       * Module packages for this module loader.
       */
      protected List modulePackages;
  
      /**
       * A String representation of the module packages
       * that are search. Used in exception handling.
       */
      protected StringBuffer modulePackagesNames;
  
      /**
       * Property that controls whether scripting is enabled
       * for this module loader.
       */
      protected boolean scriptingEnabled;
  
      /**
       * Default constructor.
       */
      public ModuleLoader()
      {
          moduleCache = new FastHashMap();
          modulePackages = new FastArrayList();
          modulePackagesNames = new StringBuffer();
      }
  
      /**
       * Add a module package to the search list.
       *
       * @param String module package to add to search list
       */
      public void addModulePackage(String modulePackage)
      {
          modulePackages.add(modulePackage);
          modulePackagesNames.append(modulePackage).append("\n");
      }
  
      /**
       * Add a new module type for this module loader.
       *
       * @param String type
       */
      public void addModuleType(String type)
      {
          moduleCache.put(type, new FastHashMap());
      }
  
      /**
       * Initialize this module loader.
       */
      public void init()
      {
      }
  
      /**
       * Get an instance of a module
       *
       * @param String name
       * @param String type
       * @return Module
       */
      public Module getModule(String type, String name)
          throws Exception
      {
          // Try and retrieve the module of the specified type
          // with the specified name.
          Module module = (Module) ((Map) moduleCache.get(type)).get(name);
          
          if (module != null)
          {
              return module;
          }
          else
          {
              Iterator i = modulePackages.iterator();
                  
              while (i.hasNext())
              {
                  String moduleClass = (String) i.next() + "." + type + "." + name;
                  
                  try
                  {
                      Log.debug("[ModuleLoader] Looking for " + moduleClass);
                      module = (Module) Class.forName(moduleClass).newInstance();
                      
                      // Store the found module is caching is enabled.
                      if (cacheEnabled)
                      {
                          ((Map) moduleCache.get(type)).put(name, module);
                      }
                      
                      break;
                  }
                  catch (Exception e)
                  {
                      // do nothing.
                  }
              }
          }            
          
          if (scriptingEnabled && module == null)
          {
              module = new ScriptableModule(type, name);
              return module;
          }
          
          if (module == null)
          {
              throw new Exception(
                  "Can't find module: " + name + " in " + modulePackagesNames);
          }                    
          
          return module;
      }
  
      /**
       * Set whether or not this module loader will attempt
       * to find BSF script to execute in the place of
       * java classes.
       */
      public void setScriptingEnabled(boolean state)
      {
          scriptingEnabled = state;
      }        
  }
  
  
  
  1.1                  jakarta-turbine/src/java/org/apache/turbine/modules/ScriptableModule.java
  
  Index: ScriptableModule.java
  ===================================================================
  package org.apache.turbine.modules;
  
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and 
   *    "Apache Turbine" must not be used to endorse or promote products 
   *    derived from this software without prior written permission. For 
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    "Apache Turbine", nor may "Apache" appear in their name, without 
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  import org.apache.turbine.util.RunData;
  import org.apache.turbine.services.bsf.TurbineBSF;
  
  /**
   * This is an interface that defines what a Module is. All the
   * current modules extend off of this class. It is currently empty and
   * future use is yet to be determined.
   *
   * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
   * @version $Id: ScriptableModule.java,v 1.1 2001/06/27 18:50:30 jvanzyl Exp $
   */
  public class ScriptableModule
      extends Module
  {
      /**
       * The script to execute. This is the path to the
       * script relative to the scriptsDirectory as
       * specified in the BSF service configuration.
       */
      private String script;
  
      /**
       * Constructor.
       */
      public ScriptableModule(String type, String name)
      {
          script = type + "/" + name;
      }
  
      public void execute(RunData data)
      {
          TurbineBSF.execute(script);
      }
  }
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org