use of org.apereo.portal.portlet.om.IPortletEntity 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.IPortletEntity 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.IPortletEntity 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.IPortletEntity 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;
}
use of org.apereo.portal.portlet.om.IPortletEntity in project uPortal by Jasig.
the class TransientPortletEntityDao method getPortletEntity.
/* (non-Javadoc)
* @see org.apereo.portal.portlet.dao.IPortletEntityDao#getPortletEntity(java.lang.String, int)
*/
@Override
public IPortletEntity getPortletEntity(String layoutNodeId, int userId) {
if (layoutNodeId.startsWith(TransientUserLayoutManagerWrapper.SUBSCRIBE_PREFIX)) {
final String databaseChannelSubscribeId = this.determineDatabaseChannelSubscribeId(layoutNodeId);
final IPortletEntity portletEntity = this.delegatePortletEntityDao.getPortletEntity(databaseChannelSubscribeId, userId);
return this.wrapEntity(portletEntity);
}
return this.delegatePortletEntityDao.getPortletEntity(layoutNodeId, userId);
}
Aggregations