01: package org.jzonic.jlo.formatter;
02:
03: /**
04: * This is an abstract implementation of the Formatter interface.
05: * It is used to force all other implementations that extends this
06: * one to provide a constructor which takes the configuration name
07: * as argument. The configuration name must be available to every
08: * formatter in order to use the VariableManager.
09: *
10: * @author Andreas Mecky
11: * @author Terry Dye
12: */
13: public abstract class AbstractFormatter implements Formatter {
14:
15: // the current configuration name
16: private String configName;
17:
18: // private so noone can use it
19: private AbstractFormatter() {
20: }
21:
22: /**
23: * This is the one and only constructor.
24: *
25: * @param configName the name of the current configuration
26: * for this Formatter
27: */
28: public AbstractFormatter(String configName) {
29: this .configName = configName;
30: }
31:
32: /**
33: * This method returns the configuration name for
34: * the specific Formatter
35: *
36: * @return the name of the configuration
37: */
38: public String getConfigurationName() {
39: return configName;
40: }
41: }
|