com.day.cq.dam.commons.handler
Class SimpleContext

java.lang.Object
  extended by com.day.cq.dam.commons.handler.SimpleContext
All Implemented Interfaces:
Context

public class SimpleContext
extends Object
implements Context

Simple context that remembers all metadata and thumbnail images found.

Author:
dpfister

Constructor Summary
SimpleContext()
           
 
Method Summary
 void addException(ProcessorException e)
          Add an exception that occurred while processing an asset.
 void addMetadata(InputStream meta)
          Add metadata.
 void addThumbnail(BufferedImage image)
          Add thumbnail image.
 ProcessorException[] getExceptions()
          Return all exceptions found during processing.
 InputStream[] getMetadata()
          Return all metadata found, as an array.
 BufferedImage[] getThumbnails()
          Return all images found, as an array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleContext

public SimpleContext()
Method Detail

getMetadata

public InputStream[] getMetadata()
Return all metadata found, as an array.

Returns:
metadata or null

getThumbnails

public BufferedImage[] getThumbnails()
Return all images found, as an array.

Returns:
images or null

getExceptions

public ProcessorException[] getExceptions()
Return all exceptions found during processing.

Returns:
exceptions or null

addException

public void addException(ProcessorException e)
Add an exception that occurred while processing an asset.

Specified by:
addException in interface Context
Parameters:
e - exception to add

addMetadata

public void addMetadata(InputStream meta)
Add metadata.

Specified by:
addMetadata in interface Context
Parameters:
meta - metadata

addThumbnail

public void addThumbnail(BufferedImage image)
Add thumbnail image.

Specified by:
addThumbnail in interface Context
Parameters:
image - buffered image


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.