org.mmbase.util.transformers
Class ConfigurableStringTransformer

java.lang.Object
  extended byorg.mmbase.util.transformers.StringTransformer
      extended byorg.mmbase.util.transformers.ConfigurableStringTransformer
All Implemented Interfaces:
CharTransformer, ConfigurableTransformer, Serializable, Transformer
Direct Known Subclasses:
Url, Xml, XmlField

public abstract class ConfigurableStringTransformer
extends StringTransformer
implements ConfigurableTransformer

Some Transformers implement more than one transformation. The instance can be configured.

Since:
MMBase-1.7
Author:
Michiel Meeuwissen
See Also:
Serialized Form

Field Summary
protected  int to
           
 
Constructor Summary
ConfigurableStringTransformer()
           
ConfigurableStringTransformer(int conf)
           
 
Method Summary
 void configure(int t)
          If a transformer can handle more then one destination format, it can be configured with this.
abstract  String getEncoding()
          Returns the encoding that is currently active
 String toString()
           
abstract  Map transformers()
          Returns which transformations can be done by an object of this class.
 
Methods inherited from class org.mmbase.util.transformers.StringTransformer
transform, transform, transform, transformBack, transformBack, transformBack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

to

protected int to
Constructor Detail

ConfigurableStringTransformer

public ConfigurableStringTransformer()

ConfigurableStringTransformer

public ConfigurableStringTransformer(int conf)
Method Detail

configure

public void configure(int t)
Description copied from interface: ConfigurableTransformer
If a transformer can handle more then one destination format, it can be configured with this. There must be a default, since to can be null.

Specified by:
configure in interface ConfigurableTransformer

transformers

public abstract Map transformers()
Description copied from interface: ConfigurableTransformer
Returns which transformations can be done by an object of this class.

Specified by:
transformers in interface ConfigurableTransformer
Returns:
A Map with String Integer/Class pairs.

getEncoding

public abstract String getEncoding()
Description copied from interface: ConfigurableTransformer
Returns the encoding that is currently active

Specified by:
getEncoding in interface ConfigurableTransformer
Returns:
An String representing the coding that is currently used.

toString

public String toString()
Specified by:
toString in interface Transformer


MMBase build 1.8.1.20060716