use of org.apereo.portal.portlet.om.IPortletWindow in project uPortal by Jasig.
the class PortletWindowRegistryImpl method wrapPortletWindowData.
protected IPortletWindow wrapPortletWindowData(HttpServletRequest request, PortletWindowData portletWindowData) {
final IPortletEntityId portletEntityId = portletWindowData.getPortletEntityId();
final IPortletEntity portletEntity = this.portletEntityRegistry.getPortletEntity(request, portletEntityId);
if (portletEntity == null) {
return null;
}
final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition();
final PortletDefinition portletDescriptor = this.portletDefinitionRegistry.getParentPortletDescriptor(portletDefinition.getPortletDefinitionId());
if (portletDescriptor == null) {
return null;
}
final IPortletWindow portletWindow = new PortletWindowImpl(portletDescriptor, portletEntity, portletWindowData);
logger.trace("Wrapping PortletWindowData {} as IPortletWindow", portletWindow.getPortletWindowId());
return portletWindow;
}
use of org.apereo.portal.portlet.om.IPortletWindow in project uPortal by Jasig.
the class PortletExecutionManager method postExecution.
@Override
public void postExecution(HttpServletRequest request, HttpServletResponse response, IPortletExecutionContext context, Exception e) {
final IPortletWindowId portletWindowId = context.getPortletWindowId();
final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId);
final IPortletEntity portletEntity = portletWindow.getPortletEntity();
final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition();
final IPortletDescriptorKey portletDescriptorKey = portletDefinition.getPortletDescriptorKey();
final AtomicInteger counter = this.executionCount.get(portletDescriptorKey);
counter.incrementAndGet();
}
use of org.apereo.portal.portlet.om.IPortletWindow in project uPortal by Jasig.
the class PortletExecutionManager method getPortletDefinition.
protected IPortletDefinition getPortletDefinition(IPortletWindowId portletWindowId, HttpServletRequest request) {
final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId);
final IPortletEntity parentPortletEntity = portletWindow.getPortletEntity();
return parentPortletEntity.getPortletDefinition();
}
use of org.apereo.portal.portlet.om.IPortletWindow in project uPortal by Jasig.
the class PortletWorkerFactoryImpl method getErrorPortletWindowId.
protected IPortletWindowId getErrorPortletWindowId(HttpServletRequest request, String fname) {
final IUserInstance userInstance = this.userInstanceManager.getUserInstance(request);
final IPortletEntity errorPortletEntity = this.portletEntityRegistry.getOrCreatePortletEntityByFname(request, userInstance, fname);
final IPortletWindow portletWindow = this.portletWindowRegistry.getOrCreateDefaultPortletWindow(request, errorPortletEntity.getPortletEntityId());
return portletWindow.getPortletWindowId();
}
use of org.apereo.portal.portlet.om.IPortletWindow in project uPortal by Jasig.
the class PortalUrlProviderImpl method getPortletWindowId.
private IPortletWindowId getPortletWindowId(HttpServletRequest request, String layoutNodeId) {
if (layoutNodeId == null) {
return null;
}
final LayoutNodeType layoutNodeType = this.getLayoutNodeType(request, layoutNodeId);
if (layoutNodeType == null) {
throw new IllegalArgumentException("No layout node exists for id: " + layoutNodeId);
}
if (layoutNodeType != LayoutNodeType.PORTLET) {
return null;
}
final IPortletWindow portletWindow = this.portletWindowRegistry.getOrCreateDefaultPortletWindowByLayoutNodeId(request, layoutNodeId);
if (portletWindow == null) {
return null;
}
return portletWindow.getPortletWindowId();
}
Aggregations