Decoration decoration,
boolean isAjaxRequest) throws FailedToRetrievePortletWindow, PortletEntityNotStoredException
{
boolean fragmentSupportsActions = false;
PortletWindow window = windowAccessor.getPortletWindow(fragment);
PortletDefinitionComposite portlet = (PortletDefinitionComposite) window.getPortletEntity().getPortletDefinition();
if (null == portlet)
{
return fragmentSupportsActions; // allow nothing
}
List actions = Collections.EMPTY_LIST;
PortletMode currentMode = requestContext.getPortalURL().getNavigationalState().getMode(window);
WindowState currentState = requestContext.getPortalURL().getNavigationalState().getState(window);
ContentTypeSet content = portlet.getContentTypeSet();
if ( fragment.equals(requestContext.getPage().getRootFragment()) )
{
fragmentSupportsActions = true;
actions = getPageModes(requestContext, window, content, currentMode, currentState, pageActionAccess, decoration, isAjaxRequest);
}
else if ( !Fragment.LAYOUT.equals(fragment.getType()) )
{
fragmentSupportsActions = true;
String fragmentId = fragment.getId();
PortletApplication pa = (PortletApplication)window.getPortletEntity().getPortletDefinition().getPortletApplicationDefinition();
String portletName = portlet.getUniqueName();
PortletMode currentMappedMode = pa.getMappedPortletMode(currentMode);
WindowState currentMappedState = pa.getMappedWindowState(currentState);
Object action;