public interface ContentTransformer extends ContentWorker
| Modifier and Type | Method and Description |
|---|---|
long |
getMaxSourceSizeKBytes(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Returns the maximum source size (in KBytes) allowed given the supplied values.
|
long |
getTransformationTime()
Provides an estimate, usually a worst case guess, of how long a transformation
will take.
|
boolean |
isExplicitTransformation(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Indicates whether given the provided transformation parmaters this transformer can prvide an explict
transformation.
|
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.
use version with extra sourceSize parameter.
|
boolean |
isTransformableMimetype(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
Sub component of {@link #isTransformable(String, long, String, TransformationOptions)
that checks just the mimetypes.
|
boolean |
isTransformableSize(java.lang.String sourceMimetype,
long sourceSize,
java.lang.String targetMimetype,
TransformationOptions options)
Sub component of {@link #isTransformable(String, long, String, TransformationOptions)
that checks just the size limits.
|
void |
transform(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer) |
void |
transform(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
java.util.Map options)
Deprecated.
Deprecated since 3.0. Options should now be provided as a TransformationOptions object.
|
void |
transform(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter contentWriter,
TransformationOptions options)
Transforms the content provided by the reader and source mimetype
to the writer and target mimetype with the provided transformation options.
|
boolean isTransformable(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
boolean isTransformable(java.lang.String sourceMimetype,
long sourceSize,
java.lang.String targetMimetype,
TransformationOptions options)
sourceMimetype - the source mimetypesourceSize - the size (bytes) of the source. If negative it is unknown.targetMimetype - the target mimetypeoptions - the transformation optionsboolean isTransformableMimetype(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
sourceMimetype - the source mimetypetargetMimetype - the target mimetypeoptions - the transformation optionsboolean isTransformableSize(java.lang.String sourceMimetype,
long sourceSize,
java.lang.String targetMimetype,
TransformationOptions options)
sourceMimetype - the source mimetypesourceSize - the size (bytes) of the source. If negative it is unknown.targetMimetype - the target mimetypeoptions - the transformation optionslong getMaxSourceSizeKBytes(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
boolean isExplicitTransformation(java.lang.String sourceMimetype,
java.lang.String targetMimetype,
TransformationOptions options)
sourceMimetype - the source mimetypetargetMimetype - the target mimetypeoptions - the transformation optionslong getTransformationTime()
This method is used to determine, up front, which of a set of equally reliant transformers will be used for a specific transformation.
void transform(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer)
throws org.alfresco.service.cmr.repository.ContentIOException
org.alfresco.service.cmr.repository.ContentIOExceptionContentTransformer.transform(ContentReader, ContentWriter, TransformationOptions)@Deprecated
void transform(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter writer,
java.util.Map options)
throws org.alfresco.service.cmr.repository.ContentIOException
The transformation viability can be determined by an up front call
to #getReliability(String, String).
The source and target mimetypes must be available on the
ContentAccessor.getMimetype() methods of
both the reader and the writer.
Both reader and writer will be closed after the transformation completes.
reader - the source of the contentwriter - the destination of the transformed contentoptions - options to pass to the transformer. These are transformer dependent
and may be null.org.alfresco.service.cmr.repository.ContentIOException - if an IO exception occursvoid transform(org.alfresco.service.cmr.repository.ContentReader reader,
org.alfresco.service.cmr.repository.ContentWriter contentWriter,
TransformationOptions options)
throws org.alfresco.service.cmr.repository.ContentIOException
The transformation viability can be determined by an up front call
to ContentTransformer.isTransformable(String, String, TransformationOptions).
The source and target mimetypes must be available on the
ContentAccessor.getMimetype() methods of
both the reader and the writer.
Both reader and writer will be closed after the transformation completes.
The provided options can be null.
reader - the source of the contentcontentWriter - the destination of the transformed contentoptions - transformation options, these can be nullorg.alfresco.service.cmr.repository.ContentIOException - if an IO exception occursCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.