{
//
Mode mode = null;
WindowState windowState = null;
PortletPageNavigationalState pageNavigationalState = null;
Map<String, String[]> publicNS = null;
StateString portletNS = null;
CacheLevel cacheability;
PortletResourceRequest.Scope scope = portletResourceRequest.getScope();
//
if (scope instanceof PortletResourceRequest.PortletScope)
{
PortletResourceRequest.PortletScope portletScope = (PortletResourceRequest.PortletScope)scope;
PortletWindowNavigationalState navigationalState = portletScope.getWindowNavigationalState();
//
if (navigationalState != null)
{
mode = navigationalState.getMode();
windowState = navigationalState.getWindowState();
portletNS = navigationalState.getPortletNavigationalState();
}
//
if (scope instanceof PortletResourceRequest.PageScope)
{
PortletResourceRequest.PageScope pageScope = (PortletResourceRequest.PageScope)scope;
pageNavigationalState = pageScope.getPageNavigationalState();
cacheability = CacheLevel.PAGE;
//
if (pageNavigationalState != null)
{
publicNS = pageNavigationalState.getPortletPublicNavigationalState(portletResourceRequest.getWindowId());
}
}
else
{
cacheability = CacheLevel.PORTLET;