Class RefineServlet

  • All Implemented Interfaces:
    Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class RefineServlet
    extends edu.mit.simile.butterfly.Butterfly
    See Also:
    Serialized Form
    • Field Detail

      • VERSION

        public static String VERSION
      • REVISION

        public static String REVISION
      • FULL_VERSION

        public static String FULL_VERSION
      • FULLNAME

        public static String FULLNAME
    • Constructor Detail

      • RefineServlet

        public RefineServlet()
    • Method Detail

      • init

        public void init()
                  throws javax.servlet.ServletException
        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException
      • init

        public void init​(javax.servlet.ServletConfig config)
                  throws javax.servlet.ServletException
        Specified by:
        init in interface javax.servlet.Servlet
        Overrides:
        init in class edu.mit.simile.butterfly.Butterfly
        Throws:
        javax.servlet.ServletException
      • destroy

        public void destroy()
        Specified by:
        destroy in interface javax.servlet.Servlet
        Overrides:
        destroy in class edu.mit.simile.butterfly.Butterfly
      • service

        public void service​(javax.servlet.http.HttpServletRequest request,
                            javax.servlet.http.HttpServletResponse response)
                     throws javax.servlet.ServletException,
                            IOException
        Overrides:
        service in class edu.mit.simile.butterfly.Butterfly
        Throws:
        javax.servlet.ServletException
        IOException
      • getModule

        public edu.mit.simile.butterfly.ButterflyModule getModule​(String name)
      • getCommandKey

        protected String getCommandKey​(javax.servlet.http.HttpServletRequest request)
      • getTempDir

        public File getTempDir()
      • getTempFile

        public File getTempFile​(String name)
      • getCacheDir

        public File getCacheDir​(String name)
      • registerOneCommand

        protected boolean registerOneCommand​(edu.mit.simile.butterfly.ButterflyModule module,
                                             String name,
                                             Command commandObject)
        Register a single command.
        Parameters:
        module - the module the command belongs to
        name - command verb for command
        commandObject - object implementing the command
        Returns:
        true if command was loaded and registered successfully
      • registerOneCommand

        protected boolean registerOneCommand​(String path,
                                             Command commandObject)
        Register a single command.
        Parameters:
        path - path for command
        commandObject - object implementing the command
        Returns:
        true if command was loaded and registered successfully
      • unregisterCommand

        protected boolean unregisterCommand​(String verb)
      • registerCommand

        public static boolean registerCommand​(edu.mit.simile.butterfly.ButterflyModule module,
                                              String commandName,
                                              Command commandObject)
        Register a single command. Used by extensions.
        Parameters:
        module - the module the command belongs to
        commandName - command verb for command
        commandObject - object implementing the command
        Returns:
        true if command was loaded and registered successfully
      • cacheClass

        public static void cacheClass​(Class<?> klass)
      • registerClassMapping

        public static void registerClassMapping​(String from,
                                                String to)
      • initDatamodelRunner

        public static void initDatamodelRunner()