svn commit: r1751947 - in /ofbiz/trunk: ./ applications/commonext/webapp/WEB-INF/ applications/commonext/webapp/ofbizsetup/WEB-INF/ applications/marketing/webapp/marketing/WEB-INF/ applications/workeffort/webapp/workeffort/WEB-INF/ framework/base/ fram...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1751947 - in /ofbiz/trunk: ./ applications/commonext/webapp/WEB-INF/ applications/commonext/webapp/ofbizsetup/WEB-INF/ applications/marketing/webapp/marketing/WEB-INF/ applications/workeffort/webapp/workeffort/WEB-INF/ framework/base/ fram...

jacopoc
Author: jacopoc
Date: Fri Jul  8 17:53:59 2016
New Revision: 1751947

URL: http://svn.apache.org/viewvc?rev=1751947&view=rev
Log:
OFBIZ-7763 Removed a series of artifacts dependent on the old Beanshell jar that is going to be removed from the project; specifically:
* removed the code that implemented the deprecated "call-bsh" operation in Minilang
* removed the BeanShellContainer (it has been disabled a long time ago)
* removed the BeanShell service engine, no more used

Removed:
    ofbiz/trunk/framework/base/src/META-INF/
    ofbiz/trunk/framework/base/src/org/ofbiz/base/container/BeanShellContainer.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/OfbizBshBsfEngine.java
    ofbiz/trunk/framework/common/minilang/BshServiceTest.bsh
    ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/CallBsh.java
    ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/BeanShellEngine.java
Modified:
    ofbiz/trunk/LICENSE
    ofbiz/trunk/applications/commonext/webapp/WEB-INF/web.xml
    ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml
    ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/web.xml
    ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/web.xml
    ofbiz/trunk/framework/base/ofbiz-component.xml
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java
    ofbiz/trunk/framework/common/servicedef/services_test.xml
    ofbiz/trunk/framework/minilang/dtd/simple-methods.xsd
    ofbiz/trunk/framework/minilang/src/META-INF/services/org.ofbiz.minilang.method.MethodOperation$Factory
    ofbiz/trunk/framework/service/config/serviceengine.xml
    ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java

Modified: ofbiz/trunk/LICENSE
URL: http://svn.apache.org/viewvc/ofbiz/trunk/LICENSE?rev=1751947&r1=1751946&r2=1751947&view=diff
==============================================================================
--- ofbiz/trunk/LICENSE (original)
+++ ofbiz/trunk/LICENSE Fri Jul  8 17:53:59 2016
@@ -456,9 +456,6 @@ framework/base/lib/jce-jdk13-154.jar
 framework/base/lib/xpp3-1.1.4c.jar
 framework/base/lib/xstream-1.4.9.jar
 framework/base/lib/esapi-2.1.0.jar
-framework/base/lib/scripting/antlr-2.7.6.jar
-framework/base/lib/scripting/asm-3.2.jar
-framework/base/lib/scripting/jline-0.9.94.jar
 
 =========================================================================
 The BSD License

Modified: ofbiz/trunk/applications/commonext/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/webapp/WEB-INF/web.xml?rev=1751947&r1=1751946&r2=1751947&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/webapp/WEB-INF/web.xml (original)
+++ ofbiz/trunk/applications/commonext/webapp/WEB-INF/web.xml Fri Jul  8 17:53:59 2016
@@ -38,11 +38,6 @@ under the License.
     <param-name>mainDecoratorLocation</param-name>
     <param-value>component://commonext/widget/CommonScreens.xml</param-value>
   </context-param>
-  <context-param>
-    <description>BeanShell Script Location</description>
-    <param-name>scriptLocationPath</param-name>
-    <param-value>/WEB-INF/bsh</param-value>
-  </context-param>
 
     <filter>
       <display-name>ContextFilter</display-name>

Modified: ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml?rev=1751947&r1=1751946&r2=1751947&view=diff
==============================================================================
--- ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml (original)
+++ ofbiz/trunk/applications/commonext/webapp/ofbizsetup/WEB-INF/web.xml Fri Jul  8 17:53:59 2016
@@ -38,12 +38,7 @@
         <param-name>mainDecoratorLocation</param-name>
         <param-value>component://commonext/widget/ofbizsetup/CommonScreens.xml</param-value>
     </context-param>
-    <context-param>
-        <description>BeanShell Script Location</description>
-        <param-name>scriptLocationPath</param-name>
-        <param-value>/WEB-INF/bsh</param-value>
-    </context-param>
-    
+
     <filter>
         <display-name>ContextFilter</display-name>
         <filter-name>ContextFilter</filter-name>

Modified: ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/web.xml?rev=1751947&r1=1751946&r2=1751947&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/web.xml (original)
+++ ofbiz/trunk/applications/marketing/webapp/marketing/WEB-INF/web.xml Fri Jul  8 17:53:59 2016
@@ -34,11 +34,6 @@ under the License.
     <param-value>marketing</param-value>
   </context-param>
   <context-param>
-    <description>BeanShell Script Location</description>
-    <param-name>scriptLocationPath</param-name>
-    <param-value>/WEB-INF/bsh</param-value>
-  </context-param>
-  <context-param>
     <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
     <param-name>mainDecoratorLocation</param-name>
     <param-value>component://marketing/widget/CommonScreens.xml</param-value>

Modified: ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/web.xml?rev=1751947&r1=1751946&r2=1751947&view=diff
==============================================================================
--- ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/web.xml (original)
+++ ofbiz/trunk/applications/workeffort/webapp/workeffort/WEB-INF/web.xml Fri Jul  8 17:53:59 2016
@@ -34,11 +34,6 @@ under the License.
         <param-value>workeffort</param-value>
     </context-param>
     <context-param>
-        <description>BeanShell Script Location</description>
-        <param-name>scriptLocationPath</param-name>
-        <param-value>/WEB-INF/bsh</param-value>
-    </context-param>
-    <context-param>
         <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable
             in screen def XML files.
         </description>

Modified: ofbiz/trunk/framework/base/ofbiz-component.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/ofbiz-component.xml?rev=1751947&r1=1751946&r2=1751947&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/ofbiz-component.xml (original)
+++ ofbiz/trunk/framework/base/ofbiz-component.xml Fri Jul  8 17:53:59 2016
@@ -39,12 +39,4 @@ under the License.
         <property name="port" value="1099"/>
     </container>
 
-    <!-- load BeanShell remote telnet server -->
-    <!-- Commented out by default for security reasons -->
-    <!-- the port below and port-1 will be opened by Beanshell -->
-    <!--container name="beanshell-container" class="org.ofbiz.base.container.BeanShellContainer">
-        <property name="telnet-port" value="9990"/>
-        <property name="app-name" value="OFBiz"/>
-    </container-->
-
 </ofbiz-component>

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java?rev=1751947&r1=1751946&r2=1751947&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/FlexibleStringExpander.java Fri Jul  8 17:53:59 2016
@@ -41,8 +41,8 @@ import org.ofbiz.base.util.UtilValidate;
 import org.ofbiz.base.util.cache.UtilCache;
 
 /** Expands String values that contain Unified Expression Language (JSR 245)
- * syntax. This class also supports the execution of bsh scripts by using the
- * 'bsh:' prefix, and Groovy scripts by using the 'groovy:' prefix.
+ * syntax. This class also supports the execution of Groovy scripts
+ * by using the 'groovy:' prefix.
  * Further it is possible to control the output by specifying the suffix
  * '?currency(XXX)' to format the output according to the supplied locale
  * and specified (XXX) currency.<p>This class extends the UEL by allowing
@@ -312,10 +312,7 @@ public abstract class FlexibleStringExpa
                 // append everything from the current index to the start of the expression
                 strElems.add(new ConstOffsetElem(chars, currentInd, (escapedExpression ? start -1 : start) - currentInd));
             }
-            if (expression.indexOf("bsh:", start + 2) == start + 2 && !escapedExpression) {
-                // checks to see if this starts with a "bsh:", if so treat the rest of the expression as a bsh scriptlet
-                strElems.add(new ScriptElem(chars, start, Math.min(end + 1, start + length) - start, start + 6, end - start - 6));
-            } else if (expression.indexOf("groovy:", start + 2) == start + 2 && !escapedExpression) {
+            if (expression.indexOf("groovy:", start + 2) == start + 2 && !escapedExpression) {
                 // checks to see if this starts with a "groovy:", if so treat the rest of the expression as a groovy scriptlet
                 strElems.add(new ScriptElem(chars, start, Math.min(end + 1, start + length) - start, start + 9, end - start - 9));
             } else {

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java?rev=1751947&r1=1751946&r2=1751947&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/string/test/FlexibleStringExpanderTests.java Fri Jul  8 17:53:59 2016
@@ -68,12 +68,10 @@ public class FlexibleStringExpanderTests
         parserTest("empty", "", true, "");
         parserTest("constant-only", "a", false, "a");
         parserTest("nested-constant-emptynest-emptynest", "${a${}${}", true, "${a${}${}");
-        parserTest("bsh", "${bsh:}", true, "${bsh:}");
         parserTest("groovy", "${groovy:}", true, "${groovy:}");
 
         parserTest("escaped", "\\${}", true, "\\${}");
         parserTest("constant-escaped", "a\\${}", true, "a\\${}");
-        parserTest("escaped-bsd", "\\${bsh:}", true, "\\${bsh:}");
         parserTest("escaped-groovy", "\\${groovy:}", true, "\\${groovy:}");
 
         parserTest("missing-}", "${", true, "${");
@@ -312,10 +310,6 @@ public class FlexibleStringExpanderTests
         fseTest("currency(USD): missing", "The total is ${noList[0]?currency(${usd})}.", testMap, null, localeToTest, "The total is .", false);
         fseTest("currency(USD): exception", "The total is ${throwException.value?currency(${usd})}.", testMap, null, localeToTest, "The total is .", false);
         fseTest("null nested", "${${nullVar}}!", testMap, "!", false);
-        fseTest("bsh: script", "${bsh:return \"Hello \" + var + \"!\";}", testMap, "Hello World!", false);
-        fseTest("bsh: null", "${bsh:return null;}!", testMap, "!", false);
-        fseTest("bsh: throw Exception", "${bsh:return throwException.value;}!", testMap, "!", false);
-        fseTest("bsh: converter exception", "${bsh:return specialNumber;}!", testMap, SpecialNumber.class.getName() + "!", false);
         fseTest("groovy: script", "${groovy:return \"Hello \" + var + \"!\";}", testMap, "Hello World!", false);
         fseTest("groovy: null", "${groovy:return null;}!", testMap, "!", false);
         fseTest("groovy missing property", "${groovy: return noList[0]}", testMap, null, null, "", null, false);
@@ -329,12 +323,10 @@ public class FlexibleStringExpanderTests
         fseTest("UEL integration: throw NPE", "${" + FlexibleStringExpanderTests.class.getName() + ".ThrowNPE.noProp}", testMap, null, null, "", null, false);
         fseTest("UEL integration: missing", "${noList[0]}", testMap, null, null, "", null, false);
         fseTest("Escaped expression", "This is an \\${escaped} expression", testMap, "This is an ${escaped} expression", false);
-        fseTest("Escaped(bsh) expression", "This is an \\${bsh:escaped} expression", testMap, "This is an ${bsh:escaped} expression", false);
         fseTest("Escaped(groovy) expression", "This is an \\${groovy:escaped} expression", testMap, "This is an ${groovy:escaped} expression", false);
 
         fseTest("nested UEL integration(return BigDecimal)", "${a${'moun'}t}", testMap, null, null, "1,234,567.89", testMap.get("amount"), false);
         fseTest("UEL integration(return BigDecimal)", "${amount}", testMap, null, null, "1,234,567.89", testMap.get("amount"), false);
-        fseTest("bsh: return BigDecimal", "${bsh: return amount;}", testMap, null, null, "1,234,567.89", testMap.get("amount"), false);
         fseTest("groovy: return BigDecimal", "${groovy: return amount;}", testMap, null, null, "1,234,567.89", testMap.get("amount"), false);
     }
 }

Modified: ofbiz/trunk/framework/common/servicedef/services_test.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/servicedef/services_test.xml?rev=1751947&r1=1751946&r2=1751947&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/servicedef/services_test.xml (original)
+++ ofbiz/trunk/framework/common/servicedef/services_test.xml Fri Jul  8 17:53:59 2016
@@ -153,12 +153,6 @@ under the License.
         <attribute name="result" type="String" mode="OUT"/>
     </service>
 
-    <service name="testBsh" engine="bsh" location="component://common/minilang/BshServiceTest.bsh" invoke="">
-        <description>Test BeanShell Script Service</description>
-        <attribute name="message" type="String" mode="IN" optional="true" />
-        <attribute name="result" type="String" mode="OUT" />
-    </service>
-
     <service name="testGroovy" engine="groovy" location="component://common/minilang/GroovyServiceTest.groovy" invoke="">
         <description>Test Groovy Script Service</description>
         <attribute name="message" type="String" mode="IN" optional="true"/>
@@ -170,12 +164,6 @@ under the License.
         <attribute name="message" type="String" mode="IN" optional="true"/>
         <attribute name="result" type="String" mode="OUT"/>
     </service>
-
-    <service name="testScriptEngineBsh" engine="script" location="component://common/minilang/BshServiceTest.bsh" invoke="">
-        <description>Test BeanShell Script Service</description>
-        <attribute name="message" type="String" mode="IN" optional="true"/>
-        <attribute name="result" type="String" mode="OUT"/>
-    </service>
 
     <service name="testScriptEngineGroovy" engine="script" location="component://common/minilang/GroovyServiceTest.groovy" invoke="">
         <description>Test Script Engine With Groovy Script</description>

Modified: ofbiz/trunk/framework/minilang/dtd/simple-methods.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/dtd/simple-methods.xsd?rev=1751947&r1=1751946&r2=1751947&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/dtd/simple-methods.xsd (original)
+++ ofbiz/trunk/framework/minilang/dtd/simple-methods.xsd Fri Jul  8 17:53:59 2016
@@ -2353,30 +2353,6 @@ under the License.
             </xs:attribute>
     </xs:complexType>
 
-    <xs:element name="call-bsh" substitutionGroup="CallOperations">
-        <xs:annotation>
-            <xs:documentation>
-                Executes a BSH script. Deprecated - replace with script.
-                
-                The script can be contained in a Java resource, and/or a short
-                script can be included in the element body.
-                If a Java resource is specified, and the element body contains a script,
-                the element body script will be executed after the Java resource script is executed.
-            </xs:documentation>
-        </xs:annotation>
-        <xs:complexType mixed="true">
-            <xs:attribute type="xs:string" name="resource">
-                <xs:annotation>
-                    <xs:documentation>
-                        A Java resource that contains the script.
-                        
-                        Required if the element body is empty. Attribute type: constant.
-                    </xs:documentation>
-                </xs:annotation>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-
     <xs:element name="call-class-method" substitutionGroup="CallOperations">
         <xs:annotation>
             <xs:documentation>

Modified: ofbiz/trunk/framework/minilang/src/META-INF/services/org.ofbiz.minilang.method.MethodOperation$Factory
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/META-INF/services/org.ofbiz.minilang.method.MethodOperation%24Factory?rev=1751947&r1=1751946&r2=1751947&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/META-INF/services/org.ofbiz.minilang.method.MethodOperation$Factory (original)
+++ ofbiz/trunk/framework/minilang/src/META-INF/services/org.ofbiz.minilang.method.MethodOperation$Factory Fri Jul  8 17:53:59 2016
@@ -15,7 +15,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-org.ofbiz.minilang.method.callops.CallBsh$CallBshFactory
 org.ofbiz.minilang.method.callops.CallClassMethod$CallClassMethodFactory
 org.ofbiz.minilang.method.callops.CallObjectMethod$CallObjectMethodFactory
 org.ofbiz.minilang.method.callops.CallScript$CallScriptFactory

Modified: ofbiz/trunk/framework/service/config/serviceengine.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/config/serviceengine.xml?rev=1751947&r1=1751946&r2=1751947&view=diff
==============================================================================
--- ofbiz/trunk/framework/service/config/serviceengine.xml (original)
+++ ofbiz/trunk/framework/service/config/serviceengine.xml Fri Jul  8 17:53:59 2016
@@ -46,7 +46,6 @@ under the License.
         <engine name="simple" class="org.ofbiz.minilang.SimpleServiceEngine"/>
         <engine name="script" class="org.ofbiz.service.engine.ScriptEngine"/>
         <!-- Engines that can be replaced by the generic script engine -->
-        <engine name="bsh" class="org.ofbiz.service.engine.BeanShellEngine"/>
         <engine name="groovy" class="org.ofbiz.service.engine.GroovyEngine"/>
         <engine name="jacl" class="org.ofbiz.service.engine.BSFEngine"/>
         <engine name="javascript" class="org.ofbiz.service.engine.ScriptEngine"/>

Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java?rev=1751947&r1=1751946&r2=1751947&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/ControlServlet.java Fri Jul  8 17:53:59 2016
@@ -330,9 +330,6 @@ public class ControlServlet extends Http
     }
 
     protected void configureBsf() {
-        String[] bshExtensions = {"bsh"};
-        BSFManager.registerScriptingEngine("beanshell", "org.ofbiz.base.util.OfbizBshBsfEngine", bshExtensions);
-
         String[] jsExtensions = {"js"};
         BSFManager.registerScriptingEngine("javascript", "org.ofbiz.base.util.OfbizJsBsfEngine", jsExtensions);