01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: ImageContentTransformer.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.cmf.transform;
09:
10: import com.uwyn.rife.cmf.dam.exceptions.ContentManagerException;
11: import java.awt.Image;
12: import java.util.Map;
13:
14: /**
15: * This interface defines the API that has to be implemented by classes that
16: * are capable of transforming {@link java.awt.Image image} content data after
17: * it's initially loaded.
18: * <p>The content attributes are provided to the {@link
19: * #transform(Image data, Map attributes) transform} method and can be used to
20: * provide hints for the transformation.
21: *
22: * @author Geert Bevin (gbevin[remove] at uwyn dot com)
23: * @version $Revision: 3634 $
24: * @since 1.0
25: * @see ContentTransformer
26: */
27: public interface ImageContentTransformer extends
28: ContentTransformer<Image> {
29: /**
30: * Transforms the {@link java.awt.Image image} content data and returns
31: * the transformed data as an <code>Image</code>.
32: *
33: * @param data the image that has to be transformed
34: * @param attributes a map of content attributes that can be used to
35: * provide hints or parameters for the transformation
36: * @return the transformed image
37: * @since 1.0
38: */
39: public Image transform(Image data, Map<String, String> attributes)
40: throws ContentManagerException;
41: }
|