Package org.opencms.main
Class OpenCmsSpellcheckHandler
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.opencms.main.OpenCmsSpellcheckHandler
-
- All Implemented Interfaces:
java.io.Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
,I_CmsRequestHandler
public class OpenCmsSpellcheckHandler extends javax.servlet.http.HttpServlet implements I_CmsRequestHandler
Handles spell check requests.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
HEADER_REFERER_KEY
A constant for the HTTP 'referer'.static java.lang.String
PARAM_BASE_URI
A constant for the optional 'baseUri' parameter.
-
Constructor Summary
Constructors Constructor Description OpenCmsSpellcheckHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CmsObject
getCmsObject(javax.servlet.http.HttpServletRequest req)
Returns the CMS object.java.lang.String[]
getHandlerNames()
Returns the handler name.static java.lang.String
getSpellcheckHandlerPath()
Returns the path to the spell check handler.void
handle(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.String name)
Handles an OpenCms request.static boolean
isSpellcheckingEnabled()
Checks if the spell check request handler is configured.-
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
-
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opencms.main.I_CmsRequestHandler
getConfiguration, initParameters
-
-
-
-
Field Detail
-
PARAM_BASE_URI
public static final java.lang.String PARAM_BASE_URI
A constant for the optional 'baseUri' parameter.- See Also:
- Constant Field Values
-
HEADER_REFERER_KEY
protected static final java.lang.String HEADER_REFERER_KEY
A constant for the HTTP 'referer'.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OpenCmsSpellcheckHandler
public OpenCmsSpellcheckHandler()
-
-
Method Detail
-
getSpellcheckHandlerPath
public static java.lang.String getSpellcheckHandlerPath()
Returns the path to the spell check handler.- Returns:
- the path to the spell check handler
-
isSpellcheckingEnabled
public static boolean isSpellcheckingEnabled()
Checks if the spell check request handler is configured.- Returns:
true
if the spell check request handler is configured
-
getHandlerNames
public java.lang.String[] getHandlerNames()
Description copied from interface:I_CmsRequestHandler
Returns the handler name.- Specified by:
getHandlerNames
in interfaceI_CmsRequestHandler
- Returns:
- the handler name
- See Also:
I_CmsRequestHandler.getHandlerNames()
-
handle
public void handle(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, java.lang.String name) throws java.io.IOException
Description copied from interface:I_CmsRequestHandler
Handles an OpenCms request.- Specified by:
handle
in interfaceI_CmsRequestHandler
- Parameters:
req
- the current requestres
- the current responsename
- the handler name to invoke- Throws:
java.io.IOException
- in case an error occurs- See Also:
I_CmsRequestHandler.handle(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
-
getCmsObject
protected CmsObject getCmsObject(javax.servlet.http.HttpServletRequest req) throws CmsException
Returns the CMS object.- Parameters:
req
- the request- Returns:
- the CMS object
- Throws:
CmsException
- if something goes wrong
-
-