Implemented channel.put Rest method for renaming channels. Also renamed publishing-events-for-node.get to publishing-events.get.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29312 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2011-07-25 15:06:14 +00:00
parent 12a03e1653
commit 4be0baaeb3
9 changed files with 68 additions and 138 deletions

View File

@@ -508,16 +508,8 @@ public class PublishingEventHelper
//Otherwise this event has already been processed or has already been cancelled. Do nothing.
}
}
public NodeRef getEnvironmentNodeForPublishingEvent(NodeRef publishingEvent)
{
ChildAssociationRef queueAssoc = nodeService.getPrimaryParent(publishingEvent);
ChildAssociationRef environmentAssoc = nodeService.getPrimaryParent(queueAssoc.getParentRef());
NodeRef environment = environmentAssoc.getParentRef();
return environment;
}
public AssociationRef linkeToLastEvent(NodeRef publishedNode, NodeRef eventNode)
public AssociationRef linkToLastEvent(NodeRef publishedNode, NodeRef eventNode)
{
List<AssociationRef> assocs = nodeService.getTargetAssocs(publishedNode, ASSOC_LAST_PUBLISHING_EVENT);
if(isEmpty(assocs)==false)
@@ -528,4 +520,51 @@ public class PublishingEventHelper
}
return nodeService.createAssociation(publishedNode, eventNode, ASSOC_LAST_PUBLISHING_EVENT);
}
// public NodePublishStatus checkNodeStatus(NodeRef node, String channelId, NodeRef queue)
// {
// PublishingEvent queuedEvent = getQueuedPublishingEvent(node, channelId, queue);
// PublishingEvent lastEvent= getLastPublishingEvent(node, channelId, queue);
// if(queuedEvent != null)
// {
// if(lastEvent != null)
// {
// return new NodePublishStatusPublishedAndOnQueue(node, channelId, queuedEvent, lastEvent);
// }
// else
// {
// return new NodePublishStatusOnQueue(node, channelId, queuedEvent);
// }
// }
// else
// {
// if(lastEvent != null)
// {
// return new NodePublishStatusPublished(node, channelId, lastEvent);
// }
// else
// {
// return new NodePublishStatusNotPublished(node, channelId);
// }
// }
// }
//
// private PublishingEvent getLastPublishingEvent(NodeRef node, String channelId, NodeRef queue)
// {
// getEventNodesForPublishedNode(queue, node);
// return null;
// }
//
// private PublishingEvent getQueuedPublishingEvent(NodeRef node, String channelId)
// {
// return publishingEventHelper.getPublishingEvent(nextEventNode);
// }
//
// private boolean isActiveEvent(NodeRef eventNode)
// {
// String statusStr = (String) nodeService.getProperty( eventNode, PROP_PUBLISHING_EVENT_STATUS);
// Status status = Status.valueOf(statusStr);
// return status == Status.IN_PROGRESS || status == Status.SCHEDULED;
// }
}