public abstract class AbstractPortletHandlerMethodAdapter extends PortletContentGenerator implements HandlerAdapter, Ordered
HandlerAdapter
implementations that support handlers of type HandlerMethod
.logger
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
AbstractPortletHandlerMethodAdapter() |
Modifier and Type | Method and Description |
---|---|
int |
getOrder() |
void |
handleAction(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
Object handler)
Use the given handler to handle this action request.
|
protected abstract void |
handleActionInternal(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response,
Object handler)
Use the given handler method to handle the request.
|
void |
handleEvent(javax.portlet.EventRequest request,
javax.portlet.EventResponse response,
Object handler)
Use the given handler to handle this event request.
|
protected abstract void |
handleEventInternal(javax.portlet.EventRequest request,
javax.portlet.EventResponse response,
Object handler)
Use the given handler method to handle the request.
|
ModelAndView |
handleRender(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
Object handler)
Use the given handler to handle this render request.
|
protected abstract ModelAndView |
handleRenderInternal(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response,
Object handler)
Use the given handler method to handle the request.
|
ModelAndView |
handleResource(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response,
Object handler)
Use the given handler to handle this resource request.
|
protected abstract ModelAndView |
handleResourceInternal(javax.portlet.ResourceRequest request,
javax.portlet.ResourceResponse response,
Object handler)
Use the given handler method to handle the request.
|
void |
setOrder(int order)
Specify the order value for this HandlerAdapter bean.
|
boolean |
supports(Object handler)
Given a handler instance, return whether or not this HandlerAdapter can support it.
|
protected abstract boolean |
supportsInternal(Object handler)
Given a handler method, return whether or not this adapter can support it.
|
applyCacheSeconds, cacheForSeconds, check, checkAndPrepare, checkAndPrepare, getCacheSeconds, isRequireSession, preventCaching, setCacheSeconds, setRequireSession
getPortletContext, getTempDir, isContextRequired, setPortletContext
getApplicationContext, getMessageSourceAccessor, initApplicationContext, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContext
public void handleAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, Object handler) throws Exception
HandlerAdapter
handleAction
in interface HandlerAdapter
request
- current action requestresponse
- current action responsehandler
- handler to use. This object must have previously been passed to the supports
method of
this interface, which must have returned true.Exception
- in case of errorsPortlet.processAction(javax.portlet.ActionRequest, javax.portlet.ActionResponse)
public void handleEvent(javax.portlet.EventRequest request, javax.portlet.EventResponse response, Object handler) throws Exception
HandlerAdapter
handleEvent
in interface HandlerAdapter
request
- current action requestresponse
- current action responsehandler
- handler to use. This object must have previously been passed to the supports
method of
this interface, which must have returned true.Exception
- in case of errorsEventPortlet.processEvent(javax.portlet.EventRequest, javax.portlet.EventResponse)
public ModelAndView handleRender(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, Object handler) throws Exception
HandlerAdapter
handleRender
in interface HandlerAdapter
request
- current render requestresponse
- current render responsehandler
- handler to use. This object must have previously been passed to the supports
method of
this interface, which must have returned true
.null
if the
request has been handled directlyException
- in case of errorsPortlet.render(javax.portlet.RenderRequest, javax.portlet.RenderResponse)
public ModelAndView handleResource(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response, Object handler) throws Exception
HandlerAdapter
handleResource
in interface HandlerAdapter
request
- current render requestresponse
- current render responsehandler
- handler to use. This object must have previously been passed to the supports
method of
this interface, which must have returned true
.null
if the
request has been handled directlyException
- in case of errorsResourceServingPortlet.serveResource(javax.portlet.ResourceRequest, javax.portlet.ResourceResponse)
public void setOrder(int order)
The default value is Ordered.LOWEST_PRECEDENCE
, meaning non-ordered.
Ordered.getOrder()
public final boolean supports(Object handler)
HandlerAdapter
A typical implementation:
return (handler instanceof MyHandler);
supports
in interface HandlerAdapter
handler
- the handler instance to checkprotected abstract void handleActionInternal(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response, Object handler) throws Exception
request
- current action requestresponse
- current action responsehandler
- refers to an instance of a class with a method annotated with ActionMapping
. Alternatively refers to an
instance of HandlerMethod
.Exception
- in case of errorsprotected abstract void handleEventInternal(javax.portlet.EventRequest request, javax.portlet.EventResponse response, Object handler) throws Exception
request
- current action requestresponse
- current action responsehandler
- refers to an instance of a class with a method annotated with EventMapping
. Alternatively refers to an
instance of HandlerMethod
.Exception
- in case of errorsprotected abstract ModelAndView handleRenderInternal(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response, Object handler) throws Exception
request
- current action requestresponse
- current action responsehandler
- refers to an instance of a class with a method annotated with RenderMapping
. Alternatively refers to an
instance of HandlerMethod
.null
if the
request has been handled directlyException
- in case of errorsprotected abstract ModelAndView handleResourceInternal(javax.portlet.ResourceRequest request, javax.portlet.ResourceResponse response, Object handler) throws Exception
request
- current action requestresponse
- current action responsehandler
- refers to an instance of a class with a method annotated with ResourceMapping
. Alternatively refers to an
instance of HandlerMethod
.null
if the
request has been handled directlyException
- in case of errorsprotected abstract boolean supportsInternal(Object handler)
handler
- refers to an instance of a class with a method annotated with ActionMapping
, EventMapping
, RenderMapping
, or ResourceMapping
. Alternatively refers to an
instance of HandlerMethod
.Copyright © 2019 Liferay, Inc.. All rights reserved.