Finished implementing Unpublishing.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@29625 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
N Smith
2011-08-09 11:01:23 +00:00
parent d004bc3e90
commit 0dc8ed5929
23 changed files with 666 additions and 477 deletions

View File

@@ -20,8 +20,8 @@
package org.alfresco.repo.publishing;
import static org.alfresco.model.ContentModel.TYPE_CONTENT;
import static org.alfresco.repo.publishing.PublishingModel.TYPE_DELIVERY_CHANNEL;
import static org.alfresco.repo.publishing.PublishingModel.PROP_AUTHORISATION_COMPLETE;
import static org.alfresco.repo.publishing.PublishingModel.TYPE_DELIVERY_CHANNEL;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.when;
@@ -39,10 +39,9 @@ import org.alfresco.model.ContentModel;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.service.cmr.model.FileFolderService;
import org.alfresco.service.cmr.publishing.PublishingPackage;
import org.alfresco.service.cmr.publishing.PublishingDetails;
import org.alfresco.service.cmr.publishing.PublishingQueue;
import org.alfresco.service.cmr.publishing.PublishingService;
import org.alfresco.service.cmr.publishing.StatusUpdate;
import org.alfresco.service.cmr.publishing.channels.Channel;
import org.alfresco.service.cmr.publishing.channels.ChannelService;
import org.alfresco.service.cmr.publishing.channels.ChannelType;
@@ -53,7 +52,6 @@ import org.alfresco.service.cmr.site.SiteService;
import org.alfresco.service.cmr.site.SiteVisibility;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.GUID;
import org.alfresco.util.collections.CollectionUtils;
/**
* @author Nick Smith
@@ -213,17 +211,18 @@ public class PublishingTestHelper
}, AuthenticationUtil.getSystemUserName());
}
public String scheduleEvent1Year(PublishingPackage pckg, String channelId, String comment, StatusUpdate statusUpdate)
public String scheduleEvent1Year(PublishingDetails details)
{
Calendar schedule = Calendar.getInstance();
schedule.add(Calendar.YEAR, 1);
return scheduleEvent(pckg, channelId, schedule, comment, statusUpdate);
details.setSchedule(schedule);
return scheduleEvent(details);
}
public String scheduleEvent(PublishingPackage pckg, String channelId, Calendar schedule, String comment, StatusUpdate statusUpdate)
public String scheduleEvent(PublishingDetails details)
{
PublishingQueue queue = publishingService.getPublishingQueue();
String eventId = queue.scheduleNewEvent(pckg, channelId, schedule, comment, statusUpdate);
String eventId = queue.scheduleNewEvent(details);
events.add(eventId);
return eventId;
}