Author: doogie
Date: Fri Mar 27 16:58:16 2009 New Revision: 759240 URL: http://svn.apache.org/viewvc?rev=759240&view=rev Log: Fix lines that *only* have whitespace. Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/DispatchContext.java ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericAbstractDispatcher.java ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericDispatcher.java ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericRequester.java ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericResultWaiter.java ofbiz/trunk/framework/service/src/org/ofbiz/service/LocalDispatcher.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelNotification.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java ofbiz/trunk/framework/service/src/org/ofbiz/service/RunningService.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/ExpressionUiHelper.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpression.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressions.java ofbiz/trunk/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaRule.java ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/BSFEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/BeanShellEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/EntityAutoEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericEngineFactory.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/HttpEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/InterfaceEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/SOAPClientEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/StandardJavaEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/group/GroupModel.java ofbiz/trunk/framework/service/src/org/ofbiz/service/group/GroupServiceModel.java ofbiz/trunk/framework/service/src/org/ofbiz/service/group/ServiceGroupEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/group/ServiceGroupReader.java ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/AbstractJmsListener.java ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsListenerFactory.java ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsServiceEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobInvoker.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManager.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobManagerException.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/JobPoller.java ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaRule.java ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcher.java ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/socket/ssl/SSLServerSocketFactory.java ofbiz/trunk/framework/service/src/org/ofbiz/service/semaphore/ServiceSemaphore.java ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTestServices.java Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/DispatchContext.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/DispatchContext.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/DispatchContext.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/DispatchContext.java Fri Mar 27 16:58:16 2009 @@ -122,7 +122,7 @@ public String getName() { return name; } - + /** * Uses an existing map of name value pairs and extracts the keys which are used in serviceName * Note: This goes not guarantee the context will be 100% valid, there may be missing fields @@ -135,9 +135,9 @@ public Map<String, Object> makeValidContext(String serviceName, String mode, Map<String, ? extends Object> context) throws GenericServiceException { ModelService model = this.getModelService(serviceName); return makeValidContext(model, mode, context); - + } - + /** * Uses an existing map of name value pairs and extracts the keys which are used in serviceName * Note: This goes not guarantee the context will be 100% valid, there may be missing fields @@ -149,7 +149,7 @@ */ public Map<String, Object> makeValidContext(ModelService model, String mode, Map<String, ? extends Object> context) throws GenericServiceException { Map<String, Object> newContext; - + int modeInt = 0; if (mode.equalsIgnoreCase("in")) { modeInt = 1; @@ -185,18 +185,18 @@ if (retVal == null) { retVal = getGlobalModelService(serviceName); } - + if (retVal == null) { throw new GenericServiceException("Cannot locate service by name (" + serviceName + ")"); } - + //Debug.logTiming("Got ModelService for name [" + serviceName + "] in [" + (System.currentTimeMillis() - timeStart) + "] milliseconds", module); return retVal; } - + private ModelService getLocalModelService(String serviceName) throws GenericServiceException { Map<String, ModelService> serviceMap = this.getLocalServiceMap(); - + ModelService retVal = null; if (serviceMap != null) { retVal = serviceMap.get(serviceName); @@ -204,7 +204,7 @@ retVal.interfaceUpdate(this); } } - + return retVal; } @@ -218,7 +218,7 @@ retVal.interfaceUpdate(this); } } - + return retVal; } @@ -276,10 +276,10 @@ } } } - + return serviceMap; } - + private Map<String, ModelService> getGlobalServiceMap() { Map<String, ModelService> serviceMap = modelServiceMapByDispatcher.get(GLOBAL_KEY); if (serviceMap == null) { @@ -306,7 +306,7 @@ serviceMap.putAll(servicesMap); } } - + // get all of the component resource model stuff, ie specified in each ofbiz-component.xml file for (ComponentConfig.ServiceResourceInfo componentResourceInfo: ComponentConfig.getAllServiceResourceInfos("model")) { Map<String, ModelService> servicesMap = ModelServiceReader.getModelServiceMap(componentResourceInfo.createResourceHandler(), this); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericAbstractDispatcher.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericAbstractDispatcher.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericAbstractDispatcher.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericAbstractDispatcher.java Fri Mar 27 16:58:16 2009 @@ -54,14 +54,14 @@ public void schedule(String poolName, String serviceName, long startTime, int frequency, int interval, int count, long endTime, int maxRetry, Object... context) throws GenericServiceException { schedule(poolName, serviceName, ServiceUtil.makeContext(context), startTime, frequency, interval, count, endTime, maxRetry); } - + /** * @see org.ofbiz.service.LocalDispatcher#schedule(java.lang.String, java.lang.String, java.lang.String, java.util.Map, long, int, int, int, long, int) */ public void schedule(String jobName, String poolName, String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count, long endTime, int maxRetry) throws GenericServiceException { try { getJobManager().schedule(jobName, poolName, serviceName, context, startTime, frequency, interval, count, endTime, maxRetry); - + if (Debug.verboseOn()) { Debug.logVerbose("[LocalDispatcher.schedule] : Current time : " + (new Date()).getTime(), module); Debug.logVerbose("[LocalDispatcher.schedule] : Runtime : " + startTime, module); @@ -71,7 +71,7 @@ Debug.logVerbose("[LocalDispatcher.schedule] : EndTime : " + endTime, module); Debug.logVerbose("[LocalDispatcher.schedule] : MazRetry : " + maxRetry, module); } - + } catch (JobManagerException e) { throw new GenericServiceException(e.getMessage(), e); } @@ -139,7 +139,7 @@ public void schedule(String serviceName, long startTime, int frequency, int interval, int count, Object... context) throws GenericServiceException { schedule(serviceName, ServiceUtil.makeContext(context), startTime, frequency, interval, count); } - + /** * @see org.ofbiz.service.LocalDispatcher#schedule(java.lang.String, java.util.Map, long, int, int, long) */ @@ -168,28 +168,28 @@ public JobManager getJobManager() { return dispatcher.getJobManager(); } - + /** * @see org.ofbiz.service.LocalDispatcher#getJMSListeneFactory() */ public JmsListenerFactory getJMSListeneFactory() { return dispatcher.getJMSListenerFactory(); } - + /** * @see org.ofbiz.service.LocalDispatcher#getDelegator() */ public GenericDelegator getDelegator() { return dispatcher.getDelegator(); } - + /** * @see org.ofbiz.service.LocalDispatcher#getSecurity() */ public Security getSecurity() { return dispatcher.getSecurity(); } - + /** * @see org.ofbiz.service.LocalDispatcher#getName() */ @@ -203,7 +203,7 @@ public DispatchContext getDispatchContext() { return ctx; } - + /** * @see org.ofbiz.service.LocalDispatcher#deregister() */ Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericDispatcher.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericDispatcher.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericDispatcher.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericDispatcher.java Fri Mar 27 16:58:16 2009 @@ -37,7 +37,7 @@ protected static boolean ecasDisabled = false; protected static Map<String, LocalDispatcher> dispatcherCache = FastMap.newInstance(); - + public static LocalDispatcher getLocalDispatcher(String dispatcherName, GenericDelegator delegator) { return getLocalDispatcher(dispatcherName, delegator, null, null, null); } @@ -45,7 +45,7 @@ public static LocalDispatcher getLocalDispatcher(String dispatcherName, GenericDelegator delegator, Collection<URL> readerURLs, ClassLoader loader) { return getLocalDispatcher(dispatcherName, delegator, readerURLs, loader, null); } - + public static LocalDispatcher getLocalDispatcher(String dispatcherName, GenericDelegator delegator, Collection<URL> readerURLs, ClassLoader loader, ServiceDispatcher serviceDispatcher) { if (dispatcherName == null) { dispatcherName = "default"; @@ -60,15 +60,15 @@ if (dispatcher == null) { if (Debug.infoOn()) Debug.logInfo("Creating new dispatcher [" + dispatcherName + "] (" + Thread.currentThread().getName() + ")", module); //Debug.logInfo(new Exception(), "Showing stack where new dispatcher is being created...", module); - + if (delegator == null && serviceDispatcher != null) { delegator = serviceDispatcher.getDelegator(); } - + if (loader == null) { loader = GenericDispatcher.class.getClassLoader(); } - + ServiceDispatcher sd = serviceDispatcher != null? serviceDispatcher : ServiceDispatcher.getInstance(dispatcherName, delegator); LocalDispatcher thisDispatcher = null; if (sd != null) { @@ -100,7 +100,7 @@ } return new GenericDispatcher(name, delegator, null, loader, sd); } - + public static Set<String> getAllDispatcherNames() { return dispatcherCache.keySet(); } @@ -228,7 +228,7 @@ public void runAsync(String serviceName, GenericRequester requester, boolean persist, Object... context) throws ServiceAuthException, ServiceValidationException, GenericServiceException { runAsync(serviceName, ServiceUtil.makeContext(context), requester, persist); } - + /** * @see org.ofbiz.service.LocalDispatcher#runAsync(java.lang.String, java.util.Map, org.ofbiz.service.GenericRequester) */ @@ -239,7 +239,7 @@ public void runAsync(String serviceName, GenericRequester requester, Object... context) throws ServiceAuthException, ServiceValidationException, GenericServiceException { runAsync(serviceName, ServiceUtil.makeContext(context), requester); } - + /** * @see org.ofbiz.service.LocalDispatcher#runAsync(java.lang.String, java.util.Map, boolean) */ @@ -251,7 +251,7 @@ public void runAsync(String serviceName, boolean persist, Object... context) throws ServiceAuthException, ServiceValidationException, GenericServiceException { runAsync(serviceName, ServiceUtil.makeContext(context), persist); } - + /** * @see org.ofbiz.service.LocalDispatcher#runAsync(java.lang.String, java.util.Map) */ @@ -271,7 +271,7 @@ public GenericResultWaiter runAsyncWait(String serviceName, boolean persist, Object... context) throws ServiceAuthException, ServiceValidationException, GenericServiceException { return runAsyncWait(serviceName, ServiceUtil.makeContext(context), persist); } - + /** * @see org.ofbiz.service.LocalDispatcher#runAsyncWait(java.lang.String, java.util.Map) */ Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericRequester.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericRequester.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericRequester.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericRequester.java Fri Mar 27 16:58:16 2009 @@ -31,7 +31,7 @@ * @param result Map of name, value pairs composing the result */ public void receiveResult(Map<String, Object> result); - + /** * Receive an exception (Throwable) from an asynchronous service cell * @param t The Throwable which was received Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericResultWaiter.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericResultWaiter.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericResultWaiter.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericResultWaiter.java Fri Mar 27 16:58:16 2009 @@ -28,14 +28,14 @@ public class GenericResultWaiter implements GenericRequester { public static final String module = GenericResultWaiter.class.getName(); - + /** Status code for a running service */ public static final int SERVICE_RUNNING = -1; /** Status code for a failed service */ public static final int SERVICE_FAILED = 0; /** Status code for a successful service */ public static final int SERVICE_FINISHED = 1; - + private boolean completed = false; private int status = -1; private Map<String, Object> result = null; @@ -52,7 +52,7 @@ if (Debug.verboseOn()) Debug.logVerbose("Received Result (" + completed + ") -- " + result, module); } - + /** * @see org.ofbiz.service.GenericRequester#receiveThrowable(java.lang.Throwable) */ @@ -62,7 +62,7 @@ status = SERVICE_FAILED; notify(); } - + /** * Returns the status of the service. * @return int Status code @@ -70,7 +70,7 @@ public synchronized int status() { return this.status; } - + /** * If the service has completed return true * @return boolean @@ -78,7 +78,7 @@ public synchronized boolean isCompleted() { return completed; } - + /** * Returns the exception which was thrown or null if none * @return Exception Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/LocalDispatcher.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/LocalDispatcher.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/LocalDispatcher.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/LocalDispatcher.java Fri Mar 27 16:58:16 2009 @@ -96,7 +96,7 @@ */ public void runSyncIgnore(String serviceName, Map<String, ? extends Object> context, int transactionTimeout, boolean requireNewTransaction) throws ServiceAuthException, ServiceValidationException, GenericServiceException; public void runSyncIgnore(String serviceName, int transactionTimeout, boolean requireNewTransaction, Object... context) throws ServiceAuthException, ServiceValidationException, GenericServiceException; - + /** * Run the service asynchronously, passing an instance of GenericRequester that will receive the result. * @param serviceName Name of the service to run. Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelNotification.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelNotification.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelNotification.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelNotification.java Fri Mar 27 16:58:16 2009 @@ -95,7 +95,7 @@ notifyContext.put("partyId", partyId); notifyContext.put("bodyScreenUri", screen); - + return notifyContext; } Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java Fri Mar 27 16:58:16 2009 @@ -48,13 +48,13 @@ /** Parameter mode (IN/OUT/INOUT) */ public String mode; - + /** The form label */ public String formLabel; - + /** The entity name */ public String entityName; - + /** The entity field name */ public String fieldName; @@ -77,15 +77,15 @@ /** Is this parameter to be displayed via the form tool? */ public boolean formDisplay = true; public boolean overrideFormDisplay = false; - + /** Default value */ public String allowHtml = null; - + /** Is this Parameter set internally? */ public boolean internal = false; - + public ModelParam() {} - + public ModelParam(ModelParam param) { this.name = param.name; this.type = param.type; @@ -120,35 +120,35 @@ return null; } } - + public String getShortDisplayDescription() { return this.name + "[" + this.type + "-" + this.mode + "]" + (optional ? "" : "*"); } - + public String getName() { return this.name; } - + public String getType() { return this.type; } - + public String getMode() { return this.mode; } - + public boolean isIn() { return "IN".equals(this.mode) || "INOUT".equals(this.mode); } - + public boolean isOut() { return "OUT".equals(this.mode) || "INOUT".equals(this.mode); } - + public boolean isOptional() { return this.optional; } - + public Object getDefaultValue() { Object defaultValueObj = null; if (this.type != null) { @@ -180,7 +180,7 @@ public boolean equals(ModelParam model) { return model.name.equals(this.name); } - + public String toString() { StringBuilder buf = new StringBuilder(); buf.append(name).append("::"); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java Fri Mar 27 16:58:16 2009 @@ -106,7 +106,7 @@ /** The name of this service */ public String name; - + /** The location of the definition this service */ public String definitionLocation; @@ -130,7 +130,7 @@ /** The loader which loaded this definition */ public String fromLoader; - + /** Does this service require authorization */ public boolean auth; @@ -160,7 +160,7 @@ /** Permission service main-action */ public String permissionMainAction; - + /** Permission service resource-description */ public String permissionResourceDesc; @@ -172,7 +172,7 @@ /** Semaphore sleep time (in milliseconds) */ public int semaphoreSleep; - + /** Set of services this service implements */ public Set<ModelServiceIface> implServices = new LinkedHashSet<ModelServiceIface>(); @@ -187,7 +187,7 @@ /** Internal Service Group */ public GroupModel internalGroup = null; - + /** Context Information, a Map of parameters used by the service, contains ModelParam objects */ protected Map<String, ModelParam> contextInfo = FastMap.newInstance(); @@ -546,7 +546,7 @@ Debug.logError("[ModelService.validate] : {" + name + "} : (" + mode + ") Required test error: " + e.toString(), module); throw e; } - + // required and type validation complete, do allow-html validation if ("IN".equals(mode)) { List<String> errorMessageList = FastList.newInstance(); @@ -601,7 +601,7 @@ } missingMsgs.add(msg); } - + List<String> missingCopy = FastList.newInstance(); missingCopy.addAll(missing); throw new ServiceValidationException(missingMsgs, model, missingCopy, null, mode); @@ -840,7 +840,7 @@ locale = Locale.getDefault(); } } - + if (timeZone == null) { // if statement here to avoid warning messages for Entity ECA service input validation, even though less efficient that doing a straight get if (source.containsKey("timeZone")) { @@ -850,7 +850,7 @@ timeZone = TimeZone.getDefault(); } } - + for (ModelParam param: contextParamList) { //boolean internalParam = param.internal; @@ -950,7 +950,7 @@ } else if (thisService != null) { ctx.put("resourceDescription", thisService.name); } - + LocalDispatcher dispatcher = dctx.getDispatcher(); Map<String, Object> resp; try { @@ -1059,7 +1059,7 @@ for (ModelParam modelParam: this.contextParamList) { // don't include OUT parameters in this list, only IN and INOUT if ("OUT".equals(modelParam.mode)) continue; - + inList.add(modelParam); } return inList; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java Fri Mar 27 16:58:16 2009 @@ -148,7 +148,7 @@ } catch (GenericConfigException e) { Debug.logError(e, "Could not get resource URL", module); } - + int i = 0; Node curChild = docElement.getFirstChild(); if (curChild != null) { @@ -270,7 +270,7 @@ service.auth = "true".equalsIgnoreCase(serviceElement.getAttribute("auth")); service.export = "true".equalsIgnoreCase(serviceElement.getAttribute("export")); service.debug = "true".equalsIgnoreCase(serviceElement.getAttribute("debug")); - + // this defaults to true; if anything but false, make it true service.validate = !"false".equalsIgnoreCase(serviceElement.getAttribute("validate")); service.useTransaction = !"false".equalsIgnoreCase(serviceElement.getAttribute("use-transaction")); @@ -313,7 +313,7 @@ } } service.maxRetry = maxRetry; - + // get the timeout and convert to int String timeoutStr = UtilXml.checkEmpty(serviceElement.getAttribute("transaction-timeout"), serviceElement.getAttribute("transaction-timout")); int timeout = 0; @@ -326,10 +326,10 @@ } } service.transactionTimeout = timeout; - + service.description = getCDATADef(serviceElement, "description"); service.nameSpace = getCDATADef(serviceElement, "namespace"); - + // contruct the context service.contextInfo = FastMap.newInstance(); this.createNotification(serviceElement, service); @@ -340,7 +340,7 @@ this.createAutoAttrDefs(serviceElement, service); this.createAttrDefs(serviceElement, service); this.createOverrideDefs(serviceElement, service); - + return service; } @@ -444,7 +444,7 @@ if (Debug.verboseOn()) Debug.logVerbose("Created INTERNAL GROUP model [" + service.internalGroup + "]", module); } } - + protected void createImplDefs(Element baseElement, ModelService service) { for (Element implement: UtilXml.childElementList(baseElement, "implements")) { String serviceName = UtilXml.checkEmpty(implement.getAttribute("service")).intern(); @@ -454,13 +454,13 @@ //service.implServices.add(serviceName); } } - + protected void createAutoAttrDefs(Element baseElement, ModelService service) { for (Element element: UtilXml.childElementList(baseElement, "auto-attributes")) { createAutoAttrDef(element, service); } } - + protected void createAutoAttrDef(Element autoElement, ModelService service) { // get the entity name; first from the auto-attributes then from the service def String entityName = UtilXml.checkEmpty(autoElement.getAttribute("entity-name")); @@ -470,18 +470,18 @@ Debug.logWarning("Auto-Attribute does not specify an entity-name; not default-entity on service definition", module); } } - + // get the include type 'pk|nonpk|all' String includeType = UtilXml.checkEmpty(autoElement.getAttribute("include")); boolean includePk = "pk".equals(includeType) || "all".equals(includeType); boolean includeNonPk = "nonpk".equals(includeType) || "all".equals(includeType); - + // need a delegator for this GenericDelegator delegator = dctx.getDelegator(); if (delegator == null) { Debug.logWarning("Cannot use auto-attribute fields with a null delegator", module); } - + if (delegator != null && entityName != null) { Map<String, ModelParam> modelParamMap = new LinkedHashMap<String, ModelParam>(); try { @@ -514,7 +514,7 @@ modelParamMap.put(field.getName(), param); } } - + // get the excludes list; and remove those from the map List<? extends Element> excludes = UtilXml.childElementList(autoElement, "exclude"); if (excludes != null) { @@ -522,7 +522,7 @@ modelParamMap.remove(UtilXml.checkEmpty(exclude.getAttribute("field-name"))); } } - + // now add in all the remaining params for (ModelParam thisParam: modelParamMap.values()) { //Debug.logInfo("Adding Param to " + service.name + ": " + thisParam.name + " [" + thisParam.mode + "] " + thisParam.type + " (" + thisParam.optional + ")", module); @@ -536,7 +536,7 @@ } } } - + protected void createAttrDefs(Element baseElement, ModelService service) { // Add in the defined attributes (override the above defaults if specified) for (Element attribute: UtilXml.childElementList(baseElement, "attribute")) { @@ -560,12 +560,12 @@ if (Debug.verboseOn()) Debug.logVerbose("Got a default-value [" + defValue + "] for service attribute [" + service.name + "." + param.name + "]", module); param.setDefaultValue(defValue.intern()); } - + // set the entity name to the default if not specified if (param.entityName.length() == 0) { param.entityName = service.defaultEntityName; } - + // set the field-name to the name if entity name is specified but no field-name if (param.fieldName.length() == 0 && param.entityName.length() > 0) { param.fieldName = param.name; @@ -644,7 +644,7 @@ def.internal = true; service.addParam(def); } - + protected void createOverrideDefs(Element baseElement, ModelService service) { for (Element overrideElement: UtilXml.childElementList(baseElement, "override")) { String name = UtilXml.checkEmpty(overrideElement.getAttribute("name")); @@ -661,7 +661,7 @@ Debug.logWarning("No parameter found for override parameter named: " + name + " in service " + service.name, module); } } - + if (param != null) { // set only modified values if (UtilValidate.isNotEmpty(overrideElement.getAttribute("type"))) { Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/RunningService.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/RunningService.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/RunningService.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/RunningService.java Fri Mar 27 16:58:16 2009 @@ -50,7 +50,7 @@ public String getLocalName() { return this.name; } - + public int getMode() { return mode; } Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java Fri Mar 27 16:58:16 2009 @@ -160,7 +160,7 @@ } return sd; } - + /** * Registers the loader with this ServiceDispatcher * @param name the local dispatcher @@ -278,7 +278,7 @@ // set IN attributes with default-value as applicable modelService.updateDefaultValues(context, ModelService.IN_PARAM); - + Map<String, Object> ecaContext = null; // for isolated transactions @@ -316,17 +316,17 @@ try { int lockRetriesRemaining = LOCK_RETRIES; boolean needsLockRetry = false; - + do { lockRetriesRemaining--; - + // NOTE: general pattern here is to do everything up to the main service call, and retry it all if //needed because those will be part of the same transaction and have been rolled back // TODO: if there is an ECA called async or in a new transaction it won't get rolled back //but will be called again, which means the service may complete multiple times! that would be for //pre-invoke and earlier events only of course - - + + // setup global transaction ECA listeners to execute later if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "global-rollback", ctx, context, result, isError, isFailure); if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "global-commit", ctx, context, result, isError, isFailure); @@ -337,7 +337,7 @@ // check for pre-auth failure/errors isFailure = ServiceUtil.isFailure(result); isError = ServiceUtil.isError(result); - + //Debug.logInfo("After [" + modelService.name + "] pre-auth ECA, before auth; isFailure=" + isFailure + ", isError=" + isError, module); context = checkAuth(localName, context, modelService); @@ -351,7 +351,7 @@ if (userLogin != null && userLogin.getString("userLoginId") != null) { GenericDelegator.pushUserIdentifier(userLogin.getString("userLoginId")); } - + // pre-validate ECA if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "in-validate", ctx, context, result, isError, isFailure); @@ -377,7 +377,7 @@ // check for pre-invoke failure/errors isFailure = ServiceUtil.isFailure(result); isError = ServiceUtil.isError(result); - + //Debug.logInfo("After [" + modelService.name + "] pre-invoke ECA, before invoke; isFailure=" + isFailure + ", isError=" + isError, module); // ===== invoke the service ===== @@ -390,7 +390,7 @@ Debug.logWarning("Service (in runSync : " + modelService.name + ") returns null result", module); } } - + // re-check the errors/failures isFailure = ServiceUtil.isFailure(result); isError = ServiceUtil.isError(result); @@ -401,7 +401,7 @@ // crazy stuff here: see if there was a deadlock or other such error and if so retry... which we can ONLY do if we own the transaction! String errMsg = ServiceUtil.getErrorMessage(result); - + // look for the string DEADLOCK in an upper-cased error message; tested on: Derby, MySQL // - Derby 10.2.2.0 deadlock string: "A lock could not be obtained due to a deadlock" // - MySQL ? deadlock string: "Deadlock found when trying to get lock; try restarting transaction" @@ -415,12 +415,12 @@ if (errMsg != null && errMsg.toUpperCase().indexOf("DEADLOCK") >= 0) { // it's a deadlock! retry... String retryMsg = "RETRYING SERVICE [" + modelService.name + "]: Deadlock error found in message [" + errMsg + "]; retry [" + (LOCK_RETRIES - lockRetriesRemaining) + "] of [" + LOCK_RETRIES + "]"; - + // make sure the old transaction is rolled back, and then start a new one - + // if there is an exception in these things, let the big overall thing handle it TransactionUtil.rollback(beganTrans, retryMsg, null); - + beganTrans = TransactionUtil.begin(modelService.transactionTimeout); // enlist for XAResource debugging if (beganTrans && TransactionUtil.debugResources) { @@ -431,22 +431,22 @@ Debug.logError(e, module); } } - + if (!beganTrans) { // just log and let things roll through, will be considered an error and ECAs, etc will run according to that Debug.logError("After rollback attempt for lock retry did not begin a new transaction!", module); } else { // deadlocks can be resolved by retring immediately as conflicting operations in the other thread will have cleared needsLockRetry = true; - + // reset state variables result = FastMap.newInstance(); isFailure = false; isError = false; - + Debug.logWarning(retryMsg, module); } - + // look for lock wait timeout error, retry in a different way by running after the parent transaction finishes, ie attach to parent tx // - Derby 10.2.2.0 lock wait timeout string: "A lock could not be obtained within the time requested" // - MySQL ? lock wait timeout string: "Lock wait timeout exceeded; try restarting transaction" @@ -485,10 +485,10 @@ // check for pre-commit failure/errors isFailure = ServiceUtil.isFailure(result); isError = ServiceUtil.isError(result); - + // global-commit-post-run ECA, like global-commit but gets the context after the service is run if (eventMap != null) ServiceEcaUtil.evalRules(modelService.name, eventMap, "global-commit-post-run", ctx, ecaContext, result, isError, isFailure); - + // check for failure and log on info level; this is used for debugging if (isFailure) { Debug.logWarning("Service Failure [" + modelService.name + "]: " + ServiceUtil.getErrorMessage(result), module); @@ -521,7 +521,7 @@ if (isError) { String errMsg = "Error in Service [" + modelService.name + "]: " + ServiceUtil.getErrorMessage(result); Debug.logError(errMsg, module); - + // rollback the transaction try { TransactionUtil.rollback(beganTrans, errMsg, null); @@ -544,7 +544,7 @@ // call notifications -- event is determined from the result (success, error, fail) modelService.evalNotifications(this.getLocalContext(localName), context, result); - + // clear out the EE userIdentifier GenericDelegator.popUserIdentifier(); } @@ -556,7 +556,7 @@ if (lock != null) { lock.release(); } - + // resume the parent transaction if (parentTransaction != null) { try { @@ -573,7 +573,7 @@ checkDebug(modelService, 0, debugging); rs.setEndStamp(); - + long timeToRun = System.currentTimeMillis() - serviceStartTime; if (Debug.timingOn() && timeToRun > 50) { Debug.logTiming("Sync service [" + localName + "/" + modelService.name + "] finished in [" + timeToRun + "] milliseconds", module); @@ -604,7 +604,7 @@ Debug.logVerbose("[ServiceDispatcher.runAsync] : prepareing service " + service.name + " [" + service.location + "/" + service.invoke + "] (" + service.engineName + ")", module); } - + Map<String, Object> context = FastMap.newInstance(); if (params != null) { context.putAll(params); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java Fri Mar 27 16:58:16 2009 @@ -563,7 +563,7 @@ Timestamp thruDate = (Timestamp) context.get("thruDate"); Timestamp now = UtilDateTime.nowTimestamp(); boolean reply = true; - + if (fromDate != null && fromDate.after(now)) reply = false; if (thruDate != null && thruDate.before(now)) reply = false; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java Fri Mar 27 16:58:16 2009 @@ -33,7 +33,7 @@ protected List<String> extraFields = new ArrayList<String>(); protected String errorMode = null; protected ModelService service = null; - + public ServiceValidationException(ModelService service, List<String> missingFields, List<String> extraFields, String errorMode) { super(); this.service = service; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/ExpressionUiHelper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/ExpressionUiHelper.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/ExpressionUiHelper.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/ExpressionUiHelper.java Fri Mar 27 16:58:16 2009 @@ -40,7 +40,7 @@ /** An array of valid DayInMonth occurrence values. */ public static final int Occurrence[] = {1, 2, 3, 4, 5, -1, -2, -3, -4 -5}; - + /** Returns a List of valid DayInMonth occurrence int values. * @return */ @@ -101,7 +101,7 @@ } return result; } - + /** Returns a List of Maps containing valid Frequency values. * @param uiLabelMap CommonUiLabels label Map * @return List of Maps. Each Map has a @@ -117,7 +117,7 @@ result.add(UtilMisc.toMap("description", uiLabelMap.get("CommonYear"), "value", new Integer(Calendar.YEAR))); return result; } - + /** Returns a List of Maps containing valid temporal expression types. * @param uiLabelMap TemporalExpressionUiLabels label Map * @return List of Maps. Each Map has a Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceInfo.java Fri Mar 27 16:58:16 2009 @@ -37,7 +37,7 @@ * Recurrence Info Object */ public class RecurrenceInfo { - + public static final String module = RecurrenceInfo.class.getName(); protected GenericValue info; @@ -203,7 +203,7 @@ if (getCurrentCount() == 0 || fromTime == 0 || fromTime == startDate.getTime()) { return first(); } - + if (Debug.verboseOn()) { Debug.logVerbose("Date List Size: " + (rDateList == null ? 0 : rDateList.size()), module); Debug.logVerbose("Rule List Size: " + (rRulesList == null ? 0 : rRulesList.size()), module); @@ -232,18 +232,18 @@ } return nextRuleTime; } - + /** Checks the current recurrence validity at the moment. */ public boolean isValidCurrent() { return isValidCurrent(RecurrenceUtil.now()); } - + /** Checks the current recurrence validity for checkTime. */ public boolean isValidCurrent(long checkTime) { if (checkTime == 0 || (rDateList == null && rRulesList == null)) { return false; } - + boolean found = false; Iterator<RecurrenceRule> rulesIterator = getRecurrenceRuleIterator(); while (rulesIterator.hasNext()) { @@ -256,7 +256,7 @@ return false; } } - + return found; } @@ -295,7 +295,7 @@ public String primaryKey() { return info.getString("recurrenceInfoId"); } - + public static RecurrenceInfo makeInfo(GenericDelegator delegator, long startTime, int frequency, int interval, int count) throws RecurrenceInfoException { return makeInfo(delegator, startTime, frequency, interval, count, 0); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java Fri Mar 27 16:58:16 2009 @@ -35,7 +35,7 @@ * Recurrence Rule Object */ public class RecurrenceRule { - + public static final String module = RecurrenceRule.class.getName(); // ********************** @@ -133,7 +133,7 @@ byMonthList = StringUtil.split(rule.getString("byMonthList"), ","); bySetPosList = StringUtil.split(rule.getString("bySetPosList"), ","); } - + // Checks for a valid frequency property. private boolean checkFreq(String freq) { if (freq == null) @@ -169,7 +169,7 @@ stamp = rule.getTimestamp("untilDateTime"); Debug.logVerbose("Stamp value: " + stamp, module); - + if (stamp != null) { long nanos = (long) stamp.getNanos(); time = stamp.getTime(); @@ -255,12 +255,12 @@ startTime = RecurrenceUtil.now(); if (fromTime == 0) fromTime = startTime; - + // Test the end time of the recurrence. if (getEndTime() != 0 && getEndTime() <= RecurrenceUtil.now()) return 0; Debug.logVerbose("Rule NOT expired by end time.", module); - + // Test the recurrence limit. if (getCount() != -1 && currentCount >= getCount()) return 0; @@ -299,24 +299,24 @@ if (checkTime == 0) { checkTime = startTime; } - + // Test the end time of the recurrence. if (getEndTime() != 0 && getEndTime() <= RecurrenceUtil.now()) { return 0; } - + // Test the recurrence limit. if (getCount() != -1 && currentCount >= getCount()) { return 0; } - + // Get the next frequency from checkTime Date nextRun = getNextFreq(startTime, checkTime); Calendar cal = Calendar.getInstance(); Calendar checkTimeCal = Calendar.getInstance(); cal.setTime(nextRun); checkTimeCal.setTime(new Date(checkTime)); - + // Get previous frequency and update its values from checkTime switch (getFrequency()) { case YEARLY: @@ -324,7 +324,7 @@ if (cal.get(Calendar.YEAR) != checkTimeCal.get(Calendar.YEAR)) { return 0; } - + case MONTHLY: if (MONTHLY == getFrequency()) { cal.add(Calendar.MONTH, -getIntervalInt()); @@ -334,7 +334,7 @@ } else { cal.set(Calendar.MONTH, checkTimeCal.get(Calendar.MONTH)); } - + case WEEKLY: if (WEEKLY == getFrequency()) { cal.add(Calendar.WEEK_OF_YEAR, -getIntervalInt()); @@ -390,10 +390,10 @@ if (validByRule(cal.getTime())) { return cal.getTime().getTime(); } - + return 0; } - + /** * Tests the date to see if it falls within the rules *@param startDate date object to test @@ -751,7 +751,7 @@ throws RecurrenceRuleException { return makeRule(delegator, frequency, interval, -1, endTime); } - + public static RecurrenceRule makeRule(GenericDelegator delegator, int frequency, int interval, int count, long endTime) throws RecurrenceRuleException { String freq[] = {"", "SECONDLY", "MINUTELY", "HOURLY", "DAILY", "WEEKLY", "MONTHLY", "YEARLY"}; @@ -760,7 +760,7 @@ throw new RecurrenceRuleException("Invalid frequency"); if (interval < 0) throw new RecurrenceRuleException("Invalid interval"); - + String freqStr = freq[frequency]; try { Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpression.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpression.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpression.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpression.java Fri Mar 27 16:58:16 2009 @@ -27,12 +27,12 @@ /** Temporal expression abstract class. */ public abstract class TemporalExpression implements Serializable, Comparable<TemporalExpression> { protected TemporalExpression() {} - + /** Field used to sort expressions. Expression evaluation depends * on correct ordering. Expressions are evaluated from lowest value * to highest value. */ protected int sequence = Integer.MAX_VALUE; - + /** Field used to sort expressions. Expression evaluation depends * on correct ordering. Expressions are evaluated from lowest value * to highest value. */ @@ -41,14 +41,14 @@ /** A unique ID for this expression. This field is intended to be used by * persistence classes. */ protected String id = null; - + /** Returns true if this expression includes the specified date. * @param cal A date to evaluate * @return true if this expression includes the date represented by * <code>cal</code> */ public abstract boolean includesDate(Calendar cal); - + /** Returns a date representing the first occurrence of this expression * on or after a specified date. Returns <code>null</code> if there * is no matching date. @@ -57,7 +57,7 @@ * or <code>null</code> if no matching date is found */ public abstract Calendar first(Calendar cal); - + /** Returns a date representing the next occurrence of this expression * after a specified date. Returns <code>null</code> if there * is no matching date. Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressions.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressions.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressions.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressions.java Fri Mar 27 16:58:16 2009 @@ -437,7 +437,7 @@ protected final int endSecs; protected final int endMins; protected final int endHrs; - + /** * @param start A time String in the form of hh:mm:ss (24 hr clock) * @param end A time String in the form of hh:mm:ss (24 hr clock) @@ -595,7 +595,7 @@ public static class DayOfWeekRange extends TemporalExpression { protected final int start; protected final int end; - + /** * @param start An integer in the range of <code>Calendar.SUNDAY</code> * to <code>Calendar.SATURDAY</code> @@ -691,7 +691,7 @@ public static class MonthRange extends TemporalExpression { protected final int start; protected final int end; - + /** * @param start An integer in the range of <code>Calendar.JANUARY</code> * to <code>Calendar.UNDECIMBER</code> @@ -789,7 +789,7 @@ public static class DayOfMonthRange extends TemporalExpression { protected final int start; protected final int end; - + /** * @param start An integer in the range of 1 to 31 * @param end An integer in the range of 1 to 31 @@ -870,7 +870,7 @@ public static class DayInMonth extends TemporalExpression { protected final int dayOfWeek; protected final int occurrence; - + /** * @param dayOfWeek An integer in the range of <code>Calendar.SUNDAY</code> * to <code>Calendar.SATURDAY</code> @@ -986,7 +986,7 @@ protected final Date start; protected final int freqType; protected final int freqCount; - + /** * @param start Starting date, defaults to current system time * @param freqType One of the following integer values: <code>Calendar.SECOND Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/config/ServiceConfigUtil.java Fri Mar 27 16:58:16 2009 @@ -37,7 +37,7 @@ * Misc. utility method for dealing with the serviceengine.xml file */ public class ServiceConfigUtil implements Serializable { - + public static final String module = ServiceConfigUtil.class.getName(); public static final String engine = "default"; public static final String SERVICE_ENGINE_XML_FILENAME = "serviceengine.xml"; @@ -58,7 +58,7 @@ } return UtilXml.firstChildElement(rootElement, elementName); } - + public static String getElementAttr(String elementName, String attrName) { Element element = getElement(elementName); @@ -69,10 +69,10 @@ public static String getSendPool() { return getElementAttr("thread-pool", "send-to-pool"); } - + public static List<String> getRunPools() { List<String> readPools = null; - + Element threadPool = getElement("thread-pool"); List<? extends Element> readPoolElements = UtilXml.childElementList(threadPool, "run-from-pool"); if (readPoolElements != null) { @@ -83,7 +83,7 @@ } return readPools; } - + public static int getPurgeJobDays() { String days = getElementAttr("thread-pool", "purge-job-days"); int purgeDays; @@ -144,7 +144,7 @@ return null; } - + public static class NotificationGroup implements Serializable { protected Notification notification; protected List<Notify> notify; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaAction.java Fri Mar 27 16:58:16 2009 @@ -65,7 +65,7 @@ // support the old, inconsistent attribute name if (UtilValidate.isEmail(this.runAsUser)) this.runAsUser = action.getAttribute("runAsUser"); this.resultMapName = action.getAttribute("result-map-name"); - + // default is true, so anything but false is true this.resultToContext = !"false".equals(action.getAttribute("result-to-context")); // default is false, so anything but true is false @@ -75,15 +75,15 @@ this.ignoreError = !"false".equals(action.getAttribute("ignore-error")); this.persist = "true".equals(action.getAttribute("persist")); } - + public String getServiceName() { return this.serviceName; } - + public String getServiceMode() { return this.serviceMode; } - + public boolean isPersist() { return this.persist; } @@ -91,7 +91,7 @@ public String getShortDisplayDescription() { return this.serviceName + "[" + this.serviceMode + (this.persist ? "-persist" : "") + "]"; } - + public boolean runAction(String selfService, DispatchContext dctx, Map<String, Object> context, Map<String, Object> result) throws GenericServiceException { if (serviceName.equals(selfService)) { throw new GenericServiceException("Cannot invoke self on ECA."); @@ -102,7 +102,7 @@ // set the userLogin object in the context actionContext.put("userLogin", ServiceUtil.getUserLogin(dctx, actionContext, runAsUser)); - + Map<String, Object> actionResult = null; LocalDispatcher dispatcher = dctx.getDispatcher(); // if SECAs have been turned off, then just return true which has same effect as if secas ran successfully @@ -238,7 +238,7 @@ return success; } - + public boolean equals(Object obj) { if (obj instanceof ServiceEcaAction) { ServiceEcaAction other = (ServiceEcaAction) obj; @@ -248,14 +248,14 @@ if (!UtilValidate.areEqual(this.serviceMode, other.serviceMode)) return false; if (!UtilValidate.areEqual(this.resultMapName, other.resultMapName)) return false; if (!UtilValidate.areEqual(this.runAsUser, other.runAsUser)) return false; - + if (this.newTransaction != other.newTransaction) return false; if (this.resultToContext != other.resultToContext) return false; if (this.resultToResult != other.resultToResult) return false; if (this.ignoreFailure != other.ignoreFailure) return false; if (this.ignoreError != other.ignoreError) return false; if (this.persist != other.persist) return false; - + return true; } else { return false; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaCondition.java Fri Mar 27 16:58:16 2009 @@ -37,7 +37,7 @@ * ServiceEcaCondition */ public class ServiceEcaCondition implements java.io.Serializable { - + public static final String module = ServiceEcaCondition.class.getName(); protected String conditionService = null; @@ -94,7 +94,7 @@ buf.append(":").append(operator).append(":"); if (UtilValidate.isNotEmpty(rhsMapName)) buf.append(rhsMapName).append("."); buf.append(rhsValueName); - + if (moreDetail) { if (UtilValidate.isNotEmpty(compareType)) { buf.append("-"); @@ -224,10 +224,10 @@ if (!UtilValidate.areEqual(this.operator, other.operator)) return false; if (!UtilValidate.areEqual(this.compareType, other.compareType)) return false; if (!UtilValidate.areEqual(this.format, other.format)) return false; - + if (this.isConstant != other.isConstant) return false; if (this.isService != other.isService) return false; - + return true; } else { return false; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaRule.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaRule.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaRule.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaRule.java Fri Mar 27 16:58:16 2009 @@ -70,7 +70,7 @@ } if (Debug.verboseOn()) Debug.logVerbose("Conditions: " + conditions, module); - + Set<String> nameSet = UtilMisc.toSet("set", "action"); for (Element actionOrSetElement: UtilXml.childElementList(eca, nameSet)) { if ("action".equals(actionOrSetElement.getNodeName())) { @@ -86,19 +86,19 @@ public String getShortDisplayName() { return this.serviceName + ":" + this.eventName; } - + public String getServiceName() { return this.serviceName; } - + public String getEventName() { return this.eventName; } - + public String getDefinitionLocation() { return this.definitionLocation; } - + public List<ServiceEcaAction> getEcaActionList() { List<ServiceEcaAction> actionList = FastList.newInstance(); for (Object actionOrSet: this.actionsAndSets) { @@ -108,13 +108,13 @@ } return actionList; } - + public List<ServiceEcaCondition> getEcaConditionList() { List<ServiceEcaCondition> condList = FastList.newInstance(); condList.addAll(this.conditions); return condList; } - + public void eval(String serviceName, DispatchContext dctx, Map<String, Object> context, Map<String, Object> result, boolean isError, boolean isFailure, Set<String> actionsRun) throws GenericServiceException { if (!enabled) { Debug.logInfo("Service ECA [" + this.serviceName + "] on [" + this.eventName + "] is disabled; not running.", module); @@ -169,7 +169,7 @@ public boolean isEnabled() { return this.enabled; } - + public boolean equals(Object obj) { if (obj instanceof ServiceEcaRule) { ServiceEcaRule other = (ServiceEcaRule) obj; @@ -177,11 +177,11 @@ if (!UtilValidate.areEqual(this.eventName, other.eventName)) return false; if (!this.conditions.equals(other.conditions)) return false; if (!this.actionsAndSets.equals(other.actionsAndSets)) return false; - + if (this.runOnFailure != other.runOnFailure) return false; if (this.runOnError != other.runOnError) return false; if (this.enabled != other.enabled) return false; - + return true; } else { return false; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaSetField.java Fri Mar 27 16:58:16 2009 @@ -125,7 +125,7 @@ if (!UtilValidate.areEqual(this.envName, other.envName)) return false; if (!UtilValidate.areEqual(this.value, other.value)) return false; if (!UtilValidate.areEqual(this.format, other.format)) return false; - + return true; } else { return false; Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/eca/ServiceEcaUtil.java Fri Mar 27 16:58:16 2009 @@ -90,7 +90,7 @@ } catch (GenericConfigException e) { Debug.logError(e, "Could not get resource URL", module); } - + int numDefs = 0; for (Element e: UtilXml.childElementList(rootElement, "eca")) { String serviceName = e.getAttribute("service"); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/BSFEngine.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/BSFEngine.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/BSFEngine.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/BSFEngine.java Fri Mar 27 16:58:16 2009 @@ -38,21 +38,21 @@ * BSF Service Engine */ public class BSFEngine extends GenericAsyncEngine { - + public static final String module = BSFEngine.class.getName(); public static UtilCache<String, String> scriptCache = new UtilCache<String, String>("BSFScripts", 0, 0); - + public BSFEngine(ServiceDispatcher dispatcher) { super(dispatcher); } - + /** * @see org.ofbiz.service.engine.GenericEngine#runSyncIgnore(java.lang.String, org.ofbiz.service.ModelService, java.util.Map) */ public void runSyncIgnore(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceException { runSync(localName, modelService, context); } - + /** * @see org.ofbiz.service.engine.GenericEngine#runSync(java.lang.String, org.ofbiz.service.ModelService, java.util.Map) */ @@ -63,7 +63,7 @@ throw new GenericServiceException("Service did not return expected result"); return UtilGenerics.checkMap(result); } - + // Invoke the BSF Script. private Object serviceInvoker(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceException { if (modelService.location == null || modelService.invoke == null) @@ -71,7 +71,7 @@ // get the DispatchContext from the localName and ServiceDispatcher DispatchContext dctx = dispatcher.getLocalContext(localName); - + // get the classloader to use ClassLoader cl = null; @@ -89,7 +89,7 @@ mgr.registerBean("dctx", dctx); mgr.registerBean("context", context); - + // pre-load the engine to make sure we were called right org.apache.bsf.BSFEngine bsfEngine = null; try { @@ -97,7 +97,7 @@ } catch (BSFException e) { throw new GenericServiceException("Problems loading org.apache.bsf.BSFEngine: " + modelService.engineName, e); } - + // source the script into a string String script = scriptCache.get(localName + "_" + location); @@ -124,14 +124,14 @@ } } } - + // now invoke the script try { bsfEngine.exec(location, 0, 0, script); } catch (BSFException e) { throw new GenericServiceException("Script invocation error", e); } - + return mgr.lookupBean("response"); } } Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/BeanShellEngine.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/BeanShellEngine.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/BeanShellEngine.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/BeanShellEngine.java Fri Mar 27 16:58:16 2009 @@ -41,14 +41,14 @@ public BeanShellEngine(ServiceDispatcher dispatcher) { super(dispatcher); } - + /** * @see org.ofbiz.service.engine.GenericEngine#runSyncIgnore(java.lang.String, org.ofbiz.service.ModelService, java.util.Map) */ public void runSyncIgnore(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceException { runSync(localName, modelService, context); } - + /** * @see org.ofbiz.service.engine.GenericEngine#runSync(java.lang.String, org.ofbiz.service.ModelService, java.util.Map) */ @@ -64,10 +64,10 @@ String location = this.getLocation(modelService); context.put("dctx", dispatcher.getLocalContext(localName)); - + try { Object resultObj = BshUtil.runBshAtLocation(location, context); - + if (resultObj != null && resultObj instanceof Map) { Debug.logInfo("Got result Map from script return: " + resultObj, module); return cast(resultObj); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/EntityAutoEngine.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/EntityAutoEngine.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/EntityAutoEngine.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/EntityAutoEngine.java Fri Mar 27 16:58:16 2009 @@ -50,7 +50,7 @@ public EntityAutoEngine(ServiceDispatcher dispatcher) { super(dispatcher); } - + /** * @see org.ofbiz.service.engine.GenericEngine#runSyncIgnore(java.lang.String, org.ofbiz.service.ModelService, java.util.Map) */ @@ -73,16 +73,16 @@ if (modelService.invoke == null || (!"create".equals(modelService.invoke) && !"update".equals(modelService.invoke) && !"delete".equals(modelService.invoke))) { throw new GenericServiceException("In Service [" + modelService.name + "] the invoke value must be create, update, or delete for entity-auto engine"); } - + if (UtilValidate.isEmpty(modelService.defaultEntityName)) { throw new GenericServiceException("In Service [" + modelService.name + "] you must specify a default-entity-name for entity-auto engine"); } - + ModelEntity modelEntity = dctx.getDelegator().getModelEntity(modelService.defaultEntityName); if (modelEntity == null) { throw new GenericServiceException("In Service [" + modelService.name + "] the specified default-entity-name [" + modelService.defaultEntityName + "] is not valid"); } - + try { boolean allPksInOnly = true; for (ModelField pkField: modelEntity.getPkFieldsUnmodifiable()) { @@ -91,19 +91,19 @@ allPksInOnly = false; } } - + if ("create".equals(modelService.invoke)) { GenericValue newEntity = dctx.getDelegator().makeValue(modelEntity.getEntityName()); - + boolean isSinglePk = modelEntity.getPksSize() == 1; boolean isDoublePk = modelEntity.getPksSize() == 2; Iterator<ModelField> pksIter = modelEntity.getPksIterator(); - + ModelField singlePkModeField = isSinglePk ? pksIter.next() : null; ModelParam singlePkModelParam = isSinglePk ? modelService.getParam(singlePkModeField.getName()) : null; boolean isSinglePkIn = isSinglePk ? singlePkModelParam.isIn() : false; boolean isSinglePkOut = isSinglePk ? singlePkModelParam.isOut() : false; - + ModelParam doublePkPrimaryInParam = null; ModelParam doublePkSecondaryOutParam = null; ModelField doublePkSecondaryOutField = null; @@ -124,8 +124,8 @@ // we don't have an IN and an OUT... so do nothing and leave them null } } - - + + if (isSinglePk && isSinglePkOut && !isSinglePkIn) { /* **** primary sequenced primary key **** @@ -139,7 +139,7 @@ <create-value value-name="newEntity"/> * */ - + String sequencedId = dctx.getDelegator().getNextSeqId(modelEntity.getEntityName()); newEntity.set(singlePkModeField.getName(), sequencedId); result.put(singlePkModelParam.name, sequencedId); @@ -169,7 +169,7 @@ pkValue = dctx.getDelegator().getNextSeqId(modelEntity.getEntityName()); } else { // pkValue passed in, check and if there are problems return an error - + if (pkValue instanceof String) { StringBuffer errorDetails = new StringBuffer(); if (!UtilValidate.isValidDatabaseId((String) pkValue, errorDetails)) { @@ -193,7 +193,7 @@ <set-nonpk-fields map-name="parameters" value-name="newEntity"/> <create-value value-name="newEntity"/> */ - + newEntity.setPKFields(parameters, true); dctx.getDelegator().setNextSubSeqId(newEntity, doublePkSecondaryOutField.getName(), 5, 1); result.put(doublePkSecondaryOutParam.name, newEntity.get(doublePkSecondaryOutField.getName())); @@ -218,7 +218,7 @@ "3. a 2-part pk with one part IN (existing primary pk) and one part OUT (the secdonary pk to sub-sequence, " + "4. all pk fields are IN for a manually specified primary key"); } - + // handle the case where there is a fromDate in the pk of the entity, and it is optional or undefined in the service def, populate automatically ModelField fromDateField = modelEntity.getField("fromDate"); if (fromDateField != null && fromDateField.getIsPk()) { @@ -227,7 +227,7 @@ newEntity.set("fromDate", UtilDateTime.nowTimestamp()); } } - + newEntity.setNonPKFields(parameters, true); newEntity.create(); } else if ("update".equals(modelService.invoke)) { @@ -238,7 +238,7 @@ <set-nonpk-fields value-name="lookedUpValue" map-name="parameters"/> <store-value value-name="lookedUpValue"/> */ - + // check to make sure that all primary key fields are defined as IN attributes if (!allPksInOnly) { throw new GenericServiceException("In Service [" + modelService.name + "] which uses the entity-auto engine with the update invoke option not all pk fields have the mode IN"); @@ -248,9 +248,9 @@ if (lookedUpValue == null) { return ServiceUtil.returnError("Value not found, cannot update"); } - + localContext.put("lookedUpValue", lookedUpValue); - + // populate the oldStatusId out if there is a service parameter for it, and before we do the set non-pk fields /* <auto-attributes include="pk" mode="IN" optional="false"/> @@ -264,7 +264,7 @@ if (statusIdParam != null && statusIdParam.isIn() && oldStatusIdParam != null && oldStatusIdParam.isOut() && statusIdField != null) { result.put("oldStatusId", lookedUpValue.get("statusId")); } - + // do the StatusValidChange check /* <if-compare-field field="lookedUpValue.statusId" operator="not-equals" to-field="parameters.statusId"> @@ -295,9 +295,9 @@ } } } - + // NOTE: nothing here to maintain the status history, that should be done with a custom service called by SECA rule - + lookedUpValue.setNonPKFields(parameters, true); lookedUpValue.store(); } else if ("delete".equals(modelService.invoke)) { @@ -307,12 +307,12 @@ <entity-one entity-name="ExampleItem" value-name="lookedUpValue"/> <remove-value value-name="lookedUpValue"/> */ - + // check to make sure that all primary key fields are defined as IN attributes if (!allPksInOnly) { throw new GenericServiceException("In Service [" + modelService.name + "] which uses the entity-auto engine with the delete invoke option not all pk fields have the mode IN"); } - + GenericValue lookedUpValue = PrimaryKeyFinder.runFind(modelEntity, parameters, dctx.getDelegator(), false, true, null, null); if (lookedUpValue != null) { lookedUpValue.remove(); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericAsyncEngine.java Fri Mar 27 16:58:16 2009 @@ -48,7 +48,7 @@ * Generic Asynchronous Engine */ public abstract class GenericAsyncEngine extends AbstractEngine { - + public static final String module = GenericAsyncEngine.class.getName(); protected GenericAsyncEngine(ServiceDispatcher dispatcher) { @@ -59,7 +59,7 @@ * @see org.ofbiz.service.engine.GenericEngine#runSync(java.lang.String, org.ofbiz.service.ModelService, java.util.Map) */ public abstract Map<String, Object> runSync(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceException; - + /** * @see org.ofbiz.service.engine.GenericEngine#runSyncIgnore(java.lang.String, org.ofbiz.service.ModelService, java.util.Map) */ @@ -71,7 +71,7 @@ public void runAsync(String localName, ModelService modelService, Map<String, Object> context, boolean persist) throws GenericServiceException { runAsync(localName, modelService, context, null, persist); } - + /** * @see org.ofbiz.service.engine.GenericEngine#runAsync(java.lang.String, org.ofbiz.service.ModelService, java.util.Map, org.ofbiz.service.GenericRequester, boolean) */ Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericEngineFactory.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericEngineFactory.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericEngineFactory.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GenericEngineFactory.java Fri Mar 27 16:58:16 2009 @@ -37,7 +37,7 @@ protected ServiceDispatcher dispatcher = null; protected Map<String, GenericEngine> engines = null; - + public GenericEngineFactory(ServiceDispatcher dispatcher) { this.dispatcher = dispatcher; engines = FastMap.newInstance(); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyEngine.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyEngine.java?rev=759240&r1=759239&r2=759240&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyEngine.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/engine/GroovyEngine.java Fri Mar 27 16:58:16 2009 @@ -37,14 +37,14 @@ public GroovyEngine(ServiceDispatcher dispatcher) { super(dispatcher); } - + /** * @see org.ofbiz.service.engine.GenericEngine#runSyncIgnore(java.lang.String, org.ofbiz.service.ModelService, java.util.Map) */ public void runSyncIgnore(String localName, ModelService modelService, Map<String, Object> context) throws GenericServiceException { runSync(localName, modelService, context); } - + /** * @see org.ofbiz.service.engine.GenericEngine#runSync(java.lang.String, org.ofbiz.service.ModelService, java.util.Map) */ @@ -59,10 +59,10 @@ String location = this.getLocation(modelService); context.put("dctx", dispatcher.getLocalContext(localName)); - + try { Object resultObj = GroovyUtil.runScriptAtLocation(location, context); - + if (resultObj != null && resultObj instanceof Map) { return cast(resultObj); } else if (context.get("result") != null && context.get("result") instanceof Map) { |
Free forum by Nabble | Edit this page |