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

@@ -74,7 +74,6 @@ public class PublishingEventProcessor
String inProgressStatus = PublishingEvent.Status.IN_PROGRESS.name();
nodeService.setProperty(eventNode, PublishingModel.PROP_PUBLISHING_EVENT_STATUS, inProgressStatus);
PublishingEvent event = eventHelper.getPublishingEvent(eventNode);
NodeRef environment = eventHelper.getEnvironmentNodeForPublishingEvent(eventNode);
String channelName = event.getChannelId();
Channel channel = channelService.getChannelById(channelName);
if (channel == null)
@@ -84,7 +83,7 @@ public class PublishingEventProcessor
else
{
publishEvent(channel, event);
updateStatus(channel, environment, event.getStatusUpdate());
updateStatus(channel, event.getStatusUpdate());
String completedStatus = PublishingEvent.Status.COMPLETED.name();
nodeService.setProperty(eventNode, PublishingModel.PROP_PUBLISHING_EVENT_STATUS, completedStatus);
}
@@ -99,7 +98,7 @@ public class PublishingEventProcessor
}
}
public void updateStatus(Channel publishChannel, NodeRef environment, StatusUpdate update)
public void updateStatus(Channel publishChannel, StatusUpdate update)
{
if(update == null)
{
@@ -166,7 +165,7 @@ public class PublishingEventProcessor
{
updatePublishedNode(publishedNode, entry);
}
eventHelper.linkeToLastEvent(publishedNode, eventNode);
eventHelper.linkToLastEvent(publishedNode, eventNode);
channel.publish(publishedNode);
return publishedNode;
}