net.spy.jwebkit
Class AjaxInPlaceEditServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
net.spy.jwebkit.JWHttpServlet
net.spy.jwebkit.xml.XMLOutputServlet
net.spy.jwebkit.AjaxServlet
net.spy.jwebkit.AjaxInPlaceEditServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public abstract class AjaxInPlaceEditServlet
- extends AjaxServlet
Handler for Ajax in-place editing support using reflection and java
annotations to make it easy to write small data handlers.
- See Also:
- Serialized Form
|
Method Summary |
protected void |
checkRequest(java.security.Principal p,
javax.servlet.http.HttpServletRequest request)
Check the sanity of this request. |
protected java.lang.String |
getDefaultRole()
Get the default role value (for when none is specified). |
protected net.spy.xml.SAXAble |
getResults(javax.servlet.http.HttpServletRequest request)
Overridden to avoid having people implement it. |
void |
init(javax.servlet.ServletConfig config)
Initialize all of the handlers. |
protected void |
processRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Look up an appropriate handler by path and execute it, returning the
results. |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AjaxInPlaceEditServlet
public AjaxInPlaceEditServlet()
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
- Initialize all of the handlers.
- Specified by:
init in interface javax.servlet.Servlet- Overrides:
init in class javax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
getDefaultRole
protected java.lang.String getDefaultRole()
- Get the default role value (for when none is specified).
- Returns:
- a role string (default "")
getResults
protected final net.spy.xml.SAXAble getResults(javax.servlet.http.HttpServletRequest request)
throws java.lang.Exception
- Overridden to avoid having people implement it. One only needs to
implement handlers.
- Specified by:
getResults in class AjaxServlet
- Parameters:
request - the servlet request
- Returns:
- a SAXAble ready to be streamed back to the client
- Throws:
java.lang.Exception - an exception to be serialized with a 500 status code
processRequest
protected void processRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
- Look up an appropriate handler by path and execute it, returning the
results.
- Overrides:
processRequest in class AjaxServlet
- Parameters:
request - the requestresponse - the response
- Throws:
java.lang.Exception - when anything goes wrong
checkRequest
protected void checkRequest(java.security.Principal p,
javax.servlet.http.HttpServletRequest request)
throws javax.servlet.ServletException
- Check the sanity of this request. Note that roles are automatically
checked for you if required, but this callback can verify the object
that was requested is available to the given user, as well as provide
input validation if necessary.
- Parameters:
p - the remote user principalrequest - the request
- Throws:
javax.servlet.ServletException - if there's a problem with this request
Copyright © 1995-2007 SPY Internetworking. All Rights Reserved.