org.broadleafcommerce.openadmin.server.service.artifact.image
Class ImageArtifactProcessor

java.lang.Object
  extended by org.broadleafcommerce.openadmin.server.service.artifact.image.ImageArtifactProcessor
All Implemented Interfaces:
ArtifactProcessor

@Service(value="blImageArtifactProcessor")
public class ImageArtifactProcessor
extends Object
implements ArtifactProcessor

Created by IntelliJ IDEA. User: jfischer Date: 9/10/11 Time: 11:58 AM To change this template use File | Settings | File Templates.


Field Summary
protected  float compressionQuality
           
protected  EffectsManager effectsManager
           
protected  String[] supportedUploadTypes
           
 
Constructor Summary
ImageArtifactProcessor()
           
 
Method Summary
 Operation[] buildOperations(Map<String,String> parameterMap, InputStream artifactStream, String mimeType)
           
 InputStream convert(InputStream artifactStream, Operation[] operations, String mimeType)
           
 float getCompressionQuality()
           
 ImageMetadata getImageMetadata(InputStream artifactStream)
           
 String[] getSupportedUploadTypes()
           
 boolean isSupported(InputStream artifactStream, String filename)
           
 void setCompressionQuality(float compressionQuality)
           
 void setSupportedUploadTypes(String[] supportedUploadTypes)
           
protected  BufferedImage stripAlpha(BufferedImage image)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

effectsManager

protected EffectsManager effectsManager

supportedUploadTypes

protected String[] supportedUploadTypes

compressionQuality

protected float compressionQuality
Constructor Detail

ImageArtifactProcessor

public ImageArtifactProcessor()
Method Detail

isSupported

public boolean isSupported(InputStream artifactStream,
                           String filename)
Specified by:
isSupported in interface ArtifactProcessor

buildOperations

public Operation[] buildOperations(Map<String,String> parameterMap,
                                   InputStream artifactStream,
                                   String mimeType)
Specified by:
buildOperations in interface ArtifactProcessor

getImageMetadata

public ImageMetadata getImageMetadata(InputStream artifactStream)
                               throws Exception
Throws:
Exception

convert

public InputStream convert(InputStream artifactStream,
                           Operation[] operations,
                           String mimeType)
                    throws Exception
Specified by:
convert in interface ArtifactProcessor
Throws:
Exception

stripAlpha

protected BufferedImage stripAlpha(BufferedImage image)

getSupportedUploadTypes

public String[] getSupportedUploadTypes()

setSupportedUploadTypes

public void setSupportedUploadTypes(String[] supportedUploadTypes)

getCompressionQuality

public float getCompressionQuality()

setCompressionQuality

public void setCompressionQuality(float compressionQuality)


Copyright © 2013. All Rights Reserved.