Class AbstractLocalTransform
java.lang.Object
org.alfresco.repo.content.transform.AbstractLocalTransform
- All Implemented Interfaces:
LocalTransform
- Direct Known Subclasses:
LocalFailoverTransform,LocalPassThroughTransform,LocalPipelineTransform,LocalTransformImpl
Abstract supper class for local transformer using flat transform options.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.apache.commons.logging.Logprotected final MimetypeServiceprotected final Stringprotected final NodeServiceprotected final TransformerDebug -
Method Summary
Modifier and TypeMethodDescriptiongetName()getStrippedTransformOptions(Map<String, String> transformOptions) Returns a subset of the supplied actual transform options from the rendition definition that are known to this transformer.abstract booleanvoidtransform(ContentReader reader, ContentWriter writer, Map<String, String> transformOptions, String renditionName, NodeRef sourceNodeRef) Requests a synchronous transform.protected abstract voidtransformImpl(ContentReader reader, ContentWriter writer, Map<String, String> transformOptions, String sourceMimetype, String targetMimetype, String sourceExtension, String targetExtension, String renditionName, NodeRef sourceNodeRef)
-
Field Details
-
log
protected static final org.apache.commons.logging.Log log -
name
-
mimetypeService
-
nodeService
-
transformerDebug
-
transformsTransformOptionNames
-
-
Method Details
-
isAvailable
public abstract boolean isAvailable() -
transformImpl
protected abstract void transformImpl(ContentReader reader, ContentWriter writer, Map<String, String> transformOptions, String sourceMimetype, String targetMimetype, String sourceExtension, String targetExtension, String renditionName, NodeRef sourceNodeRef) throws UnsupportedTransformationException, ContentIOException -
getName
- Specified by:
getNamein interfaceLocalTransform- Returns:
- the name of the transform.
-
getTransformsTransformOptionNames
-
transform
public void transform(ContentReader reader, ContentWriter writer, Map<String, String> transformOptions, String renditionName, NodeRef sourceNodeRef) Description copied from interface:LocalTransformRequests a synchronous transform.- Specified by:
transformin interfaceLocalTransform- Parameters:
reader- of the source contentwriter- to the target node's contenttransformOptions- the actual name value pairs available that could be passed to the Transform Service.renditionName- (optional) name for the set of options and target mimetype. If supplied is used to cache results to avoid having to work out if a given transformation is supported a second time. The sourceMimetype and sourceSizeInBytes may still change. In the case of ACS this is the rendition name.sourceNodeRef- the source node
-
getStrippedTransformOptions
Returns a subset of the supplied actual transform options from the rendition definition that are known to this transformer. The ones that will be passed to the T-Engine. It strips out extra ones.- Parameters:
transformOptions- the complete set of actual transform options. This will be returned if all options are known to this transformer. Otherwise a new Map is returned.- Returns:
- the transformOptions to be past to the T-Engine.
-