diff options
Diffstat (limited to 'java/src/main/java/org/pablotron/luigi/Template.java')
-rw-r--r-- | java/src/main/java/org/pablotron/luigi/Template.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/java/src/main/java/org/pablotron/luigi/Template.java b/java/src/main/java/org/pablotron/luigi/Template.java index 9af3a74..e5f25a9 100644 --- a/java/src/main/java/org/pablotron/luigi/Template.java +++ b/java/src/main/java/org/pablotron/luigi/Template.java @@ -47,4 +47,38 @@ public final class Template { public String toString() { return this.template; } + + public static String run( + final String template, + final Map<String, String> args + ) throws LuigiError { + return Template.run(template, args, Filter.FILTERS); + } + + public static void run( + final String template, + final Map<String, String> args, + final ResultHandler r + ) throws LuigiError { + run(template, args, Filter.FILTERS, r); + } + + public static String run( + final String template, + final Map<String, String> args, + final Map<String, Filter.Handler> filters + ) throws LuigiError { + final Template t = new Template(template, filters); + return t.run(args); + } + + public static void run( + final String template, + final Map<String, String> args, + final Map<String, Filter.Handler> filters, + final ResultHandler r + ) throws LuigiError { + final Template t = new Template(template, filters); + t.run(args, r); + } }; |