com.dotmarketing.portlets.contentlet.business
Interface BinaryContentExporter

All Known Implementing Classes:
ImageFilterExporter, ImageResizeFieldExporter, ImageThumbnailFieldExporter, RawFieldExporter

public interface BinaryContentExporter

A BinaryContentExporter is a class responsible on transform a piece of content field or the entire piece of content on a diferent format. E.G. A exporter that takes an image binary field and resize it to an specific dimension, Or a exporter that takes the entire content and transform it to a Word Document. This is the interface that every content exporter should implement, is responsibility of the exporter to cache the results but also check if the original binary content has change to also refresh the cached transformed object.

Version:
1.9
Author:
David H Torres

Nested Class Summary
static class BinaryContentExporter.BinaryContentExporterData
           
 
Method Summary
 BinaryContentExporter.BinaryContentExporterData exportContent(java.io.File file, java.util.Map<java.lang.String,java.lang.String[]> parameters)
          In this method the exporter operates over the given field of the piece of content to generate a result based on the passed parameters.
 java.lang.String getDescription()
          Retrieves a short description of what the exporter does
 java.lang.String getName()
          Retrieves a human readable name of the exporter
 java.lang.String getPathMapping()
          Returns the path mapping from which this exporter will be triggered
 

Method Detail

exportContent

BinaryContentExporter.BinaryContentExporterData exportContent(java.io.File file,
                                                              java.util.Map<java.lang.String,java.lang.String[]> parameters)
                                                              throws BinaryContentExporterException
In this method the exporter operates over the given field of the piece of content to generate a result based on the passed parameters. The parameter field is optional and for some exporters could apply that is null or ignored because the exporter works over the whole content instead of an specific field, E.G. A exporter to Word Document that converts the whole content in a Word document is a good example

Parameters:
file - - the file that is looking to be exported
field - The field of the content over the exporter is going to operate
parameters -
Returns:
Throws:
BinaryContentExporterException - In case an error as occurred when exporting, either because bad parameters or invalid data

getName

java.lang.String getName()
Retrieves a human readable name of the exporter

Returns:

getDescription

java.lang.String getDescription()
Retrieves a short description of what the exporter does

Returns:

getPathMapping

java.lang.String getPathMapping()
Returns the path mapping from which this exporter will be triggered

Returns:


Copyright © 2013 dotCMS Inc. All Rights Reserved.