Package org.alfresco.repo.rendition2
Interface TransformClient
- All Known Implementing Classes:
LocalTransformClient,SwitchingTransformClient
public interface TransformClient
Request asynchronous transforms and rendition transforms.
- Author:
- adavis
-
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.
-
Method Details
-
checkSupported
void checkSupported(NodeRef sourceNodeRef, RenditionDefinition2 renditionDefinition, String sourceMimetype, long sourceSizeInBytes, String contentUrl) Checks the transformation required for the rendition is supported.- 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).- Throws:
UnsupportedOperationException- if the transform is not supported.
-
transform
void transform(NodeRef sourceNodeRef, RenditionDefinition2 renditionDefinition, String user, int sourceContentHashCode) throws UnsupportedTransformationException, ContentIOException Requests 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 tocheckSupported(NodeRef, RenditionDefinition2, String, long, String)in the SAME Thread.- 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- Throws:
UnsupportedTransformationException- if there is an unexpected failure to transform, normally in a pipeline, where an intermediate transform may not be performed after all because an intermediate conversion is too big.ContentIOException- there is an unexpected communication or transformation failure.
-