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.Aware,org.springframework.beans.factory.BeanNameAware
public class NodeEligibleForRethumbnailingEvaluator extends ActionConditionEvaluatorAbstractBase
This action evaluator is specifically created for theThumbnail Service. It is used to evaluate whether aThumbnailDefinitionshould 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.retryCounttimes. - These initial retries to produce a thumbnail will occur not more often than every
system.thumbnail.retryPeriodseconds and will use which ever content transformers thecontent servicegives. - 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.quietPeriodseconds. - The attempts to thumbnail difficult pieces of content can be disabled by setting
system.thumbnail.quietPeriodRetriesEnabledto false.
- Since:
- 3.5.0
- Author:
- Neil Mc Erlean.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMEEvaluator constantsprotected org.alfresco.service.cmr.repository.NodeServicenodeServicestatic java.lang.StringPARAM_QUIET_PERIODstatic java.lang.StringPARAM_QUIET_PERIOD_RETRIES_ENABLEDstatic java.lang.StringPARAM_RETRY_COUNTstatic java.lang.StringPARAM_RETRY_PERIODstatic java.lang.StringPARAM_THUMBNAIL_DEFINITION_NAMEprotected ThumbnailServicethumbnailService-
Fields inherited from class org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase
actionConditionDefinition
-
Fields inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
adhocPropertiesAllowed, DISPLAY_LABEL, runtimeActionService
-
Fields inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
name
-
-
Constructor Summary
Constructors Constructor Description NodeEligibleForRethumbnailingEvaluator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddParameterDefinitions(java.util.List<ParameterDefinition> paramList)Add parameter definitionsbooleanevaluateImpl(ActionCondition actionCondition, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)Evaluation implementationvoidsetNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)voidsetThumbnailService(ThumbnailService thumbnailService)-
Methods inherited from class org.alfresco.repo.action.evaluator.ActionConditionEvaluatorAbstractBase
evaluate, getActionConditionDefintion, init, setPublicCondition
-
Methods inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toString
-
Methods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
setBeanName
-
-
-
-
Field Detail
-
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
-
-
Method Detail
-
setNodeService
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
-
setThumbnailService
public void setThumbnailService(ThumbnailService thumbnailService)
-
addParameterDefinitions
protected void addParameterDefinitions(java.util.List<ParameterDefinition> paramList)
Add parameter definitions- Specified by:
addParameterDefinitionsin classParameterizedItemAbstractBase- Parameters:
paramList- the parameter definitions list
-
evaluateImpl
public boolean evaluateImpl(ActionCondition actionCondition, org.alfresco.service.cmr.repository.NodeRef actionedUponNodeRef)
Description copied from class:ActionConditionEvaluatorAbstractBaseEvaluation implementation- Specified by:
evaluateImplin classActionConditionEvaluatorAbstractBase- Parameters:
actionCondition- the action conditionactionedUponNodeRef- the actioned upon node reference- Returns:
- the result of the condition evaluation
- See Also:
ActionConditionEvaluatorAbstractBase.evaluateImpl(ActionCondition, NodeRef)
-
-