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: TextContentTransformer.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.util.Map;
12:
13: /**
14: * This interface defines the API that has to be implemented by classes that
15: * are capable of transforming {@link java.lang.String text} content data
16: * after it's initially loaded.
17: * <p>The content attributes are provided to the {@link
18: * #transform(String data, Map attributes) transform} method and can be used
19: * to provide hints for the transformation.
20: *
21: * @author Geert Bevin (gbevin[remove] at uwyn dot com)
22: * @version $Revision: 3634 $
23: * @since 1.0
24: * @see ContentTransformer
25: */
26: public interface TextContentTransformer extends
27: ContentTransformer<String> {
28: /**
29: * Transforms the {@link java.lang.String text} content data and returns
30: * the transformed data as text.
31: *
32: * @param data the text that has to be transformed
33: * @param attributes a map of content attributes that can be used to
34: * provide hints or parameters for the transformation
35: * @return the transformed text
36: * @since 1.0
37: */
38: public String transform(String data, Map<String, String> attributes)
39: throws ContentManagerException;
40: }
|