use of org.apereo.portal.portlet.rendering.worker.IPortletFailureExecutionWorker in project uPortal by Jasig.
the class PortletExecutionManager method getPortletOutput.
/* (non-Javadoc)
* @see org.apereo.portal.portlet.rendering.IPortletExecutionManager#getPortletOutput(org.apereo.portal.portlet.om.IPortletWindowId, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public String getPortletOutput(IPortletWindowId portletWindowId, HttpServletRequest request, HttpServletResponse response) {
final IPortletRenderExecutionWorker tracker = getRenderedPortletBodyWorker(portletWindowId, request, response);
final long timeout = getPortletRenderTimeout(portletWindowId, request);
try {
final String output = tracker.getOutput(timeout);
return output == null ? "" : output;
} catch (Exception e) {
final IPortletFailureExecutionWorker failureWorker = this.portletWorkerFactory.createFailureWorker(request, response, portletWindowId, e);
// TODO publish portlet error event?
try {
failureWorker.submit();
return failureWorker.getOutput(timeout);
} catch (Exception e1) {
logger.error("Failed to render error portlet for: " + portletWindowId, e1);
return "Error Portlet Unavailable. Please contact your portal administrators.";
}
}
}
Aggregations