Class ComplexContentTransformer
- java.lang.Object
-
- org.alfresco.repo.content.transform.ContentTransformerHelper
-
- org.alfresco.repo.content.transform.AbstractContentTransformerLimits
-
- org.alfresco.repo.content.transform.AbstractContentTransformer2
-
- org.alfresco.repo.content.transform.ComplexContentTransformer
-
- All Implemented Interfaces:
ContentWorker,ContentTransformer,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
@Deprecated @AlfrescoPublicApi public class ComplexContentTransformer extends AbstractContentTransformer2 implements org.springframework.beans.factory.InitializingBean
Deprecated.The transformations code is being moved out of the codebase and replaced by the new async RenditionService2 or other external libraries.Transformer that passes a document through several nested transformations in order to accomplish its goal.- Author:
- Derek Hulley
-
-
Field Summary
-
Fields inherited from class org.alfresco.repo.content.transform.AbstractContentTransformerLimits
transformerDebug
-
Fields inherited from class org.alfresco.repo.content.transform.ContentTransformerHelper
transformerConfig
-
-
Constructor Summary
Constructors Constructor Description ComplexContentTransformer()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterPropertiesSet()Deprecated.Ensures that required properties have been setjava.lang.StringgetComments(boolean available)Deprecated.Returns the transformer properties predefined (hard coded or implied) by this transformer.java.util.List<java.lang.String>getIntermediateMimetypes()Deprecated.java.util.List<ContentTransformer>getIntermediateTransformers()Deprecated.protected TransformationOptionLimitsgetLimits(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Returns the limits from this transformer combined with those of the first transformer in the chain.protected booleanisPageLimitSupported(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Indicates if 'page' limits are supported by the first transformer in the chain.booleanisTransformable(java.lang.String sourceMimetype, long sourceSize, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Indicates whether the provided source mimetype can be transformed into the target mimetype with the options specified by this content transformer.booleanisTransformableMimetype(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Indicates if this transformer is able to transform the given source mimetype to the target mimetype.voidsetContentService(ContentService contentService)Deprecated.Sets the ContentService.voidsetIntermediateMimetypes(java.util.List<java.lang.String> intermediateMimetypes)Deprecated.Set the intermediate mimetypes that the transformer must take the content through.voidsetTransformationOptionOverrides(java.util.Map<java.lang.String,java.io.Serializable> transformationOptionOverrides)Deprecated.Sets any properties to be set on the TransformationOption as passed in.voidsetTransformers(java.util.List<ContentTransformer> transformers)Deprecated.The list of transformers to use.voidtransformInternal(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, TransformationOptions options)Deprecated.Method to be implemented by subclasses wishing to make use of the common infrastructural code provided by this class.-
Methods inherited from class org.alfresco.repo.content.transform.AbstractContentTransformer2
checkTransformable, getExecutorService, getRetryTransformOnDifferentMimeType, getStrictMimeTypeCheck, getTransformationTime, getTransformationTime, isTransformationLimitedInternally, recordError, recordTime, recordTime, register, setAdditionalThreadTimout, setExecutorService, setRegisterTransformer, setRegistry, setRetryTransformOnDifferentMimeType, setStrictMimeTypeCheck, setUseTimeoutThread, toString, transform, transform, transform
-
Methods inherited from class org.alfresco.repo.content.transform.AbstractContentTransformerLimits
getLimits, getLimits, getMaxPages, getMaxSourceSizeKBytes, getMaxSourceSizeKBytes, getPageLimit, getReadLimitKBytes, getReadLimitTimeMs, getTimeoutMs, isTransformable, isTransformableSize, setLimits, setMaxPages, setMaxSourceSizeKBytes, setMimetypeLimits, setPageLimit, setPageLimitsSupported, setReaderLimits, setReadLimitKBytes, setReadLimitTimeMs, setTimeoutMs, setTransformerDebug
-
Methods inherited from class org.alfresco.repo.content.transform.ContentTransformerHelper
deprecatedSetter, equals, getBeanName, getCommentsOnlySupports, getExtensionOrAny, getMimetype, getMimetypeService, getName, getSimpleName, hashCode, isExplicitTransformation, isSupportedTransformation, onlySupports, setBeanName, setExplicitTransformations, setMimetypeService, setSupportedTransformations, setTransformerConfig, setUnsupportedTransformations
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.alfresco.repo.content.transform.ContentTransformer
getName, isExplicitTransformation
-
-
-
-
Method Detail
-
setTransformers
public void setTransformers(java.util.List<ContentTransformer> transformers)
Deprecated.The list of transformers to use. If any element is null all possible transformers will be considered. If any element is null, the contentService property must be set.If a single transformer is supplied, then it will still be used.
- Parameters:
transformers- list of at least one transformer- See Also:
setContentService(ContentService)
-
setIntermediateMimetypes
public void setIntermediateMimetypes(java.util.List<java.lang.String> intermediateMimetypes)
Deprecated.Set the intermediate mimetypes that the transformer must take the content through. If the transformation A..B..C is performed in order to simulate A..C, then B is the intermediate mimetype. There must always be n-1 intermediate mimetypes, where n is the number oftransformerstaking part in the transformation.- Parameters:
intermediateMimetypes- intermediate mimetypes to transition the content through.
-
setTransformationOptionOverrides
public void setTransformationOptionOverrides(java.util.Map<java.lang.String,java.io.Serializable> transformationOptionOverrides)
Deprecated.Sets any properties to be set on the TransformationOption as passed in. This allows you to force certain properties to always be set on it, to control the transformers in a different way to their default. Note that only properties that are supported by the passed-inTransformationOptionsare changed, others are ignored.
-
setContentService
public void setContentService(ContentService contentService)
Deprecated.Sets the ContentService. Only required ifnulltransformers are provided tosetTransformers(List).- Parameters:
contentService-
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.ExceptionDeprecated.Ensures that required properties have been set- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
java.lang.Exception
-
isTransformable
public boolean isTransformable(java.lang.String sourceMimetype, long sourceSize, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Description copied from class:AbstractContentTransformerLimitsIndicates whether the provided source mimetype can be transformed into the target mimetype with the options specified by this content transformer.Implementation calls the deprecated overloaded method without the sourceSize parameter and then
AbstractContentTransformerLimits.isTransformableSize(String, long, String, TransformationOptions).- Specified by:
isTransformablein interfaceContentTransformer- Overrides:
isTransformablein classAbstractContentTransformerLimits- Parameters:
sourceMimetype- the source mimetypesourceSize- the size (bytes) of the source. If negative it is unknown.targetMimetype- the target mimetypeoptions- the transformation options- Returns:
- boolean true if this content transformer can satify the mimetypes and options specified, false otherwise
-
isTransformableMimetype
public boolean isTransformableMimetype(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Description copied from class:AbstractContentTransformerLimitsIndicates if this transformer is able to transform the given source mimetype to the target mimetype. If overridden, consider also overridingContentTransformerHelper.getComments(boolean).- Specified by:
isTransformableMimetypein interfaceContentTransformer- Overrides:
isTransformableMimetypein classAbstractContentTransformerLimits- Parameters:
sourceMimetype- the source mimetypetargetMimetype- the target mimetypeoptions- the transformation options- Returns:
- boolean true if this content transformer can satify the mimetypes, false otherwise
-
isPageLimitSupported
protected boolean isPageLimitSupported(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Indicates if 'page' limits are supported by the first transformer in the chain. If the first transformer is dynamic, all possible first transformers must support it.- Overrides:
isPageLimitSupportedin classAbstractContentTransformerLimits- Returns:
- true if the first transformer supports them.
-
getLimits
protected TransformationOptionLimits getLimits(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)
Deprecated.Returns the limits from this transformer combined with those of the first transformer in the chain. If the first transformer is dynamic, the lowest common denominator between all possible first transformers are combined.- Overrides:
getLimitsin classAbstractContentTransformerLimits
-
transformInternal
public void transformInternal(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, TransformationOptions options) throws java.lang.ExceptionDeprecated.Description copied from class:AbstractContentTransformer2Method to be implemented by subclasses wishing to make use of the common infrastructural code provided by this class.- Specified by:
transformInternalin classAbstractContentTransformer2- Parameters:
reader- the source of the content to transformwriter- the target to which to write the transformed contentoptions- a map of options to use when performing the transformation. The map will never be null.- Throws:
java.lang.Exception- exceptions will be handled by this class - subclasses can throw anything- See Also:
AbstractContentTransformer2.transformInternal(org.alfresco.service.cmr.repository.ContentReader, org.alfresco.service.cmr.repository.ContentWriter, org.alfresco.service.cmr.repository.TransformationOptions)
-
getIntermediateMimetypes
public java.util.List<java.lang.String> getIntermediateMimetypes()
Deprecated.
-
getIntermediateTransformers
public java.util.List<ContentTransformer> getIntermediateTransformers()
Deprecated.
-
getComments
public java.lang.String getComments(boolean available)
Deprecated.Returns the transformer properties predefined (hard coded or implied) by this transformer.- Specified by:
getCommentsin interfaceContentTransformer- Overrides:
getCommentsin classContentTransformerHelper- Parameters:
available- indicates if the transformer has been registered and is available to be selected.falseindicates that the transformer is only available as a component of a complex transformer.- Returns:
- one line per property. The simple transformer name is returned by default as a comment.
-
-