|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.web.service.AjaxPortletSupportService
public class AjaxPortletSupportService
Service intended for annotation-based controllers.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jasig.web.service.AjaxPortletSupport |
|---|
AjaxPortletSupport.ModelGenerator |
| Field Summary | |
|---|---|
static String |
SESSION_KEY
|
| Fields inherited from interface org.jasig.web.service.AjaxPortletSupport |
|---|
DEFAULT_AJAX_HANDLER_ERROR_KEY, DEFAULT_AJAX_SERVLET_NAME |
| Constructor Summary | |
|---|---|
AjaxPortletSupportService()
|
|
| Method Summary | |
|---|---|
String |
getAjaxHandlerErrorKey()
|
Map<String,?> |
getAjaxModel(HttpServletRequest request,
HttpServletResponse response)
Gets the model for the request, if the model is null a 404 is sent to the browser and null is returned. |
protected String |
getAjaxServletUrl(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
String ajaxServletName,
String sessionKey)
Generate the servlet URL to redirect the AJAX request to for rendering the response model. |
ModelPasser |
getModelPasser()
|
SessionKeyGenerator |
getSessionKeyGenerator()
|
void |
redirectAjaxResponse(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
AjaxPortletSupport.ModelGenerator generator)
Calls #redirectAjaxResponse(ActionRequest, ActionResponse, ModelGenerator)) passing AjaxPortletSupport.DEFAULT_AJAX_SERVLET_NAME for the servlet name. |
void |
redirectAjaxResponse(Map<String,?> model,
javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
Calls AjaxPortletSupport.redirectAjaxResponse(String, Map, ActionRequest, ActionResponse) passing AjaxPortletSupport.DEFAULT_AJAX_SERVLET_NAME for the servlet name. |
void |
redirectAjaxResponse(String ajaxServletName,
javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
AjaxPortletSupport.ModelGenerator generator)
Generates a new session key and uses that to pass the model to the servlet. |
void |
redirectAjaxResponse(String ajaxServletName,
Map<String,?> model,
javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
Generates a new session key and uses that to pass the model to the servlet. |
void |
setAjaxHandlerErrorKey(String ajaxHandlerErrorKey)
Model attribute used to pass an exception object to the rendering serlvet if one occurs from calling #handleRenderRequestInternal(javax.portlet.RenderRequest, javax.portlet.RenderResponse). |
void |
setModelPasser(ModelPasser modelPasser)
Used to pass the model data to the rendering servlet. |
void |
setSessionKeyGenerator(SessionKeyGenerator sessionKeyGenerator)
Used to generate unique keys within a portlet session. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SESSION_KEY
| Constructor Detail |
|---|
public AjaxPortletSupportService()
| Method Detail |
|---|
public SessionKeyGenerator getSessionKeyGenerator()
public void setSessionKeyGenerator(SessionKeyGenerator sessionKeyGenerator)
SecureSessionKeyGenerator
public ModelPasser getModelPasser()
public void setModelPasser(ModelPasser modelPasser)
DefaultModelPasser
public String getAjaxHandlerErrorKey()
public void setAjaxHandlerErrorKey(String ajaxHandlerErrorKey)
#handleRenderRequestInternal(javax.portlet.RenderRequest, javax.portlet.RenderResponse).
Defaults to the value of AjaxPortletSupport.DEFAULT_AJAX_HANDLER_ERROR_KEY
public void redirectAjaxResponse(Map<String,?> model,
javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
throws IOException
AjaxPortletSupportAjaxPortletSupport.redirectAjaxResponse(String, Map, ActionRequest, ActionResponse) passing AjaxPortletSupport.DEFAULT_AJAX_SERVLET_NAME for the servlet name.
redirectAjaxResponse in interface AjaxPortletSupportIOException
public final void redirectAjaxResponse(String ajaxServletName,
Map<String,?> model,
javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
throws IOException
AjaxPortletSupport
redirectAjaxResponse in interface AjaxPortletSupportajaxServletName - Name of the ajax servlet to redirect tomodel - The data model to pass to the servlet
IOException
public void redirectAjaxResponse(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
AjaxPortletSupport.ModelGenerator generator)
throws IOException
AjaxPortletSupport#redirectAjaxResponse(ActionRequest, ActionResponse, ModelGenerator)) passing AjaxPortletSupport.DEFAULT_AJAX_SERVLET_NAME for the servlet name.
redirectAjaxResponse in interface AjaxPortletSupportIOException
public void redirectAjaxResponse(String ajaxServletName,
javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
AjaxPortletSupport.ModelGenerator generator)
throws IOException
AjaxPortletSupportAjaxPortletSupport.ModelGenerator.generate(ActionRequest, ActionResponse)
using AjaxPortletSupport.DEFAULT_AJAX_HANDLER_ERROR_KEY as the error key.
redirectAjaxResponse in interface AjaxPortletSupportajaxServletName - Name of the ajax servlet to redirect togenerator - ModelGenerator used to generate the model to pass
IOException
public final Map<String,?> getAjaxModel(HttpServletRequest request,
HttpServletResponse response)
throws ServletRequestBindingException,
IOException
AjaxPortletSupportAjaxPortletSupport.DEFAULT_AJAX_HANDLER_ERROR_KEY a 500 is sent to the browser but the model is still
returned for rendering.
getAjaxModel in interface AjaxPortletSupportServletRequestBindingException
IOException
protected String getAjaxServletUrl(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
String ajaxServletName,
String sessionKey)
throws UnsupportedEncodingException
PortletResponse#encodeURL(String) before the redirect is sent.
sessionKey - The session key to provide on the URL
UnsupportedEncodingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||