com.day.cq.portlet
Interface InvocationContext


public interface InvocationContext

The invocation context of the current request.


Method Summary
 javax.portlet.ActionRequest getActionRequest()
          Return the current action request if this is an action request.
 javax.portlet.ActionResponse getActionResponse()
          Return the current action response if this is an action request.
 javax.portlet.PortletRequest getPortletRequest()
          Return the current portlet request.
 javax.portlet.PortletResponse getPortletResponse()
          Return the current portlet response.
 javax.portlet.RenderRequest getRenderRequest()
          Return the current render request if this is a render request.
 javax.portlet.RenderResponse getRenderResponse()
          Return the current render response if this is a render request.
 javax.portlet.ResourceRequest getResourceRequest()
          Return the current resource request if this is a resource request.
 javax.portlet.ResourceResponse getResourceResponse()
          Return the current resource response if this is a resource request.
<ServiceType>
ServiceType
getService(Class<ServiceType> serviceType)
          Lookup a single service
<ServiceType>
ServiceType[]
getServices(Class<ServiceType> serviceType, String filter)
          Lookup one or several services
 UserState getUserState()
          Get the current user state.
 boolean isActionRequest()
          Is this an action request?
 boolean isRenderRequest()
          Is this a render request?
 boolean isResourceRequest()
          Is this a resource request?
 

Method Detail

getUserState

UserState getUserState()
Get the current user state.

Returns:
The user state object.

getPortletRequest

javax.portlet.PortletRequest getPortletRequest()
Return the current portlet request.

Returns:
The portlet request.

getPortletResponse

javax.portlet.PortletResponse getPortletResponse()
Return the current portlet response.

Returns:
The portlet response.

isActionRequest

boolean isActionRequest()
Is this an action request?

Returns:
true if the current request is an action request.

getActionRequest

javax.portlet.ActionRequest getActionRequest()
Return the current action request if this is an action request.

Returns:
The action request or null

getActionResponse

javax.portlet.ActionResponse getActionResponse()
Return the current action response if this is an action request.

Returns:
The action response or null

isRenderRequest

boolean isRenderRequest()
Is this a render request?

Returns:
true if the current request is a render request.

getRenderRequest

javax.portlet.RenderRequest getRenderRequest()
Return the current render request if this is a render request.

Returns:
The render request or null

getRenderResponse

javax.portlet.RenderResponse getRenderResponse()
Return the current render response if this is a render request.

Returns:
The render response or null

isResourceRequest

boolean isResourceRequest()
Is this a resource request?

Returns:
true if the current request is a resource request.

getResourceRequest

javax.portlet.ResourceRequest getResourceRequest()
Return the current resource request if this is a resource request.

Returns:
The resource request or null

getResourceResponse

javax.portlet.ResourceResponse getResourceResponse()
Return the current resource response if this is a resource request.

Returns:
The resource response or null

getService

<ServiceType> ServiceType getService(Class<ServiceType> serviceType)
Lookup a single service

Parameters:
serviceType - The type (interface) of the service.
Returns:
The service instance, or null if the service is not available.

getServices

<ServiceType> ServiceType[] getServices(Class<ServiceType> serviceType,
                                        String filter)
Lookup one or several services

Parameters:
serviceType - The type (interface) of the service.
filter - An optional filter (LDAP-like, see OSGi spec)
Returns:
The services object or null.
Throws:
IllegalArgumentException - If the filter string is not a valid OSGi service filter string.


Copyright © 2009 Day Management AG. All Rights Reserved.