Package org.alfresco.repo.rendition2
Class SwitchingTransformClient
java.lang.Object
org.alfresco.repo.rendition2.SwitchingTransformClient
- All Implemented Interfaces:
TransformClient
A transform client that falls back between different implementations if not supported.
- Author:
- adavis
-
Constructor Summary
ConstructorsConstructorDescriptionSwitchingTransformClient(TransformClient primary, TransformClient secondary) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckSupported(NodeRef sourceNodeRef, RenditionDefinition2 renditionDefinition, String sourceMimetype, long sourceSizeInBytes, String contentUrl) Checks the transformation required for the rendition is supported.voidtransform(NodeRef sourceNodeRef, RenditionDefinition2 renditionDefinition, String user, int sourceContentHashCode) Requests an asynchronous transform and the subsequent linkage of that transform as a rendition.
-
Constructor Details
-
SwitchingTransformClient
-
-
Method Details
-
checkSupported
public void checkSupported(NodeRef sourceNodeRef, RenditionDefinition2 renditionDefinition, String sourceMimetype, long sourceSizeInBytes, String contentUrl) Description copied from interface:TransformClientChecks the transformation required for the rendition is supported.- Specified by:
checkSupportedin interfaceTransformClient- Parameters:
sourceNodeRef- the source noderenditionDefinition- which rendition to performsourceMimetype- the mometype of the sourcesourceSizeInBytes- the size in bytes of the sourcecontentUrl- the url of the source (used in debug).
-
transform
public void transform(NodeRef sourceNodeRef, RenditionDefinition2 renditionDefinition, String user, int sourceContentHashCode) Description copied from interface:TransformClientRequests an asynchronous transform and the subsequent linkage of that transform as a rendition. The call to this method MUST be proceeded by a successful call toTransformClient.checkSupported(NodeRef, RenditionDefinition2, String, long, String)in the SAME Thread.- Specified by:
transformin interfaceTransformClient- Parameters:
sourceNodeRef- the source noderenditionDefinition- which rendition to performuser- that requested the transform.sourceContentHashCode- the hash code of the source node's content URL. Used to check the transform result
-