All Downloads are FREE. Search and download functionalities are using the official Maven repository.

play.templates.SafeFormatters Maven / Gradle / Ivy

There is a newer version: 2.6.2
Show newest version
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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy