Author: doogie
Date: Wed Sep 16 18:10:49 2009
New Revision: 815916
URL:
http://svn.apache.org/viewvc?rev=815916&view=revLog:
Apply patch from OFBIZ-1023, adding returnSuccess(List); the javadoc
from the patch wasn't used, however.
Modified:
ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java
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=815916&r1=815915&r2=815916&view=diff==============================================================================
--- ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java (original)
+++ ofbiz/trunk/framework/service/src/org/ofbiz/service/ServiceUtil.java Wed Sep 16 18:10:49 2009
@@ -161,6 +161,13 @@
return returnMessage(ModelService.RESPOND_SUCCESS, null);
}
+ /** A small routine used all over to improve code efficiency, make a result map with the message and the success response code */
+ public static Map<String, Object> returnSuccess(List<String> successMessageList) {
+ Map result = returnMessage(ModelService.RESPOND_SUCCESS, null);
+ result.put(ModelService.SUCCESS_MESSAGE_LIST, successMessageList);
+ return result;
+ }
+
/** A small routine to make a result map with the message and the response code
* NOTE: This brings out some bad points to our message convention: we should be using a single message or message list
* and what type of message that is should be determined by the RESPONSE_MESSAGE (and there's another annoyance, it should be RESPONSE_CODE)