mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user