play.templates.SafeFormatters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of framework Show documentation
Show all versions of framework Show documentation
RePlay is a fork of the Play1 framework, created by Codeborne.
package play.templates;
import play.templates.types.SafeCSVFormatter;
import play.templates.types.SafeHTMLFormatter;
import play.templates.types.SafeXMLFormatter;
import java.util.HashMap;
import java.util.Map;
public class SafeFormatters {
private final Map safeFormatters = new HashMap<>();
SafeFormatters() {
safeFormatters.put("csv", new SafeCSVFormatter());
safeFormatters.put("html", new SafeHTMLFormatter());
safeFormatters.put("xml", new SafeXMLFormatter());
}
public SafeFormatter get(String extension) {
return safeFormatters.get(extension);
}
}