Class LocalPassThroughTransform
java.lang.Object
org.alfresco.repo.content.transform.AbstractLocalTransform
org.alfresco.repo.content.transform.LocalPassThroughTransform
- All Implemented Interfaces:
LocalTransform
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 by
CombinedConfig.addPassThroughTransformer(org.alfresco.service.cmr.repository.MimetypeService, AbstractTransformRegistry).- Author:
- adavis
-
Field Summary
FieldsFields inherited from class org.alfresco.repo.content.transform.AbstractLocalTransform
log, mimetypeService, name, nodeService, transformerDebug, transformsTransformOptionNames -
Constructor Summary
ConstructorsConstructorDescriptionLocalPassThroughTransform(String name, TransformerDebug transformerDebug, MimetypeService mimetypeService, boolean strictMimeTypeCheck, Map<String, Set<String>> strictMimetypeExceptions, boolean retryTransformOnDifferentMimeType, Set<org.alfresco.transform.config.TransformOption> transformsTransformOptions, LocalTransformServiceRegistry localTransformServiceRegistry, NodeService nodeService) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.alfresco.transform.config.Transformerbooleanprotected 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 Details
-
NAME
- See Also:
-
-
Constructor Details
-
LocalPassThroughTransform
public LocalPassThroughTransform(String name, TransformerDebug transformerDebug, MimetypeService mimetypeService, boolean strictMimeTypeCheck, Map<String, Set<String>> strictMimetypeExceptions, boolean retryTransformOnDifferentMimeType, Set<org.alfresco.transform.config.TransformOption> transformsTransformOptions, LocalTransformServiceRegistry localTransformServiceRegistry, NodeService nodeService)
-
-
Method Details
-
getConfig
-
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
-