Package org.openrefine
Class RefineServlet
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- edu.mit.simile.butterfly.Butterfly
-
- org.openrefine.RefineServlet
-
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public class RefineServlet extends edu.mit.simile.butterfly.Butterfly
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
RefineServlet.AutoSaveTimerTask
protected static class
RefineServlet.ExceptionResponse
-
Field Summary
Fields Modifier and Type Field Description static String
FULL_VERSION
static String
FULLNAME
static String
REVISION
static String
VERSION
-
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 RefineServlet()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
cacheClass(Class<?> klass)
void
destroy()
File
getCacheDir(String name)
static Class<?>
getClass(String className)
protected String
getCommandKey(javax.servlet.http.HttpServletRequest request)
String
getConfiguration(String name, String def)
edu.mit.simile.butterfly.ButterflyModule
getModule(String name)
File
getTempDir()
File
getTempFile(String name)
static String
getUserAgent()
Deprecated.useRefineModel.getUserAgent()
instead.void
init()
void
init(javax.servlet.ServletConfig config)
static void
initDatamodelRunner()
static void
registerClassMapping(String from, String to)
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)
protected boolean
unregisterCommand(String verb)
-
Methods inherited from class edu.mit.simile.butterfly.Butterfly
absolutize, configure, configureModules, createModule, delay, error, findModulesIn, getFullHost, getTrueContextPath, getTrueHost, getTrueRequestURI, 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
-
-
-
-
Method Detail
-
init
public void init() throws javax.servlet.ServletException
- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
-
init
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
- Specified by:
init
in interfacejavax.servlet.Servlet
- Overrides:
init
in classedu.mit.simile.butterfly.Butterfly
- Throws:
javax.servlet.ServletException
-
destroy
public void destroy()
- Specified by:
destroy
in interfacejavax.servlet.Servlet
- Overrides:
destroy
in classedu.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 classedu.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()
-
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 toname
- command verb for commandcommandObject
- 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 commandcommandObject
- 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 tocommandName
- command verb for commandcommandObject
- object implementing the command- Returns:
- true if command was loaded and registered successfully
-
cacheClass
public static void cacheClass(Class<?> klass)
-
getClass
public static Class<?> getClass(String className) throws ClassNotFoundException
- Throws:
ClassNotFoundException
-
getUserAgent
@Deprecated public static String getUserAgent()
Deprecated.useRefineModel.getUserAgent()
instead.
-
initDatamodelRunner
public static void initDatamodelRunner()
-
-