Class LocalPassThroughTransform
- java.lang.Object
-
- org.alfresco.repo.content.transform.AbstractLocalTransform
-
- org.alfresco.repo.content.transform.LocalPassThroughTransform
-
- All Implemented Interfaces:
LocalTransform
public class LocalPassThroughTransform extends AbstractLocalTransform
Based on the logic of the legacy BinaryPassThrough and String Transformers. Streams the source content to target when the respective mimetypes are identical, or transforms to "text/plain" from any mimetype starting "text/", or "application/x-javascript", or "application/dita+xml". There must be no transform options, but in case of the text transform the source and target encodings may be change. Supported transforms are added byCombinedConfig.addPassThroughTransformer(org.alfresco.service.cmr.repository.MimetypeService).- Author:
- adavis
-
-
Field Summary
Fields Modifier and Type Field Description static StringNAME-
Fields inherited from class org.alfresco.repo.content.transform.AbstractLocalTransform
log, mimetypeService, name, transformerDebug, transformsTransformOptionNames
-
-
Constructor Summary
Constructors Constructor Description LocalPassThroughTransform(String name, TransformerDebug transformerDebug, MimetypeService mimetypeService, boolean strictMimeTypeCheck, Map<String,Set<String>> strictMimetypeExceptions, boolean retryTransformOnDifferentMimeType, Set<org.alfresco.transform.client.model.config.TransformOption> transformsTransformOptions, LocalTransformServiceRegistry localTransformServiceRegistry)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.alfresco.transform.client.model.config.TransformergetConfig(List<String> mimetypes)booleanisAvailable()protected voidtransformImpl(ContentReader reader, ContentWriter writer, Map<String,String> transformOptions, String sourceMimetype, String targetMimetype, String sourceExtension, String targetExtension, String renditionName, NodeRef sourceNodeRef)-
Methods inherited from class org.alfresco.repo.content.transform.AbstractLocalTransform
getName, getStrippedTransformOptions, getTransformsTransformOptionNames, transform
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LocalPassThroughTransform
public LocalPassThroughTransform(String name, TransformerDebug transformerDebug, MimetypeService mimetypeService, boolean strictMimeTypeCheck, Map<String,Set<String>> strictMimetypeExceptions, boolean retryTransformOnDifferentMimeType, Set<org.alfresco.transform.client.model.config.TransformOption> transformsTransformOptions, LocalTransformServiceRegistry localTransformServiceRegistry)
-
-
Method Detail
-
getConfig
public static org.alfresco.transform.client.model.config.Transformer getConfig(List<String> mimetypes)
-
isAvailable
public boolean isAvailable()
- Specified by:
isAvailablein classAbstractLocalTransform
-
transformImpl
protected 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
- Specified by:
transformImplin classAbstractLocalTransform- Throws:
UnsupportedTransformationExceptionContentIOException
-
-