use of org.apache.pluto.container.om.portlet.ContainerRuntimeOption in project uPortal by Jasig.
the class PortletExecutionManager method doesPortletNeedHeaderWorker.
/**
* @param portletWindowId
* @param request
* @return
*/
protected boolean doesPortletNeedHeaderWorker(IPortletWindowId portletWindowId, HttpServletRequest request) {
IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId);
PortletDefinition portletDefinition = portletWindow.getPlutoPortletWindow().getPortletDefinition();
ContainerRuntimeOption renderHeaderOption = portletDefinition.getContainerRuntimeOption(PORTLET_RENDER_HEADERS_OPTION);
boolean result = false;
if (renderHeaderOption != null) {
result = renderHeaderOption.getValues().contains(Boolean.TRUE.toString());
}
logger.debug("Portlet {} need render header worker: {}", portletDefinition.getPortletName(), result);
return result;
}
use of org.apache.pluto.container.om.portlet.ContainerRuntimeOption in project uPortal by Jasig.
the class PortletEventCoordinatationService method isGlobalEvent.
protected boolean isGlobalEvent(HttpServletRequest request, IPortletWindowId sourceWindowId, Event event) {
final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, sourceWindowId);
final IPortletEntity portletEntity = portletWindow.getPortletEntity();
final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition();
final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId();
final PortletApplicationDefinition parentPortletApplicationDescriptor = this.portletDefinitionRegistry.getParentPortletApplicationDescriptor(portletDefinitionId);
final ContainerRuntimeOption globalEvents = parentPortletApplicationDescriptor.getContainerRuntimeOption(GLOBAL_EVENT__CONTAINER_OPTION);
if (globalEvents != null) {
final QName qName = event.getQName();
final String qNameStr = qName.toString();
for (final String globalEvent : globalEvents.getValues()) {
if (qNameStr.equals(globalEvent)) {
return true;
}
}
}
return false;
}
Aggregations