&& (newChanDesc.isDeleteAllowed() != oldChanDesc.isDeleteAllowed() || newChanDesc.isEditAllowed() != oldChanDesc.isEditAllowed() || newChanDesc.isMoveAllowed() != oldChanDesc.isMoveAllowed())) { pendingActions.add( new LPAEditRestriction( owner, ilfNode, newChanDesc.isMoveAllowed(), newChanDesc.isDeleteAllowed(), newChanDesc.isEditAllowed(), newChanDesc.isAddChildAllowed())); Map pubParms = getPublishedChannelParametersMap(newChanDesc.getChannelPublishId()); Map oldParms = new HashMap(oldChanDesc.getParameterMap()); for (Iterator itr = newChanDesc.getParameterMap().entrySet().iterator(); itr.hasNext(); ) { Map.Entry e = (Entry) itr.next(); String name = (String) e.getKey();
IPortletWindow portletWindow = this.portletWindowRegistry.getOrCreateDefaultPortletWindowByFname( request, channel.getFunctionalName()); portletWindow.setWindowState(addedWindowState); this.portletWindowRegistry.storePortletWindow(request, portletWindow);
final String channelTitle = channel.getTitle(); model.put( "response",
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(
if (node instanceof IUserLayoutChannelDescription) { this.channelsAdded = true; final String fname = ((IUserLayoutChannelDescription) node).getFunctionalName(); this.portalEventFactory.publishPortletMovedInLayoutPortalEvent( this, this.owner, layoutId, oldParentNodeId, parent.getId(), fname);
final String channelPublishId = portletNode.getChannelPublishId(); if (!portletDefinitionId.getStringId().equals(channelPublishId)) { throw new IllegalArgumentException(
layoutId, parentNodeId, userLayoutChannelDescription.getFunctionalName()); } else { this.portalEventFactory.publishFolderDeletedFromLayoutPortalEvent(
@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; }
if (isChannel) { this.channelsAdded = true; final String fname = ((IUserLayoutChannelDescription) node).getFunctionalName(); this.portalEventFactory.publishPortletAddedToLayoutPortalEvent( this, this.owner, layoutId, parent.getId(), fname);
@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; }