|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.alfresco.repo.content.transform.ContentTransformerHelper
org.alfresco.repo.content.transform.AbstractContentTransformerLimits
org.alfresco.repo.content.transform.AbstractContentTransformer2
org.alfresco.repo.content.transform.FailoverContentTransformer
public class FailoverContentTransformer
This class is a transformer which contains a fixed sequence of delegate transformers. Requests to transform a document will be passed to the first transformer in the sequence. If that transformer successfully transforms the document then the process is complete. However should it fail, the transformation will be passed on to the next transformer in the sequence and so on.
Transformers are considered to have failed of they throw an exception.
| Field Summary |
|---|
| Fields inherited from class org.alfresco.repo.content.transform.AbstractContentTransformerLimits |
|---|
transformerDebug |
| Constructor Summary | |
|---|---|
FailoverContentTransformer()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
Ensures that required properties have been set |
boolean |
isExplicitTransformation(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Default implementation, override if need to extend logic |
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 |
isTransformable(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Deprecated. This method should no longer be called as the overloaded method that calls it has the overridden. |
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. |
| Methods inherited from class org.alfresco.repo.content.transform.AbstractContentTransformer2 |
|---|
checkTransformable, getTransformationTime, recordTime, register, setRegistry, toString, transform, transform, transform |
| Methods inherited from class org.alfresco.repo.content.transform.AbstractContentTransformerLimits |
|---|
getBeanName, getLimits, getLimits, getLimits, getMaxPages, getMaxSourceSizeKBytes, getMimetypeLimits, getPageLimit, getReadLimitKBytes, getReadLimitTimeMs, getTimeoutMs, isPageLimitSupported, isTransformableSize, setBeanName, setLimits, setMaxPages, setMaxSourceSizeKBytes, setMimetypeLimits, setPageLimit, setPageLimitsSuported, setReaderLimits, setReadLimitKBytes, setReadLimitTimeMs, setTimeoutMs, setTransformerDebug |
| Methods inherited from class org.alfresco.repo.content.transform.ContentTransformerHelper |
|---|
getMimetype, getMimetypeService, setExplicitTransformations, setMimetypeService |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FailoverContentTransformer()
| Method Detail |
|---|
public void setTransformers(java.util.List transformers)
transformers - list of transformers.
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exception
public 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 options
ContentTransformer.isTransformable(java.lang.String, long sourceSize, java.lang.String, org.alfresco.service.cmr.repository.TransformationOptions)
public boolean isTransformable(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
isTransformable in interface ContentTransformer
public boolean isExplicitTransformation(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
ContentTransformerHelper
isExplicitTransformation in interface ContentTransformerisExplicitTransformation in class ContentTransformerHelpersourceMimetype - the source mimetypetargetMimetype - the target mimetypeoptions - the transformation options
ContentTransformer.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 java.lang.Exception
AbstractContentTransformer2
transformInternal 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)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||