Author: doogie
Date: Sat Mar 21 23:23:25 2009 New Revision: 757069 URL: http://svn.apache.org/viewvc?rev=757069&view=rev Log: Fix purely empty whitespace lines, and remove trailing whitespace. Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/DispatchContext.java ofbiz/trunk/framework/service/src/org/ofbiz/service/GeneralServiceException.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/GenericServiceCallback.java ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericServiceException.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/ModelPermGroup.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelPermission.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceIface.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/ServiceAuthException.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/ServiceXaWrapper.java ofbiz/trunk/framework/service/src/org/ofbiz/service/WebAppDispatcher.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/RecurrenceInfoException.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRule.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceRuleException.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/RecurrenceUtil.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpression.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressionVisitor.java ofbiz/trunk/framework/service/src/org/ofbiz/service/calendar/TemporalExpressionWorker.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/AbstractEngine.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/GenericEngine.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/RouteEngine.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/GenericMessageListener.java ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsListenerFactory.java ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsQueueListener.java ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsServiceEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/jms/JmsTopicListener.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/AbstractJob.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/GenericServiceJob.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/InvalidJobException.java ofbiz/trunk/framework/service/src/org/ofbiz/service/job/Job.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/job/PersistedServiceJob.java ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/JavaMailContainer.java ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/MimeMessageWrapper.java ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaAction.java ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaCondition.java ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaRule.java ofbiz/trunk/framework/service/src/org/ofbiz/service/mail/ServiceMcaUtil.java ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/ExampleRemoteClient.java ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcher.java ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RemoteDispatcherImpl.java ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RmiServiceContainer.java ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/RmiServiceEngine.java ofbiz/trunk/framework/service/src/org/ofbiz/service/rmi/socket/ssl/SSLClientSocketFactory.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 ofbiz/trunk/framework/service/src/org/ofbiz/service/test/ServiceEngineTests.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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/DispatchContext.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/DispatchContext.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -61,7 +61,7 @@ protected Map<String, Object> attributes; protected String name; - /** + /** * Creates new DispatchContext * @param localReaders a collection of reader URLs * @param loader the classloader to use for dispatched services @@ -71,7 +71,7 @@ this.localReaders = localReaders; this.loader = loader; this.dispatcher = dispatcher; - this.attributes = FastMap.newInstance(); + this.attributes = FastMap.newInstance(); } public void loadReaders() { @@ -79,7 +79,7 @@ this.getGlobalServiceMap(); } - /** + /** * Returns the service attribute for the given name, or null if there is no attribute by that name. * @param name a String specifying the name of the attribute * @return an Object containing the value of the attribute, or null if there is no attribute by that name. @@ -90,7 +90,7 @@ return null; } - /** + /** * Binds an object to a given attribute name in this context. * @param name a String specifying the name of the attribute * @param object an Object representing the attribute to be bound. @@ -99,7 +99,7 @@ attributes.put(name, object); } - /** + /** * Gets the classloader of this context * @return ClassLoader of the context */ @@ -107,7 +107,7 @@ return this.loader; } - /** + /** * Gets the collection of readers associated with this context * @return Collection of reader URLs */ @@ -115,50 +115,50 @@ return localReaders; } - /** + /** * Gets the name of the local dispatcher * @return String name of the LocalDispatcher object */ 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 * @param serviceName The name of the service to obtain parameters for - * @param mode The mode to use for building the new map (i.e. can be IN or OUT) - * @param context The initial set of values to pull from + * @param mode The mode to use for building the new map (i.e. can be IN or OUT) + * @param context The initial set of values to pull from * @return Map contains any valid values * @throws GenericServiceException */ - public Map<String, Object> makeValidContext(String serviceName, String mode, Map<String, ? extends Object> context) throws GenericServiceException { + 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 * @param model The ModelService object of the service to obtain parameters for * @param mode The mode to use for building the new map (i.e. can be IN or OUT) - * @param context The initial set of values to pull from + * @param context The initial set of values to pull from * @return Map contains any valid values * @throws GenericServiceException */ 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; } else if (mode.equalsIgnoreCase("out")) { modeInt = 2; - } + } if (model == null) { - throw new GenericServiceException("Model service is null! Should never happen."); + throw new GenericServiceException("Model service is null! Should never happen."); } else { switch (modeInt) { case 2: @@ -171,10 +171,10 @@ throw new GenericServiceException("Invalid mode, should be either IN or OUT"); } return newContext; - } + } } - /** + /** * Gets the ModelService instance that corresponds to given the name * @param serviceName Name of the service * @return GenericServiceModel that corresponds to the serviceName @@ -185,26 +185,26 @@ 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; + 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); + retVal = serviceMap.get(serviceName); if (retVal != null && !retVal.inheritedParameters()) { - retVal.interfaceUpdate(this); + retVal.interfaceUpdate(this); } } - + return retVal; } @@ -218,11 +218,11 @@ retVal.interfaceUpdate(this); } } - + return retVal; } - /** + /** * Gets the LocalDispatcher used with this context * @return LocalDispatcher that was used to create this context */ @@ -230,7 +230,7 @@ return this.dispatcher; } - /** + /** * Sets the LocalDispatcher used with this context * @param dispatcher The LocalDispatcher to re-assign to this context */ @@ -238,7 +238,7 @@ this.dispatcher = dispatcher; } - /** + /** * Gets the GenericDelegator associated with this context/dispatcher * @return GenericDelegator associated with this context */ @@ -246,7 +246,7 @@ return dispatcher.getDelegator(); } - /** + /** * Gets the Security object associated with this dispatcher * @return Security object associated with this dispatcher */ @@ -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/GeneralServiceException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/GeneralServiceException.java?rev=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/GeneralServiceException.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/GeneralServiceException.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericAbstractDispatcher.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericAbstractDispatcher.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -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); } @@ -132,22 +132,22 @@ /** * @see org.ofbiz.service.LocalDispatcher#schedule(java.lang.String, java.util.Map, long, int, int, int) */ - public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count) throws GenericServiceException { + public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, int count) throws GenericServiceException { schedule(serviceName, context, startTime, frequency, interval, count, 0); - } + } - public void schedule(String serviceName, long startTime, int frequency, int interval, int count, Object... context) throws GenericServiceException { + 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) */ - public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, long endTime) throws GenericServiceException { + public void schedule(String serviceName, Map<String, ? extends Object> context, long startTime, int frequency, int interval, long endTime) throws GenericServiceException { schedule(serviceName, context, startTime, frequency, interval, -1, endTime); - } + } - public void schedule(String serviceName, long startTime, int frequency, int interval, long endTime, Object... context) throws GenericServiceException { + public void schedule(String serviceName, long startTime, int frequency, int interval, long endTime, Object... context) throws GenericServiceException { schedule(serviceName, ServiceUtil.makeContext(context), startTime, frequency, interval, endTime); } @@ -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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericDispatcher.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericDispatcher.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -32,9 +32,9 @@ public static final String module = GenericDispatcher.class.getName(); - protected static boolean ecasDisabled = false; + 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); } @@ -42,7 +42,7 @@ public static LocalDispatcher getLocalDispatcher(String dispatcherName, GenericDelegator delegator, ClassLoader loader) { return getLocalDispatcher(dispatcherName, delegator, loader, null); } - + public static LocalDispatcher getLocalDispatcher(String dispatcherName, GenericDelegator delegator, ClassLoader loader, ServiceDispatcher serviceDispatcher) { if (dispatcherName == null) { dispatcherName = "default"; @@ -57,15 +57,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) { @@ -95,7 +95,7 @@ } catch (SecurityException e) { loader = GenericDispatcher.class.getClassLoader(); } - return new GenericDispatcher(name, delegator, loader, sd); + return new GenericDispatcher(name, delegator, loader, sd); } protected GenericDispatcher() {} @@ -221,7 +221,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) */ @@ -232,7 +232,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) */ @@ -244,7 +244,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) */ @@ -270,6 +270,6 @@ */ public GenericResultWaiter runAsyncWait(String serviceName, Map<String, ? extends Object> context) throws ServiceAuthException, ServiceValidationException, GenericServiceException { return runAsyncWait(serviceName, context, true); - } + } } 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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericRequester.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericRequester.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -26,12 +26,12 @@ */ public interface GenericRequester extends Serializable { - /** + /** * Receive the result of an asynchronous service call * @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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericResultWaiter.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericResultWaiter.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -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; @@ -49,10 +49,10 @@ completed = true; status = SERVICE_FINISHED; notify(); - if (Debug.verboseOn()) + if (Debug.verboseOn()) Debug.logVerbose("Received Result (" + completed + ") -- " + result, module); } - + /** * @see org.ofbiz.service.GenericRequester#receiveThrowable(java.lang.Throwable) */ @@ -60,9 +60,9 @@ this.t = t; completed = true; status = SERVICE_FAILED; - notify(); + 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 @@ -87,7 +87,7 @@ if (!isCompleted()) throw new java.lang.IllegalStateException("Cannot return exception, synchronous call has not completed."); return this.t; - } + } /** * Gets the results of the service or null if none Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericServiceCallback.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericServiceCallback.java?rev=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericServiceCallback.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericServiceCallback.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericServiceException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericServiceException.java?rev=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericServiceException.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/GenericServiceException.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/LocalDispatcher.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/LocalDispatcher.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -37,7 +37,7 @@ public void disableEcas(); /** - * Reenables running of Service Engine Condition Actions (SECAs). + * Reenables running of Service Engine Condition Actions (SECAs). * @throws GenericServiceException */ public void enableEcas(); @@ -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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelNotification.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelNotification.java Sat Mar 21 23:23:25 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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelParam.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -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; @@ -68,7 +68,7 @@ public List<ModelParamValidator> validators; /** Default value */ - private String defaultValue = null; + private String defaultValue = null; /** Is this Parameter required or optional? Default to false, or required */ public boolean optional = false; @@ -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 ? "" : "*"); + 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/ModelPermGroup.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelPermGroup.java?rev=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelPermGroup.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelPermGroup.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelPermission.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelPermission.java?rev=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelPermission.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelPermission.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelService.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -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,14 +546,14 @@ 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(); for (ModelParam modelParam: this.contextInfo.values()) { - if (context.get(modelParam.name) != null && - ("String".equals(modelParam.type) || "java.lang.String".equals(modelParam.type)) && - !"any".equals(modelParam.allowHtml) && + if (context.get(modelParam.name) != null && + ("String".equals(modelParam.type) || "java.lang.String".equals(modelParam.type)) && + !"any".equals(modelParam.allowHtml) && ("INOUT".equals(modelParam.mode) || "IN".equals(modelParam.mode))) { // the param is a String, allow-html is none or safe, and we are looking at an IN parameter during input parameter validation String value = (String) context.get(modelParam.name); @@ -601,7 +601,7 @@ } missingMsgs.add(msg); } - + List<String> missingCopy = FastList.newInstance(); missingCopy.addAll(missing); throw new ServiceValidationException(missingMsgs, model, missingCopy, null, mode); @@ -687,7 +687,7 @@ try { validatorClass = ObjectType.loadClass(vali.getClassName()); } catch (ClassNotFoundException e) { - Debug.logWarning(e, module); + Debug.logWarning(e, module); } if (validatorClass == null) { @@ -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; @@ -1108,7 +1108,7 @@ ModelParam newParamClone = new ModelParam(newParam); if (optional) { // default option is to make this optional, however the service can override and - // force the clone to use the parents setting. + // force the clone to use the parents setting. newParamClone.optional = true; } this.addParam(newParamClone); Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceIface.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceIface.java?rev=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceIface.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceIface.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ModelServiceReader.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -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) { @@ -187,7 +187,7 @@ String msg = "-- getModelService: # " + i + " Loaded service: " + serviceName + " (IN) " + reqIn + "/" + optIn + " (OUT) " + reqOut + "/" + optOut; - Debug.logVerbose(msg, module); + Debug.logVerbose(msg, module); } */ } else { @@ -216,7 +216,7 @@ return modelServices; } - /** + /** * Gets an Service object based on a definition from the specified XML Service descriptor file. * @param serviceName The serviceName of the Service definition to use. * @return An Service object describing the specified service of the specified descriptor file. @@ -230,7 +230,7 @@ return null; } - /** + /** * Creates a Iterator with the serviceName of each Service defined in the specified XML Service Descriptor file. * @return A Iterator of serviceName Strings */ @@ -244,7 +244,7 @@ } } - /** + /** * Creates a Collection with the serviceName of each Service defined in the specified XML Service Descriptor file. * @return A Collection of serviceName Strings */ @@ -261,16 +261,16 @@ service.definitionLocation = resourceLocation; service.engineName = UtilXml.checkEmpty(serviceElement.getAttribute("engine")).intern(); service.location = UtilXml.checkEmpty(serviceElement.getAttribute("location")).intern(); - service.invoke = UtilXml.checkEmpty(serviceElement.getAttribute("invoke")).intern(); + service.invoke = UtilXml.checkEmpty(serviceElement.getAttribute("invoke")).intern(); service.semaphore = UtilXml.checkEmpty(serviceElement.getAttribute("semaphore")).intern(); service.defaultEntityName = UtilXml.checkEmpty(serviceElement.getAttribute("default-entity-name")).intern(); - service.fromLoader = isFromURL ? readerURL.toExternalForm() : handler.getLoaderName(); + service.fromLoader = isFromURL ? readerURL.toExternalForm() : handler.getLoaderName(); // these default to true; if anything but true, make false 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"); - + 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; } @@ -385,7 +385,7 @@ ModelNotification notify = new ModelNotification(); notify.notificationEvent = e.getAttribute("event"); notify.notificationGroupName = e.getAttribute("group"); - model.notifications.add(notify); + model.notifications.add(notify); } } } @@ -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,43 +454,43 @@ //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")); + // get the entity name; first from the auto-attributes then from the service def + String entityName = UtilXml.checkEmpty(autoElement.getAttribute("entity-name")); if (entityName == null || entityName.length() == 0) { entityName = service.defaultEntityName; if (entityName == null || entityName.length() == 0) { 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 { + try { ModelEntity entity = delegator.getModelEntity(entityName); if (entity == null) { throw new GeneralException("Could not find entity with name [" + entityName + "]"); } Iterator<ModelField> fieldsIter = entity.getFieldsIterator(); - if (fieldsIter != null) { + if (fieldsIter != null) { while (fieldsIter.hasNext()) { ModelField field = fieldsIter.next(); if ((!field.getIsAutoCreatedInternal()) && ((field.getIsPk() && includePk) || (!field.getIsPk() && includeNonPk))) { @@ -509,25 +509,25 @@ } param.mode = UtilXml.checkEmpty(autoElement.getAttribute("mode")).intern(); param.optional = "true".equalsIgnoreCase(autoElement.getAttribute("optional")); // default to true - param.formDisplay = !"false".equalsIgnoreCase(autoElement.getAttribute("form-display")); // default to false + param.formDisplay = !"false".equalsIgnoreCase(autoElement.getAttribute("form-display")); // default to false param.allowHtml = UtilXml.checkEmpty(autoElement.getAttribute("allow-html"), "none").intern(); // default to none 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) { + if (excludes != null) { for (Element exclude: excludes) { 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); + //Debug.logInfo("Adding Param to " + service.name + ": " + thisParam.name + " [" + thisParam.mode + "] " + thisParam.type + " (" + thisParam.optional + ")", module); service.addParam(thisParam); - } + } } } catch (GenericEntityException e) { Debug.logError(e, "Problem loading auto-attributes [" + entityName + "] for " + service.name, 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,15 +560,15 @@ 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; + param.fieldName = param.name; } // set the validators @@ -644,30 +644,30 @@ 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")); ModelParam param = service.getParam(name); boolean directToParams = true; if (param == null) { - if (!service.inheritedParameters && (service.implServices.size() > 0 || "group".equals(service.engineName))) { + if (!service.inheritedParameters && (service.implServices.size() > 0 || "group".equals(service.engineName))) { // create a temp def to place in the ModelService // this will get read when we read implemented services - directToParams = false; + directToParams = false; param = new ModelParam(); param.name = name; } else { Debug.logWarning("No parameter found for override parameter named: " + name + " in service " + service.name, module); } - } - - if (param != null) { + } + + if (param != null) { // set only modified values - if (UtilValidate.isNotEmpty(overrideElement.getAttribute("type"))) { + if (UtilValidate.isNotEmpty(overrideElement.getAttribute("type"))) { param.type = UtilXml.checkEmpty(overrideElement.getAttribute("type")).intern(); } - if (UtilValidate.isNotEmpty(overrideElement.getAttribute("mode"))) { + if (UtilValidate.isNotEmpty(overrideElement.getAttribute("mode"))) { param.mode = UtilXml.checkEmpty(overrideElement.getAttribute("mode")).intern(); } if (UtilValidate.isNotEmpty(overrideElement.getAttribute("entity-name"))) { @@ -676,21 +676,21 @@ if (UtilValidate.isNotEmpty(overrideElement.getAttribute("field-name"))) { param.fieldName = UtilXml.checkEmpty(overrideElement.getAttribute("field-name")).intern(); } - if (UtilValidate.isNotEmpty(overrideElement.getAttribute("form-label"))) { + if (UtilValidate.isNotEmpty(overrideElement.getAttribute("form-label"))) { param.formLabel = UtilXml.checkEmpty(overrideElement.getAttribute("form-label")).intern(); } - if (UtilValidate.isNotEmpty(overrideElement.getAttribute("optional"))) { + if (UtilValidate.isNotEmpty(overrideElement.getAttribute("optional"))) { param.optional = "true".equalsIgnoreCase(overrideElement.getAttribute("optional")); // default to true param.overrideOptional = true; } if (UtilValidate.isNotEmpty(overrideElement.getAttribute("form-display"))) { param.formDisplay = !"false".equalsIgnoreCase(overrideElement.getAttribute("form-display")); // default to false param.overrideFormDisplay = true; - } + } if (UtilValidate.isNotEmpty(overrideElement.getAttribute("allow-html"))) { param.allowHtml = UtilXml.checkEmpty(overrideElement.getAttribute("allow-html")).intern(); - } + } // default value String defValue = overrideElement.getAttribute("default-value"); @@ -703,11 +703,11 @@ if (directToParams) { service.addParam(param); - } else { - service.overrideParameters.add(param); + } else { + service.overrideParameters.add(param); } - } - } + } + } } protected void addValidators(Element attribute, ModelParam param) { 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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/RunningService.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/RunningService.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -50,7 +50,7 @@ public String getLocalName() { return this.name; } - + public int getMode() { return mode; } Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceAuthException.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceAuthException.java?rev=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceAuthException.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceAuthException.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceDispatcher.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -97,7 +97,7 @@ } } - // job manager needs to always be running, but the poller thread does not + // job manager needs to always be running, but the poller thread does not try { this.jm = new JobManager(this.delegator, enableJM); } catch (GeneralRuntimeException e) { @@ -275,9 +275,9 @@ DispatchContext ctx = localContext.get(localName); GenericEngine engine = this.getGenericEngine(modelService.engineName); - // set IN attributes with default-value as applicable + // set IN attributes with default-value as applicable modelService.updateDefaultValues(context, ModelService.IN_PARAM); - + Map<String, Object> ecaContext = null; // for isolated transactions @@ -315,17 +315,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 + + // 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); @@ -336,7 +336,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); @@ -350,7 +350,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); @@ -376,7 +376,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 ===== @@ -389,7 +389,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); @@ -400,7 +400,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" @@ -408,18 +408,18 @@ // - Other ? deadlock string: TODO // TODO need testing in other databases because they all return different error messages for this! - // NOTE DEJ20070908 are there other things we need to check? I don't think so because these will - //be Entity Engine errors that will be caught and come back in an error message... IFF the + // NOTE DEJ20070908 are there other things we need to check? I don't think so because these will + //be Entity Engine errors that will be caught and come back in an error message... IFF the //service is written to not ignore it of course! 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) { @@ -430,22 +430,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 + // 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" @@ -484,10 +484,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); @@ -520,7 +520,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); @@ -543,7 +543,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(); } @@ -555,7 +555,7 @@ if (lock != null) { lock.release(); } - + // resume the parent transaction if (parentTransaction != null) { try { @@ -572,7 +572,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); @@ -603,7 +603,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); @@ -889,7 +889,7 @@ // evaluate permissions for the service or throw exception if fail. DispatchContext dctx = this.getLocalContext(localName); if (UtilValidate.isNotEmpty(origService.permissionServiceName)) { - Map<String, Object> permResp = origService.evalPermission(dctx, context); + Map<String, Object> permResp = origService.evalPermission(dctx, context); Boolean hasPermission = (Boolean) permResp.get("hasPermission"); if (hasPermission == null) { throw new ServiceAuthException("ERROR: the permission-service [" + origService.permissionServiceName + "] did not return a result. Not running the service [" + origService.name + "]"); 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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -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=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceValidationException.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -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/ServiceXaWrapper.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceXaWrapper.java?rev=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceXaWrapper.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceXaWrapper.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 Modified: ofbiz/trunk/framework/service/src/org/ofbiz/service/WebAppDispatcher.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/service/src/org/ofbiz/service/WebAppDispatcher.java?rev=757069&r1=757068&r2=757069&view=diff ============================================================================== --- ofbiz/trunk/framework/service/src/org/ofbiz/service/WebAppDispatcher.java (original) +++ ofbiz/trunk/framework/service/src/org/ofbiz/service/WebAppDispatcher.java Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -29,12 +29,12 @@ public class WebAppDispatcher extends GenericDispatcher { public static final String module = WebAppDispatcher.class.getName(); - + public WebAppDispatcher(String name, GenericDelegator delegator, Collection<URL> readerURLs) { this(name, delegator, readerURLs, null); } - public WebAppDispatcher(String name, GenericDelegator delegator, Collection<URL> readerURLs, ClassLoader loader) { + public WebAppDispatcher(String name, GenericDelegator delegator, Collection<URL> readerURLs, ClassLoader loader) { if (loader == null) { try { loader = Thread.currentThread().getContextClassLoader(); @@ -42,7 +42,7 @@ loader = this.getClass().getClassLoader(); } } - + DispatchContext dc = new DispatchContext(name, readerURLs, loader, null); init(name, delegator, dc); } 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=757069&r1=757068&r2=757069&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 Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -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=757069&r1=757068&r2=757069&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 Sat Mar 21 23:23:25 2009 @@ -6,9 +6,9 @@ * 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 @@ -37,7 +37,7 @@ * Recurrence Info Object */ public class RecurrenceInfo { - + public static final String module = RecurrenceInfo.class.getName(); protected GenericValue info; @@ -203,11 +203,11 @@ 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); - } + } // Check the rules and date list if (rDateList == null && rRulesList == null) { @@ -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); |
Free forum by Nabble | Edit this page |