Class AbstractTransformationRenderingEngine
- java.lang.Object
-
- org.alfresco.repo.action.CommonResourceAbstractBase
-
- org.alfresco.repo.action.ParameterizedItemAbstractBase
-
- org.alfresco.repo.action.executer.ActionExecuterAbstractBase
-
- org.alfresco.repo.rendition.executer.AbstractRenderingEngine
-
- org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine
-
- All Implemented Interfaces:
ActionExecuter,LoggingAwareExecuter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
- Direct Known Subclasses:
ImageRenderingEngine,ReformatRenderingEngine
public abstract class AbstractTransformationRenderingEngine extends AbstractRenderingEngine
- Author:
- Nick Smith
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractTransformationRenderingEngine.TransformationCallableImplementation ofCallablefor doing the work of the transformation which returns the temporary content writer if successful.-
Nested classes/interfaces inherited from class org.alfresco.repo.rendition.executer.AbstractRenderingEngine
AbstractRenderingEngine.RenderingContext
-
-
Field Summary
Fields Modifier and Type Field Description protected static intCANCELLED_ACTION_POLLING_INTERVALThe frequency in milliseconds with which theActionTrackingServiceshould be polled for cancellation of the action.static java.lang.StringPARAM_MAX_PAGESThis optionalIntegerparameter specifies the maximum number of pages of the source that may be read.static java.lang.StringPARAM_MAX_SOURCE_SIZE_K_BYTESThis optionalLongparameter specifies the maximum number of kbytes of the source may be read.static java.lang.StringPARAM_PAGE_LIMITThis optionalIntegerparameter specifies how many source pages should be read in order to create an image.static java.lang.StringPARAM_READ_LIMIT_K_BYTESThis optionalLongparameter specifies how many kbytes of the source to read in order to create an image.static java.lang.StringPARAM_READ_LIMIT_TIME_MSThis optionalLongparameter specifies how timeout for reading the source before EOF is returned.static java.lang.StringPARAM_TIMEOUT_MSThis optionalLongparameter specifies the timeout for reading the source before an exception is thrown.static java.lang.StringPARAM_USEThis optionalStringparameter specifies the type (or use) of the rendition.-
Fields inherited from class org.alfresco.repo.rendition.executer.AbstractRenderingEngine
actionTrackingService, CONTENT_READER_NOT_FOUND_MESSAGE, contentService, DEFAULT_RUN_AS_NAME, mimetypeMap, namespaceService, nodeService, PARAM_ENCODING, PARAM_MIME_TYPE, PARAM_PLACEHOLDER_RESOURCE_PATH, PARAM_RUN_AS, PARAM_SOURCE_CONTENT_PROPERTY, PARAM_TARGET_CONTENT_PROPERTY, PARAM_UPDATE_RENDITIONS_ON_ANY_PROPERTY_CHANGE
-
Fields inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
actionDefinition, applicableTypes, publicAction
-
Fields inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
adhocPropertiesAllowed, 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
Constructors Constructor Description AbstractTransformationRenderingEngine()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.util.concurrent.ExecutorServicegetExecutorService()Gets theExecutorServiceto be used for cancel-aware transforms.protected java.util.Collection<ParameterDefinition>getParameterDefinitions()Supplies the list of parameters required by this rendering engine.java.util.Collection<TransformationSourceOptions.TransformationSourceOptionsSerializer>getSourceOptionsSerializers()protected abstract TransformationOptionsgetTransformOptions(AbstractRenderingEngine.RenderingContext context)protected TransformationOptionsgetTransformOptionsImpl(TransformationOptions options, AbstractRenderingEngine.RenderingContext context)voidinit()Init methodprotected voidrender(AbstractRenderingEngine.RenderingContext context)voidsetSourceOptionsSerializers(java.util.Collection<TransformationSourceOptions.TransformationSourceOptionsSerializer> sourceOptionsSerializers)-
Methods inherited from class org.alfresco.repo.rendition.executer.AbstractRenderingEngine
addParameterDefinitions, checkActionIsRenditionDefinition, checkParameterValues, checkSourceNodeExists, createActionDefinition, executeImpl, executeImpl, executeRenditionImpl, getCheckedParam, getDefaultRenditionContentProp, getDefaultRenditionNodeType, getExecutionSummary, getParamDisplayLabel, getParamWithDefault, getRenditionContentProperty, getTargetEncoding, getTargetMimeType, notifyCallbackOfException, notifyCallbackOfResult, resolveRenditionLocation, setActionTrackingService, setBehaviourFilter, setContentService, setDefaultRenditionContentProp, setDefaultRenditionNodeType, setMimetypeMap, setNamespaceService, setNodeService, setRenditionLocationResolver, setRenditionService, switchToFinalRenditionNode, tagSourceNodeAsRenditioned, throwWrappedException
-
Methods inherited from class org.alfresco.repo.action.executer.ActionExecuterAbstractBase
execute, getActionDefinition, getIgnoreLock, getQueueName, getTrackStatus, isApplicableType, onLogException, setApplicableTypes, setBaseNodeService, setDictionaryService, setIgnoreLock, setLockService, setMlAwareNodeService, setPublicAction, setQueueName, setTrackStatus
-
Methods inherited from class org.alfresco.repo.action.ParameterizedItemAbstractBase
checkMandatoryProperties, getAdhocPropertiesAllowed, getDescriptionKey, getLocalizedParameterDefinitions, getParamDisplayLabel, getParameterDefintions, getTitleKey, setAdhocPropertiesAllowed, setLocales, setRuntimeActionService, toString
-
Methods inherited from class org.alfresco.repo.action.CommonResourceAbstractBase
setBeanName
-
-
-
-
Field Detail
-
PARAM_TIMEOUT_MS
public static final java.lang.String PARAM_TIMEOUT_MS
This optionalLongparameter specifies the timeout for reading the source before an exception is thrown.- See Also:
- Constant Field Values
-
PARAM_READ_LIMIT_TIME_MS
public static final java.lang.String PARAM_READ_LIMIT_TIME_MS
This optionalLongparameter specifies how timeout for reading the source before EOF is returned.- See Also:
- Constant Field Values
-
PARAM_MAX_SOURCE_SIZE_K_BYTES
public static final java.lang.String PARAM_MAX_SOURCE_SIZE_K_BYTES
This optionalLongparameter specifies the maximum number of kbytes of the source may be read. An exception is thrown before any are read if larger.- See Also:
- Constant Field Values
-
PARAM_READ_LIMIT_K_BYTES
public static final java.lang.String PARAM_READ_LIMIT_K_BYTES
This optionalLongparameter specifies how many kbytes of the source to read in order to create an image.- See Also:
- Constant Field Values
-
PARAM_MAX_PAGES
public static final java.lang.String PARAM_MAX_PAGES
This optionalIntegerparameter specifies the maximum number of pages of the source that may be read. An exception is thrown before any are read if larger.- See Also:
- Constant Field Values
-
PARAM_PAGE_LIMIT
public static final java.lang.String PARAM_PAGE_LIMIT
This optionalIntegerparameter specifies how many source pages should be read in order to create an image.- See Also:
- Constant Field Values
-
CANCELLED_ACTION_POLLING_INTERVAL
protected static final int CANCELLED_ACTION_POLLING_INTERVAL
The frequency in milliseconds with which theActionTrackingServiceshould be polled for cancellation of the action.- See Also:
- Constant Field Values
-
PARAM_USE
public static final java.lang.String PARAM_USE
This optionalStringparameter specifies the type (or use) of the rendition.
-
-
Method Detail
-
getSourceOptionsSerializers
public java.util.Collection<TransformationSourceOptions.TransformationSourceOptionsSerializer> getSourceOptionsSerializers()
-
setSourceOptionsSerializers
public void setSourceOptionsSerializers(java.util.Collection<TransformationSourceOptions.TransformationSourceOptionsSerializer> sourceOptionsSerializers)
-
getExecutorService
protected java.util.concurrent.ExecutorService getExecutorService()
Gets theExecutorServiceto be used for cancel-aware transforms.If no
ExecutorServicehas been defined a default ofExecutors.newCachedThreadPool()is used duringinit().- Returns:
- the defined or default
ExecutorService
-
init
public void init()
Description copied from class:ActionExecuterAbstractBaseInit method- Overrides:
initin classActionExecuterAbstractBase
-
render
protected void render(AbstractRenderingEngine.RenderingContext context)
- Specified by:
renderin classAbstractRenderingEngine
-
getTransformOptions
protected abstract TransformationOptions getTransformOptions(AbstractRenderingEngine.RenderingContext context)
-
getTransformOptionsImpl
protected TransformationOptions getTransformOptionsImpl(TransformationOptions options, AbstractRenderingEngine.RenderingContext context)
-
getParameterDefinitions
protected java.util.Collection<ParameterDefinition> getParameterDefinitions()
Description copied from class:AbstractRenderingEngineSupplies the list of parameters required by this rendering engine.- Overrides:
getParameterDefinitionsin classAbstractRenderingEngine
-
-