@Override public IPortletDefinition getPortletDefinition() { return this.persistentEntity.getPortletDefinition(); }
@Override public IPortletDefinition getPortletDefinition() { return this.delegatePortletEntity.getPortletDefinition(); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((this.transientLayoutNodeId == null) ? 0 : this.transientLayoutNodeId.hashCode()); result = prime * result + ((this.delegatePortletEntity.getPortletDefinition() == null) ? 0 : this.delegatePortletEntity.getPortletDefinition().hashCode()); result = prime * result + this.delegatePortletEntity.getUserId(); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!IPortletEntity.class.isAssignableFrom(obj.getClass())) return false; IPortletEntity other = (IPortletEntity) obj; if (this.layoutNodeId == null) { if (other.getLayoutNodeId() != null) return false; } else if (!this.layoutNodeId.equals(other.getLayoutNodeId())) return false; if (this.portletDefinition == null) { if (other.getPortletDefinition() != null) return false; } else if (!this.portletDefinition.equals(other.getPortletDefinition())) return false; if (this.userId != other.getUserId()) return false; return true; }
protected IPortletDefinition getPortletDefinition( IPortletWindowId portletWindowId, HttpServletRequest request) { final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId); final IPortletEntity parentPortletEntity = portletWindow.getPortletEntity(); return parentPortletEntity.getPortletDefinition(); }
protected String getFname(HttpServletRequest request, IPortletWindowId portletWindowId) { final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId); if (portletWindow == null) { logger.warn( "Failed to resolve IPortletWindow for id: " + portletWindowId + ", the id will be used instead of the fname"); return portletWindowId.toString(); } final IPortletEntity portletEntity = portletWindow.getPortletEntity(); final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition(); return portletDefinition.getFName(); }
protected String getFname(HttpServletRequest request, IPortletWindowId portletWindowId) { final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId); if (portletWindow == null) { logger.warn( "Failed to resolve IPortletWindow for id: " + portletWindowId + ", the id will be used instead of the fname"); return portletWindowId.toString(); } final IPortletEntity portletEntity = portletWindow.getPortletEntity(); final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition(); return portletDefinition.getFName(); }
@Override public String toString() { return "PortletEntity [" + "portletEntityId=" + this.standardEntityId + ", " + "layoutNodeId=" + this.persistentEntity.getLayoutNodeId() + ", " + "userId=" + this.persistentEntity.getUserId() + ", " + "portletDefinition=" + this.persistentEntity.getPortletDefinition() + "]"; } }
public PortletActionExecutionWorker( ExecutorService executorService, List<IPortletExecutionInterceptor> interceptors, IPortletRenderer portletRenderer, HttpServletRequest request, HttpServletResponse response, IPortletWindow portletWindow) { super( executorService, interceptors, portletRenderer, request, response, portletWindow, portletWindow.getPortletEntity().getPortletDefinition().getActionTimeout() != null ? portletWindow.getPortletEntity().getPortletDefinition().getActionTimeout() : portletWindow.getPortletEntity().getPortletDefinition().getTimeout()); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (!IPortletEntity.class.isAssignableFrom(obj.getClass())) return false; IPortletEntity other = (IPortletEntity) obj; if (this.portletEntityData.getLayoutNodeId() == null) { if (other.getLayoutNodeId() != null) return false; } else if (!this.portletEntityData.getLayoutNodeId().equals(other.getLayoutNodeId())) return false; if (this.portletDefinition == null) { if (other.getPortletDefinition() != null) return false; } else if (!this.portletDefinition.equals(other.getPortletDefinition())) return false; if (this.portletEntityData.getUserId() != other.getUserId()) return false; return true; }
protected String getPortletFname(HttpServletRequest request, IPortletWindowId portletWindowId) { final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId); final IPortletEntity portletEntity = portletWindow.getPortletEntity(); final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition(); return portletDefinition.getFName(); } }
protected IPortletEntityId createConsistentPortletEntityId(IPortletEntity portletEntity) { final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition(); final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId(); final String layoutNodeId = portletEntity.getLayoutNodeId(); final int userId = portletEntity.getUserId(); return this.createConsistentPortletEntityId(portletDefinitionId, layoutNodeId, userId); }
public ExecutionLifecycleCallable(Callable<V1> callable) { this.callable = callable; }
protected IPortletEntityId createConsistentPortletEntityId(IPortletEntity portletEntity) { final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition(); final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId(); final String layoutNodeId = portletEntity.getLayoutNodeId(); final int userId = portletEntity.getUserId(); return this.createConsistentPortletEntityId(portletDefinitionId, layoutNodeId, userId); }
public ExecutionLifecycleCallable(Callable<V1> callable) { this.callable = callable; }
/** * Get the list of user attributes the portlet expects. * * @param request The current request. * @param portletWindow The window to get the expected user attributes for. * @return The List of expected user attributes for the portlet */ protected List<? extends UserAttribute> getExpectedUserAttributes( HttpServletRequest request, final IPortletWindow portletWindow) { final IPortletEntity portletEntity = portletWindow.getPortletEntity(); final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition(); final PortletApplicationDefinition portletApplicationDescriptor = this.portletDefinitionRegistry.getParentPortletApplicationDescriptor( portletDefinition.getPortletDefinitionId()); return portletApplicationDescriptor.getUserAttributes(); } }
@RequestCache(keyMask = {false, true}) @Override public String getFolderNameForPortlet( HttpServletRequest request, IPortletWindowId portletWindowId) { final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId); final IPortletEntity portletEntity = portletWindow.getPortletEntity(); final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition(); final String fname = portletDefinition.getFName(); final String layoutNodeId = portletEntity.getLayoutNodeId(); // Build the targeted portlet string (fname + subscribeId) return fname + PORTLET_PATH_ELEMENT_SEPERATOR + layoutNodeId; }
@RequestCache(keyMask = {false, true}) @Override public String getFolderNameForPortlet( HttpServletRequest request, IPortletWindowId portletWindowId) { final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId); final IPortletEntity portletEntity = portletWindow.getPortletEntity(); final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition(); final String fname = portletDefinition.getFName(); final String channelSubscribeId = portletEntity.getLayoutNodeId(); // Build the targeted portlet string (fname + subscribeId) return fname + PORTLET_PATH_ELEMENT_SEPERATOR + channelSubscribeId; }
@RequestCache(keyMask = {false, true}) @Override public String getFolderNameForPortlet( HttpServletRequest request, IPortletWindowId portletWindowId) { final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId); final IPortletEntity portletEntity = portletWindow.getPortletEntity(); final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition(); final String fname = portletDefinition.getFName(); final String layoutNodeId = portletEntity.getLayoutNodeId(); // Build the targeted portlet string (fname + subscribeId) return fname + PORTLET_PATH_ELEMENT_SEPERATOR + layoutNodeId; }
@RequestCache(keyMask = {false, true}) @Override public String getFolderNameForPortlet( HttpServletRequest request, IPortletWindowId portletWindowId) { final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId); final IPortletEntity portletEntity = portletWindow.getPortletEntity(); final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition(); final String fname = portletDefinition.getFName(); final String channelSubscribeId = portletEntity.getLayoutNodeId(); // Build the targeted portlet string (fname + subscribeId) return fname + PORTLET_PATH_ELEMENT_SEPERATOR + channelSubscribeId; }