use of org.apereo.portal.portlet.rendering.worker.IPortletRenderExecutionWorker in project uPortal by Jasig.
the class PortletExecutionManager method getRenderedPortletBodyWorker.
protected IPortletRenderExecutionWorker getRenderedPortletBodyWorker(IPortletWindowId portletWindowId, HttpServletRequest request, HttpServletResponse response) {
final Map<IPortletWindowId, IPortletRenderExecutionWorker> portletRenderingMap = this.getPortletRenderingMap(request);
IPortletRenderExecutionWorker tracker = portletRenderingMap.get(portletWindowId);
if (tracker == null) {
tracker = this.startPortletRenderInternal(portletWindowId, request, response);
}
return tracker;
}
use of org.apereo.portal.portlet.rendering.worker.IPortletRenderExecutionWorker in project uPortal by Jasig.
the class PortletExecutionManager method isPortletRenderHeaderRequested.
/* (non-Javadoc)
* @see org.apereo.portal.portlet.rendering.IPortletExecutionManager#isPortletHeaderRenderRequested(org.apereo.portal.portlet.om.IPortletWindowId, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public boolean isPortletRenderHeaderRequested(IPortletWindowId portletWindowId, HttpServletRequest request, HttpServletResponse response) {
final Map<IPortletWindowId, IPortletRenderExecutionWorker> portletRenderingMap = this.getPortletHeaderRenderingMap(request);
final IPortletRenderExecutionWorker tracker = portletRenderingMap.get(portletWindowId);
return tracker != null;
}
use of org.apereo.portal.portlet.rendering.worker.IPortletRenderExecutionWorker in project uPortal by Jasig.
the class PortletExecutionManager method afterCompletion.
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
final Map<IPortletWindowId, IPortletRenderExecutionWorker> portletHeaderRenderingMap = this.getPortletHeaderRenderingMap(request);
for (final IPortletRenderExecutionWorker portletRenderExecutionWorker : portletHeaderRenderingMap.values()) {
checkWorkerCompletion(request, portletRenderExecutionWorker);
}
final Map<IPortletWindowId, IPortletRenderExecutionWorker> portletRenderingMap = this.getPortletRenderingMap(request);
for (final IPortletRenderExecutionWorker portletRenderExecutionWorker : portletRenderingMap.values()) {
checkWorkerCompletion(request, portletRenderExecutionWorker);
}
}
use of org.apereo.portal.portlet.rendering.worker.IPortletRenderExecutionWorker in project uPortal by Jasig.
the class PortletExecutionManager method isPortletRenderRequested.
/* (non-Javadoc)
* @see org.apereo.portal.portlet.rendering.IPortletExecutionManager#isPortletRenderRequested(org.apereo.portal.portlet.om.IPortletWindowId, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public boolean isPortletRenderRequested(IPortletWindowId portletWindowId, HttpServletRequest request, HttpServletResponse response) {
final Map<IPortletWindowId, IPortletRenderExecutionWorker> portletRenderingMap = this.getPortletRenderingMap(request);
final IPortletRenderExecutionWorker tracker = portletRenderingMap.get(portletWindowId);
return tracker != null;
}
use of org.apereo.portal.portlet.rendering.worker.IPortletRenderExecutionWorker in project uPortal by Jasig.
the class PortletExecutionManager method getPortletHeadOutput.
/* (non-Javadoc)
* @see org.apereo.portal.portlet.rendering.IPortletExecutionManager#getPortletHeadOutput(org.apereo.portal.portlet.om.IPortletWindowId, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public String getPortletHeadOutput(IPortletWindowId portletWindowId, HttpServletRequest request, HttpServletResponse response) {
if (doesPortletNeedHeaderWorker(portletWindowId, request)) {
final IPortletRenderExecutionWorker tracker = getRenderedPortletHeaderWorker(portletWindowId, request, response);
final long timeout = getPortletRenderTimeout(portletWindowId, request);
try {
final String output = tracker.getOutput(timeout);
return output == null ? "" : output;
} catch (Exception e) {
logger.error("failed to render header output for " + portletWindowId, e);
return "";
}
}
logger.debug(portletWindowId + " does not produce output for header");
return "";
}
Aggregations