mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Publishing:
- SlideShare channel now tested (the service seems pretty flaky, but the publishing works fine). - A couple of tweaks to ensure that credentials are being stored correctly for each channel. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28966 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -39,6 +39,7 @@ import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.publishing.channels.Channel;
|
||||
import org.alfresco.service.cmr.publishing.channels.ChannelService;
|
||||
import org.alfresco.service.cmr.publishing.channels.ChannelType;
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.site.SiteInfo;
|
||||
@@ -379,15 +380,20 @@ public class ChannelServiceImpl implements ChannelService
|
||||
* (java.lang.String, java.lang.String, java.util.Map)
|
||||
*/
|
||||
@Override
|
||||
public void updateChannel(String siteId, String channelName, Map<QName, Serializable> properties)
|
||||
public void updateChannel(Channel channel, Map<QName, Serializable> properties)
|
||||
{
|
||||
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)
|
||||
allChannelNodes.add(assoc.getSourceRef());
|
||||
}
|
||||
for (NodeRef channelNode : allChannelNodes)
|
||||
{
|
||||
for (Map.Entry<QName, Serializable> entry : properties.entrySet())
|
||||
{
|
||||
nodeService.setProperties(channel, properties);
|
||||
nodeService.setProperty(channelNode, entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user