Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/FunctionResolver.java @ 5432:d0f5bc8064f1
pass BuildHelper to Function Resolver.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Tue, 26 Mar 2013 16:24:07 +0100 |
parents | ba489a16f4d8 |
children | df32d7518f55 |
comparison
equal
deleted
inserted
replaced
5431:2fe120e1e4df | 5432:d0f5bc8064f1 |
---|---|
40 } // class Entry | 40 } // class Entry |
41 | 41 |
42 /** List of functions. */ | 42 /** List of functions. */ |
43 protected List<Entry> functions; | 43 protected List<Entry> functions; |
44 | 44 |
45 public static final FunctionResolver FUNCTIONS = new FunctionResolver(); | 45 protected Builder.BuildHelper buildHelper; |
46 | 46 |
47 | 47 |
48 public FunctionResolver() { | 48 public FunctionResolver() { |
49 this(null); | |
50 } | |
51 | |
52 public FunctionResolver(Builder.BuildHelper buildHelper) { | |
53 this.buildHelper = buildHelper; | |
54 | |
49 functions = new ArrayList<Entry>(); | 55 functions = new ArrayList<Entry>(); |
50 | 56 |
51 addFunction("contains", 2, new XPathFunction() { | 57 addFunction("contains", 2, new XPathFunction() { |
52 @Override | 58 @Override |
53 public Object evaluate(List args) throws XPathFunctionException { | 59 public Object evaluate(List args) throws XPathFunctionException { |