org.alfresco.repo.publishing
Class PublishServiceImpl

java.lang.Object
  extended by org.alfresco.repo.publishing.PublishServiceImpl
All Implemented Interfaces:
PublishingService

public class PublishServiceImpl
extends java.lang.Object
implements PublishingService

Since:
4.0

Field Summary
static java.lang.String NAME
           
 
Constructor Summary
PublishServiceImpl()
           
 
Method Summary
 void cancelPublishingEvent(java.lang.String id)
          Request that the specified publishing event be cancelled.
 java.util.Map checkPublishStatus(java.lang.String channelId, java.util.Collection nodes)
          
 java.util.Map checkPublishStatus(java.lang.String channelId, org.alfresco.service.cmr.repository.NodeRef[] nodes)
          
 PublishingDetails createPublishingDetails()
          A factory method to create an empty publishing package that can be populated before being passed into a call to the PublishingQueue.scheduleNewEvent(PublishingDetails) operation.
 java.util.List getPublishEventsForNode(org.alfresco.service.cmr.repository.NodeRef publishedNode)
          Retrieve a list of publishing events for which the specified node was published.
 PublishingEvent getPublishingEvent(java.lang.String id)
          Retrieve the publishing event that has the specified identifier
 java.util.List getUnpublishEventsForNode(org.alfresco.service.cmr.repository.NodeRef unpublishedNode)
          Retrieve a list of publishing events for which the specified node was unpublished.
 java.lang.String scheduleNewEvent(PublishingDetails publishingDetails)
          Adds the supplied publishing package onto the queue.
 void setPublishingEventHelper(PublishingEventHelper publishingEventHelper)
           
 void setPublishingRootObject(PublishingRootObject rootObject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values
Constructor Detail

PublishServiceImpl

public PublishServiceImpl()
Method Detail

setPublishingRootObject

public void setPublishingRootObject(PublishingRootObject rootObject)
Parameters:
rootObject - the rootObject to set

setPublishingEventHelper

public void setPublishingEventHelper(PublishingEventHelper publishingEventHelper)
Parameters:
publishingEventHelper - the publishingEventHelper to set

getPublishingEvent

public PublishingEvent getPublishingEvent(java.lang.String id)
Retrieve the publishing event that has the specified identifier

Specified by:
getPublishingEvent in interface PublishingService
Parameters:
id - The identifier of the required publishing event
Returns:
The PublishingEvent object that corresponds to the requested identifier or null if no such publishing event can be located

getPublishEventsForNode

public java.util.List getPublishEventsForNode(org.alfresco.service.cmr.repository.NodeRef publishedNode)
Retrieve a list of publishing events for which the specified node was published.

Specified by:
getPublishEventsForNode in interface PublishingService
Parameters:
publishedNode - The node that was published.
Returns:
A list of PublishingEvents.

getUnpublishEventsForNode

public java.util.List getUnpublishEventsForNode(org.alfresco.service.cmr.repository.NodeRef unpublishedNode)
Retrieve a list of publishing events for which the specified node was unpublished.

Specified by:
getUnpublishEventsForNode in interface PublishingService
Parameters:
unpublishedNode - The node that was unpublished.
Returns:
A list of PublishingEvents.

cancelPublishingEvent

public void cancelPublishingEvent(java.lang.String id)
Request that the specified publishing event be cancelled. This call will cancel the identified publishing event immediately if it hasn't been started. If it has been started but not yet completed then the request for cancellation will be recorded, and acted upon when (and if) possible.

Specified by:
cancelPublishingEvent in interface PublishingService
Parameters:
id - The identifier of the publishing event that is to be cancelled.

checkPublishStatus

public java.util.Map checkPublishStatus(java.lang.String channelId,
                                        java.util.Collection nodes)


checkPublishStatus

public java.util.Map checkPublishStatus(java.lang.String channelId,
                                        org.alfresco.service.cmr.repository.NodeRef[] nodes)


createPublishingDetails

public PublishingDetails createPublishingDetails()
Description copied from interface: PublishingService
A factory method to create an empty publishing package that can be populated before being passed into a call to the PublishingQueue.scheduleNewEvent(PublishingDetails) operation.

Specified by:
createPublishingDetails in interface PublishingService
Returns:
A publishing package that can be populated before being placed on the publishing queue.

scheduleNewEvent

public java.lang.String scheduleNewEvent(PublishingDetails publishingDetails)
Adds the supplied publishing package onto the queue.

Specified by:
scheduleNewEvent in interface PublishingService
Parameters:
publishingDetails - The publishing package that is to be enqueued
Returns:
The identifier of the newly scheduled event


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.