public class ComplexContentTransformer extends AbstractContentTransformer2 implements org.springframework.beans.factory.InitializingBean
transformerDebug| Constructor and Description |
|---|
ComplexContentTransformer() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Ensures that required properties have been set
|
java.util.List |
getIntermediateMimetypes() |
protected TransformationOptionLimits |
getLimits(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Returns the limits from this transformer combined with those of the first transformer in the chain.
|
protected boolean |
isPageLimitSupported(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Indicates if 'page' limits are supported by the first transformer in the chain.
|
boolean |
isTransformable(java.lang.String sourceMimetype,
long sourceSize,
java.lang.String targetMimetype,
TransformationOptions options)
Indicates whether the provided source mimetype can be transformed into the target mimetype with
the options specified by this content transformer.
|
boolean |
isTransformableMimetype(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Indicates if this transformer is able to transform the given source mimetype
to the target mimetype.
|
void |
setContentService(ContentService contentService)
Sets the ContentService.
|
void |
setIntermediateMimetypes(java.util.List intermediateMimetypes)
Set the intermediate mimetypes that the transformer must take the content
through.
|
void |
setTransformationOptionOverrides(java.util.Map transformationOptionOverrides)
Sets any properties to be set on the TransformationOption as passed in.
|
void |
setTransformers(java.util.List transformers)
The list of transformers to use.
|
void |
transformInternal(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options)
Method to be implemented by subclasses wishing to make use of the common infrastructural code
provided by this class.
|
checkTransformable, getTransformationTime, recordTime, register, setProperties, setRegistry, toString, transform, transform, transformgetBeanName, getLimits, getLimits, getMaxPages, getMaxSourceSizeKBytes, getMaxSourceSizeKBytes, getMimetypeLimits, getPageLimit, getReadLimitKBytes, getReadLimitTimeMs, getTimeoutMs, isTransformable, isTransformableSize, setBeanName, setLimits, setMaxPages, setMaxSourceSizeKBytes, setMimetypeLimits, setPageLimit, setPageLimitsSuported, setReaderLimits, setReadLimitKBytes, setReadLimitTimeMs, setTimeoutMs, setTransformerDebuggetMimetype, getMimetypeService, isExplicitTransformation, isSupportedTransformation, setExplicitTransformations, setMimetypeService, setSupportedTransformationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisExplicitTransformationpublic void setTransformers(java.util.List transformers)
If a single transformer is supplied, then it will still be used.
transformers - list of at least one transformerComplexContentTransformer.setContentService(ContentService)public void setIntermediateMimetypes(java.util.List intermediateMimetypes)
transformers taking part in the
transformation.intermediateMimetypes - intermediate mimetypes to transition the content
through.public void setTransformationOptionOverrides(java.util.Map transformationOptionOverrides)
TransformationOptions are changed, others are ignored.transformationOptionOverrides - public void setContentService(ContentService contentService)
null transformers
are provided to {@link #setTransformers(List).contentService - public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic boolean isTransformable(java.lang.String sourceMimetype,
long sourceSize,
java.lang.String targetMimetype,
TransformationOptions options)
AbstractContentTransformerLimits
Implementation calls the deprecated overloaded method without the sourceSize parameter
and then AbstractContentTransformerLimits.isTransformableSize(String, long, String, TransformationOptions).
isTransformable in interface ContentTransformerisTransformable in class AbstractContentTransformerLimitssourceMimetype - the source mimetypesourceSize - the size (bytes) of the source. If negative it is unknown.targetMimetype - the target mimetypeoptions - the transformation optionspublic boolean isTransformableMimetype(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
AbstractContentTransformerLimitsisTransformableMimetype in interface ContentTransformerisTransformableMimetype in class AbstractContentTransformerLimitssourceMimetype - the source mimetypetargetMimetype - the target mimetypeoptions - the transformation optionsprotected boolean isPageLimitSupported(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
isPageLimitSupported in class AbstractContentTransformerLimitsprotected TransformationOptionLimits getLimits(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)
getLimits in class AbstractContentTransformerLimitspublic void transformInternal(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options)
throws java.lang.Exception
AbstractContentTransformer2transformInternal in class AbstractContentTransformer2reader - 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.java.lang.Exception - exceptions will be handled by this class - subclasses can throw anythingAbstractContentTransformer2.transformInternal(org.alfresco.service.cmr.repository.ContentReader, org.alfresco.service.cmr.repository.ContentWriter, org.alfresco.service.cmr.repository.TransformationOptions)public java.util.List getIntermediateMimetypes()
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.