diff -r 5410b6afc839 -r 245f1b88a3e6 java/sql-dk/src/info/globalcode/sql/dk/configuration/FormatterDefinition.java --- a/java/sql-dk/src/info/globalcode/sql/dk/configuration/FormatterDefinition.java Mon Dec 30 23:46:41 2013 +0100 +++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/FormatterDefinition.java Tue Dec 31 17:35:33 2013 +0100 @@ -34,6 +34,7 @@ private String name; private String className; + private Properties properties = new Properties(); public FormatterDefinition() { } @@ -43,6 +44,11 @@ this.className = className; } + public FormatterDefinition(String name, String className, Properties properties) { + this(name, className); + this.properties = properties; + } + @XmlElement(name = "name", namespace = CONFIGURATION) @Override public String getName() { @@ -72,12 +78,22 @@ this.className = className; } + @XmlElement(name = "property", namespace = CONFIGURATION) + public Properties getProperties() { + return properties; + } + + public void setProperties(Properties properties) { + this.properties = properties; + } + /** * @param context * @return * @throws DKException */ public Formatter getInstance(FormatterContext context) throws FormatterException { + context.getProperties().setDefaults(properties); try { Constructor constructor = Class.forName(className).getConstructor(context.getClass());