Publishing:

- Added start of the Flickr channel. Channel creation and authorisation is complete (written as a new Spring Social module). API not currently working.
- Fixed a problem with SlideShare API: it relies on the file extension to determine the type of the file, so needed to alter the way the files are sent.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29085 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Brian Remmington
2011-07-15 15:47:26 +00:00
parent 176a08d093
commit aeb467a3d8
34 changed files with 1520 additions and 61 deletions

View File

@@ -175,16 +175,18 @@ public class ChannelServiceImpl implements ChannelService
/**
* {@inheritDoc}
*/
public void deleteChannel(String siteId, String channelName)
public void deleteChannel(Channel channel)
{
Set<NodeRef> containers = getAllChannelContainers(siteId);
for (NodeRef channelContainer : containers)
List<NodeRef> allChannelNodes = new ArrayList<NodeRef>();
NodeRef editorialNode = channel.getNodeRef();
allChannelNodes.add(editorialNode);
for (AssociationRef assoc : nodeService.getSourceAssocs(editorialNode, PublishingModel.ASSOC_EDITORIAL_CHANNEL))
{
NodeRef channel = nodeService.getChildByName(channelContainer, ContentModel.ASSOC_CONTAINS, channelName);
if (channel != null)
{
nodeService.deleteNode(channel);
}
allChannelNodes.add(assoc.getSourceRef());
}
for (NodeRef channelNode : allChannelNodes)
{
nodeService.deleteNode(channelNode);
}
}