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 Detail

      • init

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

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

        void setClassLoader​(ClassLoader classLoader)
      • setName

        void setName​(String name)
      • setPath

        void setPath​(File path)
      • setMountPoint

        void setMountPoint​(MountPoint mountPoint)
      • setImplementation

        void setImplementation​(String id)
      • setScript

        void setScript​(URL location,
                       org.mozilla.javascript.Script script)
      • 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()
      • getProperties

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

        File getPath()
      • getTemporaryDir

        File getTemporaryDir()
      • getImplementations

        Set<String> getImplementations()
      • 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
      • 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