PageActionAccess pageActionAccess,
Decoration decoration,
boolean isAjaxRequest)
{
boolean fragmentSupportsActions = false;
PortletWindow window = requestContext.getPortletWindow(fragment);
if (!window.isValid())
{
return fragmentSupportsActions; // allow nothing
}
PortletDefinition portlet = window.getPortletDefinition();
List actions = Collections.EMPTY_LIST;
PortletMode currentMode = requestContext.getPortalURL().getNavigationalState().getMode(window);
WindowState currentState = requestContext.getPortalURL().getNavigationalState().getState(window);
List<Supports> supports = portlet.getSupports();
if ( fragment.equals(requestContext.getPage().getRootFragment()) )
{
fragmentSupportsActions = true;
actions = getPageModes(requestContext, window, supports, currentMode, currentState, pageActionAccess, decoration, isAjaxRequest);
}
else if ( !Fragment.LAYOUT.equals(fragment.getType()) )
{
fragmentSupportsActions = true;
String fragmentId = fragment.getId();
PortletApplication pa = window.getPortletDefinition().getApplication();
String portletName = portlet.getUniqueName();
PortletMode currentMappedMode = pa.getMappedPortletMode(currentMode);
WindowState currentMappedState = pa.getMappedWindowState(currentState);