Class RefineServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
edu.mit.simile.butterfly.Butterfly
com.google.refine.RefineServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class RefineServlet extends edu.mit.simile.butterfly.Butterfly
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static String
     
    static String
     
    static String
     
    static String
     

    Fields inherited from class edu.mit.simile.butterfly.Butterfly

    _classLoader, _config, _configurationException, _configured, _context, _contextDir, _created, _homeDir, _moduleProperties, _modulesByInterface, _modulesByName, _mounter, _properties, _scriptWatcher, _timer, _webInfDir, APPENGINE, AUTORELOAD, BASE_URL, CONTEXT_HEADER, contextFactory, DEFAULT_MOUNTPOINT, DEFAULT_ZONE, HOME, HOST_HEADER, MAIN_ZONE, MODULES_IGNORE, MODULES_PATH, NAME, PATH_PROP, ZONE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    cacheClass(Class<?> klass)
     
    void
     
     
    static Class<?>
    getClass(String className)
     
    protected String
    getCommandKey(javax.servlet.http.HttpServletRequest request)
     
     
    edu.mit.simile.butterfly.ButterflyModule
     
     
     
    static String
     
    void
     
    static void
    Add a mapping that determines how old class names can be updated to newer class names.
    static boolean
    registerCommand(edu.mit.simile.butterfly.ButterflyModule module, String commandName, Command commandObject)
    Register a single command.
    protected boolean
    registerOneCommand(edu.mit.simile.butterfly.ButterflyModule module, String name, Command commandObject)
    Register a single command.
    protected boolean
    registerOneCommand(String path, Command commandObject)
    Register a single command.
    void
    service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
     
    static void
    Deprecated.
    extensions relying on HttpURLConnection should rather migrate to a more high-level and mature HTTP client.
    static void
    setUserAgent(URLConnection urlConnection)
    Deprecated.
    extensions relying on HttpURLConnection should rather migrate to a more high-level and mature HTTP client.
    protected boolean
     

    Methods inherited from class edu.mit.simile.butterfly.Butterfly

    absolutize, configure, configureModules, createModule, delay, error, findModulesIn, getFullHost, getTrueContextPath, getTrueHost, getTrueRequestURI, init, initializeModule, isGAE, setDependency, setRoutingCookie, setScript, setScriptable, watch, wireModules

    Methods inherited from class javax.servlet.http.HttpServlet

    doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service

    Methods inherited from class javax.servlet.GenericServlet

    getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • VERSION

      public static String VERSION
    • REVISION

      public static String REVISION
    • FULL_VERSION

      public static String FULL_VERSION
    • FULLNAME

      public static String FULLNAME
  • Constructor Details

    • RefineServlet

      public RefineServlet()
  • Method Details

    • init

      public void init() throws javax.servlet.ServletException
      Overrides:
      init in class javax.servlet.GenericServlet
      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)
    • getConfiguration

      public String getConfiguration(String name, String def)
    • 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
      name - command verb for command
      commandObject - object implementing the command
      Returns:
      true if command was loaded and registered successfully
    • registerClassMapping

      public static void registerClassMapping(String from, String to)
      Add a mapping that determines how old class names can be updated to newer class names. Such updates are desirable as the Java code changes from version to version. If the "from" argument ends with *, then it's considered a prefix; otherwise, it's an exact string match.
      Parameters:
      from -
      to -
    • cacheClass

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

      public static Class<?> getClass(String className) throws ClassNotFoundException
      Throws:
      ClassNotFoundException
    • setUserAgent

      @Deprecated public static void setUserAgent(URLConnection urlConnection)
      Deprecated.
      extensions relying on HttpURLConnection should rather migrate to a more high-level and mature HTTP client. Use {@link RefineServlet.getUserAgent()} instead.
    • setUserAgent

      @Deprecated public static void setUserAgent(HttpURLConnection httpConnection)
      Deprecated.
      extensions relying on HttpURLConnection should rather migrate to a more high-level and mature HTTP client. Use {@link RefineServlet.getUserAgent()} instead.
    • getUserAgent

      public static String getUserAgent()