org.alfresco.repo.publishing
Class PublishContentActionExecuter

java.lang.Object
  extended by org.alfresco.repo.action.CommonResourceAbstractBase
      extended by org.alfresco.repo.action.ParameterizedItemAbstractBase
          extended by org.alfresco.repo.action.executer.ActionExecuterAbstractBase
              extended by org.alfresco.repo.publishing.PublishContentActionExecuter
All Implemented Interfaces:
ActionExecuter, org.springframework.beans.factory.BeanNameAware

public class PublishContentActionExecuter
extends ActionExecuterAbstractBase

This class defines an action that publishes or unpublishes the acted-upon node to a specified publishing channel.

Since:
4.0

Field Summary
static java.lang.String NAME
           
static java.lang.String PARAM_COMMENT
          A single-valued, optional text parameter that is stored on the publishing event that is created by this action.
static java.lang.String PARAM_INCLUDE_LINK_IN_STATUS_UPDATE
          A single-valued, optional boolean parameter that specifies whether a link to the published content should be appended (in shortened form) to the status update.
static java.lang.String PARAM_NODE_TO_LINK_STATUS_UPDATE_TO
          A single-valued, optional NodeRef parameter that specifies which published node should be referenced by the status update.
static java.lang.String PARAM_PUBLISH_CHANNEL_ID
          A single-valued, optional text parameter that identifies the publishing channel to which the specified content is to be published.
static java.lang.String PARAM_PUBLISH_CHANNEL_NAME
          A single-valued, optional text parameter that names the publishing channel to which the specified content is to be published.
static java.lang.String PARAM_SCHEDULED_TIME
          A single-valued, optional datetime parameter that specifies when the publish should happen.
static java.lang.String PARAM_STATUS_UPDATE
          A single-valued, optional text parameter that specifies the text of a status update that is to be sent to the specified channels upon successful publication
static java.lang.String PARAM_STATUS_UPDATE_CHANNEL_IDS
          A multi-valued, optional text parameter that identifies the publishing channels to which the status update (if any) should be sent.
static java.lang.String PARAM_STATUS_UPDATE_CHANNEL_NAMES
          A multi-valued, optional text parameter that identifies by name the publishing channels to which the status update (if any) should be sent.
static java.lang.String PARAM_UNPUBLISH
          A single-valued, optional boolean parameter that indicates whether the node being acted on should be unpublished (true) or published (false, the default).
 
Fields inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
actionDefinition, applicableTypes, publicAction
 
Fields inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
DISPLAY_LABEL, runtimeActionService
 
Fields inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
name
 
Fields inherited from interface org.alfresco.repo.action.executer.ActionExecuter
PARAM_RESULT
 
Constructor Summary
PublishContentActionExecuter()
           
 
Method Summary
protected  void addParameterDefinitions(java.util.List paramList)
          Adds the parameter definitions to the list
protected  void checkMandatoryProperties(ParameterizedItem ruleItem, ParameterizedItemDefinition ruleItemDefinition)
          Checked whether all the mandatory parameters for the rule item have been assigned.
protected  void executeImpl(Action action, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
          Execute the action implementation
 void setChannelService(ChannelService channelService)
           
 void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
           
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
           
 void setPublishingService(PublishingService publishingService)
           
 
Methods inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
createActionDefinition, execute, getActionDefinition, getIgnoreLock, getQueueName, getTrackStatus, init, setApplicableTypes, setBaseNodeService, setIgnoreLock, setLockService, setPublicAction, setQueueName, setTrackStatus
 
Methods inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
getAdhocPropertiesAllowed, getDescriptionKey, getParamDisplayLabel, getParameterDefintions, getTitleKey, setRuntimeActionService, toString
 
Methods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
setBeanName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME

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

PARAM_PUBLISH_CHANNEL_NAME

public static final java.lang.String PARAM_PUBLISH_CHANNEL_NAME
A single-valued, optional text parameter that names the publishing channel to which the specified content is to be published. Although this is optional, one of either "publishChannelName" or "publishChannelId" MUST be specified. If both are specified then "publishChannelId" takes precedence.

See Also:
PublishContentActionExecuter.PARAM_PUBLISH_CHANNEL_ID, Constant Field Values

PARAM_PUBLISH_CHANNEL_ID

public static final java.lang.String PARAM_PUBLISH_CHANNEL_ID
A single-valued, optional text parameter that identifies the publishing channel to which the specified content is to be published. Although this is optional, one of either "publishChannelName" or "publishChannelId" MUST be specified. If both are specified then "publishChannelId" takes precedence.

See Also:
PublishContentActionExecuter.PARAM_PUBLISH_CHANNEL_NAME, Constant Field Values

PARAM_UNPUBLISH

public static final java.lang.String PARAM_UNPUBLISH
A single-valued, optional boolean parameter that indicates whether the node being acted on should be unpublished (true) or published (false, the default).

See Also:
Constant Field Values

PARAM_STATUS_UPDATE

public static final java.lang.String PARAM_STATUS_UPDATE
A single-valued, optional text parameter that specifies the text of a status update that is to be sent to the specified channels upon successful publication

See Also:
PublishContentActionExecuter.PARAM_STATUS_UPDATE_CHANNEL_NAMES, Constant Field Values

PARAM_INCLUDE_LINK_IN_STATUS_UPDATE

public static final java.lang.String PARAM_INCLUDE_LINK_IN_STATUS_UPDATE
A single-valued, optional boolean parameter that specifies whether a link to the published content should be appended (in shortened form) to the status update. Defaults to true if not set.

See Also:
PublishContentActionExecuter.PARAM_STATUS_UPDATE_CHANNEL_NAMES, PublishContentActionExecuter.PARAM_STATUS_UPDATE, Constant Field Values

PARAM_NODE_TO_LINK_STATUS_UPDATE_TO

public static final java.lang.String PARAM_NODE_TO_LINK_STATUS_UPDATE_TO
A single-valued, optional NodeRef parameter that specifies which published node should be referenced by the status update. This is only relevant if the "includeLinkInStatusUpdate" is true AND the node being acted upon is a folder AND the "unpublish" parameter value is false. If the node being acted on is not a folder then the link appended to the status update will always be a link to the published node. If the "unpublish" parameter is set to true then no link is appended to the status update.

See Also:
PublishContentActionExecuter.PARAM_INCLUDE_LINK_IN_STATUS_UPDATE, PublishContentActionExecuter.PARAM_UNPUBLISH, Constant Field Values

PARAM_STATUS_UPDATE_CHANNEL_NAMES

public static final java.lang.String PARAM_STATUS_UPDATE_CHANNEL_NAMES
A multi-valued, optional text parameter that identifies by name the publishing channels to which the status update (if any) should be sent. If both this parameter and the "statusUpdateChannelIds" parameter are given values then they are combined.

See Also:
PublishContentActionExecuter.PARAM_STATUS_UPDATE, PublishContentActionExecuter.PARAM_STATUS_UPDATE_CHANNEL_IDS, Constant Field Values

PARAM_STATUS_UPDATE_CHANNEL_IDS

public static final java.lang.String PARAM_STATUS_UPDATE_CHANNEL_IDS
A multi-valued, optional text parameter that identifies the publishing channels to which the status update (if any) should be sent. If both this parameter and the "statusUpdateChannelNames" parameter are given values then they are combined.

See Also:
PublishContentActionExecuter.PARAM_STATUS_UPDATE, PublishContentActionExecuter.PARAM_STATUS_UPDATE_CHANNEL_NAMES, Constant Field Values

PARAM_SCHEDULED_TIME

public static final java.lang.String PARAM_SCHEDULED_TIME
A single-valued, optional datetime parameter that specifies when the publish should happen.

See Also:
Constant Field Values

PARAM_COMMENT

public static final java.lang.String PARAM_COMMENT
A single-valued, optional text parameter that is stored on the publishing event that is created by this action.

See Also:
Constant Field Values
Constructor Detail

PublishContentActionExecuter

public PublishContentActionExecuter()
Method Detail

setPublishingService

public void setPublishingService(PublishingService publishingService)

setChannelService

public void setChannelService(ChannelService channelService)

setNodeService

public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)

setDictionaryService

public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)

executeImpl

protected void executeImpl(Action action,
                           org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Description copied from class: ActionExecuterAbstractBase
Execute the action implementation

Specified by:
executeImpl in class ActionExecuterAbstractBase
Parameters:
action - the action
actionedUponNodeRef - the actioned upon node

addParameterDefinitions

protected void addParameterDefinitions(java.util.List paramList)
Description copied from class: ParameterizedItemAbstractBase
Adds the parameter definitions to the list

Specified by:
addParameterDefinitions in class ParameterizedItemAbstractBase
Parameters:
paramList - the parameter definitions list

checkMandatoryProperties

protected void checkMandatoryProperties(ParameterizedItem ruleItem,
                                        ParameterizedItemDefinition ruleItemDefinition)
Description copied from class: ParameterizedItemAbstractBase
Checked whether all the mandatory parameters for the rule item have been assigned.

Overrides:
checkMandatoryProperties in class ParameterizedItemAbstractBase
Parameters:
ruleItem - the rule item
ruleItemDefinition - the rule item definition


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