01: /*
02:
03: This software is OSI Certified Open Source Software.
04: OSI Certified is a certification mark of the Open Source Initiative.
05:
06: The license (Mozilla version 1.0) can be read at the MMBase site.
07: See http://www.MMBase.org/license
08:
09: */
10: package org.mmbase.util.transformers;
11:
12: import java.util.Map;
13:
14: /**
15: * Interface for transformations. The 'configurable' version can be configured with an integer, so
16: * the transformer can work in a limited number of ways. This is to avoid a wild growth of class,
17: * because you can influence the behaviour a bit by such a setting.
18: *
19: * @author Michiel Meeuwissen
20: * @since MMBase-1.7
21: */
22:
23: public interface ConfigurableTransformer extends Transformer {
24:
25: /**
26: * If a transformer can handle more then one destination
27: * format, it can be configured with this.
28: *
29: * There must be a default, since <code>to</code> can be null.
30: */
31:
32: void configure(int to);
33:
34: /**
35: * Returns which transformations can be done by an object of this class.
36: *
37: * @return A Map with String Integer/Class pairs.
38: */
39: Map<String, Config> transformers();
40:
41: /**
42: * Returns the encoding that is currently active
43: *
44: * @return An String representing the coding that is currently used.
45: */
46: String getEncoding();
47:
48: }
|