org.alfresco.repo.thumbnail
Class AddFailedThumbnailActionExecuter

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.thumbnail.AddFailedThumbnailActionExecuter
All Implemented Interfaces:
ActionExecuter, org.springframework.beans.factory.BeanNameAware

public class AddFailedThumbnailActionExecuter
extends ActionExecuterAbstractBase

This ActionExecuter implementation is used to record a failed thumbnail attempt having occurred on a source node. For the specified thumbnail definition name and the specified failure datetime, this action executer applies the cm:failedThumbnailSource aspect and creates a cm:failedThumbnail child to store the failure data.

Some pieces of content cannot be thumbnailed. This can happen for various reasons, e.g.

Some content can take a not insignificant amount of time in producing the thumbnail - only to fail. This cost is borne each time a create-thumbnail action is run on that content, which happens each time a user looks at the doclib page for that content in Share. For problematic documents that take a long time to fail, this can add up to a significant cpu cost on the repository server. Therefore we limit the frequency with which the repository retries to create thumbnails.

The details of how these thumbnail creations are limited is described in NodeEligibleForRethumbnailingEvaluator.

Since:
3.5.0
See Also:
FailedThumbnailInfo, NodeEligibleForRethumbnailingEvaluator, ThumbnailServiceImpl.init()

Field Summary
static java.lang.String NAME
          The action bean name.
static java.lang.String PARAM_FAILURE_DATETIME
          The parameter defines the failure datetime to be recorded against the source node.
static java.lang.String PARAM_THUMBNAIL_DEFINITION_NAME
          The name of the failed thumbnail definition e.g.
 
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
AddFailedThumbnailActionExecuter()
           
 
Method Summary
protected  void addParameterDefinitions(java.util.List paramList)
          Adds the parameter definitions to the list
 void executeImpl(Action ruleAction, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
          Execute the action implementation
 void setBehaviourFilter(BehaviourFilter behaviourFilter)
          Set the behaviour filter.
 void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
          Set the node service
 void setThumbnailService(ThumbnailService thumbnailService)
          Set the thumbnail service
 
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
checkMandatoryProperties, 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
The action bean name.

See Also:
Constant Field Values

PARAM_THUMBNAIL_DEFINITION_NAME

public static final java.lang.String PARAM_THUMBNAIL_DEFINITION_NAME
The name of the failed thumbnail definition e.g. doclib.

See Also:
Constant Field Values

PARAM_FAILURE_DATETIME

public static final java.lang.String PARAM_FAILURE_DATETIME
The parameter defines the failure datetime to be recorded against the source node. We explicitly require a parameterised value for this (rather than simply using 'now') because this action is executed asynchronously and there is the possibility that the time of action execution is later than the actual failure time.

See Also:
Constant Field Values
Constructor Detail

AddFailedThumbnailActionExecuter

public AddFailedThumbnailActionExecuter()
Method Detail

setNodeService

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

Parameters:
nodeService - the node service

setThumbnailService

public void setThumbnailService(ThumbnailService thumbnailService)
Set the thumbnail service

Parameters:
thumbnailService - the thumbnail service

setBehaviourFilter

public void setBehaviourFilter(BehaviourFilter behaviourFilter)
Set the behaviour filter.


executeImpl

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

Specified by:
executeImpl in class ActionExecuterAbstractBase
Parameters:
ruleAction - the action
actionedUponNodeRef - the actioned upon node
See Also:
org.alfresco.repo.action.executer.ActionExecuter#execute(org.alfresco.service.cmr.repository.NodeRef, NodeRef)

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
See Also:
ParameterizedItemAbstractBase.addParameterDefinitions(java.util.List)


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