windowState = WindowState.create(queryParameters.get(ControllerRequestParameterNames.WINDOW_STATE));
}
//
String navigationalStateString = queryParameters.get(ControllerRequestParameterNames.NAVIGATIONAL_STATE);
StateString navigationalState = null;
if (navigationalStateString != null)
{
navigationalState = ParametersStateString.create(navigationalStateString);
}
//
PortletWindowNavigationalState windowNavigationalState = new PortletWindowNavigationalState(navigationalState, mode, windowState);
//
String phase = queryParameters.get(ControllerRequestParameterNames.LIFECYCLE_PHASE);
if (ControllerRequestParameterNames.RESOURCE_PHASE.equals(phase))
{
StateString resourceState = ParametersStateString.create(queryParameters.get(ControllerRequestParameterNames.RESOURCE_STATE));
String resourceId = queryParameters.get(ControllerRequestParameterNames.RESOURCE_ID);
//
CacheLevel resourceCacheLevel = CacheLevel.valueOf(queryParameters.get(ControllerRequestParameterNames.RESOURCE_CACHEABILITY));
//
PortletResourceRequest.Scope scope;
switch (resourceCacheLevel)
{
case FULL:
scope = new PortletResourceRequest.FullScope();
break;
case PORTLET:
scope = new PortletResourceRequest.PortletScope(windowNavigationalState);
break;
case PAGE:
scope = new PortletResourceRequest.PageScope(windowNavigationalState, pageNavigationalState);
break;
default:
throw new AssertionError();
}
//
return new PortletResourceRequest(
windowId,
resourceId,
resourceState,
formParameterMap,
scope);
}
else
{
if (ControllerRequestParameterNames.ACTION_PHASE.equals(phase))
{
StateString interactionState = ParametersStateString.create(queryParameters.get(ControllerRequestParameterNames.INTERACTION_STATE));
//
return new PortletActionRequest(
windowId,
interactionState,