protected String determineDatabaseChannelSubscribeId(String layoutNodeId) { // Find the referenced Node in the user's layout final IUserLayoutManager userLayoutManager = this.getUserLayoutManager(); final IUserLayoutChannelDescription channelNode = (IUserLayoutChannelDescription) userLayoutManager.getNode(layoutNodeId); // Lookup the IportletDefinition for the node final String portletPublishId = channelNode.getChannelPublishId(); final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinition(portletPublishId); // Generate the subscribe ID used for the database return this.getPersistentLayoutNodeId(portletDefinition.getPortletDefinitionId()); }
final IUserLayoutChannelDescription channelDescription = (IUserLayoutChannelDescription) nodeDescription; if (principal.canRender(channelDescription.getChannelPublishId())) { favorites.add(nodeDescription);
final String channelPublishId = portletNode.getChannelPublishId(); if (!portletDefinitionId.getStringId().equals(channelPublishId)) { throw new IllegalArgumentException(
Map pubParms = getPublishedChannelParametersMap(newChanDesc.getChannelPublishId());
final String channelPublishId = portletNode.getChannelPublishId(); if (!portletDefinitionId.getStringId().equals(channelPublishId)) { throw new IllegalArgumentException(
@Override public IPortletEntity getOrCreatePortletEntity( HttpServletRequest request, IUserInstance userInstance, String layoutNodeId) { final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager(); final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager(); // Find the channel and portlet definitions final IUserLayoutChannelDescription channelNode = (IUserLayoutChannelDescription) userLayoutManager.getNode(layoutNodeId); if (channelNode == null) { this.logger.warn( "No layout node exists for id " + layoutNodeId + ", no portlet entity will be returned."); return null; } final String channelPublishId = channelNode.getChannelPublishId(); final IPortletDefinition portletDefinition = this.getPortletDefinition(request, userInstance, channelPublishId); if (portletDefinition != null) { final IPerson person = userInstance.getPerson(); return this.getOrCreatePortletEntity( request, portletDefinition.getPortletDefinitionId(), layoutNodeId, person.getID()); } // No permission to see the portlet return null; }
@Override public IPortletEntity getOrCreatePortletEntity( HttpServletRequest request, IUserInstance userInstance, String layoutNodeId) { final IUserPreferencesManager preferencesManager = userInstance.getPreferencesManager(); final IUserLayoutManager userLayoutManager = preferencesManager.getUserLayoutManager(); // Find the channel and portlet definitions final IUserLayoutChannelDescription channelNode = (IUserLayoutChannelDescription) userLayoutManager.getNode(layoutNodeId); if (channelNode == null) { this.logger.warn( "No layout node exists for id " + layoutNodeId + ", no portlet entity will be returned."); return null; } final String channelPublishId = channelNode.getChannelPublishId(); final IPortletDefinition portletDefinition = this.getPortletDefinition(request, userInstance, channelPublishId); if (portletDefinition != null) { final IPerson person = userInstance.getPerson(); return this.getOrCreatePortletEntity( request, portletDefinition.getPortletDefinitionId(), layoutNodeId, person.getID()); } // No permission to see the portlet return null; }