Class AbstractImageOperation
- java.lang.Object
-
- org.hippoecm.frontend.plugins.gallery.imageutil.AbstractImageOperation
-
- All Implemented Interfaces:
ImageOperation
- Direct Known Subclasses:
AbstractScaleImageOperation
public abstract class AbstractImageOperation extends Object implements ImageOperation
-
-
Constructor Summary
Constructors Constructor Description AbstractImageOperation()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
execute(InputStream data, String mimeType)
Deprecated.Userun(InputStream, String)
insteadabstract void
execute(InputStream data, ImageReader reader, ImageWriter writer)
Executes a concrete image operation.protected ImageOperationResult
getResult()
ImageOperationResult
run(InputStream data, String mimeType)
Runs an image operation and returns the result.protected void
setResult(InputStream data, int width, int height)
-
-
-
Method Detail
-
execute
@Deprecated public void execute(InputStream data, String mimeType) throws GalleryException
Deprecated.Userun(InputStream, String)
insteadExecutes an image operation.- Throws:
GalleryException
-
run
public ImageOperationResult run(InputStream data, String mimeType) throws GalleryException
Description copied from interface:ImageOperation
Runs an image operation and returns the result.- Specified by:
run
in interfaceImageOperation
- Parameters:
data
- the image data. The stream is closed by this method.mimeType
- MIME type of the image- Throws:
GalleryException
- when the image operation fails
-
setResult
protected void setResult(InputStream data, int width, int height)
-
getResult
protected ImageOperationResult getResult()
-
execute
public abstract void execute(InputStream data, ImageReader reader, ImageWriter writer) throws IOException
Executes a concrete image operation.- Parameters:
data
- the image data. Closing the stream is the responsibility of the caller (i.e. this class).reader
- reader for the image datawriter
- writer for the image data- Throws:
IOException
- when the image operation fails
-
-