mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -1,43 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.service.cmr.publishing;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
* An extendsion of the {@link PublishingPackage} interface which allows values to be modified.
|
||||
* @author Brian
|
||||
* @author Nick Smith
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
public interface MutablePublishingPackage extends PublishingPackage
|
||||
{
|
||||
MutablePublishingPackage addNodesToUnpublish(NodeRef... nodesToRemove);
|
||||
|
||||
MutablePublishingPackage addNodesToUnpublish(Collection<NodeRef> nodesToRemove);
|
||||
|
||||
MutablePublishingPackage addNodesToPublish(NodeRef... nodesToPublish);
|
||||
|
||||
MutablePublishingPackage addNodesToPublish(Collection<NodeRef> nodesToPublish);
|
||||
|
||||
PublishingPackage build();
|
||||
}
|
@@ -20,18 +20,16 @@
|
||||
package org.alfresco.service.cmr.publishing;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.service.cmr.repository.AssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.Path;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
|
||||
/**
|
||||
* @author Brian
|
||||
* @author Nick Smith
|
||||
* @since 4.0
|
||||
*
|
||||
*/
|
||||
public interface NodeSnapshot
|
||||
@@ -42,37 +40,12 @@ public interface NodeSnapshot
|
||||
*/
|
||||
NodeRef getNodeRef();
|
||||
|
||||
/**
|
||||
* Retrieve the primary parent association of the node at the moment this snapshot was taken
|
||||
* @return The ChildAssociationRef object that describes the primary parent association of the node
|
||||
*/
|
||||
ChildAssociationRef getPrimaryParentAssoc();
|
||||
|
||||
/**
|
||||
* Retrieve the primary path to the node at the moment this snapshot was taken. Note that the elements in this path describe
|
||||
* the associations between the nodes in the hierarchy - not the "display path"
|
||||
* @return A Path object that describes the primary path to the node
|
||||
*/
|
||||
Path getPrimaryPath();
|
||||
|
||||
/**
|
||||
* The property values assigned to the node at the moment the snapshot was taken.
|
||||
* @return A map that associates property names to property values for the node.
|
||||
*/
|
||||
Map<QName, Serializable> getProperties();
|
||||
|
||||
/**
|
||||
* Retrieve all the parent associations of the node at the moment the snapshot was taken
|
||||
* @return A list of ChildAssociationRef objects, each describing one parent association of the node.
|
||||
*/
|
||||
List<ChildAssociationRef> getAllParentAssocs();
|
||||
|
||||
/**
|
||||
* Retrieve all the peer associations for which this node was the source at the moment the snapshot was taken
|
||||
* @return A list of AssociationRef objects, each describing a peer association for which this node is the source
|
||||
*/
|
||||
List<AssociationRef> getOutboundPeerAssociations();
|
||||
|
||||
|
||||
/**
|
||||
* Retrieve the type of the node at the moment the snapshot was taken.
|
||||
* @return The QName that identifies the type of the node
|
||||
|
@@ -0,0 +1,95 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.service.cmr.publishing;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
/**
|
||||
* A simple DTO used to gather parameters for scheduling a Publishing Event.
|
||||
*
|
||||
* @author Brian
|
||||
* @author Nick Smith
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
public interface PublishingDetails
|
||||
{
|
||||
PublishingDetails addNodesToUnpublish(NodeRef... nodesToRemove);
|
||||
|
||||
PublishingDetails addNodesToUnpublish(Collection<NodeRef> nodesToRemove);
|
||||
|
||||
PublishingDetails addNodesToPublish(NodeRef... nodesToPublish);
|
||||
|
||||
PublishingDetails addNodesToPublish(Collection<NodeRef> nodesToPublish);
|
||||
|
||||
PublishingDetails setPublishChannel(String channelId);
|
||||
|
||||
PublishingDetails setComment(String comment);
|
||||
|
||||
PublishingDetails setSchedule(Calendar schedule);
|
||||
|
||||
PublishingDetails setStatusMessage(String message);
|
||||
|
||||
PublishingDetails setStatusNodeToLinkTo(NodeRef nodeToLinkTo);
|
||||
|
||||
PublishingDetails addStatusUpdateChannels(Collection<String> channelIds);
|
||||
PublishingDetails addStatusUpdateChannels(String... channelIds);
|
||||
|
||||
/**
|
||||
* @return the comment
|
||||
*/
|
||||
String getComment();
|
||||
|
||||
/**
|
||||
* @return the message
|
||||
*/
|
||||
String getStatusMessage();
|
||||
|
||||
/**
|
||||
* @return the nodeToLinkTo
|
||||
*/
|
||||
NodeRef getNodeToLinkTo();
|
||||
|
||||
/**
|
||||
* @return the publishChannelId
|
||||
*/
|
||||
String getPublishChannelId();
|
||||
|
||||
/**
|
||||
* @return the schedule
|
||||
*/
|
||||
Calendar getSchedule();
|
||||
|
||||
Set<String> getStatusUpdateChannels();
|
||||
|
||||
/**
|
||||
* @return a {@link Set} of all the {@link NodeRef}s to be published.
|
||||
*/
|
||||
Set<NodeRef> getNodesToPublish();
|
||||
|
||||
/**
|
||||
* @return a {@link Set} of all the {@link NodeRef}s to be unpublished.
|
||||
*/
|
||||
Set<NodeRef> getNodesToUnpublish();
|
||||
|
||||
}
|
@@ -19,31 +19,20 @@
|
||||
|
||||
package org.alfresco.service.cmr.publishing;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
|
||||
public interface PublishingQueue
|
||||
{
|
||||
/**
|
||||
* A factory method to create an empty publishing package that can be populated before being passed into
|
||||
* a call to the {@link PublishingQueue#scheduleNewEvent(PublishingPackage, String, Calendar, String, StatusUpdate)} operation.
|
||||
* a call to the {@link PublishingQueue#scheduleNewEvent(PublishingDetails)} operation.
|
||||
* @return A publishing package that can be populated before being placed on the publishing queue.
|
||||
*/
|
||||
MutablePublishingPackage createPublishingPackageBuilder();
|
||||
PublishingDetails createPublishingDetails();
|
||||
|
||||
StatusUpdate createStatusUpdate(String message, NodeRef nodeToLinkTo, String... channelIds);
|
||||
StatusUpdate createStatusUpdate(String message, NodeRef nodeToLinkTo, Collection<String> channelIds);
|
||||
|
||||
/**
|
||||
* Adds the supplied publishing package onto the queue.
|
||||
* @param publishingPackage The publishing package that is to be enqueued
|
||||
* @param channelId The name of the channel that the package is to be published to
|
||||
* @param schedule The time at which the new publishing event should be scheduled (optional - <code>null</code> indicates "as soon as possible")
|
||||
* @param comment A comment to be stored with this new event (optional - may be <code>null</code>)
|
||||
* @param statusUpdate defines the status update (if any). If <code>null</code> then no status update is sent.
|
||||
* @param publishingDetails The publishing package that is to be enqueued
|
||||
* @return The identifier of the newly scheduled event
|
||||
*/
|
||||
String scheduleNewEvent(PublishingPackage publishingPackage, String channelId, Calendar schedule, String comment, StatusUpdate statusUpdate);
|
||||
String scheduleNewEvent(PublishingDetails publishingDetails);
|
||||
}
|
||||
|
Reference in New Issue
Block a user