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