final String parentNodeId = this.getParentId(nodeId);
final IUserLayoutNodeDescription parentNode = this.getNode(parentNodeId);
LayoutEvent ev = new LayoutEvent(this, parentNode, node);
for (Iterator i = listeners.iterator(); i.hasNext();)
{
LayoutEventListener lel = (LayoutEventListener) i.next();
lel.channelUpdated(ev);
}
}
else
{
// must be a folder
IUserLayoutFolderDescription oldFolderDesc=(IUserLayoutFolderDescription) oldNode;
if (oldFolderDesc.getId().equals(getRootFolderId()))
throw new PortalException("Update of root node is not currently allowed!");
if( node instanceof IUserLayoutFolderDescription )
{
IUserLayoutFolderDescription newFolderDesc=(IUserLayoutFolderDescription) node;
updateFolderNode(nodeId, newFolderDesc, oldFolderDesc);
// inform the listeners
final String parentNodeId = this.getParentId(nodeId);
final IUserLayoutNodeDescription parentNode = this.getNode(parentNodeId);
LayoutEvent ev=new LayoutEvent(this, parentNode, node);
for(Iterator i=listeners.iterator();i.hasNext();) {
LayoutEventListener lel=(LayoutEventListener)i.next();
lel.folderUpdated(ev);
}
}
}
this.updateCacheKey();
return true;