mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Added a new REST method, publishing-events-query.post which allows you to query for publishing events based on id or published nodes.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28846 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,11 +19,11 @@
|
||||
|
||||
package org.alfresco.repo.publishing;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.repo.transfer.manifest.TransferManifestNode;
|
||||
@@ -41,7 +41,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
public class MutablePublishingPackageImpl implements MutablePublishingPackage
|
||||
{
|
||||
private final TransferManifestNodeFactory transferManifestNodeFactory;
|
||||
private final List<PublishingPackageEntry> entries = new ArrayList<PublishingPackageEntry>();
|
||||
private final Map<NodeRef, PublishingPackageEntry> entryMap = new HashMap<NodeRef, PublishingPackageEntry>();
|
||||
private final Set<NodeRef> nodesToPublish = new HashSet<NodeRef>();
|
||||
private final Set<NodeRef> nodesToUnpublish= new HashSet<NodeRef>();
|
||||
|
||||
@@ -71,7 +71,7 @@ public class MutablePublishingPackageImpl implements MutablePublishingPackage
|
||||
TransferManifestNode payload = transferManifestNodeFactory.createTransferManifestNode(nodeRef, null);
|
||||
if (TransferManifestNormalNode.class.isAssignableFrom(payload.getClass()))
|
||||
{
|
||||
entries.add(new PublishingPackageEntryImpl(true, nodeRef, (TransferManifestNormalNode) payload));
|
||||
entryMap.put(nodeRef, new PublishingPackageEntryImpl(true, nodeRef, (TransferManifestNormalNode) payload));
|
||||
}
|
||||
}
|
||||
nodesToPublish.addAll(nodesToAdd);
|
||||
@@ -92,7 +92,7 @@ public class MutablePublishingPackageImpl implements MutablePublishingPackage
|
||||
{
|
||||
for (NodeRef nodeRef : nodesToRemove)
|
||||
{
|
||||
entries.add(new PublishingPackageEntryImpl(false, nodeRef, null));
|
||||
entryMap.put(nodeRef, new PublishingPackageEntryImpl(false, nodeRef, null));
|
||||
}
|
||||
nodesToUnpublish.addAll(nodesToRemove);
|
||||
}
|
||||
@@ -103,7 +103,7 @@ public class MutablePublishingPackageImpl implements MutablePublishingPackage
|
||||
@Override
|
||||
public Collection<PublishingPackageEntry> getEntries()
|
||||
{
|
||||
return entries;
|
||||
return entryMap.values();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -123,4 +123,13 @@ public class MutablePublishingPackageImpl implements MutablePublishingPackage
|
||||
{
|
||||
return nodesToUnpublish;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Map<NodeRef, PublishingPackageEntry> getEntryMap()
|
||||
{
|
||||
return entryMap;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user