info.magnolia.imaging.operations
Class ImageOperationChain<P extends ParameterProvider<?>>

java.lang.Object
  extended by info.magnolia.imaging.operations.ImageOperationChain<P>
Type Parameters:
P - type of ParameterProvider
All Implemented Interfaces:
ImageGenerator<P>, ImageOperation<P>

public class ImageOperationChain<P extends ParameterProvider<?>>
extends Object
implements ImageOperation<P>, ImageGenerator<P>

An implementation of ImageOperation and ImageGenerator which delegates to a list of other ImageOperation instances.

Version:
$Id$

Constructor Summary
ImageOperationChain()
           
 
Method Summary
 void addOperation(ImageOperation<P> operation)
           
 BufferedImage apply(BufferedImage source, P params)
           
 BufferedImage generate(P params)
           
 String getName()
           
 List<ImageOperation<P>> getOperations()
           
 OutputFormat getOutputFormat()
           
 OutputFormat getOutputFormat(P params)
          Returns the static output format as configured with c2b by delegating to getOutputFormat().
 ParameterProviderFactory getParameterProviderFactory()
           
 void setName(String name)
           
 void setOperations(List<ImageOperation<P>> operations)
           
 void setOutputFormat(OutputFormat outputFormat)
           
 void setParameterProviderFactory(ParameterProviderFactory parameterProviderFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageOperationChain

public ImageOperationChain()
Method Detail

generate

public BufferedImage generate(P params)
                       throws ImagingException
Specified by:
generate in interface ImageGenerator<P extends ParameterProvider<?>>
Throws:
ImagingException

apply

public BufferedImage apply(BufferedImage source,
                           P params)
                    throws ImagingException
Specified by:
apply in interface ImageOperation<P extends ParameterProvider<?>>
Throws:
ImagingException

getName

public String getName()
Specified by:
getName in interface ImageGenerator<P extends ParameterProvider<?>>

setName

public void setName(String name)

getParameterProviderFactory

public ParameterProviderFactory getParameterProviderFactory()
Specified by:
getParameterProviderFactory in interface ImageGenerator<P extends ParameterProvider<?>>

setParameterProviderFactory

public void setParameterProviderFactory(ParameterProviderFactory parameterProviderFactory)

getOutputFormat

public OutputFormat getOutputFormat()

getOutputFormat

public OutputFormat getOutputFormat(P params)
Returns the static output format as configured with c2b by delegating to getOutputFormat().

Specified by:
getOutputFormat in interface ImageGenerator<P extends ParameterProvider<?>>

setOutputFormat

public void setOutputFormat(OutputFormat outputFormat)

getOperations

public List<ImageOperation<P>> getOperations()

setOperations

public void setOperations(List<ImageOperation<P>> operations)

addOperation

public void addOperation(ImageOperation<P> operation)


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.