Author: sebb
Date: Sat Sep 12 14:16:13 2009
New Revision: 814164
URL: http://svn.apache.org/viewvc?rev=814164&view=rev
Log:
Restore ExpressionFactory and ScriptFactory
Added:
commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/ExpressionFactory.java
- copied, changed from r801101,
commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/ExpressionFactory.java
commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/ScriptFactory.java
- copied, changed from r801101,
commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/ScriptFactory.java
Modified:
commons/proper/jexl/trunk/RELEASE-NOTES.txt
Modified: commons/proper/jexl/trunk/RELEASE-NOTES.txt
URL:
http://svn.apache.org/viewvc/commons/proper/jexl/trunk/RELEASE-NOTES.txt?rev=814164&r1=814163&r2=814164&view=diff
==============================================================================
--- commons/proper/jexl/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/jexl/trunk/RELEASE-NOTES.txt Sat Sep 12 14:16:13 2009
@@ -36,7 +36,7 @@
Now requires Java 1.5 or later.
-The following classes have been removed:
+The following classes have been deprecated:
* ExpressionFactory
* ScriptFactory
@@ -44,6 +44,8 @@
Please create a JexlEngine and use createExpression() or createScript()
instead.
+The following classes have been removed:
+
* VelMethod
* VelPropertyGet
* VelPropertySet
@@ -72,7 +74,7 @@
to the actual arguments
Function namespace: ns:func(arguments...)
- * A function namespaces allows to use a class or instance methods in
function calls
+ * A function namespace allows the use of class or instance methods in
function calls
UnifiedJEXL
* Adds ${...} and #{...} JSP/EL syntax support on top of the JexlEngine
Copied:
commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/ExpressionFactory.java
(from r801101,
commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/ExpressionFactory.java)
URL:
http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/ExpressionFactory.java?p2=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/ExpressionFactory.java&p1=commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/ExpressionFactory.java&r1=801101&r2=814164&rev=814164&view=diff
==============================================================================
---
commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/ExpressionFactory.java
(original)
+++
commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/ExpressionFactory.java
Sat Sep 12 14:16:13 2009
@@ -61,10 +61,12 @@
* @throws ParseException An exception can be thrown if there is a problem
* parsing this expression, or if the expression is neither an
* expression or a reference.
+ * @deprecated Create a JexlEngine and use createExpression() on that
*/
+ @Deprecated
public static Expression createExpression(String expression)
throws ParseException {
- return JexlEngine.getDefault().createExpression(expression);
+ return new JexlEngine().createExpression(expression);
}
}
Copied:
commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/ScriptFactory.java
(from r801101,
commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/ScriptFactory.java)
URL:
http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/ScriptFactory.java?p2=commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/ScriptFactory.java&p1=commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/ScriptFactory.java&r1=801101&r2=814164&rev=814164&view=diff
==============================================================================
---
commons/proper/jexl/branches/2.0/src/main/java/org/apache/commons/jexl/ScriptFactory.java
(original)
+++
commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl/ScriptFactory.java
Sat Sep 12 14:16:13 2009
@@ -41,6 +41,7 @@
* </p>
* @since 1.1
* @version $Id$
+ * @deprecated Create a JexlEngine and use the createScript method on that
instead.
*/
@Deprecated
public final class ScriptFactory {
@@ -58,9 +59,11 @@
* {...@link JexlContext}.
* @throws Exception An exception can be thrown if there is a
* problem parsing the script.
+ * @deprecated Create a JexlEngine and use the createScript method on that
instead.
*/
+ @Deprecated
public static Script createScript(String scriptText) throws Exception {
- return JexlEngine.getDefault().createScript(scriptText);
+ return new JexlEngine().createScript(scriptText);
}
/**
@@ -73,9 +76,11 @@
* {...@link JexlContext}.
* @throws Exception An exception can be thrown if there is a problem
* parsing the script.
+ * @deprecated Create a JexlEngine and use the createScript method on that
instead.
*/
+ @Deprecated
public static Script createScript(File scriptFile) throws Exception {
- return JexlEngine.getDefault().createScript(scriptFile);
+ return new JexlEngine().createScript(scriptFile);
}
/**
@@ -88,9 +93,11 @@
* {...@link JexlContext}.
* @throws Exception An exception can be thrown if there is a problem
* parsing the script.
+ * @deprecated Create a JexlEngine and use the createScript method on that
instead.
*/
+ @Deprecated
public static Script createScript(URL scriptUrl) throws Exception {
- return JexlEngine.getDefault().createScript(scriptUrl);
+ return new JexlEngine().createScript(scriptUrl);
}
}
\ No newline at end of file