|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContentTransformer
Interface for class that allow content transformation from one mimetype to another.
Method Summary | |
---|---|
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,
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. |
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. |
Method Detail |
---|
boolean isTransformable(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)
sourceMimetype
- the source mimetypedestinationMimetype
- the destination mimetypeoptions
- the transformation options
boolean isExplicitTransformation(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)
sourceMimetype
- the source mimetypetargetMimetype
- the target mimetypeoptions
- the transformation options
long 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.ContentIOException
ContentTransformer.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 null
org.alfresco.service.cmr.repository.ContentIOException
- if an IO exception occurs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |