@AlfrescoPublicApi public class FailoverContentTransformer extends AbstractContentTransformer2 implements org.springframework.beans.factory.InitializingBean
transformerDebugtransformerConfig| Constructor and Description |
|---|
FailoverContentTransformer() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Ensures that required properties have been set
|
String |
getComments(boolean available)
Returns the transformer properties predefined (hard coded or implied) by this transformer.
|
boolean |
isExplicitTransformation(String sourceMimetype,
String targetMimetype,
TransformationOptions options) |
boolean |
isTransformable(String sourceMimetype,
long sourceSize,
String targetMimetype,
TransformationOptions options)
Overrides super class method to avoid calling
isTransformableMimetype(String, String, TransformationOptions)
twice on each transformer in the list, as
isTransformableSize(String, long, String, TransformationOptions)
in this class must check the mimetype too. |
boolean |
isTransformableMimetype(String sourceMimetype,
String targetMimetype,
TransformationOptions options)
Indicates if this transformer is able to transform the given source mimetype
to the target mimetype.
|
boolean |
isTransformableSize(String sourceMimetype,
long sourceSize,
String targetMimetype,
TransformationOptions options)
Indicates if this transformer is able to transform the given
sourceSize. |
void |
setTransformers(List<ContentTransformer> 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, getExecutorService, getRetryTransformOnDifferentMimeType, getStrictMimeTypeCheck, getTransformationTime, getTransformationTime, isTransformationLimitedInternally, recordError, recordTime, recordTime, register, setAdditionalThreadTimout, setExecutorService, setRegisterTransformer, setRegistry, setRetryTransformOnDifferentMimeType, setStrictMimeTypeCheck, setUseTimeoutThread, toString, transform, transform, transformgetLimits, getLimits, getLimits, getMaxPages, getMaxSourceSizeKBytes, getMaxSourceSizeKBytes, getPageLimit, getReadLimitKBytes, getReadLimitTimeMs, getTimeoutMs, isPageLimitSupported, isTransformable, setLimits, setMaxPages, setMaxSourceSizeKBytes, setMimetypeLimits, setPageLimit, setPageLimitsSupported, setReaderLimits, setReadLimitKBytes, setReadLimitTimeMs, setTimeoutMs, setTransformerDebugdeprecatedSetter, equals, getBeanName, getCommentsOnlySupports, getExtensionOrAny, getMimetype, getMimetypeService, getName, getSimpleName, hashCode, isSupportedTransformation, onlySupports, setBeanName, setExplicitTransformations, setMimetypeService, setSupportedTransformations, setTransformerConfig, setUnsupportedTransformationsclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetNamepublic void setTransformers(List<ContentTransformer> transformers)
transformers - list of transformers.public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic boolean isTransformable(String sourceMimetype, long sourceSize, String targetMimetype, TransformationOptions options)
isTransformableMimetype(String, String, TransformationOptions)
twice on each transformer in the list, as
isTransformableSize(String, long, String, TransformationOptions)
in this class must check the mimetype too.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(String sourceMimetype, String targetMimetype, TransformationOptions options)
AbstractContentTransformerLimitsContentTransformerHelper.getComments(boolean).isTransformableMimetype in interface ContentTransformerisTransformableMimetype in class AbstractContentTransformerLimitssourceMimetype - the source mimetypetargetMimetype - the target mimetypeoptions - the transformation optionspublic boolean isTransformableSize(String sourceMimetype, long sourceSize, String targetMimetype, TransformationOptions options)
AbstractContentTransformerLimitssourceSize.
The maxSourceSizeKBytes property may indicate that only small source files
may be transformed.isTransformableSize in interface ContentTransformerisTransformableSize in class AbstractContentTransformerLimitssourceMimetype - the source mimetypesourceSize - size in bytes of the source. If negative, the source size is unknown.targetMimetype - the target mimetypeoptions - the transformation optionstrue if the source is transformable.public boolean isExplicitTransformation(String sourceMimetype, String targetMimetype, TransformationOptions options)
isExplicitTransformation in interface ContentTransformerisExplicitTransformation in class ContentTransformerHelpersourceMimetype - the source mimetypetargetMimetype - the target mimetypeoptions - the transformation optionsContentTransformer.isExplicitTransformation(java.lang.String,
java.lang.String, org.alfresco.service.cmr.repository.TransformationOptions)public void transformInternal(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
TransformationOptions options)
throws 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.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 String getComments(boolean available)
getComments in interface ContentTransformergetComments in class ContentTransformerHelperavailable - indicates if the transformer has been registered and is available to be selected.
false indicates that the transformer is only available as a component of a
complex transformer.Copyright © 2005–2018 Alfresco Software. All rights reserved.