Interface ButterflyModule

All Known Implementing Classes:
ButterflyModuleImpl

public interface ButterflyModule
This is the interface that defines what Butterfly modules behave and what functionality is made available to them.
  • Method Details

    • init

      void init​(javax.servlet.ServletConfig config) throws Exception
      Throws:
      Exception
    • destroy

      void destroy() throws Exception
      Throws:
      Exception
    • initScope

      void initScope​(org.mozilla.javascript.Context context, org.mozilla.javascript.Scriptable scope)
    • setClassLoader

      void setClassLoader​(ClassLoader classLoader)
    • setMounter

      void setMounter​(ButterflyMounter mounter)
    • setName

      void setName​(String name)
    • setPath

      void setPath​(File path)
    • setMountPoint

      void setMountPoint​(MountPoint mountPoint)
    • setExtended

      void setExtended​(ButterflyModule extended)
    • addExtendedBy

      void addExtendedBy​(ButterflyModule extender)
    • setImplementation

      void setImplementation​(String id)
    • setDependency

      void setDependency​(String name, ButterflyModule module)
    • setModules

      void setModules​(Map<String,​ButterflyModule> map)
    • setScript

      void setScript​(URL location, org.mozilla.javascript.Script script)
    • setScriptable

      void setScriptable​(ButterflyScriptableObject scriptable)
    • setTemplateEngine

      void setTemplateEngine​(org.apache.velocity.app.VelocityEngine velocity)
    • setProperties

      void setProperties​(org.apache.commons.collections.ExtendedProperties properties)
    • setTimer

      void setTimer​(Timer timer)
    • getServletConfig

      javax.servlet.ServletConfig getServletConfig()
    • getServletContext

      javax.servlet.ServletContext getServletContext()
    • getName

      String getName()
    • getProperties

      org.apache.commons.collections.ExtendedProperties getProperties()
    • getPath

      File getPath()
    • getMountPoint

      MountPoint getMountPoint()
    • getMounter

      ButterflyMounter getMounter()
    • getTemporaryDir

      File getTemporaryDir()
    • getModule

      ButterflyModule getModule​(String name)
    • getExtendedModule

      ButterflyModule getExtendedModule()
    • getDependencies

      Map<String,​ButterflyModule> getDependencies()
    • getImplementations

      Set<String> getImplementations()
    • getScriptables

      Set<ButterflyScriptableObject> getScriptables()
    • getTemplateEngine

      org.apache.velocity.app.VelocityEngine getTemplateEngine()
    • getResource

      URL getResource​(String name)
    • getRelativePath

      String getRelativePath​(javax.servlet.http.HttpServletRequest request)
    • getFilteringWriter

      PrintWriter getFilteringWriter​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean absolute) throws IOException
      Throws:
      IOException
    • getString

      String getString​(javax.servlet.http.HttpServletRequest request) throws Exception
      Throws:
      Exception
    • getContextPath

      String getContextPath​(javax.servlet.http.HttpServletRequest request, boolean absolute)
    • process

      boolean process​(String path, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception
      Throws:
      Exception
    • redirect

      boolean redirect​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String location) throws Exception
      Throws:
      Exception
    • sendBinary

      boolean sendBinary​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String file, String mimeType) throws Exception
      Throws:
      Exception
    • sendBinary

      boolean sendBinary​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, URL resource, String mimeType) throws Exception
      Throws:
      Exception
    • sendText

      boolean sendText​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String file, String encoding, String mimeType, boolean absolute) throws Exception
      Throws:
      Exception
    • sendText

      boolean sendText​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, URL resource, String encoding, String mimeType, boolean absolute) throws Exception
      Throws:
      Exception
    • sendWrappedText

      boolean sendWrappedText​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, URL resource, String encoding, String mimeType, String prologue, String epilogue, boolean absolute) throws Exception
      Throws:
      Exception
    • sendTextFromTemplate

      boolean sendTextFromTemplate​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.apache.velocity.VelocityContext velocity, String template, String encoding, String mimeType, boolean absolute) throws Exception
      Throws:
      Exception
    • sendString

      boolean sendString​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String str, String encoding, String mimeType) throws Exception
      Throws:
      Exception
    • sendError

      boolean sendError​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, int code, String str) throws Exception
      Throws:
      Exception
    • makePath

      List<ButterflyModuleImpl.Level> makePath​(String path, Map<String,​String> descs)