org.alfresco.repo.thumbnail.conditions
Class NodeEligibleForRethumbnailingEvaluator
java.lang.Object
org.alfresco.repo.action.CommonResourceAbstractBase
org.alfresco.repo.action.ParameterizedItemAbstractBase
org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase
org.alfresco.repo.thumbnail.conditions.NodeEligibleForRethumbnailingEvaluator
- All Implemented Interfaces:
- ActionConditionEvaluator, org.springframework.beans.factory.BeanNameAware
public class NodeEligibleForRethumbnailingEvaluator
- extends ActionConditionEvaluatorAbstractBase
This action evaluator is specifically created for the Thumbnail Service
.
It is used to evaluate whether a ThumbnailDefinition
should be executed - based on
previous failed thumbnail attempts for that definition on that source node, as well as some
configuration data.
The behaviour is as follows:
- All content nodes are eligible for thumbnailing initially. Of course thumbnails can only ever be
attempted for those content mime types that have at least one registered and active
ContentTransformer
.
- If the first attempt to produce a thumbnail for a node fails, then it may be retried up to a maximum of
system.thumbnail.retryCount
times.
- These initial retries to produce a thumbnail will occur not more often than every
system.thumbnail.retryPeriod
seconds
and will use which ever content transformers the content service
gives.
- If a thumbnail is not successfully produced for a node after these attempts then it is considered to be
a 'difficult' piece of content with respect to thumbnailing and the assumption is that a thumbnail may
never be available for it. However, in order to allow for the possibility of software upgrades or similiar, which may
make the content thumbnailable at a later date, further attempts will be made, but at a much reduced frequency.
- Difficult pieces of content will not be attempted more often than every
system.thumbnail.quietPeriod
seconds.
- The attempts to thumbnail difficult pieces of content can be disabled by setting
system.thumbnail.quietPeriodRetriesEnabled
to false.
At all times, thumbnails will be attempted when a user navigates to a page which needs to show the relevant thumbnail (lazy production).
- Since:
- 3.5.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NAME
public static final java.lang.String NAME
- Evaluator constants
- See Also:
- Constant Field Values
PARAM_THUMBNAIL_DEFINITION_NAME
public static final java.lang.String PARAM_THUMBNAIL_DEFINITION_NAME
- See Also:
- Constant Field Values
PARAM_RETRY_PERIOD
public static final java.lang.String PARAM_RETRY_PERIOD
- See Also:
- Constant Field Values
PARAM_RETRY_COUNT
public static final java.lang.String PARAM_RETRY_COUNT
- See Also:
- Constant Field Values
PARAM_QUIET_PERIOD
public static final java.lang.String PARAM_QUIET_PERIOD
- See Also:
- Constant Field Values
PARAM_QUIET_PERIOD_RETRIES_ENABLED
public static final java.lang.String PARAM_QUIET_PERIOD_RETRIES_ENABLED
- See Also:
- Constant Field Values
nodeService
protected org.alfresco.service.cmr.repository.NodeService nodeService
thumbnailService
protected ThumbnailService thumbnailService
NodeEligibleForRethumbnailingEvaluator
public NodeEligibleForRethumbnailingEvaluator()
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
setThumbnailService
public void setThumbnailService(ThumbnailService thumbnailService)
addParameterDefinitions
protected void addParameterDefinitions(java.util.List paramList)
- Add parameter definitions
- Specified by:
addParameterDefinitions
in class ParameterizedItemAbstractBase
- Parameters:
paramList
- the parameter definitions list
evaluateImpl
public boolean evaluateImpl(ActionCondition actionCondition,
org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
- Description copied from class:
ActionConditionEvaluatorAbstractBase
- Evaluation implementation
- Specified by:
evaluateImpl
in class ActionConditionEvaluatorAbstractBase
- Parameters:
actionCondition
- the action conditionactionedUponNodeRef
- the actioned upon node reference
- Returns:
- the result of the condition evaluation
- See Also:
ActionConditionEvaluatorAbstractBase.evaluateImpl(ActionCondition, NodeRef)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.