--- a/java/sql-dk/src/info/globalcode/sql/dk/configuration/Configuration.java Fri Dec 27 16:54:10 2013 +0100
+++ b/java/sql-dk/src/info/globalcode/sql/dk/configuration/Configuration.java Fri Dec 27 17:40:27 2013 +0100
@@ -80,6 +80,11 @@
}
}
+ /**
+ * @return only configured formatters
+ * @see #getBuildInFormatters()
+ * @see #getAllFormatters()
+ */
@XmlElement(name = "formatter", namespace = CONFIGURATION)
public List<FormatterDefinition> getFormatters() {
return formatters;
@@ -110,12 +115,29 @@
}
}
+ /**
+ * @return only built-in formatters
+ * @see #getAllFormatters()
+ * @see #getFormatters()
+ */
@XmlTransient
public Collection<FormatterDefinition> getBuildInFormatters() {
return buildInFormatters;
}
/**
+ * @return built-in + configured formatters
+ * @see #getFormatters()
+ */
+ @XmlTransient
+ public Collection<FormatterDefinition> getAllFormatters() {
+ Collection<FormatterDefinition> allFormatters = new ArrayList<>();
+ allFormatters.addAll(buildInFormatters);
+ allFormatters.addAll(formatters);
+ return allFormatters;
+ }
+
+ /**
* @return name of default formatter, is used if name is not specified on CLI
*/
@XmlElement(name = "defaultFormatter", namespace = CONFIGURATION)