Improved: Disallow extension of the script helper bindings (OFBIZ-10825)
‘ScriptHelper’ is a mechanism used to add some useful bindings to scripts. This feature has been introduced in revision 1299924 by Adrian Crum as part of an general effort of supporting the Generic Scripting Engine specified by JSR-223. Previously this mechanism was extensible, however it appears to be undesirable (nor used in practice) to extend the bindings available to services since the internal service implementations are highly coupled to those bindings. As a consequence the usage of the Abstract Factory pattern which was used for that purpose is now removed. The side effect of this change is that we have now simpler code. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1854668 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
-18
@@ -1,18 +0,0 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
org.apache.ofbiz.common.scripting.ScriptHelperFactoryImpl
|
||||
-35
@@ -1,35 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*******************************************************************************/
|
||||
package org.apache.ofbiz.common.scripting;
|
||||
|
||||
import javax.script.ScriptContext;
|
||||
|
||||
import org.apache.ofbiz.base.util.ScriptHelper;
|
||||
import org.apache.ofbiz.base.util.ScriptHelperFactory;
|
||||
|
||||
/**
|
||||
* An implementation of the <code>ScriptHelperFactory</code> interface.
|
||||
*/
|
||||
public final class ScriptHelperFactoryImpl implements ScriptHelperFactory {
|
||||
|
||||
@Override
|
||||
public ScriptHelper getInstance(ScriptContext context) {
|
||||
return new ScriptHelperImpl(context);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user