public class TransformationImpl extends java.lang.Object implements ITransformation
Modifier | Constructor and Description |
---|---|
protected |
TransformationImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
canAsyncTransform(java.lang.String ticket,
java.lang.String sourceMimetype,
java.lang.String targetMimetype)
Returns true if an asynchronous transformer exists for the given mimetypes.
|
java.io.File |
getAsyncTransformedContent(java.lang.String ticket,
java.lang.String fileId)
Verifies the ticket, and then gets the async transformed content with the given FileId.
|
void |
transform(java.lang.String ticket,
java.io.InputStream content,
java.io.OutputStream output,
java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Transforms the given byte[] of content (with the given 'sourceMimeType') into the targetMimeType with the given arguments.
|
java.lang.String |
transformAsync(java.lang.String ticket,
java.io.InputStream content,
java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Transform the content of the byte[] passed in with the sourceMimeType into the targetMimeType.
|
public java.lang.String transformAsync(java.lang.String ticket, java.io.InputStream content, java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)
ITransformation
ITransformation#transform(String, byte[], String, String, TransformationOptions)
method. For proper functionality an asynchronous transformer must be configured for use.transformAsync
in interface ITransformation
public void transform(java.lang.String ticket, java.io.InputStream content, java.io.OutputStream output, java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)
ITransformation
transform
in interface ITransformation
ticket
- A valid OC ticket.content
- A byte[] containing the content to transform.sourceMimetype
- The mimetype of the content that is being transformed.targetMimetype
- The mimetype that the transformed content should be.options
- The TransformationOptions
to use for transforming the content.public java.io.File getAsyncTransformedContent(java.lang.String ticket, java.lang.String fileId)
ITransformation
getAsyncTransformedContent
in interface ITransformation
public boolean canAsyncTransform(java.lang.String ticket, java.lang.String sourceMimetype, java.lang.String targetMimetype)
ITransformation
canAsyncTransform
in interface ITransformation