diff --git a/framework/base/config/both-containers.xml b/framework/base/config/both-containers.xml index 273360a9f5..f8e543a493 100644 --- a/framework/base/config/both-containers.xml +++ b/framework/base/config/both-containers.xml @@ -26,9 +26,6 @@ under the License. - - - - diff --git a/framework/base/config/ofbiz-containers.xml b/framework/base/config/ofbiz-containers.xml index 0dfc3ff51e..a6140ece1f 100644 --- a/framework/base/config/ofbiz-containers.xml +++ b/framework/base/config/ofbiz-containers.xml @@ -26,9 +26,6 @@ under the License. - - - - diff --git a/framework/base/config/webslinger-invoker.properties b/framework/base/config/webslinger-invoker.properties deleted file mode 100644 index 53a82708cc..0000000000 --- a/framework/base/config/webslinger-invoker.properties +++ /dev/null @@ -1,24 +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. -############################################################################### - -# If true, then various dynamically loaded items will have a custom -# class compiled, that includes more helpful identification. This -# can include some of the following: file location, line number, -# and/or other unique identification. -wrap-calls=false diff --git a/framework/build.xml b/framework/build.xml index 9fb30fb58e..feb9f69f42 100644 --- a/framework/build.xml +++ b/framework/build.xml @@ -26,7 +26,6 @@ under the License. entity/build.xml,geronimo/build.xml, catalina/build.xml,jetty/build.xml, security/build.xml,service/build.xml,jcr/build.xml,entityext/build.xml, - webslinger/build.xml, bi/build.xml,minilang/build.xml, webapp/build.xml,guiapp/build.xml,widget/build.xml, common/build.xml,datafile/build.xml,birt/build.xml, diff --git a/framework/component-load.xml b/framework/component-load.xml index d7ab330612..064a7ed883 100644 --- a/framework/component-load.xml +++ b/framework/component-load.xml @@ -41,7 +41,6 @@ under the License. - diff --git a/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java b/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java index 03fa3cad61..c4b44bb4e6 100644 --- a/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java +++ b/framework/minilang/src/org/ofbiz/minilang/SimpleMethod.java @@ -83,8 +83,6 @@ import org.ofbiz.service.ModelService; import org.w3c.dom.Document; import org.w3c.dom.Element; -import org.webslinger.invoker.Wrap; - /** * SimpleMethod Mini Language Core Object */ @@ -895,15 +893,6 @@ public class SimpleMethod { Debug.logWarning("Operation element \"" + nodeName + "\" no recognized", module); } if (methodOp == null) continue; - if (UtilProperties.propertyValueEquals("webslinger-invoker.properties", "wrap-calls", "true")) { - Wrap wrap = new Wrap().fileName(simpleMethod.getLocationAndName()).wrappedClass(methodOp.getClass()); - wrap.wrap(methodOperationExecMethod); - Object startLine = curOperElem.getUserData("startLine"); - if (startLine != null) { - wrap.lineNumber(((Integer) startLine).intValue()); - } - methodOp = wrap.newInstance(new Class[] {Element.class, SimpleMethod.class}, new Object[] {curOperElem, simpleMethod}); - } methodOperations.add(methodOp); DeprecatedOperation depOp = methodOp.getClass().getAnnotation(DeprecatedOperation.class); if (depOp != null) Debug.logInfo("The " + nodeName + " operation has been deprecated in favor of the " + depOp.value() + " operation; found use of this in [" + simpleMethod.getShortDescription() + "]: " + methodOp.rawString(), module); diff --git a/framework/service/config/service.properties b/framework/service/config/service.properties index 81b897d23d..d13cef7c9e 100644 --- a/framework/service/config/service.properties +++ b/framework/service/config/service.properties @@ -17,8 +17,6 @@ # under the License. ############################################################################### -# If set to true then service definitions are wrapped with their filename and line number, for easier debugging; if enabled, JVM PermGen memory settings may need to be increased -servicedispatcher.servicedebugmode=true # flag to automatically export all services: same of setting export="true" for all service definitions remotedispatcher.exportall=false # complete answer from SOAP WSDL or only brief message "Problem processing the service" for security reason diff --git a/framework/service/config/serviceengine.xml b/framework/service/config/serviceengine.xml index fa210ea73c..21af875ab6 100644 --- a/framework/service/config/serviceengine.xml +++ b/framework/service/config/serviceengine.xml @@ -62,7 +62,6 @@ under the License. - diff --git a/framework/service/src/org/ofbiz/service/GenericInvoker.java b/framework/service/src/org/ofbiz/service/GenericInvoker.java deleted file mode 100644 index af64fc5613..0000000000 --- a/framework/service/src/org/ofbiz/service/GenericInvoker.java +++ /dev/null @@ -1,77 +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.ofbiz.service; - -import java.util.Map; - -import org.ofbiz.service.engine.GenericEngine; - -import org.webslinger.invoker.Invoker; - -/** - * Generic Invoker Interface - */ -public interface GenericInvoker extends Invoker { - - /** - * Run the service synchronously and return the result. - * - * @param localName Name of the LocalDispatcher. - * @param engine GenericEngine object. - * @param context Map of name, value pairs composing the context. - * @return Map of name, value pairs composing the result. - * @throws GenericServiceException - */ - public Map runSync(String localName, GenericEngine engine, Map context) throws GenericServiceException; - - /** - * Run the service synchronously and IGNORE the result. - * - * @param localName Name of the LocalDispatcher. - * @param engine GenericEngine object. - * @param context Map of name, value pairs composing the context. - * @throws GenericServiceException - */ - public void runSyncIgnore(String localName, GenericEngine engine, Map context) throws GenericServiceException; - - /** - * Run the service asynchronously, passing an instance of GenericRequester that will receive the result. - * - * @param localName Name of the LocalDispatcher. - * @param engine GenericEngine object. - * @param context Map of name, value pairs composing the context. - * @param requester Object implementing GenericRequester interface which will receive the result. - * @param persist True for store/run; False for run. - * @throws GenericServiceException - */ - public void runAsync(String localName, GenericEngine engine, Map context, GenericRequester requester, boolean persist) - throws GenericServiceException; - - /** - * Send the service callbacks - * @param engine GenericEngine object - * @param context Map of name, value pairs composing the context - * @param result Object to return to callback (Throwable or Map) - * @param mode Service mode (sync or async) - * @throws GenericServiceException - */ - public void sendCallbacks(GenericEngine engine, Map context, Map result, Throwable t, int mode) throws GenericServiceException; - public GenericInvoker copy(ModelService modelService); -} - diff --git a/framework/service/src/org/ofbiz/service/ModelService.java b/framework/service/src/org/ofbiz/service/ModelService.java index 006831c1bf..1f82b109cb 100644 --- a/framework/service/src/org/ofbiz/service/ModelService.java +++ b/framework/service/src/org/ofbiz/service/ModelService.java @@ -202,8 +202,6 @@ public class ModelService extends AbstractMap implements Seriali /** Flag to say if we have pulled in our addition parameters from our implemented service(s) */ protected boolean inheritedParameters = false; - public GenericInvoker invoker; - public ModelService() {} public ModelService(ModelService model) { @@ -229,9 +227,6 @@ public class ModelService extends AbstractMap implements Seriali this.overrideParameters = model.overrideParameters; this.inheritedParameters = model.inheritedParameters(); this.internalGroup = model.internalGroup; - if (model.invoker != null) { - this.invoker = model.invoker.copy(this); - } List modelParamList = model.getModelParamList(); for (ModelParam param: modelParamList) { diff --git a/framework/service/src/org/ofbiz/service/ModelServiceReader.java b/framework/service/src/org/ofbiz/service/ModelServiceReader.java index 433027ed1c..8b4f0247fc 100644 --- a/framework/service/src/org/ofbiz/service/ModelServiceReader.java +++ b/framework/service/src/org/ofbiz/service/ModelServiceReader.java @@ -54,8 +54,6 @@ import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; -import org.webslinger.invoker.Wrap; - import freemarker.template.utility.StringUtil; /** @@ -65,7 +63,6 @@ import freemarker.template.utility.StringUtil; public class ModelServiceReader implements Serializable { public static final String module = ModelServiceReader.class.getName(); - protected static boolean serviceDebugMode = true; /** is either from a URL or from a ResourceLoader (through the ResourceHandler) */ protected boolean isFromURL; @@ -94,7 +91,6 @@ public class ModelServiceReader implements Serializable { this.readerURL = readerURL; this.handler = handler; this.dctx = dctx; - serviceDebugMode = "true".equals(UtilProperties.getPropertyValue("service", "servicedispatcher.servicedebugmode", "true")); } private Map getModelServices() { @@ -204,21 +200,6 @@ public class ModelServiceReader implements Serializable { ModelService service = new ModelService(); service.name = UtilXml.checkEmpty(serviceElement.getAttribute("name")).intern(); - if (serviceDebugMode) { - Wrap wrap = new Wrap().fileName(resourceLocation + '#' + service.name).wrappedClass(GenericInvokerImpl.class); - for (Method method: GenericInvokerImpl.class.getDeclaredMethods()) { - if (method.getName().startsWith("run")) { - wrap.wrap(method); - } else if (method.getName().startsWith("send")) { - wrap.wrap(method); - } - } - Object startLine = serviceElement.getUserData("startLine"); - if (startLine != null) { - wrap.lineNumber(((Integer) startLine).intValue()); - } - service.invoker = wrap.newInstance(new Class[] {ModelService.class}, new Object[] {service}); - } service.definitionLocation = resourceLocation; service.engineName = UtilXml.checkEmpty(serviceElement.getAttribute("engine")).intern(); service.location = UtilXml.checkEmpty(serviceElement.getAttribute("location")).intern(); @@ -749,54 +730,4 @@ public class ModelServiceReader implements Serializable { return document; } - - public static class GenericInvokerImpl implements GenericInvoker { - private final ModelService modelService; - - public GenericInvokerImpl(ModelService modelService) { - this.modelService = modelService; - } - - public Map runSync(String localName, GenericEngine engine, Map context) throws GenericServiceException { - return engine.runSync(localName, modelService, context); - } - - public void runSyncIgnore(String localName, GenericEngine engine, Map context) throws GenericServiceException { - engine.runSyncIgnore(localName, modelService, context); - } - - public void runAsync(String localName, GenericEngine engine, Map context, GenericRequester requester, boolean persist) throws GenericServiceException { - if (requester != null) { - engine.runAsync(localName, modelService, context, requester, persist); - } else { - engine.runAsync(localName, modelService, context, persist); - } - } - - public void sendCallbacks(GenericEngine engine, Map context, Map result, Throwable t, int mode) throws GenericServiceException { - if (t != null) { - engine.sendCallbacks(modelService, context, t, mode); - } else if (result != null) { - engine.sendCallbacks(modelService, context, result, mode); - } else { - engine.sendCallbacks(modelService, context, mode); - } - } - - public GenericInvokerImpl copy(ModelService modelService) { - try { - try { - return getClass().getConstructor(ModelService.class).newInstance(modelService); - } catch (InvocationTargetException e) { - throw e.getCause(); - } - } catch (RuntimeException e) { - throw e; - } catch (Error e) { - throw e; - } catch (Throwable e) { - throw (InternalError) new InternalError(e.getMessage()).initCause(e); - } - } - } } diff --git a/framework/service/src/org/ofbiz/service/ServiceDispatcher.java b/framework/service/src/org/ofbiz/service/ServiceDispatcher.java index b7f7ab9178..810d2f7b25 100644 --- a/framework/service/src/org/ofbiz/service/ServiceDispatcher.java +++ b/framework/service/src/org/ofbiz/service/ServiceDispatcher.java @@ -74,7 +74,6 @@ public class ServiceDispatcher { protected static boolean enableJM = true; protected static boolean enableJMS = true; protected static boolean enableSvcs = true; - protected static boolean serviceDebugMode = true; protected Delegator delegator = null; protected GenericEngineFactory factory = null; @@ -123,7 +122,6 @@ public class ServiceDispatcher { if (enableSvcs) { this.runStartupServices(); } - serviceDebugMode = "true".equals(UtilProperties.getPropertyValue("service", "servicedispatcher.servicedebugmode", "true")); } protected ServiceDispatcher(Delegator delegator) { @@ -395,13 +393,8 @@ public class ServiceDispatcher { // ===== invoke the service ===== if (!isError && !isFailure) { Map invokeResult = null; - if (serviceDebugMode) { - invokeResult = modelService.invoker.runSync(localName, engine, context); - modelService.invoker.sendCallbacks(engine, context, invokeResult, null, GenericEngine.SYNC_MODE); - } else { - invokeResult = engine.runSync(localName, modelService, context); - engine.sendCallbacks(modelService, context, invokeResult, GenericEngine.SYNC_MODE); - } + invokeResult = engine.runSync(localName, modelService, context); + engine.sendCallbacks(modelService, context, invokeResult, GenericEngine.SYNC_MODE); if (invokeResult != null) { result.putAll(invokeResult); } else { @@ -515,11 +508,7 @@ public class ServiceDispatcher { UtilTimer.closeTimer(localName + " / " + modelService.name, "Sync service failed...", module); } String errMsg = "Service [" + modelService.name + "] threw an unexpected exception/error"; - if (serviceDebugMode) { - modelService.invoker.sendCallbacks(engine, context, null, t, GenericEngine.SYNC_MODE); - } else { - engine.sendCallbacks(modelService, context, t, GenericEngine.SYNC_MODE); - } + engine.sendCallbacks(modelService, context, t, GenericEngine.SYNC_MODE); try { TransactionUtil.rollback(beganTrans, errMsg, t); } catch (GenericTransactionException te) { @@ -715,17 +704,12 @@ public class ServiceDispatcher { // run the service if (!isError && !isFailure) { - if (serviceDebugMode) { - service.invoker.runAsync(localName, engine, context, requester, persist); - service.invoker.sendCallbacks(engine, context, null, null, GenericEngine.ASYNC_MODE); + if (requester != null) { + engine.runAsync(localName, service, context, requester, persist); } else { - if (requester != null) { - engine.runAsync(localName, service, context, requester, persist); - } else { - engine.runAsync(localName, service, context, persist); - } - engine.sendCallbacks(service, context, GenericEngine.ASYNC_MODE); + engine.runAsync(localName, service, context, persist); } + engine.sendCallbacks(service, context, GenericEngine.ASYNC_MODE); } if (Debug.timingOn()) { @@ -738,11 +722,7 @@ public class ServiceDispatcher { } String errMsg = "Service [" + service.name + "] threw an unexpected exception/error"; Debug.logError(t, errMsg, module); - if (serviceDebugMode) { - service.invoker.sendCallbacks(engine, context, null, t, GenericEngine.ASYNC_MODE); - } else { - engine.sendCallbacks(service, context, t, GenericEngine.ASYNC_MODE); - } + engine.sendCallbacks(service, context, t, GenericEngine.ASYNC_MODE); try { TransactionUtil.rollback(beganTrans, errMsg, t); } catch (GenericTransactionException te) { diff --git a/framework/webslinger/build.xml b/framework/webslinger/build.xml deleted file mode 100644 index 15e0d81030..0000000000 --- a/framework/webslinger/build.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/framework/webslinger/config/webslinger.properties b/framework/webslinger/config/webslinger.properties deleted file mode 100644 index cfb9112db4..0000000000 --- a/framework/webslinger/config/webslinger.properties +++ /dev/null @@ -1,17 +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. -moduleBase=ofbiz-component://webslinger/modules diff --git a/framework/webslinger/data/WebslingerSeedData.xml b/framework/webslinger/data/WebslingerSeedData.xml deleted file mode 100644 index dad8f8d8bd..0000000000 --- a/framework/webslinger/data/WebslingerSeedData.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/framework/webslinger/entitydef/entitymodel.xml b/framework/webslinger/entitydef/entitymodel.xml deleted file mode 100644 index 9b5da79119..0000000000 --- a/framework/webslinger/entitydef/entitymodel.xml +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/framework/webslinger/lib/webslinger-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 829427c415..0000000000 Binary files a/framework/webslinger/lib/webslinger-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-base-cache-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-base-cache-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 41799d75b2..0000000000 Binary files a/framework/webslinger/lib/webslinger-base-cache-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-base-collections-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-base-collections-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index a3c6ae7aa9..0000000000 Binary files a/framework/webslinger/lib/webslinger-base-collections-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-base-collections-arrays-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-base-collections-arrays-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 14df6dafec..0000000000 Binary files a/framework/webslinger/lib/webslinger-base-collections-arrays-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-base-concurrent-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-base-concurrent-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 5f762470ef..0000000000 Binary files a/framework/webslinger/lib/webslinger-base-concurrent-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-base-html-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-base-html-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 29f7e26cb7..0000000000 Binary files a/framework/webslinger/lib/webslinger-base-html-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-base-io-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-base-io-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index c2c20594c3..0000000000 Binary files a/framework/webslinger/lib/webslinger-base-io-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-base-javacc-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-base-javacc-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 7274d4b677..0000000000 Binary files a/framework/webslinger/lib/webslinger-base-javacc-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-base-junit-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-base-junit-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index e1834df325..0000000000 Binary files a/framework/webslinger/lib/webslinger-base-junit-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-base-lang-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-base-lang-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index ee5dac6da4..0000000000 Binary files a/framework/webslinger/lib/webslinger-base-lang-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-base-logging-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-base-logging-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index b222283126..0000000000 Binary files a/framework/webslinger/lib/webslinger-base-logging-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-base-resolver-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-base-resolver-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 08d0d10716..0000000000 Binary files a/framework/webslinger/lib/webslinger-base-resolver-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-base-util-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-base-util-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index d0e0fd58fc..0000000000 Binary files a/framework/webslinger/lib/webslinger-base-util-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-base-xml-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-base-xml-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 1283a1b513..0000000000 Binary files a/framework/webslinger/lib/webslinger-base-xml-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-catalina-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-catalina-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 53f93ec47f..0000000000 Binary files a/framework/webslinger/lib/webslinger-catalina-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-cgi-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-cgi-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index ce95e8bb68..0000000000 Binary files a/framework/webslinger/lib/webslinger-cgi-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-embryo-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-embryo-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 723314c6dc..0000000000 Binary files a/framework/webslinger/lib/webslinger-embryo-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-beanshell-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-beanshell-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index e0d7af446f..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-beanshell-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-bsf-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-bsf-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 5965643653..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-bsf-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-code-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-code-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 6475567a6d..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-code-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-commonsvfs-object-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-commonsvfs-object-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index a30cd1c6f5..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-commonsvfs-object-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-directory-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-directory-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index ed46df398f..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-directory-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-freemarker-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-freemarker-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 63fcc3dca3..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-freemarker-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-groovy-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-groovy-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 7aad5d41c3..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-groovy-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-image-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-image-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 7438a2f320..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-image-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-janino-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-janino-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 20e323a6c1..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-janino-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-jruby-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-jruby-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index e12ef64be1..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-jruby-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-jython-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-jython-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 9a99484e68..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-jython-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-nutch-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-nutch-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index e7800df5e3..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-nutch-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-plan9-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-plan9-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 87aaa81ed2..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-plan9-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-quercus-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-quercus-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 29fe4b29f7..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-quercus-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-rhino-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-rhino-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 621d0be713..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-rhino-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-servlet-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-servlet-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 247ecdd917..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-servlet-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-template-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-template-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index ce30acecd5..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-template-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-velocity-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-velocity-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 6f2d9ab98a..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-velocity-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-extension-wiki-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-extension-wiki-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index d86c91fe8a..0000000000 Binary files a/framework/webslinger/lib/webslinger-extension-wiki-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/lib/webslinger-launcher-20091211-3897-7ab22baea4b6.jar b/framework/webslinger/lib/webslinger-launcher-20091211-3897-7ab22baea4b6.jar deleted file mode 100644 index 5319dccf4f..0000000000 Binary files a/framework/webslinger/lib/webslinger-launcher-20091211-3897-7ab22baea4b6.jar and /dev/null differ diff --git a/framework/webslinger/modules/defaults.zip b/framework/webslinger/modules/defaults.zip deleted file mode 100644 index 98876fba39..0000000000 Binary files a/framework/webslinger/modules/defaults.zip and /dev/null differ diff --git a/framework/webslinger/modules/ofbiz/Classes/org/webslinger/mime.types b/framework/webslinger/modules/ofbiz/Classes/org/webslinger/mime.types deleted file mode 100644 index efb2cbc381..0000000000 --- a/framework/webslinger/modules/ofbiz/Classes/org/webslinger/mime.types +++ /dev/null @@ -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. -application/x-ofbiz-condition ofbiz-condition -application/x-ofbiz-screen ofbiz-screen diff --git a/framework/webslinger/modules/ofbiz/www/WEB-INF/DefaultMimeAttributes/application/x-ofbiz-condition b/framework/webslinger/modules/ofbiz/www/WEB-INF/DefaultMimeAttributes/application/x-ofbiz-condition deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/framework/webslinger/modules/ofbiz/www/WEB-INF/DefaultMimeAttributes/application/x-ofbiz-condition@/data-filter b/framework/webslinger/modules/ofbiz/www/WEB-INF/DefaultMimeAttributes/application/x-ofbiz-condition@/data-filter deleted file mode 100644 index d2aa8d91cd..0000000000 --- a/framework/webslinger/modules/ofbiz/www/WEB-INF/DefaultMimeAttributes/application/x-ofbiz-condition@/data-filter +++ /dev/null @@ -1 +0,0 @@ -java.lang.String:/WEB-INF/Events/System/Ofbiz/FilterOfbizConditionData diff --git a/framework/webslinger/modules/ofbiz/www/WEB-INF/DefaultMimeAttributes/application/x-ofbiz-condition@/type b/framework/webslinger/modules/ofbiz/www/WEB-INF/DefaultMimeAttributes/application/x-ofbiz-condition@/type deleted file mode 100644 index fc30ac2422..0000000000 --- a/framework/webslinger/modules/ofbiz/www/WEB-INF/DefaultMimeAttributes/application/x-ofbiz-condition@/type +++ /dev/null @@ -1 +0,0 @@ -java.lang.String:data diff --git a/framework/webslinger/modules/ofbiz/www/WEB-INF/DefaultMimeAttributes/application/x-ofbiz-screen b/framework/webslinger/modules/ofbiz/www/WEB-INF/DefaultMimeAttributes/application/x-ofbiz-screen deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/framework/webslinger/modules/ofbiz/www/WEB-INF/DefaultMimeAttributes/application/x-ofbiz-screen@/type b/framework/webslinger/modules/ofbiz/www/WEB-INF/DefaultMimeAttributes/application/x-ofbiz-screen@/type deleted file mode 100644 index aad3070129..0000000000 --- a/framework/webslinger/modules/ofbiz/www/WEB-INF/DefaultMimeAttributes/application/x-ofbiz-screen@/type +++ /dev/null @@ -1 +0,0 @@ -java.lang.String:ofbiz-screen diff --git a/framework/webslinger/modules/ofbiz/www/WEB-INF/Events/System/Ofbiz/FilterOfbizConditionData.groovy b/framework/webslinger/modules/ofbiz/www/WEB-INF/Events/System/Ofbiz/FilterOfbizConditionData.groovy deleted file mode 100644 index 1c7cc66a43..0000000000 --- a/framework/webslinger/modules/ofbiz/www/WEB-INF/Events/System/Ofbiz/FilterOfbizConditionData.groovy +++ /dev/null @@ -1,44 +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. - *******************************************************************************/ -import org.ofbiz.entity.condition.EntityCondition -import org.ofbiz.entity.condition.EntityOperator - -def buildCondition -def getValue = { item -> - if (item instanceof Map) return buildCondition(item) - return item -} -buildCondition = { item -> - switch (item.name) { - case "EntityConditionList": - def conditions = [] - for (conditionDef in item.list) { - conditions.add(buildCondition(conditionDef)) - } - return EntityCondition.makeCondition(conditions, EntityOperator.lookup(item.operator)) - case "EntityExpr": - return EntityCondition.makeCondition(getValue(item.left), EntityOperator.lookup(item.operator), getValue(item.right)) - case "Include": - return webslinger.event(item.path) - default: - throw new InternalError(item.toString()) - } -} - -return buildCondition(webslinger.payload) diff --git a/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy b/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy deleted file mode 100644 index 3ba86cdca6..0000000000 --- a/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy +++ /dev/null @@ -1,59 +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. - *******************************************************************************/ -import org.ofbiz.base.util.StringUtil -import org.ofbiz.base.util.UtilXml -import org.ofbiz.base.util.collections.MapStack -import org.ofbiz.base.util.template.FreeMarkerWorker -import org.ofbiz.widget.screen.ScreenFactory -import org.ofbiz.widget.screen.ScreenRenderer -import org.ofbiz.widget.html.HtmlFormRenderer -import org.ofbiz.widget.html.HtmlScreenRenderer - -import org.webslinger.commons.vfs.VFSUtil -import org.webslinger.container.FileInfo - -switch (webslinger.command) { - case 'init': - return new HtmlScreenRenderer() - case 'get-creator': - return [ - createValue: { fi, name -> - def file = fi.file - def singleScreenText = VFSUtil.getString(file) - def screenName = fi.servletFile.name.path - def fullDocumentText = '' + singleScreenText + '' - def doc = UtilXml.readXmlDocument(fullDocumentText) - def screens = ScreenFactory.readScreenDocument(doc, "webslinger://$webslinger.webslingerServletContext.id") - if (screens.size() != 1) throw new IllegalArgumentException('wrong size') - return screens.values().iterator().next() - } - ] as FileInfo.Creator -} -def target = webslinger.payload -def modelScreen = target.pathContext.info.getCachedItem(null) -def screenRenderer = webslinger.initObject -//response.contentType = 'text/html' -def targetContext = MapStack.create(target.context) -def screens = new ScreenRenderer(response.writer, targetContext, screenRenderer); -screens.populateContextForRequest(request, response, webslinger.webslingerServletContext) -FreeMarkerWorker.getSiteParameters(request, targetContext) -targetContext.formStringRenderer = new HtmlFormRenderer(request, response) -targetContext.simpleEncoder = StringUtil.htmlEncoder -modelScreen.renderScreenString(response.writer, targetContext, screenRenderer) -return null diff --git a/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy@/has-init b/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy@/has-init deleted file mode 100644 index 0194e35580..0000000000 --- a/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy@/has-init +++ /dev/null @@ -1 +0,0 @@ -java.lang.String:true diff --git a/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy@/type-supports-creator b/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy@/type-supports-creator deleted file mode 100644 index 0194e35580..0000000000 --- a/framework/webslinger/modules/ofbiz/www/WEB-INF/TypeHandlers/ofbiz-screen.groovy@/type-supports-creator +++ /dev/null @@ -1 +0,0 @@ -java.lang.String:true diff --git a/framework/webslinger/ofbiz-component.xml b/framework/webslinger/ofbiz-component.xml deleted file mode 100644 index 6e209b9804..0000000000 --- a/framework/webslinger/ofbiz-component.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - diff --git a/framework/webslinger/src/META-INF/vfs-providers.xml b/framework/webslinger/src/META-INF/vfs-providers.xml deleted file mode 100644 index ae22ebd7dd..0000000000 --- a/framework/webslinger/src/META-INF/vfs-providers.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - diff --git a/framework/webslinger/src/org/ofbiz/commons/vfs/CommonsVfsContainer.java b/framework/webslinger/src/org/ofbiz/commons/vfs/CommonsVfsContainer.java deleted file mode 100644 index 0d5d4f6d5b..0000000000 --- a/framework/webslinger/src/org/ofbiz/commons/vfs/CommonsVfsContainer.java +++ /dev/null @@ -1,66 +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.ofbiz.commons.vfs; - -import java.io.File; -import java.io.IOException; -import java.net.MalformedURLException; - -import org.apache.commons.vfs.FileObject; -import org.apache.commons.vfs.FileSystemException; -import org.apache.commons.vfs.FileSystemManager; -import org.apache.commons.vfs.impl.StandardFileSystemManager; -import org.ofbiz.base.container.Container; -import org.ofbiz.base.container.ContainerException; -import org.ofbiz.base.util.UtilMisc; -import org.webslinger.commons.vfs.VFSUtil; - -public class CommonsVfsContainer implements Container { - private static StandardFileSystemManager sfsm; - - public void init(String[] args, String configFile) throws ContainerException { - } - - public boolean start() throws ContainerException { - try { - StandardFileSystemManager sfsm = VFSUtil.createStandardFileSystemManager(); - FileObject currentDir = sfsm.resolveFile(new File(".").toURI().toURL().toString()); - sfsm.setBaseFile(currentDir); - CommonsVfsContainer.sfsm = sfsm; - } catch (FileSystemException e) { - throw UtilMisc.initCause(new ContainerException("Initializing StandardFileSystemManager"), e); - } catch (MalformedURLException e) { - throw UtilMisc.initCause(new ContainerException("Initializing StandardFileSystemManager"), e); - } - return true; - } - - public void stop() throws ContainerException { - sfsm.close(); - sfsm = null; - } - - public static FileObject resolveFile(String uri) throws IOException { - return sfsm.resolveFile(uri); - } - - public static FileSystemManager getFileSystemManager() { - return sfsm; - } -} diff --git a/framework/webslinger/src/org/ofbiz/commons/vfs/ofbiz/OfbizComponentProvider.java b/framework/webslinger/src/org/ofbiz/commons/vfs/ofbiz/OfbizComponentProvider.java deleted file mode 100644 index 2f79dcd80c..0000000000 --- a/framework/webslinger/src/org/ofbiz/commons/vfs/ofbiz/OfbizComponentProvider.java +++ /dev/null @@ -1,58 +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.ofbiz.commons.vfs.ofbiz; - -import java.net.URL; -import java.util.Collection; -import org.apache.commons.vfs.FileObject; -import org.apache.commons.vfs.FileSystemException; -import org.apache.commons.vfs.FileSystemOptions; -import org.apache.commons.vfs.provider.AbstractFileProvider; -import org.apache.commons.vfs.provider.local.DefaultLocalFileProvider; -import org.ofbiz.base.location.FlexibleLocation; -import org.ofbiz.base.util.UtilMisc; -import org.webslinger.commons.vfs.VFSUtil; - -public class OfbizComponentProvider extends AbstractFileProvider { - public Collection getCapabilities() { - return DefaultLocalFileProvider.capabilities; - } - - public FileObject findFile(FileObject base, String name, FileSystemOptions properties) throws FileSystemException { - try { - //name = name.replaceAll("^ofbiz-component://", ""); - int nameLength = name.length(); - int componentNameStart = 16; - while (componentNameStart < nameLength && name.charAt(componentNameStart) == '/') componentNameStart++; - if (componentNameStart == nameLength) throw new IllegalArgumentException("Invalid name(" + name + ")"); - int componentNameEnd = componentNameStart; - while (componentNameEnd < nameLength && name.charAt(componentNameEnd) != '/') componentNameEnd++; - if (componentNameEnd == nameLength) throw new IllegalArgumentException("Invalid name(" + name + ")"); - int restStart = componentNameEnd; - while (restStart < nameLength && name.charAt(restStart) == '/') restStart++; - if (restStart == nameLength) throw new IllegalArgumentException("Invalid name(" + name + ")"); - String componentName = name.substring(componentNameStart, componentNameEnd); - URL location = FlexibleLocation.resolveLocation("component://" + componentName + "/."); - FileObject ofbizBase = getContext().resolveFile(location.toString(), properties); - return VFSUtil.toFileObject(ofbizBase.getFileSystem().getFileSystemManager(), ofbizBase.resolveFile(name.substring(restStart)).getURL().toString(), properties); - } catch (Exception e) { - throw UtilMisc.initCause(new FileSystemException(e.getMessage(), null, e), e); - } - } -} diff --git a/framework/webslinger/src/org/ofbiz/commons/vfs/ofbiz/OfbizHomeProvider.java b/framework/webslinger/src/org/ofbiz/commons/vfs/ofbiz/OfbizHomeProvider.java deleted file mode 100644 index 880bf6ea7f..0000000000 --- a/framework/webslinger/src/org/ofbiz/commons/vfs/ofbiz/OfbizHomeProvider.java +++ /dev/null @@ -1,50 +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.ofbiz.commons.vfs.ofbiz; - -import java.net.URL; -import java.util.Collection; - -import org.apache.commons.vfs.FileObject; -import org.apache.commons.vfs.FileSystemException; -import org.apache.commons.vfs.FileSystemOptions; -import org.apache.commons.vfs.provider.AbstractFileProvider; -import org.apache.commons.vfs.provider.local.DefaultLocalFileProvider; - -import org.ofbiz.base.location.FlexibleLocation; -import org.ofbiz.base.util.UtilMisc; - -import org.webslinger.commons.vfs.VFSUtil; - -public class OfbizHomeProvider extends AbstractFileProvider { - public Collection getCapabilities() { - return DefaultLocalFileProvider.capabilities; - } - - public FileObject findFile(FileObject base, String name, FileSystemOptions properties) throws FileSystemException { - //new Exception("findFile(" + base + ", " + name + ")").printStackTrace(); - try { - URL location = FlexibleLocation.resolveLocation("ofbizhome://."); - FileObject ofbizBase = getContext().resolveFile(location.toString(), properties); - return VFSUtil.toFileObject(ofbizBase.getFileSystem().getFileSystemManager(), ofbizBase.resolveFile(name.substring(13)).getURL().toString(), properties); - } catch (Exception e) { - throw UtilMisc.initCause(new FileSystemException(e.getMessage(), null, e), e); - } - } -} diff --git a/framework/webslinger/src/org/ofbiz/webslinger/EntityHttpUtil.java b/framework/webslinger/src/org/ofbiz/webslinger/EntityHttpUtil.java deleted file mode 100644 index 1ae066ccb3..0000000000 --- a/framework/webslinger/src/org/ofbiz/webslinger/EntityHttpUtil.java +++ /dev/null @@ -1,73 +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.ofbiz.webslinger; - -import java.util.Iterator; -import java.util.Locale; - -import javax.servlet.ServletRequest; -import javax.servlet.http.HttpServletRequest; - -import org.ofbiz.base.util.GeneralException; -import org.ofbiz.base.util.ObjectType; -import org.ofbiz.base.util.UtilHttp; -import org.ofbiz.entity.Delegator; -import org.ofbiz.entity.GenericValue; -import org.ofbiz.entity.model.ModelEntity; -import org.ofbiz.entity.model.ModelField; -import org.ofbiz.entity.model.ModelFieldType; - -public class EntityHttpUtil { - public static GenericValue makeValidValue(String entityName, ServletRequest request) throws GeneralException { - return makeValidValue(entityName, false, request); - } - - public static GenericValue makeValidValue(String entityName, boolean includePks, ServletRequest request) throws GeneralException { - if (request instanceof HttpServletRequest) return makeValidValue(entityName, includePks, (HttpServletRequest) request); - throw new IllegalArgumentException("Not an HttpServletRequest"); - } - - public static GenericValue makeValidValue(String entityName, HttpServletRequest request) throws GeneralException { - return makeValidValue(entityName, false, request); - } - - public static GenericValue makeValidValue(String entityName, boolean includePks, HttpServletRequest request) throws GeneralException { - Delegator delegator = (Delegator) request.getAttribute("delegator"); - GenericValue value = delegator.makeValue(entityName); - ModelEntity model = value.getModelEntity(); - Iterator it = includePks ? model.getFieldsIterator() : model.getNopksIterator(); - Locale locale = UtilHttp.getLocale(request); - while (it.hasNext()) { - ModelField field = it.next(); - String fieldName = field.getName(); - String parameterValue = request.getParameter(fieldName); - Object fieldValue; - if (parameterValue == null) { - fieldValue = null; - } else { - ModelFieldType fieldType = delegator.getEntityFieldType(model, field.getType()); - String wantedType = fieldType.getJavaType(); - fieldValue = ObjectType.simpleTypeConvert(parameterValue, wantedType, null, locale, true); - } - value.put(fieldName, fieldValue); - } - return value; - } -} - diff --git a/framework/webslinger/src/org/ofbiz/webslinger/EntityTransactionUtil.java b/framework/webslinger/src/org/ofbiz/webslinger/EntityTransactionUtil.java deleted file mode 100644 index 59fdeaeec8..0000000000 --- a/framework/webslinger/src/org/ofbiz/webslinger/EntityTransactionUtil.java +++ /dev/null @@ -1,37 +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.ofbiz.webslinger; - - -import org.ofbiz.entity.transaction.TransactionUtil; -import java.util.concurrent.Callable; - -public class EntityTransactionUtil { - /** @deprecated use TransactionUtil.doNewTransaction */ - @Deprecated - public static V doNewTransaction(String ifErrorMessage, Callable callable) throws Throwable { - return TransactionUtil.doNewTransaction(ifErrorMessage, callable); - } - - /** @deprecated use TransactionUtil.doNewTransaction */ - @Deprecated - public static V doTransaction(String ifErrorMessage, Callable callable) throws Throwable { - return TransactionUtil.doTransaction(ifErrorMessage, callable); - } -} diff --git a/framework/webslinger/src/org/ofbiz/webslinger/StatsUpdater.java b/framework/webslinger/src/org/ofbiz/webslinger/StatsUpdater.java deleted file mode 100644 index 19982fdde6..0000000000 --- a/framework/webslinger/src/org/ofbiz/webslinger/StatsUpdater.java +++ /dev/null @@ -1,118 +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.ofbiz.webslinger; - -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.Callable; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicReference; - -import org.ofbiz.base.util.UtilMisc; -import org.ofbiz.entity.Delegator; -import org.ofbiz.entity.GenericEntityException; -import org.ofbiz.entity.GenericPK; -import org.ofbiz.entity.GenericValue; -import org.webslinger.cache.ConcurrentCache; -import org.webslinger.concurrent.ExecutionPool; - -public class StatsUpdater { - private static final Updater UPDATER = new Updater(); - - public static void updateStats(Delegator delegator, String entityName, Map keyFields, Map updateCountFields) throws GenericEntityException { - GenericPK pk = delegator.makePK(entityName, keyFields); - Map value = UPDATER.getValue(pk); - synchronized (value) { - for (Map.Entry entry: updateCountFields.entrySet()) { - Long oldValue = value.get(entry.getKey()); - if (oldValue != null) { - value.put(entry.getKey(), Long.valueOf(oldValue.longValue() + entry.getValue())); - } else { - value.put(entry.getKey(), entry.getValue()); - } - } - } - } - - private static final class Updater implements Callable { - protected AtomicReference entities = new AtomicReference(new EntityHolder(Updater.class, "entities", null)); - protected ScheduledFuture future; - - protected Map getValue(GenericPK pk) throws GenericEntityException { - synchronized (this) { - if (future == null || future.isDone()) { - future = ExecutionPool.schedule(this, 1, TimeUnit.SECONDS); - } - } - try { - return entities.get().get(pk); - } catch (RuntimeException e) { - throw e; - } catch (GenericEntityException e) { - throw e; - } catch (Exception e) { - throw UtilMisc.initCause(new GenericEntityException(e.getMessage()), e); - } - } - - public Void call() { - EntityHolder oldEntities; - EntityHolder newEntities = new EntityHolder(Updater.class, "entities", null); - do { - oldEntities = entities.get(); - } while (!entities.compareAndSet(oldEntities, newEntities)); - synchronized (Updater.class) { - for (GenericPK pk: oldEntities.keys()) { - try { - Map add = oldEntities.get(pk); - GenericValue existing = pk.getDelegator().findOne(pk.getEntityName(), pk, false); - if (existing == null) { - existing = pk.getDelegator().create(pk.getEntityName(), pk); - } - for (Map.Entry entry: add.entrySet()) { - Long value = entry.getValue(); - Long oldValue = existing.getLong(entry.getKey()); - if (oldValue != null) { - existing.put(entry.getKey(), Long.valueOf(value.longValue() + oldValue.longValue())); - } else { - existing.put(entry.getKey(), value); - } - } - existing.store(); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - return null; - } - } - - private static final class EntityHolder extends ConcurrentCache> { - protected EntityHolder(Class owner, String field, String label) { - super(owner, field, label, HARD); - } - - @Override - protected Map createValue(GenericPK pk) throws Exception { - return new HashMap(); - } - } -} diff --git a/framework/webslinger/src/org/ofbiz/webslinger/WebslingerBSFServiceEngine.java b/framework/webslinger/src/org/ofbiz/webslinger/WebslingerBSFServiceEngine.java deleted file mode 100644 index 2b144e28fc..0000000000 --- a/framework/webslinger/src/org/ofbiz/webslinger/WebslingerBSFServiceEngine.java +++ /dev/null @@ -1,62 +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.ofbiz.webslinger; - -import java.io.IOException; -import java.util.Map; - -import org.apache.bsf.BSFException; - -import org.ofbiz.base.util.UtilGenerics; -import org.ofbiz.base.util.UtilMisc; -import org.ofbiz.service.DispatchContext; -import org.ofbiz.service.GenericServiceException; -import org.ofbiz.service.ModelService; -import org.ofbiz.service.ServiceDispatcher; -import org.ofbiz.service.engine.GenericAsyncEngine; - -public class WebslingerBSFServiceEngine extends GenericAsyncEngine { - private static final String[] paramNames; - private static final Class[] paramTypes; - static { - paramNames = new String[] { "dispatcher", "context" }; - paramTypes = new Class[] { DispatchContext.class, Map.class }; - } - - public WebslingerBSFServiceEngine(ServiceDispatcher dispatcher) { - super(dispatcher); - } - - @Override - public void runSyncIgnore(String localName, ModelService modelService, Map context) throws GenericServiceException { - runSync(localName, modelService, context); - } - - @Override - public Map runSync(String localName, ModelService modelService, Map context) throws GenericServiceException { - Object[] params = new Object[] { dispatcher.getLocalContext(localName), context }; - try { - return UtilGenerics.checkMap(WebslingerContainer.runEvent(modelService.engineName, modelService.location, paramNames, paramTypes, params)); - } catch (IOException e) { - throw UtilMisc.initCause(new GenericServiceException(e.getMessage()), e); - } catch (BSFException e) { - throw UtilMisc.initCause(new GenericServiceException(e.getMessage()), e); - } - } -} diff --git a/framework/webslinger/src/org/ofbiz/webslinger/WebslingerCatalinaContainer.java b/framework/webslinger/src/org/ofbiz/webslinger/WebslingerCatalinaContainer.java deleted file mode 100644 index 8ccda2dc4d..0000000000 --- a/framework/webslinger/src/org/ofbiz/webslinger/WebslingerCatalinaContainer.java +++ /dev/null @@ -1,53 +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.ofbiz.webslinger; - -import java.io.File; - -import org.apache.catalina.Engine; -import org.apache.catalina.core.StandardEngine; - -import org.ofbiz.base.util.UtilValidate; -import org.ofbiz.base.container.ContainerConfig; -import org.ofbiz.base.container.ContainerException; -import org.ofbiz.catalina.container.CatalinaContainer; - -import org.webslinger.catalina.WebslingerAccessLogValve; - -public class WebslingerCatalinaContainer extends CatalinaContainer { - @Override - protected Engine createEngine(ContainerConfig.Container.Property engineConfig) throws ContainerException { - Engine engine = super.createEngine(engineConfig); - String logDir = ContainerConfig.getPropertyValue(engineConfig, "access-log-dir", null); - if (logDir == null) return engine; - WebslingerAccessLogValve al = new WebslingerAccessLogValve(); - if (!logDir.startsWith("/")) logDir = System.getProperty("ofbiz.home") + "/" + logDir; - File logFile = new File(logDir); - if (!logFile.isDirectory()) throw new ContainerException("Log directory [" + logDir + "] is not available; make sure the directory is created"); - al.setDirectory(logFile.getAbsolutePath()); - String alp2 = ContainerConfig.getPropertyValue(engineConfig, "access-log-pattern", null); - if (!UtilValidate.isEmpty(alp2)) al.setPattern(alp2); - String alp3 = ContainerConfig.getPropertyValue(engineConfig, "access-log-prefix", null); - if (!UtilValidate.isEmpty(alp3)) al.setPrefix(alp3); - al.setResolveHosts(ContainerConfig.getPropertyValue(engineConfig, "access-log-resolve", true)); - al.setRotatable(ContainerConfig.getPropertyValue(engineConfig, "access-log-rotate", false)); - ((StandardEngine) engine).addValve(al); - return engine; - } -} diff --git a/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContainer.java b/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContainer.java deleted file mode 100644 index dd86c4d49b..0000000000 --- a/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContainer.java +++ /dev/null @@ -1,100 +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.ofbiz.webslinger; - -import java.io.IOException; -import java.io.StringWriter; -import java.io.Writer; -import java.util.Map; - -import org.apache.bsf.BSFException; -import org.apache.commons.vfs.FileName; -import org.apache.commons.vfs.FileObject; - -import org.ofbiz.base.container.Container; -import org.ofbiz.base.container.ContainerException; -import org.ofbiz.base.util.UtilMisc; -import org.ofbiz.commons.vfs.CommonsVfsContainer; - -import org.webslinger.bsf.LanguageManager; -import org.webslinger.template.CompiledTemplate; -import org.webslinger.template.TemplateManager; -import org.webslinger.vfs.CommonsVfsFileNameVFSDelegate; -import org.webslinger.vfs.TypeVFSDelegate; - -public class WebslingerContainer implements Container { - private static TypeVFSDelegate vfsDelegate; - private static LanguageManager languageManager; - private static TemplateManager templateManager; - - public void init(String[] args, String configFile) throws ContainerException { - } - - @SuppressWarnings("unchecked") - public boolean start() throws ContainerException { - ClassLoader loader = Thread.currentThread().getContextClassLoader(); - TypeVFSDelegate.Resolver resolver = new TypeVFSDelegate.Resolver() { - public Object resolve(String name) throws IOException { - return CommonsVfsContainer.resolveFile(name); - } - }; - try { - vfsDelegate = new TypeVFSDelegate(resolver); - vfsDelegate.addVFSDelegate(FileName.class, new CommonsVfsFileNameVFSDelegate(vfsDelegate, CommonsVfsContainer.getFileSystemManager())); - languageManager = new LanguageManager(vfsDelegate, null); - languageManager.setClassLoader(loader); - templateManager = new TemplateManager(vfsDelegate, null); - templateManager.setClassLoader(loader); - } catch (BSFException e) { - throw UtilMisc.initCause(new ContainerException("Initializing StandardFileSystemManager"), e); - } - return true; - } - - public void stop() throws ContainerException { - } - - public static LanguageManager getLanguageManager() { - return languageManager; - } - - public static TemplateManager getTemplateManager() { - return templateManager; - } - - public static Object runEvent(String language, String name, String[] paramNames, Class[] paramTypes, Object[] params) throws BSFException, IOException { - return getLanguageManager().apply(language, "top", 0, 0, CommonsVfsContainer.resolveFile(name), paramNames, params, paramTypes); - } - - public static String runTemplate(String language, String name, Map context) throws IOException { - StringWriter writer = new StringWriter(); - runTemplate(language, name, writer, context); - return writer.toString(); - } - - public static void runTemplate(String language, String name, Writer writer, Map context) throws IOException { - FileObject file = CommonsVfsContainer.resolveFile(name); - CompiledTemplate template = getTemplate(language, file); - template.run(file, writer, context); - } - - public static CompiledTemplate getTemplate(String language, FileObject file) throws IOException { - return getTemplateManager().compileTemplate(language, "top", 0, 0, file); - } -} diff --git a/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContextMapper.java b/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContextMapper.java deleted file mode 100644 index b9715826a6..0000000000 --- a/framework/webslinger/src/org/ofbiz/webslinger/WebslingerContextMapper.java +++ /dev/null @@ -1,216 +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.ofbiz.webslinger; - -import java.io.IOException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; - -import org.ofbiz.base.util.UtilMisc; -import org.ofbiz.base.util.UtilProperties; -import org.ofbiz.entity.Delegator; -import org.ofbiz.entity.DelegatorFactory; -import org.ofbiz.entity.GenericEntityException; -import org.ofbiz.entity.GenericValue; -import org.ofbiz.entity.cache.Cache; -import org.ofbiz.entity.util.EntityUtil; -import org.ofbiz.security.SecurityFactory; -import org.ofbiz.security.authz.AuthorizationFactory; -import org.ofbiz.service.DispatchContext; -import org.ofbiz.service.GenericDispatcher; -import org.ofbiz.service.ServiceDispatcher; -import org.webslinger.AbstractMappingWebslingerServletContextFactory; -import org.webslinger.WebslingerServletContext; -import org.webslinger.collections.CollectionUtil; -import org.webslinger.lang.ObjectUtil; - -public class WebslingerContextMapper extends AbstractMappingWebslingerServletContextFactory { - protected ServletContext servletContext; - protected Delegator delegator; - protected final ArrayList globalReaderURLs = new ArrayList(); - - public void init(ServletConfig config) throws ServletException, IOException { - System.err.println(org.webslinger.commons.vfs.flat.FlatFileProvider.class); - servletContext = config.getServletContext(); - String delegatorName = servletContext.getInitParameter("entityDelegatorName"); - delegator = DelegatorFactory.getDelegator(delegatorName); - String readerFiles = servletContext.getInitParameter("serviceReaderUrls"); - if (readerFiles != null) { - for (String reader: CollectionUtil.split(readerFiles, ";")) { - URL url = config.getServletContext().getResource(reader); - if (url != null) globalReaderURLs.add(url); - } - } - super.init(config, UtilProperties.getPropertyValue("webslinger.properties", "moduleBase")); - } - - @Override - protected Layout[] getStartLayouts() throws Exception { - ArrayList layouts = new ArrayList(); - try { - for (GenericValue value: delegator.findByAnd("WebslingerServer", UtilMisc.toMap("loadAtStart", "Y"))) { - layouts.add(new OfbizLayout(value)); - } - } catch (GenericEntityException e) { - } - return layouts.toArray(new Layout[layouts.size()]); - } - - @Override - public void initializeRequest(WebslingerServletContext context, HttpServletRequest request) { - request.setAttribute("servletContext", context); - Object delegator = context.getAttribute("delegator"); - Object dispatcher = context.getAttribute("dispatcher"); - Object authz = context.getAttribute("authz"); - Object security = context.getAttribute("security"); - request.setAttribute("delegator", delegator); - request.setAttribute("dispatcher", dispatcher); - request.setAttribute("authz", authz); - request.setAttribute("security", security); - // FIXME!!! These next two are a hack until proper fake/wrapped session support is done in webslinger - servletContext.setAttribute("delegator", delegator); - servletContext.setAttribute("dispatcher", dispatcher); - servletContext.setAttribute("authz", authz); - servletContext.setAttribute("security", security); - } - - @Override - protected void initializeContext(WebslingerServletContext context, Layout layout) throws Exception { - OfbizLayout ofbizLayout = (OfbizLayout) layout; - Delegator delegator = null; - delegator = DelegatorFactory.getDelegator(ofbizLayout.delegatorName); - context.setAttribute("delegator", delegator); - context.setAttribute("dispatcher", new WebslingerGenericDispatcher(context, layout.getTarget(), delegator, globalReaderURLs)); - context.setAttribute("authz", AuthorizationFactory.getInstance(delegator)); - context.setAttribute("security", SecurityFactory.getInstance(delegator)); - } - - protected static final class WebslingerGenericDispatcher extends GenericDispatcher { - protected WebslingerGenericDispatcher(WebslingerServletContext context, String name, Delegator delegator, List globalReaderURLs) throws IOException { - ArrayList readerURLs = new ArrayList(globalReaderURLs); - String readerFiles = context.getInitParameter("serviceReaderUrls"); - if (readerFiles != null) { - for (String reader: CollectionUtil.split(readerFiles, ";")) { - URL url = context.getResource(reader); - if (url != null) readerURLs.add(url); - } - } - System.err.println(readerURLs); - this.dispatcher = new ServiceDispatcher(delegator, true, true, true) { - }; - ClassLoader loader = null; - try { - loader = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException e) { - loader = WebslingerContextMapper.class.getClassLoader(); - } - DispatchContext dc = new DispatchContext(name, readerURLs, loader, null); - init(name, delegator, dc); - } - } - - @Override - protected Set getSuffixes() throws Exception { - Cache cache = delegator.getCache(); - Set suffixes; - synchronized (WebslingerContextMapper.class) { - suffixes = cache.get("WebslingerHostSuffix", null, "WebslingerContextMapper.Suffixes"); - if (suffixes == null) { - suffixes = new HashSet(); - for (GenericValue value: delegator.findList("WebslingerHostSuffix", null, null, null, null, false)) { - suffixes.add(value.getString("hostSuffix")); - } - cache.put("WebslingerHostSuffix", null, "WebslingerContextMapper.Suffixes", suffixes); - } - } - return suffixes; - } - - @Override - protected Layout lookupLayout(String hostName, String contextPath) throws Exception { - GenericValue layout = EntityUtil.getOnly(delegator.findByAndCache("WebslingerLayout", UtilMisc.toMap("hostName", hostName, "contextPath", contextPath))); - if (layout == null) return null; - return new OfbizLayout(layout); - } - - protected class OfbizLayout implements Layout { - private final String contextPath; - private final String id; - private final String target; - private final String[] bases; - private final int hashCode; - protected final String delegatorName; - protected final String dispatcherName; - - protected OfbizLayout(GenericValue server) throws GenericEntityException { - contextPath = server.getString("contextPath"); - id = server.getString("webslingerServerId"); - target = server.getString("target"); - List baseValues = server.getRelatedCache("WebslingerServerBase", UtilMisc.toList("seqNum")); - bases = new String[baseValues.size()]; - for (int i = 0; i < bases.length; i++) { - GenericValue baseValue = baseValues.get(i); - bases[i] = baseValue.getString("baseName"); - } - delegatorName = server.getString("delegatorName"); - dispatcherName = server.getString("dispatcherName"); - hashCode = target.hashCode() ^ ObjectUtil.hashCodeHelper(delegatorName) ^ Arrays.hashCode(bases); - } - - public String getContextPath() { - return contextPath; - } - - public String getId() { - return id; - } - - public String getTarget() { - return target; - } - - public String[] getBases() { - return bases; - } - - @Override - public int hashCode() { - return hashCode; - } - - @Override - public boolean equals(Object o) { - if (!(o instanceof OfbizLayout)) return false; - OfbizLayout other = (OfbizLayout) o; - if (!contextPath.equals(other.contextPath)) return false; - if (!target.equals(other.target)) return false; - if (!ObjectUtil.equalsHelper(delegatorName, other.delegatorName)) return false; - return Arrays.equals(bases, other.bases); - } - } -} diff --git a/framework/webslinger/src/org/ofbiz/webslinger/WebslingerServerEngine.java b/framework/webslinger/src/org/ofbiz/webslinger/WebslingerServerEngine.java deleted file mode 100644 index a9272dd23f..0000000000 --- a/framework/webslinger/src/org/ofbiz/webslinger/WebslingerServerEngine.java +++ /dev/null @@ -1,59 +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.ofbiz.webslinger; - -import java.util.Map; - -import org.ofbiz.base.util.UtilGenerics; -import org.ofbiz.base.util.UtilMisc; -import org.ofbiz.entity.Delegator; -import org.ofbiz.entity.GenericValue; -import org.ofbiz.entity.util.EntityUtil; -import org.ofbiz.service.GenericServiceException; -import org.ofbiz.service.ModelService; -import org.ofbiz.service.ServiceDispatcher; -import org.ofbiz.service.engine.GenericAsyncEngine; -import org.webslinger.WebslingerServletContext; - -public class WebslingerServerEngine extends GenericAsyncEngine { - public WebslingerServerEngine(ServiceDispatcher dispatcher) { - super(dispatcher); - } - - @Override - public void runSyncIgnore(String localName, ModelService modelService, Map context) throws GenericServiceException { - runSync(localName, modelService, context); - } - - @Override - public Map runSync(String localName, ModelService modelService, Map context) throws GenericServiceException { - Delegator delegator = dispatcher.getDelegator(); - try { - GenericValue found = EntityUtil.getFirst(delegator.findByAndCache("WebslingerLayout", UtilMisc.toMap("webslingerServerId", modelService.location))); - if (found == null) throw new GenericServiceException("Couldn't find server mapping for(" + modelService.location + ")"); - return UtilGenerics.checkMap(WebslingerServletContext.invokeInVM(found.getString("hostName"), 8080, modelService.invoke, context)); - } catch (RuntimeException e) { - throw e; - } catch (GenericServiceException e) { - throw e; - } catch (Exception e) { - throw UtilMisc.initCause(new GenericServiceException(e.getMessage()), e); - } - } -} diff --git a/framework/webslinger/webapp/webslinger/WEB-INF/web.xml b/framework/webslinger/webapp/webslinger/WEB-INF/web.xml deleted file mode 100644 index f613867c1f..0000000000 --- a/framework/webslinger/webapp/webslinger/WEB-INF/web.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - Open For Business - Catalog - Catalog Module of the Open For Business Project - - - entityDelegatorName - default - The Name of the Entity Delegator to use, defined in entityengine.xml - - - - ofbiz.webslinger.baseLocation - ofbiz-component://webslinger/webapp/bases - - - - WebslingerServlet - WebslingerServlet - Webslinger Servlet - org.webslinger.servlet.WebslingerServlet - - ofbiz.mapping.ttl - 60000 - - - org.webslinger.servlet.WebslingerServlet.WebslingerServletContextFactory - org.ofbiz.webslinger.WebslingerContextMapper - - 1 - - - WebslingerServlet - /* - - - - 60 - - - - index.jsp - index.html - index.htm - - diff --git a/framework/webslinger/websites/webslinger/Config/ModuleState.xml b/framework/webslinger/websites/webslinger/Config/ModuleState.xml deleted file mode 100644 index eac11bb8d2..0000000000 --- a/framework/webslinger/websites/webslinger/Config/ModuleState.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - diff --git a/framework/webslinger/websites/webslinger/www/OfBiz/DemoScreen.ofbiz-screen b/framework/webslinger/websites/webslinger/www/OfBiz/DemoScreen.ofbiz-screen deleted file mode 100644 index e77b86d0ee..0000000000 --- a/framework/webslinger/websites/webslinger/www/OfBiz/DemoScreen.ofbiz-screen +++ /dev/null @@ -1,33 +0,0 @@ - -
- - - - - - - - - - - - - -
diff --git a/framework/webslinger/websites/webslinger/www/OfBiz/DemoScreen.ofbiz-screen@/wrapper b/framework/webslinger/websites/webslinger/www/OfBiz/DemoScreen.ofbiz-screen@/wrapper deleted file mode 100644 index a6f298056b..0000000000 --- a/framework/webslinger/websites/webslinger/www/OfBiz/DemoScreen.ofbiz-screen@/wrapper +++ /dev/null @@ -1 +0,0 @@ -java.lang.String:None diff --git a/framework/webslinger/websites/webslinger/www/OfBiz/index.vm b/framework/webslinger/websites/webslinger/www/OfBiz/index.vm deleted file mode 100644 index d7e0a06c4c..0000000000 --- a/framework/webslinger/websites/webslinger/www/OfBiz/index.vm +++ /dev/null @@ -1,19 +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. -*# -#Merge("DemoScreen.ofbiz-screen") diff --git a/framework/webslinger/websites/webslinger/www/Showcase/Events/Groovy.groovy b/framework/webslinger/websites/webslinger/www/Showcase/Events/Groovy.groovy deleted file mode 100644 index 8b16621827..0000000000 --- a/framework/webslinger/websites/webslinger/www/Showcase/Events/Groovy.groovy +++ /dev/null @@ -1,21 +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. - *******************************************************************************/ -webslinger.response.writer.println('groovy start') -webslinger.merge('Middle') -webslinger.response.writer.println('groovy end') diff --git a/framework/webslinger/websites/webslinger/www/Showcase/Events/Java.jn b/framework/webslinger/websites/webslinger/www/Showcase/Events/Java.jn deleted file mode 100644 index 3be8f3c3c2..0000000000 --- a/framework/webslinger/websites/webslinger/www/Showcase/Events/Java.jn +++ /dev/null @@ -1,22 +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. - *******************************************************************************/ -webslinger.getResponse().getWriter().println("java start"); -webslinger.merge("Middle"); -webslinger.getResponse().getWriter().println("java end"); -return null; diff --git a/framework/webslinger/websites/webslinger/www/Showcase/Events/Middle.vm b/framework/webslinger/websites/webslinger/www/Showcase/Events/Middle.vm deleted file mode 100644 index 5eae7e4d16..0000000000 --- a/framework/webslinger/websites/webslinger/www/Showcase/Events/Middle.vm +++ /dev/null @@ -1,19 +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. -*# -Something in the middle of an event. diff --git a/framework/webslinger/websites/webslinger/www/Showcase/Middle.groovy b/framework/webslinger/websites/webslinger/www/Showcase/Middle.groovy deleted file mode 100644 index 8c274e7593..0000000000 --- a/framework/webslinger/websites/webslinger/www/Showcase/Middle.groovy +++ /dev/null @@ -1,19 +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. - *******************************************************************************/ -webslinger.response.writer.write("Howdy from groovy.") diff --git a/framework/webslinger/websites/webslinger/www/Showcase/SomeLeftMenu.vm b/framework/webslinger/websites/webslinger/www/Showcase/SomeLeftMenu.vm deleted file mode 100644 index f9e7f247c6..0000000000 --- a/framework/webslinger/websites/webslinger/www/Showcase/SomeLeftMenu.vm +++ /dev/null @@ -1,24 +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. -*# - diff --git a/framework/webslinger/websites/webslinger/www/Showcase/StandAlonePage.vm b/framework/webslinger/websites/webslinger/www/Showcase/StandAlonePage.vm deleted file mode 100644 index f292a6c6f1..0000000000 --- a/framework/webslinger/websites/webslinger/www/Showcase/StandAlonePage.vm +++ /dev/null @@ -1,21 +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. -*# -

-Page by itself, or merged inside another. -

diff --git a/framework/webslinger/websites/webslinger/www/Showcase/StandAlonePage.vm@/section-LeftMenu b/framework/webslinger/websites/webslinger/www/Showcase/StandAlonePage.vm@/section-LeftMenu deleted file mode 100644 index b5918d3b91..0000000000 --- a/framework/webslinger/websites/webslinger/www/Showcase/StandAlonePage.vm@/section-LeftMenu +++ /dev/null @@ -1 +0,0 @@ -java.lang.String:SomeLeftMenu diff --git a/framework/webslinger/websites/webslinger/www/Showcase/StandAlonePage.vm@/template b/framework/webslinger/websites/webslinger/www/Showcase/StandAlonePage.vm@/template deleted file mode 100644 index 850ee9a688..0000000000 --- a/framework/webslinger/websites/webslinger/www/Showcase/StandAlonePage.vm@/template +++ /dev/null @@ -1 +0,0 @@ -java.lang.String:TwoColumn diff --git a/framework/webslinger/websites/webslinger/www/Showcase/Templates/Middle.vm b/framework/webslinger/websites/webslinger/www/Showcase/Templates/Middle.vm deleted file mode 100644 index 734f3663ef..0000000000 --- a/framework/webslinger/websites/webslinger/www/Showcase/Templates/Middle.vm +++ /dev/null @@ -1,19 +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. -*# -This is the middle of a template. diff --git a/framework/webslinger/websites/webslinger/www/Showcase/Templates/Velocity.vm b/framework/webslinger/websites/webslinger/www/Showcase/Templates/Velocity.vm deleted file mode 100644 index 1360214275..0000000000 --- a/framework/webslinger/websites/webslinger/www/Showcase/Templates/Velocity.vm +++ /dev/null @@ -1,21 +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. -*# -velocity start -#Merge("Middle") -velocity end diff --git a/framework/webslinger/websites/webslinger/www/Showcase/index.vm b/framework/webslinger/websites/webslinger/www/Showcase/index.vm deleted file mode 100644 index 5c9e8aae8a..0000000000 --- a/framework/webslinger/websites/webslinger/www/Showcase/index.vm +++ /dev/null @@ -1,26 +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. -*# -
-#Merge("Events/Groovy")
-#Merge("Events/Java")
-#Merge("Templates/Velocity")
-
- -#Merge("Middle", "$ThemePath/Templates/Box/Blue") -#Merge("StandAlonePage") diff --git a/framework/webslinger/websites/webslinger/www/TestSQL.groovy b/framework/webslinger/websites/webslinger/www/TestSQL.groovy deleted file mode 100644 index 0579d962fc..0000000000 --- a/framework/webslinger/websites/webslinger/www/TestSQL.groovy +++ /dev/null @@ -1,64 +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. - *******************************************************************************/ -import java.util.concurrent.Callable -import org.ofbiz.entity.sql.SQLUtil -import org.ofbiz.entity.transaction.TransactionUtil -response.contentType = 'text/html' -def delegator = request.delegator - -/* -def ec1 = SQLUtil.parseCondition("partyId = 'foo' AND partyTypeId = 'PARTY_GROUP' OR sequenceNum IN (1, 2) or foo BETWEEN 'a' and 'b'") -println("ec1=$ec1") -response.writer.println("ec1=$ec1
") -def ec2 = SQLUtil.parseCondition(ec1.toString()) -println("ec2=$ec2") -response.writer.println("ec2=$ec2
") -//return -*/ - -def sql = """ -SELECT - a.partyId, - a.partyTypeId AS type, - COALESCE(b.firstName, '') AS firstName, - COALESCE(b.lastName, '') AS lastName, - COALESCE(c.groupName, '') AS groupName -FROM - Party a LEFT JOIN Person b USING partyId LEFT JOIN PartyGroup c USING partyId -RELATION TYPE one Party USING partyId -WHERE - partyId = ?partyId -; -""" -def sqlSelect = SQLUtil.parseSelect(sql) - -TransactionUtil.doNewTransaction("Test", [call: { - def eli - try { - eli = sqlSelect.getEntityListIterator(delegator, [partyId: 'admin']) - def gv; - while ((gv = eli.next()) != null) { - response.writer.println("gv=$gv
") - def party = gv.getRelatedOneCache('Party'); response.writer.println("\tparty=$party
") - //def person = gv.getRelatedOneCache('Person'); response.writer.println("\tperson=$person
") - } - } finally { - if (eli != null) eli.close() - } -}] as Callable) diff --git a/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/Box.vm b/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/Box.vm deleted file mode 100644 index ebb680ad6c..0000000000 --- a/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/Box.vm +++ /dev/null @@ -1,20 +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. -*# -#set($boxStyle = $webslinger.pathInfo.split("/").get(1)) -
#Content()
diff --git a/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/Box.vm@/is-filter b/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/Box.vm@/is-filter deleted file mode 100644 index 0194e35580..0000000000 --- a/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/Box.vm@/is-filter +++ /dev/null @@ -1 +0,0 @@ -java.lang.String:true diff --git a/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/Editable.vm b/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/Editable.vm deleted file mode 100644 index 494f86c76f..0000000000 --- a/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/Editable.vm +++ /dev/null @@ -1,20 +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. -*# -#set($cause = $webslinger.planCause) -
#Content()
diff --git a/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/TwoColumn.vm b/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/TwoColumn.vm deleted file mode 100644 index d9aa292a13..0000000000 --- a/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/TwoColumn.vm +++ /dev/null @@ -1,26 +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. -*# -
-
-#Section("LeftMenu") -
-
-#Content("Editable") -
-
diff --git a/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/TwoColumn.vm@/section-LeftMenu b/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/TwoColumn.vm@/section-LeftMenu deleted file mode 100644 index ca26584654..0000000000 --- a/framework/webslinger/websites/webslinger/www/Theme/Default/Templates/TwoColumn.vm@/section-LeftMenu +++ /dev/null @@ -1 +0,0 @@ -java.lang.String:/Includes/DefaultMenu diff --git a/framework/webslinger/websites/webslinger/www/WEB-INF/web.xml b/framework/webslinger/websites/webslinger/www/WEB-INF/web.xml deleted file mode 100644 index c2cfbef84e..0000000000 --- a/framework/webslinger/websites/webslinger/www/WEB-INF/web.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - org.ofbiz.webapp.control.ControlEventListener - org.ofbiz.webapp.control.LoginEventListener - - - - jsp - org.apache.jasper.servlet.JspServlet - forkfalse - xpoweredByfalse - mappedFilefalse - genStrAsCharArraytrue - 3 - - - Main Control Servlet - ControlServlet - ControlServlet - org.ofbiz.webapp.control.ControlServlet - 1 - - jsp*.jsp - - ControlServlet - /control/* - - - diff --git a/framework/webslinger/websites/webslinger/www/index.whtml b/framework/webslinger/websites/webslinger/www/index.whtml deleted file mode 100644 index 1b4533e899..0000000000 --- a/framework/webslinger/websites/webslinger/www/index.whtml +++ /dev/null @@ -1,29 +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. -*# -

-Front page. -

- -

-Look at the showcase, and at a standalone page. -

- -

-Also try looking at some deep OfBiz integration. -