Java Code Examples for javax.portlet.PortletRequest#ACTION_PHASE

The following examples show how to use javax.portlet.PortletRequest#ACTION_PHASE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AnnotationMethodHandlerAdapter.java    From spring4-understanding with Apache License 2.0 6 votes vote down vote up
private String determineDefaultPhase(Method handlerMethod) {
	if (void.class != handlerMethod.getReturnType()) {
		return PortletRequest.RENDER_PHASE;
	}
	for (Class<?> argType : handlerMethod.getParameterTypes()) {
		if (ActionRequest.class.isAssignableFrom(argType) || ActionResponse.class.isAssignableFrom(argType) ||
				InputStream.class.isAssignableFrom(argType) || Reader.class.isAssignableFrom(argType)) {
			return PortletRequest.ACTION_PHASE;
		}
		else if (RenderRequest.class.isAssignableFrom(argType) || RenderResponse.class.isAssignableFrom(argType) ||
				OutputStream.class.isAssignableFrom(argType) || Writer.class.isAssignableFrom(argType)) {
			return PortletRequest.RENDER_PHASE;
		}
		else if (ResourceRequest.class.isAssignableFrom(argType) || ResourceResponse.class.isAssignableFrom(argType)) {
			return PortletRequest.RESOURCE_PHASE;
		}
		else if (EventRequest.class.isAssignableFrom(argType) || EventResponse.class.isAssignableFrom(argType)) {
			return PortletRequest.EVENT_PHASE;
		}
	}
	return "";
}
 
Example 2
Source File: BaseEventTest.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@TestPhase(PortletRequest.ACTION_PHASE)
public TestResult checkFireEventsFromActionPhase(ActionRequest request,
        ActionResponse response) {
    tally(response);
    TestResult result = new TestResult();
    result.setReturnCode(TestResult.UNDEFINED);
    result.setDescription("Fire several events to test processing." +
            " Be sure to check to Companion portlet to make sure" +
            " that all tests are correctly run.");
    result.setSpecPLT("15.2.3");
    fireEvents(request, response);
    
    return result;
}
 
Example 3
Source File: EventFilterTest.java    From portals-pluto with Apache License 2.0 5 votes vote down vote up
@TestPhase(PortletRequest.ACTION_PHASE)
  public TestResult checkTriggerEventFromActionPhase(ActionResponse response) {
      TestResult result = new TestResult();
      result.setDescription(
              "Trigger the event phase from the action phase" +
"so that the event filter can be tested.");
      result.setReturnCode(TestResult.UNDEFINED);
      response.setEvent(EVENT_PHASE_TRIGGER, getClass().getName());
      return result;
  }
 
Example 4
Source File: ActionRequestImpl.java    From portals-pluto with Apache License 2.0 4 votes vote down vote up
public ActionRequestImpl(PortletRequestContext requestContext, PortletActionResponseContext responseContext)
{
    super(requestContext, responseContext, PortletRequest.ACTION_PHASE);
}