Fixed ALF-10333: Publishing: Multiple publishing events are processed sequentially rather than in parallel

Publishing: Remove some operations from the Channel and ChannelType interface that really shouldn't be exposed. Also removed the PublishingQueue interface - the two operations it had are now on the PublishingService.
WQS: Removed obsolete references to publishing channels.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30794 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Brian Remmington
2011-09-27 11:23:19 +00:00
parent 590f665d63
commit 2fd91d87c2
49 changed files with 1274 additions and 1525 deletions

View File

@@ -18,6 +18,7 @@
*/
package org.alfresco.repo.publishing.slideshare;
import java.io.Serializable;
import java.util.Collections;
import java.util.Map;
import java.util.TreeMap;
@@ -25,8 +26,7 @@ import java.util.TreeMap;
import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.node.encryption.MetadataEncryptor;
import org.alfresco.repo.publishing.PublishingModel;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.Pair;
import com.benfante.jslideshare.SlideShareAPI;
@@ -52,15 +52,9 @@ public class SlideSharePublishingHelper
}
private Map<String, String> allowedMimeTypes = Collections.unmodifiableMap(DEFAULT_MIME_TYPES);
private NodeService nodeService;
private SlideShareConnector slideshareConnector;
private MetadataEncryptor encryptor;
public void setNodeService(NodeService nodeService)
{
this.nodeService = nodeService;
}
public void setSlideshareConnector(SlideShareConnector slideshareConnector)
{
this.slideshareConnector = slideshareConnector;
@@ -91,23 +85,16 @@ public class SlideSharePublishingHelper
return new SlideShareApiImpl(slideshareConnector);
}
public Pair<String, String> getSlideShareCredentialsForNode(NodeRef publishNode)
public Pair<String, String> getSlideShareCredentialsFromChannelProperties(Map<QName, Serializable> channelProperties)
{
Pair<String, String> result = null;
if (nodeService.exists(publishNode))
String username = (String) encryptor.decrypt(PublishingModel.PROP_CHANNEL_USERNAME,
channelProperties.get(PublishingModel.PROP_CHANNEL_USERNAME));
String password = (String) encryptor.decrypt(PublishingModel.PROP_CHANNEL_PASSWORD,
channelProperties.get(PublishingModel.PROP_CHANNEL_PASSWORD));
if (username != null && password != null)
{
NodeRef parent = nodeService.getPrimaryParent(publishNode).getParentRef();
if (nodeService.hasAspect(parent, SlideSharePublishingModel.ASPECT_DELIVERY_CHANNEL))
{
String username = (String) encryptor.decrypt(PublishingModel.PROP_CHANNEL_USERNAME, nodeService
.getProperty(parent, PublishingModel.PROP_CHANNEL_USERNAME));
String password = (String) encryptor.decrypt(PublishingModel.PROP_CHANNEL_PASSWORD, nodeService
.getProperty(parent, PublishingModel.PROP_CHANNEL_PASSWORD));
if (username != null && password != null)
{
result = new Pair<String, String>(username, password);
}
}
result = new Pair<String, String>(username, password);
}
return result;
}