Interface ContentTransformer
-
- All Superinterfaces:
ContentWorker
- All Known Implementing Classes:
AbstractContentTransformer,AbstractContentTransformer2,AbstractContentTransformerLimits,AbstractRemoteContentTransformer,AppleIWorksContentTransformer,ArchiveContentTransformer,BinaryPassThroughContentTransformer,ComplexContentTransformer,EMLTransformer,FailoverContentTransformer,HtmlParserContentTransformer,MailContentTransformer,MediaWikiContentTransformer,OOXMLThumbnailContentTransformer,PdfBoxContentTransformer,PoiContentTransformer,PoiHssfContentTransformer,PoiOOXMLContentTransformer,ProxyContentTransformer,StringExtractingContentTransformer,TextMiningContentTransformer,TextToPdfContentTransformer,TikaAutoContentTransformer,TikaPoweredContentTransformer,TikaSpringConfiguredContentTransformer
@Deprecated @AlfrescoPublicApi public interface ContentTransformer extends ContentWorker
Deprecated.The RenditionService is being replace by the simpler async RenditionService2.Interface for class that allow content transformation from one mimetype to another.- Author:
- Derek Hulley
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.StringgetComments(boolean available)Deprecated.Overridden to supply a comment or String of commented out transformation properties that specify any (hard coded or implied) supported transformations.longgetMaxSourceSizeKBytes(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Returns the maximum source size (in KBytes) allowed given the supplied values.java.lang.StringgetName()Deprecated.Returns transformer's name used in configuration.longgetTransformationTime()Deprecated.use mimetype specific version.longgetTransformationTime(java.lang.String sourceMimetype, java.lang.String targetMimetype)Deprecated.Provides an estimate, usually a worst case guess, of how long a transformation will take.booleanisExplicitTransformation(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Use transformer priority and unsupported transformer properties.booleanisTransformable(java.lang.String sourceMimetype, long sourceSize, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Indicates whether the provided source mimetype can be transformed into the target mimetype with the options specified by this content transformer.booleanisTransformable(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.use version with extra sourceSize parameter.booleanisTransformableMimetype(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Sub component ofisTransformable(String, long, String, TransformationOptions)that checks just the mimetypes.booleanisTransformableSize(java.lang.String sourceMimetype, long sourceSize, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Sub component ofisTransformable(String, long, String, TransformationOptions)that checks just the size limits.voidtransform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer)Deprecated.Deprecated use {linktransform(ContentReader, ContentWriter, TransformationOptions).voidtransform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, java.util.Map<java.lang.String,java.lang.Object> options)Deprecated.Deprecated since 3.0.voidtransform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter contentWriter, TransformationOptions options)Deprecated.Transforms the content provided by the reader and source mimetype to the writer and target mimetype with the provided transformation options.
-
-
-
Method Detail
-
isTransformable
boolean isTransformable(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.use version with extra sourceSize parameter.
-
isTransformable
boolean isTransformable(java.lang.String sourceMimetype, long sourceSize, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Indicates whether the provided source mimetype can be transformed into the target mimetype with the options specified by this content transformer.- Parameters:
sourceMimetype- the source mimetypesourceSize- the size (bytes) of the source. If negative it is unknown.targetMimetype- the target mimetypeoptions- the transformation options- Returns:
- boolean true if this content transformer can satify the mimetypes and options specified, false otherwise
-
isTransformableMimetype
boolean isTransformableMimetype(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Sub component ofisTransformable(String, long, String, TransformationOptions)that checks just the mimetypes.- Parameters:
sourceMimetype- the source mimetypetargetMimetype- the target mimetypeoptions- the transformation options- Returns:
- boolean true if this content transformer can satify the mimetypes, false otherwise
-
isTransformableSize
boolean isTransformableSize(java.lang.String sourceMimetype, long sourceSize, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Sub component ofisTransformable(String, long, String, TransformationOptions)that checks just the size limits.- Parameters:
sourceMimetype- the source mimetypesourceSize- the size (bytes) of the source. If negative it is unknown.targetMimetype- the target mimetypeoptions- the transformation options- Returns:
- boolean true if this content transformer can satify the mimetypes, false otherwise
-
getComments
java.lang.String getComments(boolean available)
Deprecated.Overridden to supply a comment or String of commented out transformation properties that specify any (hard coded or implied) supported transformations. Used when providing a list of properties to an administrators who may be setting other transformation properties, via JMX. Consider overriding if {linkAbstractContentTransformerLimits.isTransformableMimetype(String, String, TransformationOptions)orContentTransformerWorker.isTransformable(String, String, TransformationOptions)have been overridden.- Parameters:
available- indicates if the transformer has been registered and is available to be selected.falseindicates that the transformer is only available as a component of a complex transformer.- Returns:
- one line per property. The simple transformer name is returned by default as a comment.
-
getMaxSourceSizeKBytes
long getMaxSourceSizeKBytes(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Returns the maximum source size (in KBytes) allowed given the supplied values.- Returns:
- 0 if the the transformation is disabled, -1 if there is no limit, otherwise the size in KBytes.
-
isExplicitTransformation
boolean isExplicitTransformation(java.lang.String sourceMimetype, java.lang.String targetMimetype, TransformationOptions options)Deprecated.Use transformer priority and unsupported transformer properties. Indicates whether given the provided transformation parameters this transformer can provide an explicit transformation. An explicit transformation indicates that the transformation happens directly and not as a result of another transformation process. Explicit transformation always take presidency over normal transformations.- Parameters:
sourceMimetype- the source mimetypetargetMimetype- the target mimetypeoptions- the transformation options- Returns:
- boolean true if it is an explicit transformation, false otherwise
-
getTransformationTime
long getTransformationTime()
Deprecated.use mimetype specific version.
-
getTransformationTime
long getTransformationTime(java.lang.String sourceMimetype, java.lang.String targetMimetype)Deprecated.Provides an estimate, usually a worst case guess, of how long a transformation will take. Null mimetype values provide the overall value for the transformer.This method is used to determine, up front, which of a set of equally reliant transformers will be used for a specific transformation.
- Parameters:
sourceMimetype- the source mimetypetargetMimetype- the target mimetype- Returns:
- Returns the approximate number of milliseconds per transformation
-
transform
void transform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer) throws org.alfresco.service.cmr.repository.ContentIOExceptionDeprecated.Deprecated use {linktransform(ContentReader, ContentWriter, TransformationOptions).- Throws:
org.alfresco.service.cmr.repository.ContentIOException- See Also:
transform(ContentReader, ContentWriter, TransformationOptions)
-
transform
@Deprecated void transform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter writer, java.util.Map<java.lang.String,java.lang.Object> options) throws org.alfresco.service.cmr.repository.ContentIOExceptionDeprecated.Deprecated since 3.0. Options should now be provided as a TransformationOptions object.Transforms the content provided by the reader and source mimetype to the writer and target mimetype.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.
- Parameters:
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.- Throws:
org.alfresco.service.cmr.repository.ContentIOException- if an IO exception occurs
-
transform
void transform(org.alfresco.service.cmr.repository.ContentReader reader, org.alfresco.service.cmr.repository.ContentWriter contentWriter, TransformationOptions options) throws org.alfresco.service.cmr.repository.ContentIOExceptionDeprecated.Transforms the content provided by the reader and source mimetype to the writer and target mimetype with the provided transformation options.The transformation viability can be determined by an up front call to
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.
- Parameters:
reader- the source of the contentcontentWriter- the destination of the transformed contentoptions- transformation options, these can be null- Throws:
org.alfresco.service.cmr.repository.ContentIOException- if an IO exception occurs
-
getName
java.lang.String getName()
Deprecated.Returns transformer's name used in configuration.
-
-