# HG changeset patch # User Raimund Renkert # Date 1403787628 -7200 # Node ID ae16292586929dc472b6325086b2d5d4fde0ceaa # Parent 93da474506e7d9636f175ac448dfb7a0b01be63c# Parent 912cf4ec09d1cffc7a1df888740bd922f704c628 merged. diff -r 93da474506e7 -r ae1629258692 artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java --- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java Thu Jun 26 14:59:28 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/FunctionResolver.java Thu Jun 26 15:00:28 2014 +0200 @@ -255,7 +255,7 @@ } /** Implementation of case-ignoring dc:contains. */ - public Object contains(List args) throws XPathFunctionException { + public static Object contains(List args) throws XPathFunctionException { Object haystack = args.get(0); Object needle = args.get(1); @@ -299,7 +299,7 @@ /** Implementation for getting the minimum value of location or distance * dc:fromValue. */ - public Object fromValue(List args) throws XPathFunctionException { + public static Object fromValue(List args) throws XPathFunctionException { Object mode = args.get(0); Object locations = args.get(1); Object from = args.get(2); @@ -345,7 +345,7 @@ /** Implementation for getting the maximum value of location or distance * dc:toValue. */ - public Object toValue(List args) throws XPathFunctionException { + public static Object toValue(List args) throws XPathFunctionException { Object mode = args.get(0); Object locations = args.get(1); Object to = args.get(2); @@ -393,7 +393,7 @@ /** Implementation for doing a string replace * dc:replace . */ - public Object replace(List args) throws XPathFunctionException { + public static Object replace(List args) throws XPathFunctionException { Object haystack = args.get(0); Object needle = args.get(1); Object replacement = args.get(2); @@ -410,7 +410,7 @@ /** Implementation for doing a string replace * dc:replace-all */ - public Object replaceAll(List args) throws XPathFunctionException { + public static Object replaceAll(List args) throws XPathFunctionException { Object haystack = args.get(0); Object needle = args.get(1); Object replacement = args.get(2); @@ -424,7 +424,7 @@ return haystack; } - public Object dateFormat(List args) throws XPathFunctionException { + public static Object dateFormat(List args) throws XPathFunctionException { Object pattern = args.get(0); Object date = args.get(1); @@ -449,7 +449,7 @@ return ""; } - public Set allStateSuccessors(String artifactName, String stateId) { + public static Set allStateSuccessors(String artifactName, String stateId) { GlobalContext gc = RiverContextFactory.getGlobalContext(); if (gc == null) { return Collections.emptySet(); @@ -462,7 +462,7 @@ return Collections.emptySet(); } - public Collection findAll(String needle, String haystack) { + public static Collection findAll(String needle, String haystack) { ArrayList result = new ArrayList(); @@ -474,7 +474,7 @@ return result; } - public Number maxNumber(Object list) { + public static Number maxNumber(Object list) { if (list instanceof Collection) { Collection collection = (Collection)list; double max = -Double.MAX_VALUE; @@ -514,7 +514,7 @@ : Double.valueOf(Double.MAX_VALUE); } - public Number minNumber(Object list) { + public static Number minNumber(Object list) { if (list instanceof Collection) { Collection collection = (Collection)list; double min = Double.MAX_VALUE;