Class ImageRenderingEngine
- 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
-
- org.alfresco.repo.rendition.executer.ImageRenderingEngine
-
- All Implemented Interfaces:
ActionExecuter,LoggingAwareExecuter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
@Deprecated public class ImageRenderingEngine extends AbstractTransformationRenderingEngine
Deprecated.The RenditionService is being replace by the simpler async RenditionService2.This class is the implementation of theRenditionService's "imageRenderingEngine" rendering engine. This action renders a piece of content in the same MIME type as its source node, having been rescaled as requested.- Since:
- 3.3
- Author:
- Neil McErlean
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine
AbstractTransformationRenderingEngine.TransformationCallable
-
Nested classes/interfaces inherited from class org.alfresco.repo.rendition.executer.AbstractRenderingEngine
AbstractRenderingEngine.RenderingContext
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringNAMEDeprecated.static java.lang.StringPARAM_ALLOW_ENLARGEMENTDeprecated.This optionalBooleanflag parameter specifies whether image resizing should produce an enlarged image, based on the resizing parameters and the size of the original image.static java.lang.StringPARAM_AUTO_ORIENTATIONDeprecated.This optionalBooleanflag parameter specifies if the engine should automatically rotate and image based on the EXIF orientation flag.static java.lang.StringPARAM_COMMAND_OPTIONSDeprecated.This optionalStringparameter specifies any additional ImageMagick commands, that the user wishes to add.static java.lang.StringPARAM_IS_PERCENT_RESIZEDeprecated.This optionalBooleanflag parameter specifies how the PARAM_RESIZE_HEIGHT and PARAM_RESIZE_WIDTH parameters are interpreted.static java.lang.StringPARAM_MAINTAIN_ASPECT_RATIODeprecated.This optionalBooleanflag parameter determines whether the rendered image maintains its original aspect ratio or is stretched to fit the specified height and width.static java.lang.StringPARAM_RESIZE_HEIGHTDeprecated.This optionalIntegerorFloatparameter specifies the height of the image after resizing.static java.lang.StringPARAM_RESIZE_TO_THUMBNAILDeprecated.This optionalBooleanflag parameter specifies a mode for dramatically shrinking large images in a performant way.
If set totruethe rendering process will be more performant for large images but the rendered image will be of lower quality.static java.lang.StringPARAM_RESIZE_WIDTHDeprecated.This optionalIntegerorFloatparameter specifies the width of the image after resizing.-
Fields inherited from class org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine
CANCELLED_ACTION_POLLING_INTERVAL, PARAM_MAX_PAGES, PARAM_MAX_SOURCE_SIZE_K_BYTES, PARAM_PAGE_LIMIT, PARAM_READ_LIMIT_K_BYTES, PARAM_READ_LIMIT_TIME_MS, PARAM_TIMEOUT_MS, PARAM_USE
-
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 ImageRenderingEngine()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidcheckParameterValues(Action action)Deprecated.This method can be overridden by subclasses to provide checking of parameter values.protected java.util.Collection<ParameterDefinition>getParameterDefinitions()Deprecated.Supplies the list of parameters required by this rendering engine.protected java.lang.StringgetTargetMimeType(AbstractRenderingEngine.RenderingContext context)Deprecated.protected TransformationOptionsgetTransformOptions(AbstractRenderingEngine.RenderingContext context)Deprecated.protected TransformationOptionsgetTransformOptionsImpl(TransformationOptions options, AbstractRenderingEngine.RenderingContext context)Deprecated.protected voidrender(AbstractRenderingEngine.RenderingContext context)Deprecated.-
Methods inherited from class org.alfresco.repo.rendition.executer.AbstractTransformationRenderingEngine
getExecutorService, getSourceOptionsSerializers, init, setSourceOptionsSerializers
-
Methods inherited from class org.alfresco.repo.rendition.executer.AbstractRenderingEngine
addParameterDefinitions, checkActionIsRenditionDefinition, checkSourceNodeExists, createActionDefinition, executeImpl, executeImpl, executeRenditionImpl, getCheckedParam, getDefaultRenditionContentProp, getDefaultRenditionNodeType, getExecutionSummary, getParamDisplayLabel, getParamWithDefault, getRenditionContentProperty, getTargetEncoding, 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
-
NAME
public static final java.lang.String NAME
Deprecated.- See Also:
- Constant Field Values
-
PARAM_RESIZE_WIDTH
public static final java.lang.String PARAM_RESIZE_WIDTH
Deprecated.This optionalIntegerorFloatparameter specifies the width of the image after resizing. This may be expressed as pixels or it may represent a percentage of the original image width, depending on the value of the PARAM_IS_PERCENT_RESIZE parameter.
If no value is specified for this parameter then the width of the image will be unchanged.
If an image is being cropped and resized then the cropping happens first, followed by resizing of the cropped image.- See Also:
- Constant Field Values
-
PARAM_RESIZE_HEIGHT
public static final java.lang.String PARAM_RESIZE_HEIGHT
Deprecated.This optionalIntegerorFloatparameter specifies the height of the image after resizing. This may be expressed as pixels or it may represent a percentage of the original image width, depending on the value of the PARAM_IS_PERCENT_RESIZE parameter.
If no value is specified for this parameter then the height of the image will be unchanged.
If an image is being cropped and resized then the cropping happens first, followed by resizing of the cropped image.- See Also:
- Constant Field Values
-
PARAM_IS_PERCENT_RESIZE
public static final java.lang.String PARAM_IS_PERCENT_RESIZE
Deprecated.This optionalBooleanflag parameter specifies how the PARAM_RESIZE_HEIGHT and PARAM_RESIZE_WIDTH parameters are interpreted. If this parameter is set totruethen the rendition height and width are represented as a percentage of the original image height and width. If this parameter is set tofalsethen the rendition height and width are represented as pixels. This parameter defaults tofalse.- See Also:
- Constant Field Values
-
PARAM_MAINTAIN_ASPECT_RATIO
public static final java.lang.String PARAM_MAINTAIN_ASPECT_RATIO
Deprecated.This optionalBooleanflag parameter determines whether the rendered image maintains its original aspect ratio or is stretched to fit the specified height and width.
If this parameter istruethen the rendered image will always maintain its aspect ratio and will be resized to best fit within the given width and height. For example if an image starts at 100x200 pixels and it is resized to 50x50 pixels then the rendered image will actually be 25x50 pixels.
If this parameter isfalsethen the image will be stretched or compressed to fit the given height and width, regardless of the original aspect ratio.
This parameter defaults tofalse- See Also:
- Constant Field Values
-
PARAM_RESIZE_TO_THUMBNAIL
public static final java.lang.String PARAM_RESIZE_TO_THUMBNAIL
Deprecated.This optionalBooleanflag parameter specifies a mode for dramatically shrinking large images in a performant way.
If set totruethe rendering process will be more performant for large images but the rendered image will be of lower quality.
If set tofalsethe rendering process will take longer but the resulting image will usually be of better quality.- See Also:
- Constant Field Values
-
PARAM_ALLOW_ENLARGEMENT
public static final java.lang.String PARAM_ALLOW_ENLARGEMENT
Deprecated.This optionalBooleanflag parameter specifies whether image resizing should produce an enlarged image, based on the resizing parameters and the size of the original image. If true (the default), images may be enlarged. If false, resize operations that would enlarge the image will instead produce a copy of the original image at the same size.- Since:
- 4.0
- See Also:
- Constant Field Values
-
PARAM_COMMAND_OPTIONS
public static final java.lang.String PARAM_COMMAND_OPTIONS
Deprecated.This optionalStringparameter specifies any additional ImageMagick commands, that the user wishes to add. These commands are appended after the various crop and resize options.- See Also:
- Constant Field Values
-
PARAM_AUTO_ORIENTATION
public static final java.lang.String PARAM_AUTO_ORIENTATION
Deprecated.This optionalBooleanflag parameter specifies if the engine should automatically rotate and image based on the EXIF orientation flag. If this parameter is set totruethen the engine reads and resets the EXIF image profile setting 'Orientation' and then performs the appropriate 90 degree rotation on the image to orient the image, for correct viewing. This parameter defaults totrue.- See Also:
- Constant Field Values
-
-
Method Detail
-
getTransformOptions
protected TransformationOptions getTransformOptions(AbstractRenderingEngine.RenderingContext context)
Deprecated.- Specified by:
getTransformOptionsin classAbstractTransformationRenderingEngine
-
getTransformOptionsImpl
protected TransformationOptions getTransformOptionsImpl(TransformationOptions options, AbstractRenderingEngine.RenderingContext context)
Deprecated.- Overrides:
getTransformOptionsImplin classAbstractTransformationRenderingEngine
-
getTargetMimeType
protected java.lang.String getTargetMimeType(AbstractRenderingEngine.RenderingContext context)
Deprecated.- Overrides:
getTargetMimeTypein classAbstractRenderingEngine
-
checkParameterValues
protected void checkParameterValues(Action action)
Deprecated.Description copied from class:AbstractRenderingEngineThis method can be overridden by subclasses to provide checking of parameter values. If a parameter value is illegal or inappropriate, an exception should be thrown.- Overrides:
checkParameterValuesin classAbstractRenderingEngine
-
render
protected void render(AbstractRenderingEngine.RenderingContext context)
Deprecated.- Overrides:
renderin classAbstractTransformationRenderingEngine
-
getParameterDefinitions
protected java.util.Collection<ParameterDefinition> getParameterDefinitions()
Deprecated.Description copied from class:AbstractRenderingEngineSupplies the list of parameters required by this rendering engine.- Overrides:
getParameterDefinitionsin classAbstractTransformationRenderingEngine
-
-