You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2009/03/06 18:36:13 UTC
svn commit: r750997 [2/2] - in /ofbiz/trunk:
applications/accounting/src/org/ofbiz/accounting/invoice/
applications/accounting/src/org/ofbiz/accounting/payment/
applications/accounting/src/org/ofbiz/accounting/thirdparty/authorizedotnet/
applications/a...
Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/UtilValidate.java Fri Mar 6 17:36:09 2009
@@ -269,7 +269,7 @@
public static boolean charInString(char c, String s) {
return (s.indexOf(c) != -1);
// for(int i = 0; i < s.length; i++) {
- // if(s.charAt(i) == c) return true;
+ // if (s.charAt(i) == c) return true;
// }
// return false;
}
@@ -342,10 +342,10 @@
// int startPos = 0;
// boolean secondArg = defaultEmptyOK;
- // if(isSignedInteger.arguments.length > 1) secondArg = isSignedInteger.arguments[1];
+ // if (isSignedInteger.arguments.length > 1) secondArg = isSignedInteger.arguments[1];
// skip leading + or -
- // if((s.charAt(0) == "-") ||(s.charAt(0) == "+") ) startPos = 1;
+ // if ((s.charAt(0) == "-") ||(s.charAt(0) == "+") ) startPos = 1;
// return(isInteger(s.substring(startPos, s.length), secondArg))
}
@@ -536,9 +536,9 @@
//The old way:
// int startPos = 0;
- // if(isSignedFloat.arguments.length > 1) secondArg = isSignedFloat.arguments[1];
+ // if (isSignedFloat.arguments.length > 1) secondArg = isSignedFloat.arguments[1];
// skip leading + or -
- // if((s.charAt(0) == "-") ||(s.charAt(0) == "+") ) startPos = 1;
+ // if ((s.charAt(0) == "-") ||(s.charAt(0) == "+") ) startPos = 1;
// return(isFloat(s.substring(startPos, s.length), secondArg))
}
Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/Captcha.java Fri Mar 6 17:36:09 2009
@@ -41,7 +41,7 @@
public static String CAPTCHA_FILE_PATH = null;
public static String getCodeCaptcha(HttpServletRequest request,HttpServletResponse response) {
- if(CAPTCHA_FILE_PATH != null) deleteFile();
+ if (CAPTCHA_FILE_PATH != null) deleteFile();
StringBuffer finalString = new StringBuffer();
String elegibleChars = "ABCDEFGHJKLMPQRSTUVWXYabcdefhjkmnpqrstuvwxy23456789";
int charsToPrint = 6;
@@ -54,7 +54,7 @@
finalString.append(characterToShow);
}
ID_KEY = finalString.toString();
- if(createImageCaptcha (request,response)) return "success";
+ if (createImageCaptcha (request,response)) return "success";
return "error";
}
@@ -167,7 +167,7 @@
}
public static void deleteFile() {
- if(CAPTCHA_FILE_PATH != null) {
+ if (CAPTCHA_FILE_PATH != null) {
File file = new File(CAPTCHA_FILE_PATH);
file.delete();
}
Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/FindServices.java Fri Mar 6 17:36:09 2009
@@ -288,7 +288,7 @@
}
Object fieldObject = null;
- if(fieldOp != EntityOperator.IN || ! (fieldValue instanceof Collection)) {
+ if (fieldOp != EntityOperator.IN || ! (fieldValue instanceof Collection)) {
fieldObject = modelEntity.convertFieldValue(modelField, fieldValue, delegator, context);
} else {
fieldObject = fieldValue;
Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/login/LoginServices.java Fri Mar 6 17:36:09 2009
@@ -840,7 +840,7 @@
}
Debug.logInfo(" password.change.history.limit is set to " + passwordChangeHistoryLimit, module);
Debug.logInfo(" userLogin is set to " + userLogin, module);
- if(passwordChangeHistoryLimit > 0 && userLogin != null ) {
+ if (passwordChangeHistoryLimit > 0 && userLogin != null ) {
Debug.logInfo(" checkNewPassword Checking if user is tyring to use old password " + passwordChangeHistoryLimit, module);
GenericDelegator delegator = userLogin.getDelegator();
String newPasswordHash = newPassword;
@@ -850,7 +850,7 @@
try {
List<GenericValue> pwdHistList = delegator.findByAnd("UserLoginPasswordHistory", UtilMisc.toMap("userLoginId",userLogin.getString("userLoginId"),"currentPassword",newPasswordHash));
Debug.logInfo(" checkNewPassword pwdHistListpwdHistList " + pwdHistList.size(), module);
- if(pwdHistList.size() >0) {
+ if (pwdHistList.size() >0) {
Map<String, Integer> messageMap = UtilMisc.toMap("passwordChangeHistoryLimit", passwordChangeHistoryLimit);
errMsg = UtilProperties.getMessage(resource,"loginservices.password_must_be_different_from_last_passwords", messageMap, locale);
errorMessageList.add(errMsg);
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericEntity.java Fri Mar 6 17:36:09 2009
@@ -1101,7 +1101,7 @@
// if it is less that 0x20 at this point it is invalid because the only valid values < 0x20 are 0x9, 0xA, 0xD as caught above
Debug.logInfo("Removing invalid character [" + curChar + "] numeric value [" + (int) curChar + "] for field " + name + " of entity with PK: " + this.getPrimaryKey().toString(), module);
value.deleteCharAt(i);
- } else if(curChar > 0x7F) {
+ } else if (curChar > 0x7F) {
// Replace each char which is out of the ASCII range with a XML entity
String replacement = "&#" + (int) curChar + ";";
if (Debug.verboseOn()) {
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/datasource/GenericDAO.java Fri Mar 6 17:36:09 2009
@@ -546,7 +546,7 @@
}
/*
- if(entity == null || entity.<%=modelEntity.pkNameString(" == null || entity."," == null")%>) {
+ if (entity == null || entity.<%=modelEntity.pkNameString(" == null || entity."," == null")%>) {
Debug.logWarning("[GenericDAO.select]: Cannot select GenericEntity: required primary key field(s) missing.", module);
return false;
}
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/jdbc/DatabaseUtil.java Fri Mar 6 17:36:09 2009
@@ -1733,7 +1733,7 @@
sqlBuf.append(" ");
sqlBuf.append(type.getSqlType());
- if("String".equals(type.getJavaType()) || "java.lang.String".equals(type.getJavaType())) {
+ if ("String".equals(type.getJavaType()) || "java.lang.String".equals(type.getJavaType())) {
// if there is a characterSet, add the CHARACTER SET arg here
if (UtilValidate.isNotEmpty(this.datasourceInfo.characterSet)) {
sqlBuf.append(" CHARACTER SET ");
@@ -1933,7 +1933,7 @@
sqlBuf.append(" ");
sqlBuf.append(type.getSqlType());
- if("String".equals(type.getJavaType()) || "java.lang.String".equals(type.getJavaType())) {
+ if ("String".equals(type.getJavaType()) || "java.lang.String".equals(type.getJavaType())) {
// if there is a characterSet, add the CHARACTER SET arg here
if (UtilValidate.isNotEmpty(this.datasourceInfo.characterSet)) {
sqlBuf.append(" CHARACTER SET ");
@@ -1961,7 +1961,7 @@
sql2Buf.append(" ");
sql2Buf.append(type.getSqlType());
- if("String".equals(type.getJavaType()) || "java.lang.String".equals(type.getJavaType())) {
+ if ("String".equals(type.getJavaType()) || "java.lang.String".equals(type.getJavaType())) {
// if there is a characterSet, add the CHARACTER SET arg here
if (UtilValidate.isNotEmpty(this.datasourceInfo.characterSet)) {
sql2Buf.append(" CHARACTER SET ");
@@ -3225,7 +3225,7 @@
messages.add("Field type [" + type + "] not found for field [" + field.getName() + "] of entity [" + entity.getEntityName() + "], not creating table.");
continue;
}
- if(!"String".equals(type.getJavaType()) && !"java.lang.String".equals(type.getJavaType())) {
+ if (!"String".equals(type.getJavaType()) && !"java.lang.String".equals(type.getJavaType())) {
continue;
}
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntity.java Fri Mar 6 17:36:09 2009
@@ -1141,12 +1141,12 @@
/*
public String httpRelationArgList(ModelRelation relation) {
String returnString = "";
- if(relation.keyMaps.size() < 1) { return ""; }
+ if (relation.keyMaps.size() < 1) { return ""; }
int i = 0;
for(; i < relation.keyMaps.size() - 1; i++) {
ModelKeyMap keyMap = (ModelKeyMap)relation.keyMaps.get(i);
- if(keyMap != null)
+ if (keyMap != null)
returnString = returnString + "\"" + tableName + "_" + keyMap.relColName + "=\" + " + ModelUtil.lowerFirstChar(relation.mainEntity.entityName) + ".get" + ModelUtil.upperFirstChar(keyMap.fieldName) + "() + \"&\" + ";
}
ModelKeyMap keyMap = (ModelKeyMap)relation.keyMaps.get(i);
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntityChecker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntityChecker.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntityChecker.java (original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/model/ModelEntityChecker.java Fri Mar 6 17:36:09 2009
@@ -254,7 +254,7 @@
if (field != null && rfield != null) {
//this was the old check, now more constrained
// to keep things cleaner:
- // if(!field.getType().equals(rfield.getType())
+ // if (!field.getType().equals(rfield.getType())
// &&
// !field.getType().startsWith(rfield.getType())
// &&
Modified: ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java (original)
+++ ofbiz/trunk/framework/entityext/src/org/ofbiz/entityext/permission/EntityPermissionChecker.java Fri Mar 6 17:36:09 2009
@@ -223,7 +223,7 @@
if (!(targetOperationList == null) && userLoginId != null) {
hasRoleOperation = checkHasRoleOperations(partyId, targetOperationList, delegator);
}
- if( hasRoleOperation ) {
+ if ( hasRoleOperation ) {
return true;
}
ModelEntity modelEntity = delegator.getModelEntity(entityName);
@@ -504,7 +504,7 @@
boolean checkAncestors = false;
boolean hasRoleOperation = checkHasRoleOperations(partyId, permissionConditionGetter, delegator);
- if( hasRoleOperation ) {
+ if ( hasRoleOperation ) {
return true;
}
ModelEntity modelEntity = delegator.getModelEntity(entityName);
@@ -766,7 +766,7 @@
*/
public static List<String> getRelatedPurposes(GenericValue entity, List<String> passedPurposes) {
- if(entity == null) return passedPurposes;
+ if (entity == null) return passedPurposes;
List<String> purposeIds = null;
if (passedPurposes == null) {
@@ -806,7 +806,7 @@
String entityName = entity.getEntityName();
List<String> roles = FastList.newInstance();
- if(entity == null) return roles;
+ if (entity == null) return roles;
// TODO: Need to use ContentManagementWorker.getAuthorContent first
@@ -825,7 +825,7 @@
List<GenericValue> relatedRoles = null;
List<GenericValue> tmpRelatedRoles = entity.getRelatedCache(entityName + "Role");
relatedRoles = EntityUtil.filterByDate(tmpRelatedRoles);
- if(relatedRoles != null ) {
+ if (relatedRoles != null ) {
for (GenericValue contentRole: relatedRoles) {
String roleTypeId = (String)contentRole.get("roleTypeId");
String targPartyId = (String)contentRole.get("partyId");
Modified: ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java (original)
+++ ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java Fri Mar 6 17:36:09 2009
@@ -134,7 +134,7 @@
public XuiScreen(String[] args, JFrame frame) {
super(args, frame);
- if(args.length > 0) {
+ if (args.length > 0) {
startupProperties = args[0];
}
String suffix = Locale.getDefault().getLanguage();
@@ -144,7 +144,7 @@
suffix = "_" + suffix;
}
String language = UtilProperties.getPropertyValue(startupProperties, "Language");
- if(language.compareTo("XuiLabels" + suffix ) != 0) {
+ if (language.compareTo("XuiLabels" + suffix ) != 0) {
UtilProperties.setPropertyValue(startupProperties, "Language", "XuiLabels" + suffix);
}
frame.setVisible(true);
Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Classpath.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Classpath.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Classpath.java (original)
+++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Classpath.java Fri Mar 6 17:36:09 2009
@@ -78,7 +78,7 @@
private void appendPath(StringBuilder cp, String path) {
- if(path.indexOf(' ') >= 0) {
+ if (path.indexOf(' ') >= 0) {
cp.append('\"');
cp.append(path);
cp.append('"');
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/control/RequestHandler.java Fri Mar 6 17:36:09 2009
@@ -393,7 +393,7 @@
if (UtilValidate.isNotEmpty(preRequestMap)) {
for (Map.Entry<String, Object> entry: preRequestMap.entrySet()) {
String key = entry.getKey();
- if("_ERROR_MESSAGE_LIST_".equals(key) || "_ERROR_MESSAGE_MAP_".equals(key) || "_ERROR_MESSAGE_".equals(key) ||
+ if ("_ERROR_MESSAGE_LIST_".equals(key) || "_ERROR_MESSAGE_MAP_".equals(key) || "_ERROR_MESSAGE_".equals(key) ||
"_EVENT_MESSAGE_LIST_".equals(key) || "_EVENT_MESSAGE_".equals(key)) {
request.setAttribute(key, entry.getValue());
previousRequestAttrMap.put(key, entry.getValue());
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/CoreEvents.java Fri Mar 6 17:36:09 2009
@@ -406,7 +406,7 @@
Map<String, Object> syncServiceResult = null;
// schedule service
try {
- if(null!=request.getParameter("_RUN_SYNC_") && request.getParameter("_RUN_SYNC_").equals("Y")) {
+ if (null!=request.getParameter("_RUN_SYNC_") && request.getParameter("_RUN_SYNC_").equals("Y")) {
syncServiceResult = dispatcher.runSync(serviceName, serviceContext);
}else{
dispatcher.schedule(jobName, poolName, serviceName, serviceContext, startTime, frequency, interval, count, endTime, maxRetry);
@@ -419,7 +419,7 @@
String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.service_scheduled", locale);
request.setAttribute("_EVENT_MESSAGE_", errMsg);
- if(null!=syncServiceResult) {
+ if (null!=syncServiceResult) {
request.getSession().setAttribute("_RUN_SYNC_RESULT_", syncServiceResult);
return "sync_success";
}
@@ -430,26 +430,26 @@
HttpSession session = request.getSession();
Locale locale = UtilHttp.getLocale(request);
Map<String, Object> syncServiceResult = checkMap(session.getAttribute("_RUN_SYNC_RESULT_"), String.class, Object.class);
- if(null==syncServiceResult) {
+ if (null==syncServiceResult) {
String errMsg = UtilProperties.getMessage(CoreEvents.err_resource, "coreEvents.no_fields_in_session", locale);
request.setAttribute("_ERROR_MESSAGE_", "<li>" + errMsg);
return "error";
}
- if(null!=request.getParameter("_CLEAR_PREVIOUS_PARAMS_") && request.getParameter("_CLEAR_PREVIOUS_PARAMS_").equalsIgnoreCase("on"))
+ if (null!=request.getParameter("_CLEAR_PREVIOUS_PARAMS_") && request.getParameter("_CLEAR_PREVIOUS_PARAMS_").equalsIgnoreCase("on"))
session.removeAttribute("_SAVED_SYNC_RESULT_");
Map<String, String[]> serviceFieldsToSave = checkMap(request.getParameterMap(), String.class, String[].class);
Map<String, Object> savedFields = FastMap.newInstance();
for (String key: serviceFieldsToSave.keySet()) {
- if(null!=serviceFieldsToSave.get(key) && request.getParameter(key).equalsIgnoreCase("on") && !key.equals("_CLEAR_PREVIOUS_PARAMS_")) {
+ if (null!=serviceFieldsToSave.get(key) && request.getParameter(key).equalsIgnoreCase("on") && !key.equals("_CLEAR_PREVIOUS_PARAMS_")) {
String[] servicePath = key.split("\\|\\|");
String partialKey = servicePath[servicePath.length-1];
savedFields.put(partialKey, getObjectFromServicePath(key ,syncServiceResult));
}
}
- if(null!=session.getAttribute("_SAVED_SYNC_RESULT_")) {
+ if (null!=session.getAttribute("_SAVED_SYNC_RESULT_")) {
Map<String, Object> savedSyncResult = checkMap(session.getAttribute("_SAVED_SYNC_RESULT_"), String.class, Object.class);
savedSyncResult.putAll(savedFields);
savedFields = savedSyncResult;
@@ -465,22 +465,22 @@
Map<String, Object> servicePathMap = null;
for(int i=0;i<sp.length;i++) {
String servicePathEntry = sp[i];
- if(null==servicePathMap) {
+ if (null==servicePathMap) {
servicePathObject = serviceResult.get(servicePathEntry);
}else{
servicePathObject = servicePathMap.get(servicePathEntry);
}
servicePathMap = null;
- if(servicePathObject instanceof Map) {
+ if (servicePathObject instanceof Map) {
servicePathMap = checkMap(servicePathObject);
- }else if(servicePathObject instanceof GenericEntity) {
+ }else if (servicePathObject instanceof GenericEntity) {
GenericEntity servicePathEntity = (GenericEntity)servicePathObject;
servicePathMap = FastMap.newInstance();
for (Map.Entry<String, Object> entry: servicePathEntity.entrySet()) {
servicePathMap.put(entry.getKey(), entry.getValue());
}
- }else if(servicePathObject instanceof Collection) {
+ }else if (servicePathObject instanceof Collection) {
Collection<?> servicePathColl = checkCollection(servicePathObject);
int count=0;
servicePathMap = FastMap.newInstance();
@@ -490,7 +490,7 @@
}
}
}
- if(null==servicePathMap) {
+ if (null==servicePathMap) {
return servicePathObject;
}else{
return servicePathMap;
Modified: ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceVariantsEventHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceVariantsEventHandler.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceVariantsEventHandler.java (original)
+++ ofbiz/trunk/framework/webapp/src/org/ofbiz/webapp/event/ServiceVariantsEventHandler.java Fri Mar 6 17:36:09 2009
@@ -137,14 +137,14 @@
// get All Variant Products related to the Virtual Product
String productId = new String();
FastList<GenericValue> variantList = FastList.newInstance();
- if(UtilValidate.isNotEmpty(request.getParameter("productId"))) {
+ if (UtilValidate.isNotEmpty(request.getParameter("productId"))) {
productId = request.getParameter("productId");
// check Virtual Current Product
try{
GenericValue product = (GenericValue) dispatcher.runSync("getProduct", UtilMisc.toMap("productId", productId)).get("product");
// check if we have to implement changes to all Product Variants
- if(!request.getParameterMap().containsKey("modifyVariants")
+ if (!request.getParameterMap().containsKey("modifyVariants")
|| request.getParameterMap().containsKey("modifyVariants")
&& request.getParameter("modifyVariants").equals("Y")
&& product.get("isVirtual").toString().equals("Y")) {
@@ -159,11 +159,11 @@
for(GenericValue assocProduct: assocProductsList) {
try{
GenericValue variant = (GenericValue) dispatcher.runSync("getProduct", UtilMisc.toMap("productId", assocProduct.get("productIdTo"))).get("product");
- if(variant.get("isVirtual").toString().equals("Y")) {
+ if (variant.get("isVirtual").toString().equals("Y")) {
// save Sub-Variant Products
try{
Map<String, Object> subVariantMap = dispatcher.runSync("getAllProductVariants", UtilMisc.toMap("productId", assocProduct.get("productIdTo")));
- if(subVariantMap.get("responseMessage").equals("success") && subVariantMap.get("assocProducts") != null) {
+ if (subVariantMap.get("responseMessage").equals("success") && subVariantMap.get("assocProducts") != null) {
variantList.addAll((FastList<GenericValue>) subVariantMap.get("assocProducts"));
}
}catch(GenericServiceException e) {
@@ -239,8 +239,8 @@
Object value = null;
// set Product Id
- if("productId".equals(paramName)) {
- if(variant.getEntityName().equals("ProductAssoc")) {
+ if ("productId".equals(paramName)) {
+ if (variant.getEntityName().equals("ProductAssoc")) {
value = variant.get("productIdTo");
currentProductId = (String) value;
}else{
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/WidgetWorker.java Fri Mar 6 17:36:09 2009
@@ -110,7 +110,7 @@
writer.append('>');
- if(request.getAttribute("image") != null) {
+ if (request.getAttribute("image") != null) {
writer.append("<img src = \""+request.getAttribute("image").toString()+"\"/>");
}
Modified: ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original)
+++ ofbiz/trunk/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Fri Mar 6 17:36:09 2009
@@ -568,7 +568,7 @@
String value = modelFormField.getEntry(context, dateTimeField.getDefaultValue(context));
if (UtilValidate.isNotEmpty(value)) {
- if(value.length() > maxlength) {
+ if (value.length() > maxlength) {
value = value.substring(0, maxlength);
}
writer.append(" value=\"");
@@ -912,7 +912,7 @@
writer.append("</noscript>");
writer.append("\n<script type='text/javascript' language='JavaScript'><!--");
writer.append("\ndisa = ' disabled';");
- writer.append("\nif(other_choice(document.");
+ writer.append("\nif (other_choice(document.");
writer.append(modelForm.getName());
writer.append(".");
writer.append(fieldName);
@@ -930,7 +930,7 @@
writer.append(".");
writer.append(fieldName);
writer.append(")'/>\");");
- writer.append("\nif(disa && document.styleSheets)");
+ writer.append("\nif (disa && document.styleSheets)");
writer.append(" document.");
writer.append(modelForm.getName());
writer.append(".");
@@ -1425,7 +1425,7 @@
this.renderNextPrev(writer, context, modelForm);
}
writer.append(" <table cellspacing=\"0\" class=\"");
- if(UtilValidate.isNotEmpty(modelForm.getDefaultTableStyle())) {
+ if (UtilValidate.isNotEmpty(modelForm.getDefaultTableStyle())) {
writer.append(modelForm.getDefaultTableStyle());
} else {
writer.append("basic-table form-widget-table dark-grid");
@@ -1648,7 +1648,7 @@
public void renderFormatSingleWrapperOpen(Appendable writer, Map<String, Object> context, ModelForm modelForm) throws IOException {
writer.append(" <table cellspacing=\"0\"");
- if(UtilValidate.isNotEmpty(modelForm.getDefaultTableStyle())) {
+ if (UtilValidate.isNotEmpty(modelForm.getDefaultTableStyle())) {
writer.append(" class=\"" + modelForm.getDefaultTableStyle() + "\"");
}
writer.append(">");
Modified: ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java (original)
+++ ofbiz/trunk/specialpurpose/oagis/src/org/ofbiz/oagis/OagisInventoryServices.java Fri Mar 6 17:36:09 2009
@@ -489,7 +489,7 @@
Element documentRefElement = UtilXml.firstChildElement(receiptLnElement, "os:DOCUMNTREF");
orderId = UtilXml.childElementValue(documentRefElement, "of:DOCUMENTID");
String orderTypeId = UtilXml.childElementValue(documentRefElement, "of:DOCTYPE");
- if(orderTypeId.equals("PO")) {
+ if (orderTypeId.equals("PO")) {
orderTypeId = "PURCHASE_ORDER";
}
@@ -802,7 +802,7 @@
ripCtx.put("returnId", returnId);
String returnHeaderTypeId = UtilXml.childElementValue(documentRefElement, "of:DOCTYPE");
- if(returnHeaderTypeId.equals("RMA")) {
+ if (returnHeaderTypeId.equals("RMA")) {
returnHeaderTypeId = "CUSTOMER_RETURN";
}
@@ -884,7 +884,7 @@
//do some validations
Integer messageQuantity = Integer.valueOf(itemQtyStr);
- if(UtilValidate.isNotEmpty(serialNumsList)) {
+ if (UtilValidate.isNotEmpty(serialNumsList)) {
if (messageQuantity.intValue() != serialNumsList.size()) {
String errMsg = "Not enough serial numbers [" + serialNumsList.size() + "] for the quantity [" + messageQuantity.intValue() + "].";
errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SerialNumbersMissing"));
@@ -1360,7 +1360,7 @@
//do some validations
Integer messageQuantity = Integer.valueOf(itemQtyStr);
- if(UtilValidate.isNotEmpty(serialNumsList)) {
+ if (UtilValidate.isNotEmpty(serialNumsList)) {
if (messageQuantity.intValue() != serialNumsList.size()) {
String errMsg = "Not enough serial numbers [" + serialNumsList.size() + "] for the quantity [" + messageQuantity.intValue() + "].";
errorMapList.add(UtilMisc.toMap("description", errMsg, "reasonCode", "SerialNumbersMissing"));
Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/PosTransaction.java Fri Mar 6 17:36:09 2009
@@ -267,7 +267,7 @@
// to use foreach in receipt.java
ShoppingCartItem item = cart.findCartItem(index);
- if(this.isAggregatedItem(item.getProductId())) {
+ if (this.isAggregatedItem(item.getProductId())) {
ProductConfigWrapper pcw = null;
pcw = item.getConfigWrapper();
List selected = pcw.getSelectedOptions();
@@ -1239,7 +1239,7 @@
GenericDelegator delegator = cart.getDelegator();
ProductConfigWrapper pcw = null;
pcw = product.getConfigWrapper();
- if(pcw != null) {
+ if (pcw != null) {
ConfigureItem configItem = new ConfigureItem(cartIndex, pcw, this, pos);
configItem.openDlg();
}
@@ -1293,7 +1293,7 @@
for (GenericValue order : orders) {
String orderName = order.getString("orderName");
String orderId = order.getString("orderId");
- if(orderName != null) {
+ if (orderName != null) {
hash.put(orderId, orderName);
}
}
@@ -1340,7 +1340,7 @@
Debug.logError(ServiceUtil.getErrorMessage(svcRes) + " - " + svcRes, module);
} else{
ShoppingCart restoredCart = (ShoppingCart) svcRes.get("shoppingCart");
- if(append) {
+ if (append) {
// TODO: add stuff to append items
this.cart = restoredCart;
this.orderId = orderId;
Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/InputWithPassword.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/InputWithPassword.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/InputWithPassword.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/component/InputWithPassword.java Fri Mar 6 17:36:09 2009
@@ -30,14 +30,14 @@
super( page);
this.savedInput = super.input;
this.password = (XPassword)page.findComponent("pos_inputpassword");
- if( this.password == null) {
+ if ( this.password == null) {
this.password = new XPassword();
}
this.password.setVisible(false);
this.password.setFocusable(false);
}
public void setPasswordInput(boolean isPasswordInput) {
- if( isPasswordInput) {
+ if ( isPasswordInput) {
this.savedInput.setVisible(false);
this.password.setText("");
this.password.setVisible( true);
Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/device/impl/Receipt.java Fri Mar 6 17:36:09 2009
@@ -386,7 +386,7 @@
String[] lines = toPrint.split("\\n");
for (int x = 0; x < lines.length; x++) {
String trimmed = lines[x].trim();
- if(trimmed.length()>1) { // if empty string don't println
+ if (trimmed.length()>1) { // if empty string don't println
this.println(lines[x]);
}
}
@@ -394,7 +394,7 @@
this.println(toPrint);
}
- if(trans.isAggregatedItem(((String)expandMap.get("productId")).trim())) {
+ if (trans.isAggregatedItem(((String)expandMap.get("productId")).trim())) {
List<Map> maps = trans.getItemConfigInfo(i);
for (Map map: maps) {
expandMap = this.makeCodeExpandMap(trans, type);
@@ -410,7 +410,7 @@
String[] lines = toPrint.split("\\n");
for (int x = 0; x < lines.length; x++) {
String trimmed = lines[x].trim();
- if(trimmed.length()>1) {
+ if (trimmed.length()>1) {
this.println(lines[x]);
}
}
Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/MenuEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/MenuEvents.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/MenuEvents.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/MenuEvents.java Fri Mar 6 17:36:09 2009
@@ -198,7 +198,7 @@
ProductConfigWrapper pcw = null;
try {
aggregatedItem = trans.isAggregatedItem(productId);
- if(aggregatedItem) {
+ if (aggregatedItem) {
pcw = trans.getProductConfigWrapper(productId);
pcw.setDefaultConfig();
ConfigureItem configureItem = new ConfigureItem(pcw, trans, pos);
@@ -213,7 +213,7 @@
// add the item to the cart; report any errors to the user
if (productId != null) {
try {
- if(!aggregatedItem) {
+ if (!aggregatedItem) {
trans.addItem(productId, quantity);
}else{
trans.addItem(productId, pcw);
@@ -436,7 +436,7 @@
ProductConfigWrapper pcw = null;
try {
aggregatedItem = trans.isAggregatedItem(productId);
- if(aggregatedItem) {
+ if (aggregatedItem) {
pcw = trans.getProductConfigWrapper(productId, index);
ConfigureItem configureItem = new ConfigureItem(pcw, trans, pos);
pcw = configureItem.openDlg();
Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/event/PaymentEvents.java Fri Mar 6 17:36:09 2009
@@ -188,8 +188,8 @@
input.clearLastFunction();
input.setFunction("POSTALCODE");
postalCodeInfo = input.getFunction("POSTALCODE");
- if(UtilValidate.isNotEmpty(crtInfo[1])) {
- if(UtilValidate.isNotEmpty(creditExpirationInfo[1])) {
+ if (UtilValidate.isNotEmpty(crtInfo[1])) {
+ if (UtilValidate.isNotEmpty(creditExpirationInfo[1])) {
// setup keyed transaction
msrInfoStr = crtInfo[1] + "|" + creditExpirationInfo[1];
}else {
@@ -233,10 +233,10 @@
// if swiped
trans.setPaymentTrack2(pmId, null, track2Info[1]);
}else{ //keyed
- if(securityCodeInfo != null && UtilValidate.isNotEmpty(securityCodeInfo[1])) {
+ if (securityCodeInfo != null && UtilValidate.isNotEmpty(securityCodeInfo[1])) {
trans.setPaymentSecurityCode(pmId, null, securityCodeInfo[1]);
}
- if(postalCodeInfo != null && UtilValidate.isNotEmpty(postalCodeInfo[1])) {
+ if (postalCodeInfo != null && UtilValidate.isNotEmpty(postalCodeInfo[1])) {
trans.setPaymentPostalCode(pmId, null, postalCodeInfo[1]);
}
}
Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/ConfigureItem.java Fri Mar 6 17:36:09 2009
@@ -159,7 +159,7 @@
listModel.addElement(gv.get("description"));
List questions = m_pcw.getQuestions();
- if(questions==null) ; // no questions, we shouldn't be here
+ if (questions==null) ; // no questions, we shouldn't be here
else{
Iterator iter = questions.iterator();
while(iter.hasNext()) {
@@ -184,7 +184,7 @@
questionHashMap = new Hashtable();
List questions = m_pcw.getQuestions();
- if(questions==null) ; // no questions, we shouldn't be here
+ if (questions==null) ; // no questions, we shouldn't be here
else{
Iterator iter = questions.iterator();
Iterator buttons = m_buttonList.iterator();
@@ -193,7 +193,7 @@
XButton button = (XButton)buttons.next();
questionHashMap.put(button.getName(), buttonQuestion );
buttonQuestion.setupButton(button);
- if(buttonQuestion instanceof ListQuestion) {
+ if (buttonQuestion instanceof ListQuestion) {
((ListQuestion)buttonQuestion).setupListPane(m_optionListPane);
}
XEventHelper.addMouseHandler(this, button, "buttonPressed");
@@ -221,7 +221,7 @@
//Debug.logInfo("Product: " +gv.get("description"), module);
List questions = m_pcw.getQuestions();
- if(questions==null) return; // no questions, return
+ if (questions==null) return; // no questions, return
Iterator iter = questions.iterator();
while(iter.hasNext()) {
@@ -272,8 +272,8 @@
public Question get(ConfigItem question) {
List options = question.getOptions();
- if(question.isSingleChoice()) {
- if(options.size()>2) {
+ if (question.isSingleChoice()) {
+ if (options.size()>2) {
return new ListButtonQuestion(question);
}else{
//TODO: this doesn't handle the case of
@@ -311,7 +311,7 @@
public void setupButton(XButton button) {
this.button = button;
List options = question.getOptions();
- if(question.isSelected()) {
+ if (question.isSelected()) {
ConfigOption selectedOption = question.getSelected();
showOption = options.indexOf(selectedOption);
}
@@ -339,7 +339,7 @@
public void reset() {
showOption = 0;
List options = question.getOptions();
- if(question.isSelected()) {
+ if (question.isSelected()) {
ConfigOption selectedOption = question.getSelected();
showOption = options.indexOf(selectedOption);
}
@@ -411,7 +411,7 @@
try{
JList jlist = (JList)event.getSource();
boolean isAdjusting = event.getValueIsAdjusting();
- if(!isAdjusting) {
+ if (!isAdjusting) {
int[] selected = jlist.getSelectedIndices();
//for(int i: selected) {
// Debug.logInfo(""+i, module);
Modified: ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/NumericKeypad.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/NumericKeypad.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/NumericKeypad.java (original)
+++ ofbiz/trunk/specialpurpose/pos/src/org/ofbiz/pos/screen/NumericKeypad.java Fri Mar 6 17:36:09 2009
@@ -96,13 +96,13 @@
button = (XButton) m_dialog.findComponent("menuEnter");
XEventHelper.addMouseHandler(this, button, "triggerEnter");
- if(getMinus()) {
+ if (getMinus()) {
button = (XButton) m_dialog.findComponent("numMinus");
XEventHelper.addMouseHandler(this, button, "triggerMinus");
}else{
disableButton("numMinus");
}
- if(getPercent()) {
+ if (getPercent()) {
button = (XButton) m_dialog.findComponent("numPercent");
XEventHelper.addMouseHandler(this, button, "triggerMinus");
}else{
@@ -188,7 +188,7 @@
}
private synchronized void prependUnique(char c) {
- if(wasMouseClicked()) {
+ if (wasMouseClicked()) {
String text = "";
try{
text = m_edit.getText();
@@ -198,7 +198,7 @@
}finally{
text=c+text;
}
- if(countChars(text, c) > 1) {
+ if (countChars(text, c) > 1) {
text = stripChars(text, c);
}
m_edit.setText(text);
@@ -230,14 +230,14 @@
}
private synchronized void close() {
- if(wasMouseClicked()) {
+ if (wasMouseClicked()) {
m_dialog.closeDlg();
return;
}
}
private synchronized void clear() {
- if(wasMouseClicked()) {
+ if (wasMouseClicked()) {
String text = "";
m_edit.setText(text);
m_dialog.repaint();
@@ -246,7 +246,7 @@
}
private synchronized void append(char c) {
- if(wasMouseClicked()) {
+ if (wasMouseClicked()) {
String text = "";
try{
text = m_edit.getText();
@@ -263,7 +263,7 @@
}
private synchronized void append(String c) {
- if(wasMouseClicked()) {
+ if (wasMouseClicked()) {
String text = "";
try{
text = m_edit.getText();
Modified: ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/src/org/ofbiz/project/Various.java Fri Mar 6 17:36:09 2009
@@ -100,10 +100,10 @@
public static double calculateActualHours(GenericDelegator delegator, String timesheetId) {
List actuals = FastList.newInstance();
double actualHours = 0.00;
- if(timesheetId != null) {
+ if (timesheetId != null) {
try {
actuals = delegator.findByAnd("TimeEntry", UtilMisc.toMap("timesheetId", timesheetId));
- if(actuals.size() > 0) {
+ if (actuals.size() > 0) {
Iterator ite = actuals.iterator();
while(ite.hasNext()) {
GenericValue actual =(GenericValue)ite.next();
Modified: ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/container/SharkContainer.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/container/SharkContainer.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/container/SharkContainer.java (original)
+++ ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/container/SharkContainer.java Fri Mar 6 17:36:09 2009
@@ -134,7 +134,7 @@
Shark.configure(props);
String java_home = System.getenv("JAVA_HOME");
- if((java_home == null) && (java_home.length() > 0))
+ if ((java_home == null) && (java_home.length() > 0))
{
Debug.logError("OUT :Java home variable is undefined", module);
} else
@@ -211,7 +211,7 @@
if (dispatcher != null) {
dispatcher.deregister();
}
- if(p != null) {
+ if (p != null) {
p.destroy();
}
Modified: ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java (original)
+++ ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/instance/EntityPersistentMgr.java Fri Mar 6 17:36:09 2009
@@ -333,12 +333,12 @@
while(st.hasMoreElements())
{
Elem = (String)st.nextElement();
- if(Elem.equalsIgnoreCase(org.ofbiz.shark.SharkConstants.packageId)) {
+ if (Elem.equalsIgnoreCase(org.ofbiz.shark.SharkConstants.packageId)) {
st.nextElement();
strtoc = new StringTokenizer((String)st.nextElement(), "\'");
pkgId = strtoc.nextToken();
for(int i = 0; i < l.size(); i++) {
- if(((ProcessMgr)l.get(i)).getPackageId().equalsIgnoreCase(pkgId)) {
+ if (((ProcessMgr)l.get(i)).getPackageId().equalsIgnoreCase(pkgId)) {
returnList.add((ProcessMgr)l.get(i));
}
}
@@ -964,13 +964,13 @@
String prcsMngrName = new String();
String procState = new String();
String element = null;
- if(sqlWhere != null)
+ if (sqlWhere != null)
{
st = new StringTokenizer(sqlWhere);
while(st.hasMoreElements())
{
element = (String)st.nextElement();
- if(element.equalsIgnoreCase("ProcessDefinitions"))
+ if (element.equalsIgnoreCase("ProcessDefinitions"))
{
st.nextElement();
st.nextElement();
@@ -979,7 +979,7 @@
strtoc = new StringTokenizer(prcsMngrName, "\'");
prcsMngrName = strtoc.nextToken();
}
- if(element.equalsIgnoreCase("ProcessStates"))
+ if (element.equalsIgnoreCase("ProcessStates"))
{
st.nextElement();
st.nextElement();
@@ -993,7 +993,7 @@
l = getAllProcessesForMgr(prcsMngrName, trans);
for(int i = 0; i < l.size(); i ++)
{
- if(((Process)l.get(i)).getState().startsWith(new String(procState.substring(0, procState.length()-1))))
+ if (((Process)l.get(i)).getState().startsWith(new String(procState.substring(0, procState.length()-1))))
returnList.add(l.get(i));
}
}else{
@@ -1039,13 +1039,13 @@
while(st.hasMoreElements())
{
element = (String)st.nextElement();
- if(element.equals("Id"))
+ if (element.equals("Id"))
{
st.nextElement();
ProcessId = (String)st.nextElement();
strtoc = new StringTokenizer(ProcessId, "\'");
ProcessId = strtoc.nextToken();
- } else if( element.equals("ActivityStates"))
+ } else if ( element.equals("ActivityStates"))
{
st.nextElement();
st.nextElement();
@@ -1053,7 +1053,7 @@
String e = (String)st.nextElement();
strtoc = new StringTokenizer(e, "\'");
state = strtoc.nextToken();
- } else if(element.equals("ActivityDefinitionId")) {
+ } else if (element.equals("ActivityDefinitionId")) {
st.nextElement();
String e = (String)st.nextElement();
strtoc = new StringTokenizer(e, "\'");
@@ -1065,14 +1065,14 @@
for(int i = 0; i < act_list.size(); i ++)
{
- if((state == null) && (defId != null)) {
- if(((Activity)act_list.get(i)).getActivityDefinitionId().equalsIgnoreCase(defId))
+ if ((state == null) && (defId != null)) {
+ if (((Activity)act_list.get(i)).getActivityDefinitionId().equalsIgnoreCase(defId))
returnList.add(act_list.get(i));
- } else if((state != null) && (defId == null)) {
- if(((Activity)act_list.get(i)).getState().startsWith(new String(state.substring(0, state.length()-1))))
+ } else if ((state != null) && (defId == null)) {
+ if (((Activity)act_list.get(i)).getState().startsWith(new String(state.substring(0, state.length()-1))))
returnList.add(act_list.get(i));
} else if ((state != null) && (defId != null)) {
- if((((Activity)act_list.get(i)).getState().startsWith(new String(state.substring(0, state.length()-1))))&&
+ if ((((Activity)act_list.get(i)).getState().startsWith(new String(state.substring(0, state.length()-1))))&&
(((Activity)act_list.get(i)).getActivityDefinitionId().equalsIgnoreCase(defId)))
returnList.add(act_list.get(i));
}
@@ -1164,10 +1164,10 @@
List createdList = new ArrayList();
List tmpList = null;
tmpList = getAllVariablesForProcess(processId, trans);
- if(tmpList != null) {
+ if (tmpList != null) {
for(int i =0; i < tmpList.size(); i++) {
for(int j =0; j < varList.size(); j++) {
- if(((String)varList.get(j)).equalsIgnoreCase(((ProcessVariable)tmpList.get(i)).getDefinitionId())) {
+ if (((String)varList.get(j)).equalsIgnoreCase(((ProcessVariable)tmpList.get(i)).getDefinitionId())) {
createdList.add(tmpList.get(i));
}
}
@@ -1177,17 +1177,17 @@
}
public List getActivityVariables(String activityId, List varList, SharkTransaction trans) throws PersistenceException {
- if(varList == null)
+ if (varList == null)
{
return new ArrayList();
}
List createdList = new ArrayList();
List tmpList = null;
tmpList = getAllVariablesForActivity(activityId, trans);
- if(tmpList != null) {
+ if (tmpList != null) {
for(int i =0; i < tmpList.size(); i++) {
for(int j =0; j < varList.size(); j++) {
- if(((String)varList.get(j)).equalsIgnoreCase(((ActivityVariable)tmpList.get(i)).getDefinitionId())) {
+ if (((String)varList.get(j)).equalsIgnoreCase(((ActivityVariable)tmpList.get(i)).getDefinitionId())) {
createdList.add(tmpList.get(i));
}
}
Modified: ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/mapping/EntityApplicationMap.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/mapping/EntityApplicationMap.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/mapping/EntityApplicationMap.java (original)
+++ ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/mapping/EntityApplicationMap.java Fri Mar 6 17:36:09 2009
@@ -151,7 +151,7 @@
return false;
if ((applicationMap.getProcessDefinitionId() != null && this.getProcessDefinitionId() != null))
- if( !(applicationMap.getProcessDefinitionId().equals(this.getProcessDefinitionId())))
+ if ( !(applicationMap.getProcessDefinitionId().equals(this.getProcessDefinitionId())))
return false;
if ((applicationMap.getApplicationDefinitionId() != null && this.getApplicationDefinitionId() != null))
Modified: ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/repository/EntityRepositoryMgr.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/repository/EntityRepositoryMgr.java?rev=750997&r1=750996&r2=750997&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/repository/EntityRepositoryMgr.java (original)
+++ ofbiz/trunk/specialpurpose/shark/src/org/ofbiz/shark/repository/EntityRepositoryMgr.java Fri Mar 6 17:36:09 2009
@@ -410,7 +410,7 @@
try
{
byte [] b = getXPDL(null, xpdlId);
- if(b == null)
+ if (b == null)
return null;
return b;
}