Remove unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1044931 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -511,7 +511,7 @@ public class InvoiceWorker {
|
||||
// check if the invoice is posted and get the conversion from there
|
||||
List<GenericValue> acctgTransEntries = invoice.getRelated("AcctgTrans");
|
||||
if (UtilValidate.isNotEmpty(acctgTransEntries)) {
|
||||
GenericValue acctgTransEntry = ((GenericValue) acctgTransEntries.get(0)).getRelated("AcctgTransEntry").get(0);
|
||||
GenericValue acctgTransEntry = (acctgTransEntries.get(0)).getRelated("AcctgTransEntry").get(0);
|
||||
conversionRate = acctgTransEntry.getBigDecimal("amount").divide(acctgTransEntry.getBigDecimal("origAmount"), new MathContext(100)).setScale(decimals,rounding);
|
||||
}
|
||||
// check if a payment is applied and use the currency conversion from there
|
||||
@@ -532,7 +532,7 @@ public class InvoiceWorker {
|
||||
if (UtilValidate.isEmpty(conversionRate)) {
|
||||
List<GenericValue> rates = EntityUtil.filterByDate(delegator.findByAnd("UomConversionDated", UtilMisc.toMap("uomIdTo", invoice.getString("currencyUomId"), "uomId", otherCurrencyUomId)), invoice.getTimestamp("invoiceDate"));
|
||||
if (UtilValidate.isNotEmpty(rates)) {
|
||||
conversionRate = (BigDecimal.ONE).divide(((GenericValue) rates.get(0)).getBigDecimal("conversionFactor"), new MathContext(100)).setScale(decimals,rounding);
|
||||
conversionRate = (BigDecimal.ONE).divide((rates.get(0)).getBigDecimal("conversionFactor"), new MathContext(100)).setScale(decimals,rounding);
|
||||
} else {
|
||||
Debug.logError("Could not find conversionrate for invoice: " + invoice.getString("invoiceId"), module);
|
||||
return new BigDecimal("1");
|
||||
|
||||
+27
-27
@@ -221,7 +221,7 @@ public class PaymentGatewayServices {
|
||||
if (UtilValidate.isNotEmpty(otherPaymentMethodAndCreditCardList)) {
|
||||
Iterator<GenericValue> otherPaymentMethodAndCreditCardIter = otherPaymentMethodAndCreditCardList.iterator();
|
||||
while (otherPaymentMethodAndCreditCardIter.hasNext()) {
|
||||
GenericValue otherPaymentMethodAndCreditCard = (GenericValue) otherPaymentMethodAndCreditCardIter.next();
|
||||
GenericValue otherPaymentMethodAndCreditCard = otherPaymentMethodAndCreditCardIter.next();
|
||||
|
||||
// change OrderPaymentPreference in memory only and call auth service
|
||||
orderPaymentPreference.set("paymentMethodId", otherPaymentMethodAndCreditCard.getString("paymentMethodId"));
|
||||
@@ -348,7 +348,7 @@ public class PaymentGatewayServices {
|
||||
List<String> messages = FastList.newInstance();
|
||||
Iterator<GenericValue> payments = paymentPrefs.iterator();
|
||||
while (payments.hasNext()) {
|
||||
GenericValue paymentPref = (GenericValue) payments.next();
|
||||
GenericValue paymentPref = payments.next();
|
||||
if (reAuth && "PAYMENT_AUTHORIZED".equals(paymentPref.getString("statusId"))) {
|
||||
String paymentConfig = null;
|
||||
// get the payment settings i.e. serviceName and config properties file name
|
||||
@@ -524,7 +524,7 @@ public class PaymentGatewayServices {
|
||||
}
|
||||
|
||||
// try other expire dates if the expireDate is not after today, or if we called the auth service and resultBadExpire = true
|
||||
if (tryOtherExpDates && (!UtilValidate.isDateAfterToday(creditCard.getString("expireDate")) || (processorResult != null && Boolean.TRUE.equals((Boolean) processorResult.get("resultBadExpire"))))) {
|
||||
if (tryOtherExpDates && (!UtilValidate.isDateAfterToday(creditCard.getString("expireDate")) || (processorResult != null && Boolean.TRUE.equals(processorResult.get("resultBadExpire"))))) {
|
||||
// try adding 2, 3, 4 years later with the same month
|
||||
String expireDate = creditCard.getString("expireDate");
|
||||
int dateSlash1 = expireDate.indexOf("/");
|
||||
@@ -539,14 +539,14 @@ public class PaymentGatewayServices {
|
||||
processorResult = dispatcher.runSync(serviceName, processContext, TX_TIME, true);
|
||||
|
||||
// note that these additional tries will only be done if the service return is not an error, in that case we let it pass through to the normal error handling
|
||||
if (!ServiceUtil.isError(processorResult) && Boolean.TRUE.equals((Boolean) processorResult.get("resultBadExpire"))) {
|
||||
if (!ServiceUtil.isError(processorResult) && Boolean.TRUE.equals(processorResult.get("resultBadExpire"))) {
|
||||
// okay, try one more year...
|
||||
year = StringUtil.addToNumberString(year, 1);
|
||||
creditCard.set("expireDate", month + "/" + year);
|
||||
processorResult = dispatcher.runSync(serviceName, processContext, TX_TIME, true);
|
||||
}
|
||||
|
||||
if (!ServiceUtil.isError(processorResult) && Boolean.TRUE.equals((Boolean) processorResult.get("resultBadExpire"))) {
|
||||
if (!ServiceUtil.isError(processorResult) && Boolean.TRUE.equals(processorResult.get("resultBadExpire"))) {
|
||||
// okay, try one more year... and this is the last try
|
||||
year = StringUtil.addToNumberString(year, 1);
|
||||
creditCard.set("expireDate", month + "/" + year);
|
||||
@@ -554,7 +554,7 @@ public class PaymentGatewayServices {
|
||||
}
|
||||
|
||||
// at this point if we have a successful result, let's save the new creditCard expireDate
|
||||
if (!ServiceUtil.isError(processorResult) && Boolean.TRUE.equals((Boolean) processorResult.get("authResult"))) {
|
||||
if (!ServiceUtil.isError(processorResult) && Boolean.TRUE.equals(processorResult.get("authResult"))) {
|
||||
// TODO: this is bad; we should be expiring the old card and creating a new one instead of editing it
|
||||
creditCard.store();
|
||||
}
|
||||
@@ -662,7 +662,7 @@ public class PaymentGatewayServices {
|
||||
Collection<GenericValue> emails = ContactHelper.getContactMech(billToPersonOrGroup.getRelatedOne("Party"), "PRIMARY_EMAIL", "EMAIL_ADDRESS", false);
|
||||
|
||||
if (UtilValidate.isNotEmpty(emails)) {
|
||||
billToEmail = (GenericValue) emails.iterator().next();
|
||||
billToEmail = emails.iterator().next();
|
||||
}
|
||||
|
||||
toContext.put("billToParty", billToPersonOrGroup);
|
||||
@@ -733,7 +733,7 @@ public class PaymentGatewayServices {
|
||||
List<GenericValue> finished = FastList.newInstance();
|
||||
Iterator<GenericValue> payments = paymentPrefs.iterator();
|
||||
while (payments.hasNext()) {
|
||||
paymentPref = (GenericValue) payments.next();
|
||||
paymentPref = payments.next();
|
||||
Map<String, Object> releaseContext = UtilMisc.toMap("userLogin", userLogin, "orderPaymentPreferenceId", paymentPref.getString("orderPaymentPreferenceId"));
|
||||
Map<String, Object> releaseResult = null;
|
||||
try {
|
||||
@@ -794,7 +794,7 @@ public class PaymentGatewayServices {
|
||||
while (i.hasNext()) {
|
||||
GenericValue respMsg = delegator.makeValue("PaymentGatewayRespMsg");
|
||||
String respMsgId = delegator.getNextSeqId("PaymentGatewayRespMsg");
|
||||
String message = (String) i.next();
|
||||
String message = i.next();
|
||||
respMsg.set("paymentGatewayRespMsgId", respMsgId);
|
||||
respMsg.set("paymentGatewayResponseId", responseId);
|
||||
respMsg.set("pgrMessage", message);
|
||||
@@ -819,7 +819,7 @@ public class PaymentGatewayServices {
|
||||
if (paymentList != null) {
|
||||
Iterator<GenericValue> pi = paymentList.iterator();
|
||||
while (pi.hasNext()) {
|
||||
GenericValue pay = (GenericValue) pi.next();
|
||||
GenericValue pay = pi.next();
|
||||
try {
|
||||
Map<String, Object> cancelResults = dispatcher.runSync("setPaymentStatus", UtilMisc.toMap("userLogin", userLogin, "paymentId", pay.get("paymentId"), "statusId", "PMNT_CANCELLED"));
|
||||
if (ServiceUtil.isError(cancelResults)) {
|
||||
@@ -985,7 +985,7 @@ public class PaymentGatewayServices {
|
||||
while (i.hasNext()) {
|
||||
GenericValue respMsg = delegator.makeValue("PaymentGatewayRespMsg");
|
||||
String respMsgId = delegator.getNextSeqId("PaymentGatewayRespMsg");
|
||||
String message = (String) i.next();
|
||||
String message = i.next();
|
||||
respMsg.set("paymentGatewayRespMsgId", respMsgId);
|
||||
respMsg.set("paymentGatewayResponseId", responseId);
|
||||
respMsg.set("pgrMessage", message);
|
||||
@@ -1011,7 +1011,7 @@ public class PaymentGatewayServices {
|
||||
if (paymentList != null) {
|
||||
Iterator<GenericValue> pi = paymentList.iterator();
|
||||
while (pi.hasNext()) {
|
||||
GenericValue pay = (GenericValue) pi.next();
|
||||
GenericValue pay = pi.next();
|
||||
try {
|
||||
Map<String, Object> cancelResults = dispatcher.runSync("setPaymentStatus", UtilMisc.toMap("userLogin", userLogin, "paymentId", pay.get("paymentId"), "statusId", "PMNT_CANCELLED"));
|
||||
if (ServiceUtil.isError(cancelResults)) {
|
||||
@@ -1072,7 +1072,7 @@ public class PaymentGatewayServices {
|
||||
if (orderItemBillings != null) {
|
||||
Iterator<GenericValue> oii = orderItemBillings.iterator();
|
||||
while (oii.hasNext()) {
|
||||
GenericValue oib = (GenericValue) oii.next();
|
||||
GenericValue oib = oii.next();
|
||||
String orderId = oib.getString("orderId");
|
||||
if (testOrderId == null) {
|
||||
testOrderId = orderId;
|
||||
@@ -1169,7 +1169,7 @@ public class PaymentGatewayServices {
|
||||
if (UtilValidate.isNotEmpty(paymentPrefsBa)) {
|
||||
Iterator<GenericValue> paymentsBa = paymentPrefsBa.iterator();
|
||||
while (paymentsBa.hasNext()) {
|
||||
GenericValue paymentPref = (GenericValue) paymentsBa.next();
|
||||
GenericValue paymentPref = paymentsBa.next();
|
||||
|
||||
BigDecimal authAmount = paymentPref.getBigDecimal("maxAmount");
|
||||
if (authAmount == null) authAmount = ZERO;
|
||||
@@ -1539,7 +1539,7 @@ public class PaymentGatewayServices {
|
||||
// we have captured all the amount required
|
||||
break;
|
||||
}
|
||||
GenericValue paymentApplication = (GenericValue)paymentApplicationsIt.next();
|
||||
GenericValue paymentApplication = paymentApplicationsIt.next();
|
||||
GenericValue payment = paymentApplication.getRelatedOne("Payment");
|
||||
if (payment.getString("paymentPreferenceId") != null) {
|
||||
// if the payment is reserved for a specific OrderPaymentPreference,
|
||||
@@ -1866,10 +1866,10 @@ public class PaymentGatewayServices {
|
||||
response.set("gatewayMessage", context.get("authMessage"));
|
||||
response.set("transactionDate", UtilDateTime.nowTimestamp());
|
||||
|
||||
if (Boolean.TRUE.equals((Boolean) context.get("resultDeclined"))) response.set("resultDeclined", "Y");
|
||||
if (Boolean.TRUE.equals((Boolean) context.get("resultNsf"))) response.set("resultNsf", "Y");
|
||||
if (Boolean.TRUE.equals((Boolean) context.get("resultBadExpire"))) response.set("resultBadExpire", "Y");
|
||||
if (Boolean.TRUE.equals((Boolean) context.get("resultBadCardNumber"))) response.set("resultBadCardNumber", "Y");
|
||||
if (Boolean.TRUE.equals(context.get("resultDeclined"))) response.set("resultDeclined", "Y");
|
||||
if (Boolean.TRUE.equals(context.get("resultNsf"))) response.set("resultNsf", "Y");
|
||||
if (Boolean.TRUE.equals(context.get("resultBadExpire"))) response.set("resultBadExpire", "Y");
|
||||
if (Boolean.TRUE.equals(context.get("resultBadCardNumber"))) response.set("resultBadCardNumber", "Y");
|
||||
|
||||
// save the response
|
||||
savePgr(dctx, response);
|
||||
@@ -1881,7 +1881,7 @@ public class PaymentGatewayServices {
|
||||
while (i.hasNext()) {
|
||||
GenericValue respMsg = delegator.makeValue("PaymentGatewayRespMsg");
|
||||
String respMsgId = delegator.getNextSeqId("PaymentGatewayRespMsg");
|
||||
String message = (String) i.next();
|
||||
String message = i.next();
|
||||
respMsg.set("paymentGatewayRespMsgId", respMsgId);
|
||||
respMsg.set("paymentGatewayResponseId", responseId);
|
||||
respMsg.set("pgrMessage", message);
|
||||
@@ -1926,7 +1926,7 @@ public class PaymentGatewayServices {
|
||||
}
|
||||
creditCard.set("lastFailedAuthDate", nowTimestamp);
|
||||
|
||||
if (Boolean.TRUE.equals((Boolean) context.get("resultNsf"))) {
|
||||
if (Boolean.TRUE.equals(context.get("resultNsf"))) {
|
||||
Long consecutiveFailedNsf = creditCard.getLong("consecutiveFailedNsf");
|
||||
if (consecutiveFailedNsf == null) {
|
||||
creditCard.set("consecutiveFailedNsf", Long.valueOf(1));
|
||||
@@ -1960,7 +1960,7 @@ public class PaymentGatewayServices {
|
||||
|
||||
private static boolean needsNsfRetry(GenericValue orderPaymentPreference, Map<String, ? extends Object> processContext, Delegator delegator) throws GenericEntityException {
|
||||
boolean needsNsfRetry = false;
|
||||
if (Boolean.TRUE.equals((Boolean) processContext.get("resultNsf"))) {
|
||||
if (Boolean.TRUE.equals(processContext.get("resultNsf"))) {
|
||||
// only track this for auto-orders, since we will only not fail and re-try on those
|
||||
GenericValue orderHeader = orderPaymentPreference.getRelatedOne("OrderHeader");
|
||||
if (UtilValidate.isNotEmpty(orderHeader.getString("autoOrderShoppingListId"))) {
|
||||
@@ -2190,7 +2190,7 @@ public class PaymentGatewayServices {
|
||||
while (i.hasNext()) {
|
||||
GenericValue respMsg = delegator.makeValue("PaymentGatewayRespMsg");
|
||||
String respMsgId = delegator.getNextSeqId("PaymentGatewayRespMsg");
|
||||
String message = (String) i.next();
|
||||
String message = i.next();
|
||||
respMsg.set("paymentGatewayRespMsgId", respMsgId);
|
||||
respMsg.set("paymentGatewayResponseId", responseId);
|
||||
respMsg.set("pgrMessage", message);
|
||||
@@ -2469,7 +2469,7 @@ public class PaymentGatewayServices {
|
||||
while (i.hasNext()) {
|
||||
GenericValue respMsg = delegator.makeValue("PaymentGatewayRespMsg");
|
||||
String respMsgId = delegator.getNextSeqId("PaymentGatewayRespMsg");
|
||||
String message = (String) i.next();
|
||||
String message = i.next();
|
||||
respMsg.set("paymentGatewayRespMsgId", respMsgId);
|
||||
respMsg.set("paymentGatewayResponseId", responseId);
|
||||
respMsg.set("pgrMessage", message);
|
||||
@@ -2613,7 +2613,7 @@ public class PaymentGatewayServices {
|
||||
if (eli != null) {
|
||||
Debug.logInfo("Processing failed order re-auth(s)", module);
|
||||
GenericValue value = null;
|
||||
while (((value = (GenericValue) eli.next()) != null)) {
|
||||
while (((value = eli.next()) != null)) {
|
||||
String orderId = value.getString("orderId");
|
||||
if (!processList.contains(orderId)) { // just try each order once
|
||||
try {
|
||||
@@ -2662,7 +2662,7 @@ public class PaymentGatewayServices {
|
||||
if (eli != null) {
|
||||
Debug.logInfo("Processing failed order re-auth(s)", module);
|
||||
GenericValue value = null;
|
||||
while (((value = (GenericValue) eli.next()) != null)) {
|
||||
while (((value = eli.next()) != null)) {
|
||||
String orderId = value.getString("orderId");
|
||||
if (!processList.contains(orderId)) { // just try each order once
|
||||
try {
|
||||
@@ -3382,7 +3382,7 @@ public class PaymentGatewayServices {
|
||||
String lastNumberStr = expireDate.substring(expireDate.length() - 1);
|
||||
int lastNumber = Integer.parseInt(lastNumberStr);
|
||||
|
||||
if ((float) lastNumber / 2.0 == 0.0) {
|
||||
if (lastNumber / 2.0 == 0.0) {
|
||||
return alwaysBadExpireProcessor(dctx, context);
|
||||
} else {
|
||||
return alwaysApproveProcessor(dctx, context);
|
||||
|
||||
Vendored
+3
-3
@@ -125,7 +125,7 @@ public class AIMPaymentServices {
|
||||
// CAPTURE_ONLY is a "force" transaction to be used if there is no prior authorization
|
||||
props.put("transType", "PRIOR_AUTH_CAPTURE");
|
||||
//props.put("transType","CAPTURE_ONLY");
|
||||
props.put("cardtype", (String)creditCard.get("cardType"));
|
||||
props.put("cardtype", creditCard.get("cardType"));
|
||||
buildCaptureTransaction(context,props,request);
|
||||
Map<String, Object> validateResults = validateRequest(context, props, request);
|
||||
String respMsg = (String)validateResults.get(ModelService.RESPONSE_MESSAGE);
|
||||
@@ -165,7 +165,7 @@ public class AIMPaymentServices {
|
||||
buildGatewayResponeConfig(context, props, request);
|
||||
buildEmailSettings(context, props, request);
|
||||
props.put("transType", "CREDIT");
|
||||
props.put("cardtype", (String)creditCard.get("cardType"));
|
||||
props.put("cardtype", creditCard.get("cardType"));
|
||||
buildRefundTransaction(context, props, request);
|
||||
Map<String, Object> validateResults = validateRequest(context, props, request);
|
||||
String respMsg = (String)validateResults.get(ModelService.RESPONSE_MESSAGE);
|
||||
@@ -398,7 +398,7 @@ public class AIMPaymentServices {
|
||||
props.put("password", password);
|
||||
props.put("trankey", tranKey);
|
||||
if (cc != null) {
|
||||
props.put("cardtype", (String)cc.get("cardType"));
|
||||
props.put("cardtype", cc.get("cardType"));
|
||||
}
|
||||
if (AIMProperties == null) {
|
||||
AIMProperties = props;
|
||||
|
||||
+3
-3
@@ -250,7 +250,7 @@ public class PayPalEvents {
|
||||
Set <String> keySet = parametersMap.keySet();
|
||||
Iterator <String> i = keySet.iterator();
|
||||
while (i.hasNext()) {
|
||||
String name = (String) i.next();
|
||||
String name = i.next();
|
||||
String value = request.getParameter(name);
|
||||
Debug.logError("### Param: " + name + " => " + value, module);
|
||||
if (UtilValidate.isNotEmpty(name) && "payer_status".equalsIgnoreCase(name) &&
|
||||
@@ -419,7 +419,7 @@ public class PayPalEvents {
|
||||
if (paymentPrefs.size() > 0) {
|
||||
Iterator <GenericValue> i = paymentPrefs.iterator();
|
||||
while (i.hasNext()) {
|
||||
GenericValue pref = (GenericValue) i.next();
|
||||
GenericValue pref = i.next();
|
||||
boolean okay = setPaymentPreference(dispatcher, userLogin, pref, request);
|
||||
if (!okay)
|
||||
return false;
|
||||
@@ -504,7 +504,7 @@ public class PayPalEvents {
|
||||
|
||||
if ((results == null) || (results.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR))) {
|
||||
Debug.logError((String) results.get(ModelService.ERROR_MESSAGE), module);
|
||||
request.setAttribute("_ERROR_MESSAGE_", (String) results.get(ModelService.ERROR_MESSAGE));
|
||||
request.setAttribute("_ERROR_MESSAGE_", results.get(ModelService.ERROR_MESSAGE));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -437,19 +437,19 @@ public class ContentWorker implements org.ofbiz.widget.ContentWorkerInterface {
|
||||
List<GenericValue> topicList = content.getRelatedByAnd("ToContentAssoc", UtilMisc.toMap("contentAssocTypeId", "TOPIC"));
|
||||
List<String> topics = FastList.newInstance();
|
||||
for (int i = 0; i < topicList.size(); i++) {
|
||||
GenericValue assoc = (GenericValue) topicList.get(i);
|
||||
GenericValue assoc = topicList.get(i);
|
||||
topics.add(assoc.getString("contentId"));
|
||||
}
|
||||
List<GenericValue> keywordList = content.getRelatedByAnd("ToContentAssoc", UtilMisc.toMap("contentAssocTypeId", "KEYWORD"));
|
||||
List<String> keywords = FastList.newInstance();
|
||||
for (int i = 0; i < keywordList.size(); i++) {
|
||||
GenericValue assoc = (GenericValue) keywordList.get(i);
|
||||
GenericValue assoc = keywordList.get(i);
|
||||
keywords.add(assoc.getString("contentId"));
|
||||
}
|
||||
List<GenericValue> purposeValueList = content.getRelatedCache("ContentPurpose");
|
||||
List<String> purposes = FastList.newInstance();
|
||||
for (int i = 0; i < purposeValueList.size(); i++) {
|
||||
GenericValue purposeValue = (GenericValue) purposeValueList.get(i);
|
||||
GenericValue purposeValue = purposeValueList.get(i);
|
||||
purposes.add(purposeValue.getString("contentPurposeTypeId"));
|
||||
}
|
||||
List<GenericValue> contentTypeAncestry = FastList.newInstance();
|
||||
@@ -490,7 +490,7 @@ public class ContentWorker implements org.ofbiz.widget.ContentWorkerInterface {
|
||||
Map<String, Object> assocContext = FastMap.newInstance();
|
||||
assocContext.put("related", relatedAssocs);
|
||||
while (it.hasNext()) {
|
||||
GenericValue assocValue = (GenericValue) it.next();
|
||||
GenericValue assocValue = it.next();
|
||||
contentAssocTypeId = (String) assocValue.get("contentAssocTypeId");
|
||||
assocContext.put("contentAssocTypeId", contentAssocTypeId);
|
||||
//assocContext.put("contentTypeId", assocValue.get("contentTypeId"));
|
||||
@@ -530,7 +530,7 @@ public class ContentWorker implements org.ofbiz.widget.ContentWorkerInterface {
|
||||
return false;
|
||||
}
|
||||
|
||||
Map<String, Object> currentNode = (Map<String, Object>)nodeTrail.get(sz - 1);
|
||||
Map<String, Object> currentNode = nodeTrail.get(sz - 1);
|
||||
Boolean isReturnAfter = (Boolean)currentNode.get("isReturnAfter");
|
||||
if (isReturnAfter != null && isReturnAfter.booleanValue()) {
|
||||
return false;
|
||||
@@ -540,7 +540,7 @@ public class ContentWorker implements org.ofbiz.widget.ContentWorkerInterface {
|
||||
if (UtilValidate.isNotEmpty(kids)) {
|
||||
int idx = 0;
|
||||
while (idx < kids.size()) {
|
||||
currentNode = (Map<String, Object>)kids.get(idx);
|
||||
currentNode = kids.get(idx);
|
||||
ContentWorker.traceNodeTrail("12",nodeTrail);
|
||||
Boolean isPick = (Boolean)currentNode.get("isPick");
|
||||
|
||||
@@ -568,9 +568,9 @@ public class ContentWorker implements org.ofbiz.widget.ContentWorkerInterface {
|
||||
if (!inProgress) {
|
||||
// look for next sibling
|
||||
while (sz > 1) {
|
||||
currentNode = (Map<String, Object>)nodeTrail.remove(--sz);
|
||||
currentNode = nodeTrail.remove(--sz);
|
||||
ContentWorker.traceNodeTrail("15",nodeTrail);
|
||||
Map<String, Object> parentNode = (Map<String, Object>) nodeTrail.get(sz - 1);
|
||||
Map<String, Object> parentNode = nodeTrail.get(sz - 1);
|
||||
kids = (List<Map <String, Object>>)parentNode.get("kids");
|
||||
if (kids == null) {
|
||||
continue;
|
||||
@@ -578,7 +578,7 @@ public class ContentWorker implements org.ofbiz.widget.ContentWorkerInterface {
|
||||
|
||||
int idx = kids.indexOf(currentNode);
|
||||
while (idx < (kids.size() - 1)) {
|
||||
currentNode = (Map<String, Object>)kids.get(idx + 1);
|
||||
currentNode = kids.get(idx + 1);
|
||||
Boolean isFollow = (Boolean)currentNode.get("isFollow");
|
||||
if (isFollow == null || !isFollow.booleanValue()) {
|
||||
idx++;
|
||||
|
||||
+4
-4
@@ -117,10 +117,10 @@ public class LimitedSubContentCacheTransform implements TemplateTransformModel {
|
||||
}
|
||||
|
||||
Map whenMap = FastMap.newInstance();
|
||||
whenMap.put("followWhen", (String) templateRoot.get("followWhen"));
|
||||
whenMap.put("pickWhen", (String) templateRoot.get("pickWhen"));
|
||||
whenMap.put("returnBeforePickWhen", (String) templateRoot.get("returnBeforePickWhen"));
|
||||
whenMap.put("returnAfterPickWhen", (String) templateRoot.get("returnAfterPickWhen"));
|
||||
whenMap.put("followWhen", templateRoot.get("followWhen"));
|
||||
whenMap.put("pickWhen", templateRoot.get("pickWhen"));
|
||||
whenMap.put("returnBeforePickWhen", templateRoot.get("returnBeforePickWhen"));
|
||||
whenMap.put("returnAfterPickWhen", templateRoot.get("returnAfterPickWhen"));
|
||||
templateRoot.put("whenMap", whenMap);
|
||||
|
||||
String fromDateStr = (String) templateRoot.get("fromDateStr");
|
||||
|
||||
@@ -223,7 +223,7 @@ public class RenderContentAsText implements TemplateTransformModel {
|
||||
}
|
||||
|
||||
out.write("<a href=\"");
|
||||
ServletContext servletContext = (ServletContext) request.getSession().getServletContext();
|
||||
ServletContext servletContext = request.getSession().getServletContext();
|
||||
RequestHandler rh = (RequestHandler) servletContext.getAttribute("_REQUEST_HANDLER_");
|
||||
out.append(rh.makeLink(request, response, "/" + fullRequest, false, false, true));
|
||||
out.write("\">Edit</a>");
|
||||
|
||||
@@ -138,7 +138,7 @@ public class RenderContentTransform implements TemplateTransformModel {
|
||||
}
|
||||
|
||||
out.write("<a href=\"");
|
||||
ServletContext servletContext = (ServletContext) request.getSession().getServletContext();
|
||||
ServletContext servletContext = request.getSession().getServletContext();
|
||||
RequestHandler rh = (RequestHandler) servletContext.getAttribute("_REQUEST_HANDLER_");
|
||||
out.append(rh.makeLink(request, response, "/" + fullRequest, false, false, true));
|
||||
out.write("\">Edit</a>");
|
||||
|
||||
+1
-1
@@ -268,7 +268,7 @@ public class RenderSubContentCacheTransform implements TemplateTransformModel {
|
||||
|
||||
if (Debug.infoOn()) Debug.logInfo("in Render(2), contentIdTo ." + contentIdTo , module);
|
||||
out.write("<a href=\"");
|
||||
ServletContext servletContext = (ServletContext) request.getSession().getServletContext();
|
||||
ServletContext servletContext = request.getSession().getServletContext();
|
||||
RequestHandler rh = (RequestHandler) servletContext.getAttribute("_REQUEST_HANDLER_");
|
||||
out.append(rh.makeLink(request, response, "/" + fullRequest, false, false, true));
|
||||
out.write("\">Edit</a>");
|
||||
|
||||
+4
-4
@@ -117,10 +117,10 @@ public class TraverseSubContentCacheTransform implements TemplateTransformModel
|
||||
final Map traverseContext = FastMap.newInstance();
|
||||
traverseContext.put("delegator", delegator);
|
||||
Map whenMap = FastMap.newInstance();
|
||||
whenMap.put("followWhen", (String)templateRoot.get("followWhen"));
|
||||
whenMap.put("pickWhen", (String)templateRoot.get("pickWhen"));
|
||||
whenMap.put("returnBeforePickWhen", (String)templateRoot.get("returnBeforePickWhen"));
|
||||
whenMap.put("returnAfterPickWhen", (String)templateRoot.get("returnAfterPickWhen"));
|
||||
whenMap.put("followWhen", templateRoot.get("followWhen"));
|
||||
whenMap.put("pickWhen", templateRoot.get("pickWhen"));
|
||||
whenMap.put("returnBeforePickWhen", templateRoot.get("returnBeforePickWhen"));
|
||||
whenMap.put("returnAfterPickWhen", templateRoot.get("returnAfterPickWhen"));
|
||||
traverseContext.put("whenMap", whenMap);
|
||||
env.setVariable("whenMap", FreeMarkerWorker.autoWrap(whenMap, env));
|
||||
String fromDateStr = (String)templateRoot.get("fromDateStr");
|
||||
|
||||
+4
-4
@@ -136,10 +136,10 @@ public class TraverseSubContentTransform implements TemplateTransformModel {
|
||||
final Map traverseContext = FastMap.newInstance();
|
||||
traverseContext.put("delegator", delegator);
|
||||
Map whenMap = FastMap.newInstance();
|
||||
whenMap.put("followWhen", (String)templateCtx.get("followWhen"));
|
||||
whenMap.put("pickWhen", (String)templateCtx.get("pickWhen"));
|
||||
whenMap.put("returnBeforePickWhen", (String)templateCtx.get("returnBeforePickWhen"));
|
||||
whenMap.put("returnAfterPickWhen", (String)templateCtx.get("returnAfterPickWhen"));
|
||||
whenMap.put("followWhen", templateCtx.get("followWhen"));
|
||||
whenMap.put("pickWhen", templateCtx.get("pickWhen"));
|
||||
whenMap.put("returnBeforePickWhen", templateCtx.get("returnBeforePickWhen"));
|
||||
whenMap.put("returnAfterPickWhen", templateCtx.get("returnAfterPickWhen"));
|
||||
traverseContext.put("whenMap", whenMap);
|
||||
String fromDateStr = (String)templateCtx.get("fromDateStr");
|
||||
String thruDateStr = (String)templateCtx.get("thruDateStr");
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ public class InventoryEventPlannedServices {
|
||||
mrpEvent.put("isLate", (isLate? "Y": "N"));
|
||||
mrpEvent.create();
|
||||
} else {
|
||||
BigDecimal qties = newQuantity.add((BigDecimal)mrpEvent.getBigDecimal("quantity"));
|
||||
BigDecimal qties = newQuantity.add(mrpEvent.getBigDecimal("quantity"));
|
||||
mrpEvent.put("quantity", qties.doubleValue());
|
||||
if (!UtilValidate.isEmpty(eventName)) {
|
||||
String existingEventName = mrpEvent.getString("eventName");
|
||||
|
||||
@@ -72,8 +72,8 @@ public class VCard {
|
||||
public static final String module = VCard.class.getName();
|
||||
|
||||
public static Map<String, Object> importVCard(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
LocalDispatcher dispatcher = (LocalDispatcher) dctx.getDispatcher();
|
||||
Delegator delegator = (Delegator) dctx.getDelegator();
|
||||
LocalDispatcher dispatcher = dctx.getDispatcher();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
Map<String, Object> result = ServiceUtil.returnSuccess();
|
||||
Address workAddress = null;
|
||||
String email = null;
|
||||
@@ -213,7 +213,7 @@ public class VCard {
|
||||
}
|
||||
|
||||
public static Map<String, Object> exportVCard(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
Delegator delegator = (Delegator) dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String partyId = (String) context.get("partyId");
|
||||
File file = null;
|
||||
try {
|
||||
|
||||
@@ -104,7 +104,7 @@ public class OrderManagerEvents {
|
||||
|
||||
if ((results == null) || (results.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR))) {
|
||||
Debug.logError((String) results.get(ModelService.ERROR_MESSAGE), module);
|
||||
request.setAttribute("_ERROR_MESSAGE_", (String) results.get(ModelService.ERROR_MESSAGE));
|
||||
request.setAttribute("_ERROR_MESSAGE_", results.get(ModelService.ERROR_MESSAGE));
|
||||
return "error";
|
||||
}
|
||||
}
|
||||
@@ -229,7 +229,7 @@ public class OrderManagerEvents {
|
||||
|
||||
if ((results == null) || (results.get(ModelService.RESPONSE_MESSAGE).equals(ModelService.RESPOND_ERROR))) {
|
||||
Debug.logError((String) results.get(ModelService.ERROR_MESSAGE), module);
|
||||
request.setAttribute("_ERROR_MESSAGE_", (String) results.get(ModelService.ERROR_MESSAGE));
|
||||
request.setAttribute("_ERROR_MESSAGE_", results.get(ModelService.ERROR_MESSAGE));
|
||||
return "error";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class FinAccountHelper {
|
||||
*/
|
||||
public static BigDecimal addFirstEntryAmount(BigDecimal initialValue, List<GenericValue> transactions, String fieldName, int decimals, int rounding) throws GenericEntityException {
|
||||
if ((transactions != null) && (transactions.size() == 1)) {
|
||||
GenericValue firstEntry = (GenericValue) transactions.get(0);
|
||||
GenericValue firstEntry = transactions.get(0);
|
||||
if (firstEntry.get(fieldName) != null) {
|
||||
BigDecimal valueToAdd = firstEntry.getBigDecimal(fieldName);
|
||||
return initialValue.add(valueToAdd).setScale(decimals, rounding);
|
||||
@@ -163,7 +163,7 @@ public class FinAccountHelper {
|
||||
Debug.logError("Multiple fin accounts found", module);
|
||||
return null;
|
||||
} else {
|
||||
return (GenericValue) accounts.get(0);
|
||||
return accounts.get(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -278,8 +278,8 @@ public class OrderLookupServices {
|
||||
// Shipment Method
|
||||
String shipmentMethod = (String) context.get("shipmentMethod");
|
||||
if (UtilValidate.isNotEmpty(shipmentMethod)) {
|
||||
String carrierPartyId = (String) shipmentMethod.substring(0, shipmentMethod.indexOf("@"));
|
||||
String ShippingMethodTypeId = (String) shipmentMethod.substring(shipmentMethod.indexOf("@")+1);
|
||||
String carrierPartyId = shipmentMethod.substring(0, shipmentMethod.indexOf("@"));
|
||||
String ShippingMethodTypeId = shipmentMethod.substring(shipmentMethod.indexOf("@")+1);
|
||||
dve.addMemberEntity("OISG", "OrderItemShipGroup");
|
||||
dve.addAlias("OISG", "shipmentMethodTypeId");
|
||||
dve.addAlias("OISG", "carrierPartyId");
|
||||
|
||||
@@ -260,7 +260,7 @@ public class OrderReturnServices {
|
||||
String xslfoAttachScreenLocation = productStoreEmail.getString("xslfoAttachScreenLocation");
|
||||
sendMap.put("xslfoAttachScreenLocation", xslfoAttachScreenLocation);
|
||||
|
||||
ResourceBundleMapWrapper uiLabelMap = (ResourceBundleMapWrapper) UtilProperties.getResourceBundleMap("EcommerceUiLabels", locale);
|
||||
ResourceBundleMapWrapper uiLabelMap = UtilProperties.getResourceBundleMap("EcommerceUiLabels", locale);
|
||||
uiLabelMap.addBottomResourceBundle("OrderUiLabels");
|
||||
uiLabelMap.addBottomResourceBundle("CommonUiLabels");
|
||||
|
||||
|
||||
@@ -357,7 +357,7 @@ public class OrderServices {
|
||||
if (ServiceUtil.isError(invReqResult)) {
|
||||
errorMessages.add(invReqResult.get(ModelService.ERROR_MESSAGE));
|
||||
errorMessages.addAll((List) invReqResult.get(ModelService.ERROR_MESSAGE_LIST));
|
||||
} else if (!"Y".equals((String) invReqResult.get("availableOrNotRequired"))) {
|
||||
} else if (!"Y".equals(invReqResult.get("availableOrNotRequired"))) {
|
||||
String invErrMsg = UtilProperties.getMessage(resource_error, "product.out_of_stock",
|
||||
new Object[] { getProductName(product, itemName), currentProductId }, locale);
|
||||
Debug.logWarning(invErrMsg, module);
|
||||
|
||||
@@ -107,7 +107,7 @@ public class RequirementServices {
|
||||
|
||||
// get an available supplier product, preferably the one with the smallest minimum quantity to order, followed by price
|
||||
String supplierKey = partyId + "^" + productId;
|
||||
GenericValue supplierProduct = (GenericValue) suppliers.get(supplierKey);
|
||||
GenericValue supplierProduct = suppliers.get(supplierKey);
|
||||
if (supplierProduct == null) {
|
||||
conditions = UtilMisc.toList(
|
||||
// TODO: it is possible to restrict to quantity > minimumOrderQuantity, but then the entire requirement must be skipped
|
||||
|
||||
@@ -637,7 +637,7 @@ public class CheckOutEvents {
|
||||
Delegator delegator = (Delegator) request.getAttribute("delegator");
|
||||
ShoppingCart cart = ShoppingCartEvents.getCartObject(request);
|
||||
GenericValue productStore = ProductStoreWorker.getProductStore(cart.getProductStoreId(), delegator);
|
||||
String paymentMethodTypeId = (String) request.getParameter("paymentMethodTypeId");
|
||||
String paymentMethodTypeId = request.getParameter("paymentMethodTypeId");
|
||||
if ("EXT_PAYPAL".equals(paymentMethodTypeId) || cart.getPaymentMethodTypeIds().contains("EXT_PAYPAL")) {
|
||||
List<GenericValue> payPalProdStorePaySettings = null;
|
||||
try {
|
||||
|
||||
@@ -498,7 +498,7 @@ public class ShoppingCart implements Iterable<ShoppingCartItem>, Serializable {
|
||||
GenericValue supplierProduct = null;
|
||||
// Check for existing cart item.
|
||||
for (int i = 0; i < this.cartLines.size(); i++) {
|
||||
ShoppingCartItem sci = (ShoppingCartItem) cartLines.get(i);
|
||||
ShoppingCartItem sci = cartLines.get(i);
|
||||
|
||||
|
||||
if (sci.equals(productId, reservStart, reservLength, reservPersons, accommodationMapId, accommodationSpotId, features, attributes, prodCatalogId,selectedAmount, configWrapper, itemType, itemGroup, false)) {
|
||||
@@ -651,7 +651,7 @@ public class ShoppingCart implements Iterable<ShoppingCartItem>, Serializable {
|
||||
public ShoppingCartItem findCartItem(String productId, Map features, Map attributes, String prodCatalogId, BigDecimal selectedAmount) {
|
||||
// Check for existing cart item.
|
||||
for (int i = 0; i < this.cartLines.size(); i++) {
|
||||
ShoppingCartItem cartItem = (ShoppingCartItem) cartLines.get(i);
|
||||
ShoppingCartItem cartItem = cartLines.get(i);
|
||||
|
||||
if (cartItem.equals(productId, features, attributes, prodCatalogId, selectedAmount)) {
|
||||
return cartItem;
|
||||
@@ -713,7 +713,7 @@ public class ShoppingCart implements Iterable<ShoppingCartItem>, Serializable {
|
||||
public void removeEmptyCartItems() {
|
||||
// Check for existing cart item.
|
||||
for (int i = 0; i < this.cartLines.size();) {
|
||||
ShoppingCartItem cartItem = (ShoppingCartItem) cartLines.get(i);
|
||||
ShoppingCartItem cartItem = cartLines.get(i);
|
||||
|
||||
if (cartItem.getQuantity().compareTo(BigDecimal.ZERO) == 0) {
|
||||
this.clearItemShipInfo(cartItem);
|
||||
@@ -806,7 +806,7 @@ public class ShoppingCart implements Iterable<ShoppingCartItem>, Serializable {
|
||||
public boolean containAnyWorkEffortCartItems() {
|
||||
// Check for existing cart item.
|
||||
for (int i = 0; i < this.cartLines.size(); i++) {
|
||||
ShoppingCartItem cartItem = (ShoppingCartItem) cartLines.get(i);
|
||||
ShoppingCartItem cartItem = cartLines.get(i);
|
||||
if (cartItem.getItemType().equals("RENTAL_ORDER_ITEM")) { // create workeffort items?
|
||||
return true;
|
||||
}
|
||||
@@ -817,7 +817,7 @@ public class ShoppingCart implements Iterable<ShoppingCartItem>, Serializable {
|
||||
public boolean containAllWorkEffortCartItems() {
|
||||
// Check for existing cart item.
|
||||
for (int i = 0; i < this.cartLines.size(); i++) {
|
||||
ShoppingCartItem cartItem = (ShoppingCartItem) cartLines.get(i);
|
||||
ShoppingCartItem cartItem = cartLines.get(i);
|
||||
if (!cartItem.getItemType().equals("RENTAL_ORDER_ITEM")) { // not a item to create workefforts?
|
||||
return false;
|
||||
}
|
||||
@@ -831,7 +831,7 @@ public class ShoppingCart implements Iterable<ShoppingCartItem>, Serializable {
|
||||
*/
|
||||
public boolean containOnlyDigitalGoods() {
|
||||
for (int i = 0; i < this.cartLines.size(); i++) {
|
||||
ShoppingCartItem cartItem = (ShoppingCartItem) cartLines.get(i);
|
||||
ShoppingCartItem cartItem = cartLines.get(i);
|
||||
GenericValue product = cartItem.getProduct();
|
||||
try {
|
||||
GenericValue productType = product.getRelatedOneCache("ProductType");
|
||||
@@ -879,14 +879,14 @@ public class ShoppingCart implements Iterable<ShoppingCartItem>, Serializable {
|
||||
if (cartLines.size() <= index) {
|
||||
return null;
|
||||
}
|
||||
return (ShoppingCartItem) cartLines.get(index);
|
||||
return cartLines.get(index);
|
||||
|
||||
}
|
||||
|
||||
public ShoppingCartItem findCartItem(String orderItemSeqId) {
|
||||
if (orderItemSeqId != null) {
|
||||
for (int i = 0; i < this.cartLines.size(); i++) {
|
||||
ShoppingCartItem cartItem = (ShoppingCartItem) cartLines.get(i);
|
||||
ShoppingCartItem cartItem = cartLines.get(i);
|
||||
String itemSeqId = cartItem.getOrderItemSeqId();
|
||||
if (itemSeqId != null && orderItemSeqId.equals(itemSeqId)) {
|
||||
return cartItem;
|
||||
@@ -908,7 +908,7 @@ public class ShoppingCart implements Iterable<ShoppingCartItem>, Serializable {
|
||||
}
|
||||
if (index < 0) return;
|
||||
if (cartLines.size() <= index) return;
|
||||
ShoppingCartItem item = (ShoppingCartItem) cartLines.remove(index);
|
||||
ShoppingCartItem item = cartLines.remove(index);
|
||||
|
||||
// set quantity to 0 to trigger necessary events
|
||||
item.setQuantity(BigDecimal.ZERO, dispatcher, this);
|
||||
|
||||
@@ -504,7 +504,7 @@ public class ShoppingCartHelper {
|
||||
try {
|
||||
if (Debug.verboseOn()) Debug.logVerbose("Bulk Adding to cart requirement [" + quantity + "] of [" + productId + "]", module);
|
||||
int index = this.cart.addOrIncreaseItem(productId, null, quantity, null, null, null, requirement.getTimestamp("requiredByDate"), null, null, null, catalogId, null, null, itemGroupNumber, null, dispatcher);
|
||||
ShoppingCartItem sci = (ShoppingCartItem)this.cart.items().get(index);
|
||||
ShoppingCartItem sci = this.cart.items().get(index);
|
||||
sci.setRequirementId(requirementId);
|
||||
} catch (CartItemModifyException e) {
|
||||
return ServiceUtil.returnError(e.getMessage());
|
||||
|
||||
@@ -924,7 +924,7 @@ public class ShoppingCartItem implements java.io.Serializable {
|
||||
while (BigDecimal.valueOf(dayCount).compareTo(reservLength) < 0) {
|
||||
GenericValue techDataCalendarExcDay = null;
|
||||
// find an existing Day exception record
|
||||
Timestamp exceptionDateStartTime = new Timestamp((long) (reservStart.getTime() + (dayCount++ * 86400000)));
|
||||
Timestamp exceptionDateStartTime = new Timestamp((reservStart.getTime() + (dayCount++ * 86400000)));
|
||||
try {
|
||||
techDataCalendarExcDay = delegator.findByPrimaryKey("TechDataCalendarExcDay",
|
||||
UtilMisc.toMap("calendarId", fixedAsset.get("calendarId"), "exceptionDateStartTime", exceptionDateStartTime));
|
||||
@@ -976,7 +976,7 @@ public class ShoppingCartItem implements java.io.Serializable {
|
||||
Debug.logError("Error calling isStoreInventoryAvailableOrNotRequired service, result is: " + invReqResult, module);
|
||||
throw new CartItemModifyException((String) invReqResult.get(ModelService.ERROR_MESSAGE));
|
||||
}
|
||||
inventoryAvailable = "Y".equals((String) invReqResult.get("availableOrNotRequired"));
|
||||
inventoryAvailable = "Y".equals(invReqResult.get("availableOrNotRequired"));
|
||||
} catch (GenericServiceException e) {
|
||||
String errMsg = "Fatal error calling inventory checking services: " + e.toString();
|
||||
Debug.logError(e, errMsg, module);
|
||||
|
||||
@@ -276,7 +276,7 @@ public class ShoppingCartServices {
|
||||
if (UtilValidate.isNotEmpty(orderPaymentPrefs)) {
|
||||
Iterator<GenericValue> oppi = orderPaymentPrefs.iterator();
|
||||
while (oppi.hasNext()) {
|
||||
GenericValue opp = (GenericValue) oppi.next();
|
||||
GenericValue opp = oppi.next();
|
||||
String paymentId = opp.getString("paymentMethodId");
|
||||
if (paymentId == null) {
|
||||
paymentId = opp.getString("paymentMethodTypeId");
|
||||
@@ -560,7 +560,7 @@ public class ShoppingCartServices {
|
||||
// set the item's ship group info
|
||||
List<GenericValue> shipGroupAssocs = orh.getOrderItemShipGroupAssocs(item);
|
||||
for (int g = 0; g < shipGroupAssocs.size(); g++) {
|
||||
GenericValue sgAssoc = (GenericValue) shipGroupAssocs.get(g);
|
||||
GenericValue sgAssoc = shipGroupAssocs.get(g);
|
||||
BigDecimal shipGroupQty = OrderReadHelper.getOrderItemShipGroupQuantity(sgAssoc);
|
||||
if (shipGroupQty == null) {
|
||||
shipGroupQty = BigDecimal.ZERO;
|
||||
@@ -720,7 +720,7 @@ public class ShoppingCartServices {
|
||||
// put them in a map: the key/values pairs are quoteItemSeqId/List of adjs
|
||||
Map<String, List<GenericValue>> orderAdjsMap = FastMap.newInstance() ;
|
||||
for (GenericValue quoteAdj : quoteAdjs) {
|
||||
List<GenericValue> orderAdjs = (List<GenericValue>)orderAdjsMap.get(UtilValidate.isNotEmpty(quoteAdj.getString("quoteItemSeqId")) ? quoteAdj.getString("quoteItemSeqId") : quoteId);
|
||||
List<GenericValue> orderAdjs = orderAdjsMap.get(UtilValidate.isNotEmpty(quoteAdj.getString("quoteItemSeqId")) ? quoteAdj.getString("quoteItemSeqId") : quoteId);
|
||||
if (orderAdjs == null) {
|
||||
orderAdjs = FastList.newInstance();
|
||||
orderAdjsMap.put(UtilValidate.isNotEmpty(quoteAdj.getString("quoteItemSeqId")) ? quoteAdj.getString("quoteItemSeqId") : quoteId, orderAdjs);
|
||||
@@ -852,7 +852,7 @@ public class ShoppingCartServices {
|
||||
// If applyQuoteAdjustments is set to false then standard cart adjustments are used.
|
||||
if (applyQuoteAdjustments) {
|
||||
// The cart adjustments, derived from quote adjustments, are added to the cart
|
||||
List<GenericValue> adjs = (List<GenericValue>)orderAdjsMap.get(quoteId);
|
||||
List<GenericValue> adjs = orderAdjsMap.get(quoteId);
|
||||
if (adjs != null) {
|
||||
cart.getAdjustments().addAll(adjs);
|
||||
}
|
||||
@@ -863,7 +863,7 @@ public class ShoppingCartServices {
|
||||
ShoppingCartItem item = (ShoppingCartItem) i.next();
|
||||
String orderItemSeqId = item.getOrderItemSeqId();
|
||||
if (orderItemSeqId != null) {
|
||||
adjs = (List)orderAdjsMap.get(orderItemSeqId);
|
||||
adjs = orderAdjsMap.get(orderItemSeqId);
|
||||
} else {
|
||||
adjs = null;
|
||||
}
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@ public class ShippingEstimateWrapper {
|
||||
}
|
||||
|
||||
public BigDecimal getShippingEstimate(GenericValue storeCarrierShipMethod) {
|
||||
return (BigDecimal) shippingEstimates.get(storeCarrierShipMethod);
|
||||
return shippingEstimates.get(storeCarrierShipMethod);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ public class ShoppingListServices {
|
||||
|
||||
if (eli != null) {
|
||||
GenericValue shoppingList;
|
||||
while (((shoppingList = (GenericValue) eli.next()) != null)) {
|
||||
while (((shoppingList = eli.next()) != null)) {
|
||||
Timestamp lastOrder = shoppingList.getTimestamp("lastOrderedDate");
|
||||
GenericValue recurrenceInfo = null;
|
||||
recurrenceInfo = shoppingList.getRelatedOne("RecurrenceInfo");
|
||||
|
||||
@@ -74,7 +74,7 @@ public class TaskEvents {
|
||||
"fromDate", fromDate, "result", parameterMap, "userLogin", userLogin);
|
||||
result = dispatcher.runSync("wfCompleteAssignment", context);
|
||||
if (result.containsKey(ModelService.RESPOND_ERROR)) {
|
||||
request.setAttribute("_ERROR_MESSAGE_", (String) result.get(ModelService.ERROR_MESSAGE));
|
||||
request.setAttribute("_ERROR_MESSAGE_", result.get(ModelService.ERROR_MESSAGE));
|
||||
return "error";
|
||||
}
|
||||
} catch (GenericServiceException e) {
|
||||
|
||||
@@ -1041,7 +1041,7 @@ public class ContactMechServices {
|
||||
* Creates an EmailAddressVerification
|
||||
*/
|
||||
public static Map<String, Object> createEmailAddressVerification(DispatchContext dctx, Map<String, ? extends Object> context) {
|
||||
Delegator delegator = (Delegator) dctx.getDelegator();
|
||||
Delegator delegator = dctx.getDelegator();
|
||||
String emailAddress = (String) context.get("emailAddress");
|
||||
String verifyHash = null;
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ public class ProductConfigWorker {
|
||||
try {
|
||||
cnt = Integer.parseInt(opt);
|
||||
String comments = null;
|
||||
ProductConfigWrapper.ConfigItem question = (ProductConfigWrapper.ConfigItem) configWrapper.getQuestions().get(k);
|
||||
ProductConfigWrapper.ConfigItem question = configWrapper.getQuestions().get(k);
|
||||
if (question.isSingleChoice()) {
|
||||
comments = request.getParameter("comments_" + k + "_" + "0");
|
||||
} else {
|
||||
@@ -142,7 +142,7 @@ public class ProductConfigWorker {
|
||||
List<String> selectedFeatures = FastList.newInstance();
|
||||
Enumeration<String> paramNames = UtilGenerics.cast(request.getParameterNames());
|
||||
while (paramNames.hasMoreElements()) {
|
||||
String paramName = (String)paramNames.nextElement();
|
||||
String paramName = paramNames.nextElement();
|
||||
if (paramName.startsWith("FT" + k + "_" + cnt + "_" + variantIndex)) {
|
||||
selectedFeatures.add(request.getParameterValues(paramName)[0]);
|
||||
}
|
||||
@@ -342,7 +342,7 @@ public class ProductConfigWorker {
|
||||
List<GenericValue> components = oneOption.getComponents();
|
||||
for (GenericValue component: components) {
|
||||
if (oneOption.isVirtualComponent(component)) {
|
||||
String componentOption = (String)oneOption.componentOptions.get(component.getString("productId"));
|
||||
String componentOption = oneOption.componentOptions.get(component.getString("productId"));
|
||||
GenericValue configOptionProductOption = delegator.makeValue("ConfigOptionProductOption");
|
||||
configOptionProductOption.put("configId", configId);
|
||||
configOptionProductOption.put("configItemId", configItemId);
|
||||
|
||||
@@ -242,7 +242,7 @@ public class ProductConfigWrapper implements Serializable {
|
||||
List<ConfigOption> avalOptions = ci.getOptions();
|
||||
if (ci.isSingleChoice()) {
|
||||
for (int j = 0; j < avalOptions.size(); j++) {
|
||||
ConfigOption oneOption = (ConfigOption)avalOptions.get(j);
|
||||
ConfigOption oneOption = avalOptions.get(j);
|
||||
oneOption.setSelected(false);
|
||||
oneOption.setComments(null);
|
||||
}
|
||||
|
||||
@@ -270,7 +270,7 @@ public class ProductFeatureServices {
|
||||
// now figure out which of these combinations already have productIds associated with them
|
||||
for (Map<String, Object> combination: oldCombinations) {
|
||||
// Verify if the default code is already used, if so add a numeric suffix
|
||||
if (defaultVariantProductIds.contains((String) combination.get("defaultVariantProductId"))) {
|
||||
if (defaultVariantProductIds.contains(combination.get("defaultVariantProductId"))) {
|
||||
combination.put("defaultVariantProductId", combination.get("defaultVariantProductId") + "-" + (defaultCodeCounter < 10? "0" + defaultCodeCounter: "" + defaultCodeCounter));
|
||||
defaultCodeCounter++;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class ScaleImage {
|
||||
|
||||
/* ImageProperties.xml */
|
||||
String imgPropertyFullPath = System.getProperty("ofbiz.home") + "/applications/product/config/ImageProperties.xml";
|
||||
resultXMLMap.putAll((Map<String, Object>) ImageTransform.getXMLValue(imgPropertyFullPath, locale));
|
||||
resultXMLMap.putAll(ImageTransform.getXMLValue(imgPropertyFullPath, locale));
|
||||
if (resultXMLMap.containsKey("responseMessage") && resultXMLMap.get("responseMessage").equals("success")) {
|
||||
imgPropertyMap.putAll(UtilGenerics.<Map<String, Map<String, String>>>cast(resultXMLMap.get("xml")));
|
||||
} else {
|
||||
@@ -136,8 +136,8 @@ public class ScaleImage {
|
||||
bufImg = (BufferedImage) resultBufImgMap.get("bufferedImage");
|
||||
|
||||
// get Dimensions
|
||||
imgHeight = (double) bufImg.getHeight();
|
||||
imgWidth = (double) bufImg.getWidth();
|
||||
imgHeight = bufImg.getHeight();
|
||||
imgWidth = bufImg.getWidth();
|
||||
if (imgHeight == 0.0 || imgWidth == 0.0) {
|
||||
String errMsg = UtilProperties.getMessage(resource, "ScaleImage.one_current_image_dimension_is_null", locale) + " : imgHeight = " + imgHeight + " ; imgWidth = " + imgWidth;
|
||||
Debug.logError(errMsg, module);
|
||||
@@ -187,7 +187,7 @@ public class ScaleImage {
|
||||
|
||||
// write new image
|
||||
try {
|
||||
ImageIO.write((RenderedImage) bufNewImg, imgExtension, new File(imageServerPath + "/" + newFilePathPrefix + filenameToUse));
|
||||
ImageIO.write(bufNewImg, imgExtension, new File(imageServerPath + "/" + newFilePathPrefix + filenameToUse));
|
||||
} catch (IllegalArgumentException e) {
|
||||
String errMsg = UtilProperties.getMessage(resource, "ScaleImage.one_parameter_is_null", locale) + e.toString();
|
||||
Debug.logError(errMsg, module);
|
||||
|
||||
@@ -581,8 +581,8 @@ public class InventoryServices {
|
||||
List<GenericValue> toBeStored = FastList.newInstance();
|
||||
for (GenericValue orderItem: orderItems) {
|
||||
String orderItemSeqId = orderItem.getString("orderItemSeqId");
|
||||
Timestamp shipDate = (Timestamp) backOrderedItems.get(orderItemSeqId);
|
||||
Timestamp cancelDate = (Timestamp) cancelItems.get(orderItemSeqId);
|
||||
Timestamp shipDate = backOrderedItems.get(orderItemSeqId);
|
||||
Timestamp cancelDate = cancelItems.get(orderItemSeqId);
|
||||
Timestamp currentCancelDate = orderItem.getTimestamp("autoCancelDate");
|
||||
|
||||
Debug.logError("OI: " + orderId + " SEQID: "+ orderItemSeqId + " cancelAll: " + cancelAll + " cancelDate: " + cancelDate, module);
|
||||
|
||||
@@ -679,7 +679,7 @@ public class PriceServices {
|
||||
return ServiceUtil.returnError("Error calculating VAT tax (with calcTaxForDisplay service)", null, null, calcTaxForDisplayResult);
|
||||
}
|
||||
// taxTotal, taxPercentage, priceWithTax
|
||||
result.put("price", (BigDecimal) calcTaxForDisplayResult.get("priceWithTax"));
|
||||
result.put("price", calcTaxForDisplayResult.get("priceWithTax"));
|
||||
|
||||
// based on the taxPercentage calculate the other amounts, including: listPrice, defaultPrice, averageCost, promoPrice, competitivePrice
|
||||
BigDecimal taxPercentage = (BigDecimal) calcTaxForDisplayResult.get("taxPercentage");
|
||||
|
||||
@@ -719,7 +719,7 @@ public class ProductSearch {
|
||||
productIds.add(searchResult.getString("mainProductId"));
|
||||
productIdSet.add(searchResult.getString("mainProductId"));
|
||||
|
||||
while ((maxResults == null || numRetreived < maxResults.intValue()) && ((searchResult = (GenericValue) eli.next()) != null)) {
|
||||
while ((maxResults == null || numRetreived < maxResults.intValue()) && ((searchResult = eli.next()) != null)) {
|
||||
String productId = searchResult.getString("mainProductId");
|
||||
if (!productIdSet.contains(productId)) {
|
||||
productIds.add(productId);
|
||||
|
||||
@@ -212,7 +212,7 @@ public class ProductSearchEvents {
|
||||
|
||||
GenericValue searchResultView = null;
|
||||
int numAdded = 0;
|
||||
while ((searchResultView = (GenericValue) eli.next()) != null) {
|
||||
while ((searchResultView = eli.next()) != null) {
|
||||
String productId = searchResultView.getString("mainProductId");
|
||||
|
||||
GenericValue pcm=delegator.makeValue("ProductCategoryMember");
|
||||
@@ -301,7 +301,7 @@ public class ProductSearchEvents {
|
||||
|
||||
GenericValue searchResultView = null;
|
||||
int numAdded = 0;
|
||||
while ((searchResultView = (GenericValue) eli.next()) != null) {
|
||||
while ((searchResultView = eli.next()) != null) {
|
||||
String productId = searchResultView.getString("mainProductId");
|
||||
GenericValue pfa=delegator.makeValue("ProductFeatureAppl");
|
||||
pfa.set("productId", productId);
|
||||
@@ -360,7 +360,7 @@ public class ProductSearchEvents {
|
||||
|
||||
GenericValue searchResultView = null;
|
||||
int numRemoved = 0;
|
||||
while ((searchResultView = (GenericValue) eli.next()) != null) {
|
||||
while ((searchResultView = eli.next()) != null) {
|
||||
String productId = searchResultView.getString("mainProductId");
|
||||
numRemoved += delegator.removeByAnd("ProductFeatureAppl", UtilMisc.toMap("productId", productId, "productFeatureId", productFeatureId));
|
||||
}
|
||||
|
||||
@@ -598,7 +598,7 @@ public class ProductSearchSession {
|
||||
String keywordString = (String) parameters.get("SEARCH_STRING");
|
||||
String searchOperator = (String) parameters.get("SEARCH_OPERATOR");
|
||||
// defaults to true/Y, ie anything but N is true/Y
|
||||
boolean anyPrefixSuffix = !"N".equals((String) parameters.get("SEARCH_ANYPRESUF"));
|
||||
boolean anyPrefixSuffix = !"N".equals(parameters.get("SEARCH_ANYPRESUF"));
|
||||
searchAddConstraint(new ProductSearch.KeywordConstraint(keywordString, anyPrefixSuffix, anyPrefixSuffix, null, "AND".equals(searchOperator)), session);
|
||||
constraintsChanged = true;
|
||||
}
|
||||
@@ -622,7 +622,7 @@ public class ProductSearchSession {
|
||||
String keywordString = (String) parameters.get("SEARCH_STRING" + kwNum);
|
||||
String searchOperator = (String) parameters.get("SEARCH_OPERATOR" + kwNum);
|
||||
// defaults to true/Y, ie anything but N is true/Y
|
||||
boolean anyPrefixSuffix = !"N".equals((String) parameters.get("SEARCH_ANYPRESUF" + kwNum));
|
||||
boolean anyPrefixSuffix = !"N".equals(parameters.get("SEARCH_ANYPRESUF" + kwNum));
|
||||
searchAddConstraint(new ProductSearch.KeywordConstraint(keywordString, anyPrefixSuffix, anyPrefixSuffix, null, "AND".equals(searchOperator)), session);
|
||||
constraintsChanged = true;
|
||||
}
|
||||
@@ -1227,7 +1227,7 @@ public class ProductSearchSession {
|
||||
|
||||
List<Map<String, String>> featureCountList = FastList.newInstance();
|
||||
GenericValue searchResult = null;
|
||||
while ((searchResult = (GenericValue) eli.next()) != null) {
|
||||
while ((searchResult = eli.next()) != null) {
|
||||
featureCountList.add(UtilMisc.toMap("productFeatureId", (String) searchResult.get("pfacProductFeatureId"), "productFeatureTypeId", (String) searchResult.get("pfcProductFeatureTypeId"), "description", (String) searchResult.get("pfcDescription"), "featureCount", Long.toString((Long) searchResult.get("featureCount"))));
|
||||
}
|
||||
|
||||
@@ -1305,7 +1305,7 @@ public class ProductSearchSession {
|
||||
|
||||
GenericValue searchResult = null;
|
||||
Long priceRangeCount = Long.valueOf(0);
|
||||
while ((searchResult = (GenericValue) eli.next()) != null) {
|
||||
while ((searchResult = eli.next()) != null) {
|
||||
priceRangeCount = searchResult.getLong("priceRangeCount");
|
||||
}
|
||||
|
||||
@@ -1371,7 +1371,7 @@ public class ProductSearchSession {
|
||||
|
||||
GenericValue searchResult = null;
|
||||
Long categoryCount = Long.valueOf(0);
|
||||
while ((searchResult = (GenericValue) eli.next()) != null) {
|
||||
while ((searchResult = eli.next()) != null) {
|
||||
categoryCount = searchResult.getLong("categoryCount");
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ public class ProductServices {
|
||||
Map<String, Object> invReqResult = dispatcher.runSync("isStoreInventoryAvailableOrNotRequired", UtilMisc.<String, Object>toMap("productStoreId", productStoreId, "productId", productIdTo, "quantity", BigDecimal.ONE));
|
||||
if (ServiceUtil.isError(invReqResult)) {
|
||||
return ServiceUtil.returnError("Error calling the isStoreInventoryRequired when building the variant product tree.", null, null, invReqResult);
|
||||
} else if ("Y".equals((String) invReqResult.get("availableOrNotRequired"))) {
|
||||
} else if ("Y".equals(invReqResult.get("availableOrNotRequired"))) {
|
||||
items.add(productIdTo);
|
||||
if (productTo.getString("isVirtual") != null && productTo.getString("isVirtual").equals("Y")) {
|
||||
virtualVariant.add(productIdTo);
|
||||
@@ -542,7 +542,7 @@ public class ProductServices {
|
||||
//List featureKey = FastList.newInstance();
|
||||
Map<String, List<String>> tempGroup = FastMap.newInstance();
|
||||
Map<String, Object> group = new LinkedHashMap<String, Object>();
|
||||
String orderKey = (String) order.get(index);
|
||||
String orderKey = order.get(index);
|
||||
|
||||
if (featureList == null) {
|
||||
throw new IllegalArgumentException("Cannot build feature tree: featureList is null");
|
||||
@@ -1050,14 +1050,14 @@ public class ProductServices {
|
||||
|
||||
Map<String, Object> dataResourceCtx = FastMap.newInstance();
|
||||
dataResourceCtx.put("objectInfo", imageUrl);
|
||||
dataResourceCtx.put("dataResourceName", (String) context.get("_uploadedFile_fileName"));
|
||||
dataResourceCtx.put("dataResourceName", context.get("_uploadedFile_fileName"));
|
||||
dataResourceCtx.put("userLogin", userLogin);
|
||||
|
||||
Map<String, Object> productContentCtx = FastMap.newInstance();
|
||||
productContentCtx.put("productId", productId);
|
||||
productContentCtx.put("productContentTypeId", productContentTypeId);
|
||||
productContentCtx.put("fromDate", (Timestamp) context.get("fromDate"));
|
||||
productContentCtx.put("thruDate", (Timestamp) context.get("thruDate"));
|
||||
productContentCtx.put("fromDate", context.get("fromDate"));
|
||||
productContentCtx.put("thruDate", context.get("thruDate"));
|
||||
productContentCtx.put("userLogin", userLogin);
|
||||
|
||||
if (UtilValidate.isNotEmpty(contentId)) {
|
||||
@@ -1254,14 +1254,14 @@ public class ProductServices {
|
||||
if (UtilValidate.isNotEmpty(imageUrl) && imageUrl.length() > 0) {
|
||||
Map<String, Object> dataResourceCtx = FastMap.newInstance();
|
||||
dataResourceCtx.put("objectInfo", imageUrl);
|
||||
dataResourceCtx.put("dataResourceName", (String) context.get("_uploadedFile_fileName"));
|
||||
dataResourceCtx.put("dataResourceName", context.get("_uploadedFile_fileName"));
|
||||
dataResourceCtx.put("userLogin", userLogin);
|
||||
|
||||
Map<String, Object> productPromoContentCtx = FastMap.newInstance();
|
||||
productPromoContentCtx.put("productPromoId", productPromoId);
|
||||
productPromoContentCtx.put("productPromoContentTypeId", productPromoContentTypeId);
|
||||
productPromoContentCtx.put("fromDate", (Timestamp) context.get("fromDate"));
|
||||
productPromoContentCtx.put("thruDate", (Timestamp) context.get("thruDate"));
|
||||
productPromoContentCtx.put("fromDate", context.get("fromDate"));
|
||||
productPromoContentCtx.put("thruDate", context.get("thruDate"));
|
||||
productPromoContentCtx.put("userLogin", userLogin);
|
||||
|
||||
if (UtilValidate.isNotEmpty(contentId)) {
|
||||
@@ -1358,8 +1358,8 @@ public class ProductServices {
|
||||
productPromoContentCtx.put("productPromoId", productPromoId);
|
||||
productPromoContentCtx.put("productPromoContentTypeId", productPromoContentTypeId);
|
||||
productPromoContentCtx.put("contentId", contentId);
|
||||
productPromoContentCtx.put("fromDate", (Timestamp) context.get("fromDate"));
|
||||
productPromoContentCtx.put("thruDate", (Timestamp) context.get("thruDate"));
|
||||
productPromoContentCtx.put("fromDate", context.get("fromDate"));
|
||||
productPromoContentCtx.put("thruDate", context.get("thruDate"));
|
||||
productPromoContentCtx.put("userLogin", userLogin);
|
||||
try {
|
||||
dispatcher.runSync("updateProductPromoContent", productPromoContentCtx);
|
||||
|
||||
@@ -669,7 +669,7 @@ while (allCatIter.hasNext()) {
|
||||
), EntityOperator.AND);
|
||||
EntityListIterator productFeatureAndApplEli = delegator.find("ProductFeatureAndAppl", condition, null, null, null, null);
|
||||
GenericValue productFeatureAndAppl = null;
|
||||
while ((productFeatureAndAppl = (GenericValue) productFeatureAndApplEli.next()) != null) {
|
||||
while ((productFeatureAndAppl = productFeatureAndApplEli.next()) != null) {
|
||||
String productFeatureId = productFeatureAndAppl.getString("productFeatureId");
|
||||
String productFeatureTypeId = productFeatureAndAppl.getString("productFeatureTypeId");
|
||||
if (UtilValidate.isNotEmpty(productFeatureTypeIdsToInclude) && !productFeatureTypeIdsToInclude.contains(productFeatureTypeId)) {
|
||||
|
||||
+2
-2
@@ -109,11 +109,11 @@ public class ImportProductServices {
|
||||
if (row != null) {
|
||||
// read productId from first column "sheet column index
|
||||
// starts from 0"
|
||||
HSSFCell cell2 = row.getCell((int) 2);
|
||||
HSSFCell cell2 = row.getCell(2);
|
||||
cell2.setCellType(HSSFCell.CELL_TYPE_STRING);
|
||||
String productId = cell2.getRichStringCellValue().toString();
|
||||
// read QOH from ninth column
|
||||
HSSFCell cell5 = row.getCell((int) 5);
|
||||
HSSFCell cell5 = row.getCell(5);
|
||||
BigDecimal quantityOnHand = BigDecimal.ZERO;
|
||||
if (cell5 != null && cell5.getCellType() == HSSFCell.CELL_TYPE_NUMERIC)
|
||||
quantityOnHand = new BigDecimal(cell5.getNumericCellValue());
|
||||
|
||||
@@ -610,7 +610,7 @@ public class ProductStoreWorker {
|
||||
Debug.logError("Error calling isStoreInventoryRequired service, result is: " + invReqResult, module);
|
||||
return false;
|
||||
}
|
||||
requiredOkay = Boolean.valueOf(wantRequired.booleanValue() == "Y".equals((String) invReqResult.get("requireInventory")));
|
||||
requiredOkay = Boolean.valueOf(wantRequired.booleanValue() == "Y".equals(invReqResult.get("requireInventory")));
|
||||
}
|
||||
|
||||
Boolean availableOkay = null;
|
||||
@@ -620,7 +620,7 @@ public class ProductStoreWorker {
|
||||
Debug.logError("Error calling isStoreInventoryAvailable service, result is: " + invAvailResult, module);
|
||||
return false;
|
||||
}
|
||||
availableOkay = Boolean.valueOf(wantAvailable.booleanValue() == "Y".equals((String) invAvailResult.get("available")));
|
||||
availableOkay = Boolean.valueOf(wantAvailable.booleanValue() == "Y".equals(invAvailResult.get("available")));
|
||||
}
|
||||
|
||||
if ((requiredOkay == null || requiredOkay.booleanValue()) && (availableOkay == null || availableOkay.booleanValue())) {
|
||||
|
||||
@@ -153,7 +153,7 @@ public class PackingServices {
|
||||
if (qtyStr == null) {
|
||||
quantities = new String[packages.length];
|
||||
for (int p = 0; p < packages.length; p++) {
|
||||
quantities[p] = (String) qtyInfo.get(rowKey + ":" + packages[p]);
|
||||
quantities[p] = qtyInfo.get(rowKey + ":" + packages[p]);
|
||||
}
|
||||
if (quantities.length != packages.length) {
|
||||
return ServiceUtil.returnError("Packages and quantities do not match.");
|
||||
@@ -316,7 +316,7 @@ public class PackingServices {
|
||||
String packageSeqId = entry.getKey();
|
||||
String packageWeightStr = entry.getValue();
|
||||
if (UtilValidate.isNotEmpty(packageWeightStr)) {
|
||||
BigDecimal packageWeight = new BigDecimal((String)packageWeights.get(packageSeqId));
|
||||
BigDecimal packageWeight = new BigDecimal(packageWeights.get(packageSeqId));
|
||||
session.setPackageWeight(Integer.parseInt(packageSeqId), packageWeight);
|
||||
shippableWeight = shippableWeight.add(packageWeight);
|
||||
} else {
|
||||
|
||||
@@ -138,7 +138,7 @@ public class ShipmentWorker {
|
||||
if (!addedToPackage) {
|
||||
BigDecimal packageWeight = calcPackageWeight(dctx, packageMap, shippableItemInfo, weight);
|
||||
if (packageWeight.compareTo(maxWeight) <= 0) {
|
||||
BigDecimal qty = (BigDecimal) packageMap.get(productId);
|
||||
BigDecimal qty = packageMap.get(productId);
|
||||
qty = UtilValidate.isEmpty(qty) ? BigDecimal.ZERO : qty;
|
||||
packageMap.put(productId, qty.add(partialQty));
|
||||
addedToPackage = true;
|
||||
@@ -168,7 +168,7 @@ public class ShipmentWorker {
|
||||
String productId = entry.getKey();
|
||||
Map<String, Object> productInfo = getProductItemInfo(shippableItemInfo, productId);
|
||||
BigDecimal productWeight = (BigDecimal) productInfo.get("weight");
|
||||
BigDecimal quantity = (BigDecimal) packageMap.get(productId);
|
||||
BigDecimal quantity = packageMap.get(productId);
|
||||
|
||||
String weightUomId = (String) productInfo.get("weightUomId");
|
||||
|
||||
|
||||
+1
-1
@@ -1138,7 +1138,7 @@ public class UpsServices {
|
||||
if (shipmentPackageRouteSegIter.hasNext()) {
|
||||
errorList.add("Error: There are more Packages on this Shipment than there were PackageResults returned from UPS");
|
||||
while (shipmentPackageRouteSegIter.hasNext()) {
|
||||
GenericValue shipmentPackageRouteSeg = (GenericValue) shipmentPackageRouteSegIter.next();
|
||||
GenericValue shipmentPackageRouteSeg = shipmentPackageRouteSegIter.next();
|
||||
errorList.add("Error: No PackageResults were returned for the Package [" + shipmentPackageRouteSeg.getString("shipmentPackageSeqId") + "]");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ public class LoginEvents {
|
||||
try {
|
||||
Map<String, Object> result = dispatcher.runSync("sendMailFromScreen", serviceContext);
|
||||
|
||||
if (ModelService.RESPOND_ERROR.equals((String) result.get(ModelService.RESPONSE_MESSAGE))) {
|
||||
if (ModelService.RESPOND_ERROR.equals(result.get(ModelService.RESPONSE_MESSAGE))) {
|
||||
Map<String, Object> messageMap = UtilMisc.toMap("errorMessage", result.get(ModelService.ERROR_MESSAGE));
|
||||
errMsg = UtilProperties.getMessage(resource, "loginevents.error_unable_email_password_contact_customer_service_errorwas", messageMap, UtilHttp.getLocale(request));
|
||||
request.setAttribute("_ERROR_MESSAGE_", errMsg);
|
||||
|
||||
@@ -261,7 +261,7 @@ public class ICalConverter {
|
||||
if (iCalObj == null) {
|
||||
return null;
|
||||
}
|
||||
return new Long((long)iCalObj.getPercentage());
|
||||
return new Long(iCalObj.getPercentage());
|
||||
}
|
||||
|
||||
protected static Double fromPriority(PropertyList propertyList) {
|
||||
|
||||
@@ -274,7 +274,7 @@ public class ICalWorker {
|
||||
}
|
||||
|
||||
protected static void logInUser(HttpServletRequest request, HttpServletResponse response) throws GenericServiceException, GenericEntityException {
|
||||
Map<String, Object> serviceMap = (Map<String, Object>) WebDavUtil.getCredentialsFromRequest(request);
|
||||
Map<String, Object> serviceMap = WebDavUtil.getCredentialsFromRequest(request);
|
||||
if (serviceMap == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ public class WorkEffortSearch {
|
||||
workEffortIds.add(searchResult.getString("workEffortId"));
|
||||
workEffortIdSet.add(searchResult.getString("workEffortId"));
|
||||
|
||||
while (((searchResult = (GenericValue) eli.next()) != null) && (maxResults == null || numRetreived < maxResults.intValue())) {
|
||||
while (((searchResult = eli.next()) != null) && (maxResults == null || numRetreived < maxResults.intValue())) {
|
||||
String workEffortId = searchResult.getString("workEffortId");
|
||||
if (!workEffortIdSet.contains(workEffortId)) {
|
||||
workEffortIds.add(workEffortId);
|
||||
|
||||
+1
-1
@@ -238,7 +238,7 @@ public class WorkEffortSearchSession {
|
||||
String keywordString = (String) parameters.get("SEARCH_STRING");
|
||||
String searchOperator = (String) parameters.get("SEARCH_OPERATOR");
|
||||
// defaults to true/Y, ie anything but N is true/Y
|
||||
boolean anyPrefixSuffix = !"N".equals((String) parameters.get("SEARCH_ANYPRESUF"));
|
||||
boolean anyPrefixSuffix = !"N".equals(parameters.get("SEARCH_ANYPRESUF"));
|
||||
searchAddConstraint(new WorkEffortSearch.KeywordConstraint(keywordString, anyPrefixSuffix, anyPrefixSuffix, null, "AND".equals(searchOperator)), session);
|
||||
constraintsChanged = true;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public class JSONWriter {
|
||||
writer.write(c);
|
||||
} else {
|
||||
writer.write("\\u");
|
||||
String n = Integer.toString((int) c, 16);
|
||||
String n = Integer.toString(c, 16);
|
||||
for (int j = 4 - n.length(); j > 0; j--) writer.write('0');
|
||||
writer.write(n);
|
||||
}
|
||||
|
||||
@@ -72,17 +72,17 @@ public class JSONTests extends GenericTestCaseBase {
|
||||
|
||||
protected void assertSimpleJSONByte(byte n, String json) throws Exception {
|
||||
assertSimpleJSON("integer - byte", new Byte(n), json, new Long(n));
|
||||
assertSimpleJSONShort((short) n, json);
|
||||
assertSimpleJSONShort(n, json);
|
||||
}
|
||||
|
||||
protected void assertSimpleJSONShort(short n, String json) throws Exception {
|
||||
assertSimpleJSON("integer - short", new Integer(n), json, new Long(n));
|
||||
assertSimpleJSONInteger((int) n, json);
|
||||
assertSimpleJSONInteger(n, json);
|
||||
}
|
||||
|
||||
protected void assertSimpleJSONInteger(int n, String json) throws Exception {
|
||||
assertSimpleJSON("integer - int", new Short((short) n), json, new Long(n));
|
||||
assertSimpleJSONLong((long) n, json);
|
||||
assertSimpleJSONLong(n, json);
|
||||
}
|
||||
|
||||
protected void assertSimpleJSONLong(long n, String json) throws Exception {
|
||||
@@ -91,7 +91,7 @@ public class JSONTests extends GenericTestCaseBase {
|
||||
|
||||
protected void assertSimpleJSONFloat(float n, String json) throws Exception {
|
||||
assertSimpleJSON("float - float", new Float(n), json, new Double(n));
|
||||
assertSimpleJSONDouble((double) n, json);
|
||||
assertSimpleJSONDouble(n, json);
|
||||
}
|
||||
|
||||
protected void assertSimpleJSONDouble(double n, String json) throws Exception {
|
||||
|
||||
@@ -307,10 +307,10 @@ public class TimeDuration implements Serializable, Comparable<TimeDuration> {
|
||||
}
|
||||
long units = duration / 0x757B12C00L;
|
||||
int years = (int) units;
|
||||
duration -= 0x757B12C00L * (long) years;
|
||||
duration -= 0x757B12C00L * years;
|
||||
units = duration / 0x9CA41900L;
|
||||
int months = (int) units;
|
||||
duration -= 0x9CA41900L * (long) months;
|
||||
duration -= 0x9CA41900L * months;
|
||||
units = duration / 86400000;
|
||||
int days = (int) units;
|
||||
duration -= 86400000 * (long) days;
|
||||
@@ -373,8 +373,8 @@ public class TimeDuration implements Serializable, Comparable<TimeDuration> {
|
||||
*/
|
||||
public static long toLong(TimeDuration duration) {
|
||||
return
|
||||
(0x757B12C00L * (long) duration.years) +
|
||||
(0x9CA41900L * (long) duration.months) +
|
||||
(0x757B12C00L * duration.years) +
|
||||
(0x9CA41900L * duration.months) +
|
||||
(86400000 * (long) duration.days) +
|
||||
(3600000 * (long) duration.hours) +
|
||||
(60000 * (long) duration.minutes) +
|
||||
|
||||
@@ -118,7 +118,7 @@ public class UtilHttp {
|
||||
// add all the actual HTTP request parameters
|
||||
Enumeration<String> e = UtilGenerics.cast(request.getParameterNames());
|
||||
while (e.hasMoreElements()) {
|
||||
String name = (String) e.nextElement();
|
||||
String name = e.nextElement();
|
||||
if (nameSet != null && (onlyIncludeOrSkipPrim ^ nameSet.contains(name))) {
|
||||
continue;
|
||||
}
|
||||
@@ -248,7 +248,7 @@ public class UtilHttp {
|
||||
} else if (paramEntry.getValue() instanceof Collection) {
|
||||
List<String> newList = FastList.newInstance();
|
||||
for (String listEntry: UtilGenerics.<String>checkCollection(paramEntry.getValue())) {
|
||||
newList.add(canonicalizeParameter((String) listEntry));
|
||||
newList.add(canonicalizeParameter(listEntry));
|
||||
}
|
||||
paramEntry.setValue(newList);
|
||||
}
|
||||
@@ -306,7 +306,7 @@ public class UtilHttp {
|
||||
// look at all request attributes
|
||||
Enumeration<String> requestAttrNames = UtilGenerics.cast(request.getAttributeNames());
|
||||
while (requestAttrNames.hasMoreElements()) {
|
||||
String attrName = (String) requestAttrNames.nextElement();
|
||||
String attrName = requestAttrNames.nextElement();
|
||||
if (namesToSkip != null && namesToSkip.contains(attrName))
|
||||
continue;
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@ public class UtilNumber {
|
||||
* @return formatted string or an empty string if there was an error
|
||||
*/
|
||||
public static String formatRuleBasedAmount(double amount, String rule, Locale locale) {
|
||||
String ruleSet = (String) rbnfRuleSets.get(locale);
|
||||
String ruleSet = rbnfRuleSets.get(locale);
|
||||
if (ruleSet == null) {
|
||||
Debug.logWarning("Cannot format rule based amount for locale " + locale.toString() + " because rule set for that locale does not exist", module);
|
||||
return "";
|
||||
|
||||
@@ -121,7 +121,7 @@ public final class UtilObject {
|
||||
ObjectOutputStream oos = new ObjectOutputStream(bos);
|
||||
oos.writeObject(obj);
|
||||
oos.flush();
|
||||
long size = (long) bos.size();
|
||||
long size = bos.size();
|
||||
bos.close();
|
||||
return size;
|
||||
}
|
||||
|
||||
@@ -448,7 +448,7 @@ public class UtilProperties implements Serializable {
|
||||
|
||||
String value = null;
|
||||
try {
|
||||
value = (String) bundle.getString(name);
|
||||
value = bundle.getString(name);
|
||||
} catch (Exception e) {
|
||||
//Debug.log(e, module);
|
||||
}
|
||||
|
||||
@@ -124,14 +124,14 @@ public class UtilTimer {
|
||||
* @return The number of seconds since the timer started
|
||||
*/
|
||||
public double secondsSinceStart() {
|
||||
return ((double) timeSinceStart()) / 1000.0;
|
||||
return (timeSinceStart()) / 1000.0;
|
||||
}
|
||||
|
||||
/** Returns the number of seconds since the last time timerString was called
|
||||
* @return The number of seconds since the last time timerString was called
|
||||
*/
|
||||
public double secondsSinceLast() {
|
||||
return ((double) timeSinceLast()) / 1000.0;
|
||||
return (timeSinceLast()) / 1000.0;
|
||||
}
|
||||
|
||||
/** Returns the number of milliseconds since the timer started
|
||||
|
||||
@@ -123,7 +123,7 @@ public final class XslTransform {
|
||||
Transformer transformer = translet.newTransformer();
|
||||
if (params != null) {
|
||||
for (Map.Entry<String, Object> entry: params.entrySet()) {
|
||||
String key = (String)entry.getKey();
|
||||
String key = entry.getKey();
|
||||
Object val = entry.getValue();
|
||||
transformer.setParameter(key, val);
|
||||
}
|
||||
|
||||
@@ -48,13 +48,13 @@ public class IndentingWriterTests extends GenericTestCaseBase {
|
||||
} else {
|
||||
iw = new IndentingWriter(sw);
|
||||
}
|
||||
iw.write((int) 'a');
|
||||
iw.write('a');
|
||||
iw.push();
|
||||
iw.write("b\nm");
|
||||
iw.newline();
|
||||
iw.write(new char[] {'1', '\n', '2'});
|
||||
iw.space();
|
||||
iw.write((int) '\n');
|
||||
iw.write('\n');
|
||||
iw.pop();
|
||||
iw.write("e");
|
||||
iw.close();
|
||||
|
||||
@@ -107,7 +107,7 @@ public class Captcha {
|
||||
// we can rotate it independently
|
||||
int charWidth = fontMetrics.charWidth(characterToShow.charAt(i));
|
||||
int charDim = Math.max(maxAdvance, fontHeight);
|
||||
int halfCharDim = (int) (charDim / 2);
|
||||
int halfCharDim = (charDim / 2);
|
||||
|
||||
BufferedImage charImage =
|
||||
new BufferedImage(charDim, charDim, BufferedImage.TYPE_INT_ARGB);
|
||||
@@ -121,10 +121,10 @@ public class Captcha {
|
||||
|
||||
int charX = (int) (0.5 * charDim - 0.5 * charWidth);
|
||||
charGraphics.drawString("" + characterToShow.charAt(i), charX,
|
||||
(int) ((charDim - fontMetrics.getAscent()) / 2 + fontMetrics.getAscent()));
|
||||
((charDim - fontMetrics.getAscent()) / 2 + fontMetrics.getAscent()));
|
||||
|
||||
float x = horizMargin + spacePerChar * (i) - charDim / 2.0f;
|
||||
int y = (int) ((height - charDim) / 2);
|
||||
int y = ((height - charDim) / 2);
|
||||
|
||||
g.drawImage(charImage, (int) x, y, charDim, charDim, null, null);
|
||||
|
||||
|
||||
@@ -137,7 +137,7 @@ public class CommonEvents {
|
||||
String followSessionId = request.getParameter("followSid");
|
||||
Map<String, String> follow = appletSessions.get(followSessionId);
|
||||
if (follow == null) follow = FastMap.newInstance();
|
||||
String followerListStr = (String) follow.get("followers");
|
||||
String followerListStr = follow.get("followers");
|
||||
if (followerListStr == null) {
|
||||
followerListStr = followerSessionId;
|
||||
} else {
|
||||
|
||||
@@ -452,7 +452,7 @@ public class CommonServices {
|
||||
Map<String, String> mapOfStrings = checkMap(context.get("mapOfStrings"), String.class, String.class);
|
||||
|
||||
for (String str: listOfStrings) {
|
||||
String v = (String) mapOfStrings.get(str);
|
||||
String v = mapOfStrings.get(str);
|
||||
Debug.log("SimpleMapListTest: " + str + " -> " + v, module);
|
||||
}
|
||||
|
||||
|
||||
@@ -593,8 +593,8 @@ public class FindServices {
|
||||
String entityName = (String) context.get("entityName");
|
||||
EntityConditionList entityConditionList = (EntityConditionList) context.get("entityConditionList");
|
||||
List<String> orderByList = checkList(context.get("orderByList"), String.class);
|
||||
boolean noConditionFind = "Y".equals((String) context.get("noConditionFind"));
|
||||
boolean distinct = "Y".equals((String) context.get("distinct"));
|
||||
boolean noConditionFind = "Y".equals(context.get("noConditionFind"));
|
||||
boolean distinct = "Y".equals(context.get("distinct"));
|
||||
List<String> fieldList = UtilGenerics.checkList(context.get("fieldList"));
|
||||
Set<String> fieldSet = null;
|
||||
if (fieldList != null) {
|
||||
|
||||
@@ -164,7 +164,7 @@ public class KeywordSearchUtil {
|
||||
}
|
||||
|
||||
// group by word, add up weight
|
||||
Long curWeight = (Long) keywords.get(token);
|
||||
Long curWeight = keywords.get(token);
|
||||
if (curWeight == null) {
|
||||
keywords.put(token, Long.valueOf(1));
|
||||
} else {
|
||||
|
||||
@@ -171,7 +171,7 @@ public class PreferenceServices {
|
||||
|
||||
String userLoginId = PreferenceWorker.getUserLoginId(context, false);
|
||||
String userPrefTypeId = (String) context.get("userPrefTypeId");
|
||||
Object userPrefValue = (String) context.get("userPrefValue");
|
||||
Object userPrefValue = context.get("userPrefValue");
|
||||
if (UtilValidate.isEmpty(userLoginId) || UtilValidate.isEmpty(userPrefTypeId) || userPrefValue == null) {
|
||||
return ServiceUtil.returnError(UtilProperties.getMessage(resource, "setPreference.invalidArgument", locale));
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ public class Record implements Serializable {
|
||||
(long)(byteArray[3]&0xff) << 24 |
|
||||
(long)(byteArray[2]&0xff) << 16 |
|
||||
(long)(byteArray[1]&0xff) << 8 |
|
||||
(long)(byteArray[0]&0xff);
|
||||
(byteArray[0]&0xff);
|
||||
}
|
||||
|
||||
/** Sets the named field to the passed value, converting the value from a String to the current type using <code>Type.valueOf()</code>
|
||||
|
||||
+1
-1
@@ -150,7 +150,7 @@ public abstract class AbstractEntityConditionCache<K, V> extends AbstractCache<E
|
||||
protected List<? extends Map<String, Object>> convert(boolean isPK, String targetEntityName, GenericEntity entity) {
|
||||
if (isNull(entity)) return null;
|
||||
if (isPK) {
|
||||
return entity.getModelEntity().convertToViewValues(targetEntityName, (GenericPK) entity);
|
||||
return entity.getModelEntity().convertToViewValues(targetEntityName, entity);
|
||||
} else {
|
||||
return entity.getModelEntity().convertToViewValues(targetEntityName, entity);
|
||||
}
|
||||
|
||||
@@ -439,7 +439,7 @@ public class GenericDAO {
|
||||
}
|
||||
} else if (meResult.size() == 1) {
|
||||
// Update existing value
|
||||
meGenericValue = (GenericValue) meResult.iterator().next();
|
||||
meGenericValue = meResult.iterator().next();
|
||||
} else {
|
||||
throw new GenericEntityException("Found more than one result for member entity " + meName + " in view " + modelViewEntity.getEntityName() + " - this is no updatable view");
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ public class DatabaseUtil {
|
||||
|
||||
// -list all fields that do not have a corresponding column
|
||||
for (String colName: fieldColNames.keySet()) {
|
||||
ModelField field = (ModelField) fieldColNames.get(colName);
|
||||
ModelField field = fieldColNames.get(colName);
|
||||
String message = "Field [" + field.getName() + "] of entity [" + entity.getEntityName() + "] is missing its corresponding column [" + field.getColName() + "]" + (field.getIsPk() ? " (and it is a PRIMARY KEY FIELD)" : "");
|
||||
|
||||
Debug.logWarning(message, module);
|
||||
@@ -2105,7 +2105,7 @@ public class DatabaseUtil {
|
||||
String entityName = fieldInfo.substring(0, fieldInfo.indexOf('.'));
|
||||
String fieldName = fieldInfo.substring(fieldInfo.indexOf('.') + 1);
|
||||
|
||||
ModelEntity modelEntity = (ModelEntity) modelEntities.get(entityName);
|
||||
ModelEntity modelEntity = modelEntities.get(entityName);
|
||||
ModelField modelField = modelEntity.getField(fieldName);
|
||||
repairColumnSize(modelEntity, modelField, messages);
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ public class ModelReader implements Serializable {
|
||||
// all entity elements in, now go through extend-entity elements and add their stuff
|
||||
for (Element extendEntityElement: tempExtendEntityElementList) {
|
||||
String entityName = UtilXml.checkEmpty(extendEntityElement.getAttribute("entity-name"));
|
||||
ModelEntity modelEntity = (ModelEntity) entityCache.get(entityName);
|
||||
ModelEntity modelEntity = entityCache.get(entityName);
|
||||
if (modelEntity == null) throw new GenericEntityConfException("Entity to extend does not exist: " + entityName);
|
||||
modelEntity.addExtendEntity(this, extendEntityElement);
|
||||
}
|
||||
@@ -271,7 +271,7 @@ public class ModelReader implements Serializable {
|
||||
curViewEntity.populateFields(this);
|
||||
for (ModelViewEntity.ModelMemberEntity mve: curViewEntity.getAllModelMemberEntities()) {
|
||||
|
||||
ModelEntity me = (ModelEntity) entityCache.get(mve.getEntityName());
|
||||
ModelEntity me = entityCache.get(mve.getEntityName());
|
||||
if (me == null) throw new GenericEntityConfException("View " + curViewEntity.getEntityName() + " references non-existant entity: " + mve.getEntityName());
|
||||
me.addViewEntity(curViewEntity);
|
||||
}
|
||||
@@ -498,7 +498,7 @@ public class ModelReader implements Serializable {
|
||||
//put the entityNames TreeSets in a HashMap by packageName
|
||||
Iterator<String> ecIter = this.getEntityNames().iterator();
|
||||
while (ecIter.hasNext()) {
|
||||
String entityName = (String) ecIter.next();
|
||||
String entityName = ecIter.next();
|
||||
ModelEntity entity = this.getModelEntity(entityName);
|
||||
String packageName = entity.getPackageName();
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ public class EntityPlanner extends Planner<EntityPlanner, EntityCondition, Entit
|
||||
if (value instanceof FieldValue) {
|
||||
addFieldDef(dve, groupBy, fieldDef.getAlias(), (FieldValue) value, null);
|
||||
} else if (value instanceof ConstantValue) {
|
||||
addFieldDef(dve, groupBy, fieldDef.getAlias(), (ConstantValue) value);
|
||||
addFieldDef(dve, groupBy, fieldDef.getAlias(), value);
|
||||
} else {
|
||||
throw new UnsupportedOperationException(alias + "[" + fieldDef + "]:" + fieldDef.getClass());
|
||||
}
|
||||
|
||||
@@ -336,7 +336,7 @@ public class EntityDataLoadContainer implements Container {
|
||||
|
||||
// add in the defined extra files
|
||||
for (String fileName: this.files) {
|
||||
URL fileUrl = UtilURL.fromResource((String) fileName);
|
||||
URL fileUrl = UtilURL.fromResource(fileName);
|
||||
if (fileUrl != null) {
|
||||
urlList.add(fileUrl);
|
||||
}
|
||||
|
||||
@@ -1066,14 +1066,14 @@ public class EntityPermissionChecker {
|
||||
buf.append(StringUtil.join(this.operationList, ","));
|
||||
buf.append("\n");
|
||||
for (String fld: fieldNames) {
|
||||
wid = (Integer)widths.get(fld);
|
||||
wid = widths.get(fld);
|
||||
buf.append(fld);
|
||||
for (int i=0; i < (wid.intValue() - fld.length()); i++) buf.append("^");
|
||||
buf.append(" ");
|
||||
}
|
||||
buf.append("\n");
|
||||
for (String fld: fieldNames) {
|
||||
wid = (Integer)widths.get(fld);
|
||||
wid = widths.get(fld);
|
||||
for (int i=0; i < wid.intValue(); i++) buf.append("-");
|
||||
buf.append(" ");
|
||||
}
|
||||
@@ -1095,7 +1095,7 @@ public class EntityPermissionChecker {
|
||||
if (UtilValidate.isEmpty(roleTypeId)) {
|
||||
roleTypeId = "";
|
||||
}
|
||||
wid = (Integer)widths.get("roleFieldName");
|
||||
wid = widths.get("roleFieldName");
|
||||
buf.append(roleTypeId);
|
||||
for (int i=0; i < (wid.intValue() - roleTypeId.length()); i++) buf.append("^");
|
||||
buf.append(" ");
|
||||
@@ -1104,7 +1104,7 @@ public class EntityPermissionChecker {
|
||||
if (UtilValidate.isEmpty(auxiliaryFieldValue)) {
|
||||
auxiliaryFieldValue = "";
|
||||
}
|
||||
wid = (Integer)widths.get("auxiliaryFieldName");
|
||||
wid = widths.get("auxiliaryFieldName");
|
||||
buf.append(auxiliaryFieldValue);
|
||||
for (int i=0; i < (wid.intValue() - auxiliaryFieldValue.length()); i++) buf.append("^");
|
||||
buf.append(" ");
|
||||
|
||||
@@ -53,7 +53,7 @@ public class GeronimoTransactionFactory implements TransactionFactoryInterface {
|
||||
// creates an instance of Geronimo transaction context, etc with a local transaction factory which is not bound to a registry
|
||||
try {
|
||||
transactionLog = new UnrecoverableLog();
|
||||
geronimoTransactionManager = new GeronimoTransactionManager(defaultTransactionTimeoutSeconds, (XidFactory)new XidFactoryImpl(), transactionLog);
|
||||
geronimoTransactionManager = new GeronimoTransactionManager(defaultTransactionTimeoutSeconds, new XidFactoryImpl(), transactionLog);
|
||||
} catch (XAException e) {
|
||||
Debug.logError(e, "Error initializing Geronimo transaction manager: " + e.toString(), module);
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class XuiSession {
|
||||
protected Map<String, Object> attributes = FastMap.newInstance();
|
||||
protected String id = null;
|
||||
protected final boolean IS_SAME_LOGIN = UtilProperties.propertyValueEqualsIgnoreCase("xui.properties", "isSameLogin", "true");
|
||||
private Locale locale = (Locale) Locale.getDefault();
|
||||
private Locale locale = Locale.getDefault();
|
||||
|
||||
public XuiSession(String id, Delegator delegator, LocalDispatcher dispatcher, XuiContainer container) {
|
||||
this.id = id;
|
||||
|
||||
@@ -76,10 +76,10 @@ public class StringAppend extends MethodOperation {
|
||||
mapAcsr.put(methodContext, toMap);
|
||||
}
|
||||
|
||||
String oldValue = (String) fieldAcsr.get(toMap, methodContext);
|
||||
String oldValue = fieldAcsr.get(toMap, methodContext);
|
||||
fieldAcsr.put(toMap, this.appendString(oldValue, methodContext), methodContext);
|
||||
} else {
|
||||
String oldValue = (String) fieldAcsr.get(methodContext);
|
||||
String oldValue = fieldAcsr.get(methodContext);
|
||||
fieldAcsr.put(methodContext, this.appendString(oldValue, methodContext));
|
||||
}
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ public class CheckPermission extends MethodOperation {
|
||||
}
|
||||
|
||||
if (!hasPermission && acceptUlPartyIdEnvNameAcsr != null) {
|
||||
String acceptPartyId = (String) acceptUlPartyIdEnvNameAcsr.get(methodContext);
|
||||
String acceptPartyId = acceptUlPartyIdEnvNameAcsr.get(methodContext);
|
||||
if (UtilValidate.isEmpty(acceptPartyId)) {
|
||||
// try the parameters Map
|
||||
Map<String, Object> parameters = methodContext.getEnv("parameters");
|
||||
|
||||
@@ -245,7 +245,7 @@ public class Calculate extends MethodOperation {
|
||||
|
||||
public BigDecimal calcValue(MethodContext methodContext, int scale, int roundingMode) {
|
||||
String valueStr = methodContext.expandString(this.valueStr);
|
||||
Locale locale = (Locale) methodContext.getLocale();
|
||||
Locale locale = methodContext.getLocale();
|
||||
|
||||
if (locale == null) locale = Locale.getDefault();
|
||||
|
||||
|
||||
@@ -171,7 +171,7 @@ public class RecurrenceRule {
|
||||
Debug.logVerbose("Stamp value: " + stamp, module);
|
||||
|
||||
if (stamp != null) {
|
||||
long nanos = (long) stamp.getNanos();
|
||||
long nanos = stamp.getNanos();
|
||||
time = stamp.getTime();
|
||||
time += (nanos / 1000000);
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ public class ServiceConfigUtil implements Serializable {
|
||||
for (int index = 0; index < params.getLength(); index++) {
|
||||
Element param = (Element) params.item(index);
|
||||
if (param != null && name.equals(param.getAttribute("name"))) {
|
||||
return (String) param.getAttribute("value");
|
||||
return param.getAttribute("value");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ public class GroupModel {
|
||||
} else if (this.getSendMode().equals("round-robin")) {
|
||||
return runIndex(dispatcher, localName, context, (++lastServiceRan % services.size()));
|
||||
} else if (this.getSendMode().equals("random")) {
|
||||
int randomIndex = (int) (Math.random() * (double) (services.size()));
|
||||
int randomIndex = (int) (Math.random() * (services.size()));
|
||||
return runIndex(dispatcher, localName, context, randomIndex);
|
||||
} else if (this.getSendMode().equals("first-available")) {
|
||||
return runOne(dispatcher, localName, context);
|
||||
|
||||
@@ -100,7 +100,7 @@ public class ServiceSemaphore {
|
||||
}
|
||||
}
|
||||
if (timedOut) {
|
||||
double waitTimeSec = ((double) (System.currentTimeMillis() - lockTime.getTime()) / 1000.0);
|
||||
double waitTimeSec = ((System.currentTimeMillis() - lockTime.getTime()) / 1000.0);
|
||||
String errMsg = "Service [" + model.name + "] with wait semaphore exceeded wait timeout, waited [" + waitTimeSec + "], wait started at " + lockTime;
|
||||
Debug.logWarning(errMsg, module);
|
||||
throw new SemaphoreWaitException(errMsg);
|
||||
|
||||
@@ -428,7 +428,7 @@ public class ConfigXMLReader {
|
||||
}
|
||||
|
||||
String cacheId = controllerPartialPath != null ? controllerPartialPath : "NOPARTIALPATH";
|
||||
List<ControllerConfig> controllerConfigs = (List<ControllerConfig>) controllerSearchResultsCache.get(cacheId);
|
||||
List<ControllerConfig> controllerConfigs = controllerSearchResultsCache.get(cacheId);
|
||||
|
||||
if (controllerConfigs == null) {
|
||||
try {
|
||||
|
||||
@@ -851,7 +851,7 @@ public class LoginWorker {
|
||||
|
||||
Map<String, String> x500Map = KeyStoreUtil.getCertX500Map(clientCerts[i]);
|
||||
if (i == 0) {
|
||||
String cn = (String) x500Map.get("CN");
|
||||
String cn = x500Map.get("CN");
|
||||
cn = cn.replaceAll("\\\\", "");
|
||||
Matcher m = pattern.matcher(cn);
|
||||
if (m.matches()) {
|
||||
@@ -933,7 +933,7 @@ public class LoginWorker {
|
||||
String externalKey = request.getParameter(LoginWorker.EXTERNAL_LOGIN_KEY_ATTR);
|
||||
if (externalKey == null) return "success";
|
||||
|
||||
GenericValue userLogin = (GenericValue) LoginWorker.externalLoginKeys.get(externalKey);
|
||||
GenericValue userLogin = LoginWorker.externalLoginKeys.get(externalKey);
|
||||
if (userLogin != null) {
|
||||
//to check it's the right tenant
|
||||
//in case username and password are the same in different tenants
|
||||
|
||||
@@ -87,13 +87,13 @@ public class ProtectViewWorker {
|
||||
}
|
||||
GenericValue protectedView = protectedViews.get(0);
|
||||
// 1st hit ?
|
||||
Long curMaxHits = (Long) hitsByViewAccessed.get(viewNameUserLoginId);
|
||||
Long curMaxHits = hitsByViewAccessed.get(viewNameUserLoginId);
|
||||
if (UtilValidate.isEmpty(curMaxHits)) {
|
||||
hitsByViewAccessed.put(viewNameUserLoginId, one);
|
||||
Long maxHitsDuration = (Long) protectedView.get("maxHitsDuration") * 1000;
|
||||
durationByViewAccessed.put(viewNameUserLoginId, now + maxHitsDuration);
|
||||
} else {
|
||||
Long maxDuration = (Long) durationByViewAccessed.get(viewNameUserLoginId);
|
||||
Long maxDuration = durationByViewAccessed.get(viewNameUserLoginId);
|
||||
Long newMaxHits = (Long) curMaxHits + one;
|
||||
hitsByViewAccessed.put(viewNameUserLoginId, newMaxHits);
|
||||
// Are we in a period of time where we need to check if there was too much hits ?
|
||||
|
||||
@@ -88,10 +88,10 @@ public class WfsEventHandler implements EventHandler {
|
||||
Element queryElem = null;
|
||||
|
||||
try {
|
||||
typeName = (String)request.getParameter("typename");
|
||||
typeName = request.getParameter("typename");
|
||||
//determine if "get" or "post" and get "filter" param accordingly
|
||||
if (UtilValidate.isNotEmpty(typeName)) {
|
||||
String queryFieldCoded = (String)request.getParameter("filter");
|
||||
String queryFieldCoded = request.getParameter("filter");
|
||||
String queryFieldDecoded = UtilFormatOut.decodeQueryValue(queryFieldCoded);
|
||||
Document doc = UtilXml.readXmlDocument(queryFieldDecoded);
|
||||
queryElem = doc.getDocumentElement();
|
||||
|
||||
@@ -300,7 +300,7 @@ public class XmlRpcEventHandler extends XmlRpcHttpServer implements EventHandler
|
||||
context = checkMap(param, String.class, Object.class);
|
||||
} else {
|
||||
if (model.getDefinedInCount() == 1) {
|
||||
String paramName = (String) model.getInParamNames().iterator().next();
|
||||
String paramName = model.getInParamNames().iterator().next();
|
||||
context.put(paramName, xmlRpcReq.getParameter(0));
|
||||
} else {
|
||||
throw new XmlRpcException("More than one parameter defined on service; cannot call via RPC with parameter list");
|
||||
|
||||
@@ -117,7 +117,7 @@ public class RegionManager {
|
||||
newRegion = new Region(idAttr, templateAttr, null);
|
||||
} else {
|
||||
if (UtilValidate.isNotEmpty(regionAttr)) {
|
||||
Region parentRegion = (Region) regions.get(regionAttr);
|
||||
Region parentRegion = regions.get(regionAttr);
|
||||
|
||||
if (parentRegion == null) {
|
||||
throw new IllegalArgumentException("can't find page definition attribute with this key: " + regionAttr);
|
||||
|
||||
@@ -247,23 +247,23 @@ public class ServerHitBin {
|
||||
// save in global, and try to get bin by id
|
||||
switch (type) {
|
||||
case REQUEST:
|
||||
bin = (ServerHitBin) requestSinceStarted.get(id);
|
||||
bin = requestSinceStarted.get(id);
|
||||
break;
|
||||
|
||||
case EVENT:
|
||||
bin = (ServerHitBin) eventSinceStarted.get(id);
|
||||
bin = eventSinceStarted.get(id);
|
||||
break;
|
||||
|
||||
case VIEW:
|
||||
bin = (ServerHitBin) viewSinceStarted.get(id);
|
||||
bin = viewSinceStarted.get(id);
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
bin = (ServerHitBin) entitySinceStarted.get(id);
|
||||
bin = entitySinceStarted.get(id);
|
||||
break;
|
||||
|
||||
case SERVICE:
|
||||
bin = (ServerHitBin) serviceSinceStarted.get(id);
|
||||
bin = serviceSinceStarted.get(id);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -271,23 +271,23 @@ public class ServerHitBin {
|
||||
synchronized (ServerHitBin.class) {
|
||||
switch (type) {
|
||||
case REQUEST:
|
||||
bin = (ServerHitBin) requestSinceStarted.get(id);
|
||||
bin = requestSinceStarted.get(id);
|
||||
break;
|
||||
|
||||
case EVENT:
|
||||
bin = (ServerHitBin) eventSinceStarted.get(id);
|
||||
bin = eventSinceStarted.get(id);
|
||||
break;
|
||||
|
||||
case VIEW:
|
||||
bin = (ServerHitBin) viewSinceStarted.get(id);
|
||||
bin = viewSinceStarted.get(id);
|
||||
break;
|
||||
|
||||
case ENTITY:
|
||||
bin = (ServerHitBin) entitySinceStarted.get(id);
|
||||
bin = entitySinceStarted.get(id);
|
||||
break;
|
||||
|
||||
case SERVICE:
|
||||
bin = (ServerHitBin) serviceSinceStarted.get(id);
|
||||
bin = serviceSinceStarted.get(id);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -477,7 +477,7 @@ public class ServerHitBin {
|
||||
|
||||
/** returns (endTime - startTime)/60000 */
|
||||
public double getBinLengthMinutes() {
|
||||
return ((double) this.getBinLength()) / 60000.0;
|
||||
return (this.getBinLength()) / 60000.0;
|
||||
}
|
||||
|
||||
public long getNumberHits() {
|
||||
@@ -493,7 +493,7 @@ public class ServerHitBin {
|
||||
}
|
||||
|
||||
public double getMinTimeSeconds() {
|
||||
return ((double) this.minTime) / 1000.0;
|
||||
return (this.minTime) / 1000.0;
|
||||
}
|
||||
|
||||
public long getMaxTime() {
|
||||
@@ -501,7 +501,7 @@ public class ServerHitBin {
|
||||
}
|
||||
|
||||
public double getMaxTimeSeconds() {
|
||||
return ((double) this.maxTime) / 1000.0;
|
||||
return (this.maxTime) / 1000.0;
|
||||
}
|
||||
|
||||
public double getAvgTime() {
|
||||
@@ -514,7 +514,7 @@ public class ServerHitBin {
|
||||
|
||||
/** return the hits per minute using the entire length of the bin as returned by getBinLengthMinutes() */
|
||||
public double getHitsPerMinute() {
|
||||
return ((double) this.numberHits) / this.getBinLengthMinutes();
|
||||
return (this.numberHits) / this.getBinLengthMinutes();
|
||||
}
|
||||
|
||||
synchronized void addHit(long startTime, long runningTime) {
|
||||
|
||||
@@ -319,10 +319,10 @@ public class WebToolsServices {
|
||||
String readers = (String) context.get("readers");
|
||||
String overrideDelegator = (String) context.get("overrideDelegator");
|
||||
String overrideGroup = (String) context.get("overrideGroup");
|
||||
boolean useDummyFks = "true".equals((String) context.get("createDummyFks"));
|
||||
boolean maintainTxs = "true".equals((String) context.get("maintainTimeStamps"));
|
||||
boolean tryInserts = "true".equals((String) context.get("mostlyInserts"));
|
||||
boolean checkDataOnly = "true".equals((String) context.get("checkDataOnly"));
|
||||
boolean useDummyFks = "true".equals(context.get("createDummyFks"));
|
||||
boolean maintainTxs = "true".equals(context.get("maintainTimeStamps"));
|
||||
boolean tryInserts = "true".equals(context.get("mostlyInserts"));
|
||||
boolean checkDataOnly = "true".equals(context.get("checkDataOnly"));
|
||||
|
||||
Integer txTimeoutInt = (Integer) context.get("txTimeout");
|
||||
int txTimeout = txTimeoutInt != null ? txTimeoutInt.intValue() : -1;
|
||||
@@ -513,7 +513,7 @@ public class WebToolsServices {
|
||||
|
||||
//Don't bother writing the file if there's nothing
|
||||
//to put into it
|
||||
GenericValue value = (GenericValue) values.next();
|
||||
GenericValue value = values.next();
|
||||
if (value != null) {
|
||||
PrintWriter writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(outdir, curEntityName +".xml")), "UTF-8")));
|
||||
writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
|
||||
@@ -526,7 +526,7 @@ public class WebToolsServices {
|
||||
TransactionUtil.commit(beganTx);
|
||||
beganTx = TransactionUtil.begin();
|
||||
}
|
||||
} while ((value = (GenericValue) values.next()) != null);
|
||||
} while ((value = values.next()) != null);
|
||||
writer.println("</entity-engine-xml>");
|
||||
writer.close();
|
||||
results.add("["+fileNumber +"] [" + numberWritten + "] " + curEntityName + " wrote " + numberWritten + " records");
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ public class ControllerRequestArtifactInfo extends ArtifactInfoBase {
|
||||
// populate serviceCalledByRequestEvent, requestsThatAreResponsesToThisRequest, viewsThatAreResponsesToThisRequest and related reverse maps
|
||||
|
||||
if (this.requestInfoMap.event != null && this.requestInfoMap.event.type != null && (this.requestInfoMap.event.type.indexOf("service") >= 0)) {
|
||||
String serviceName = (String) this.requestInfoMap.event.invoke;
|
||||
String serviceName = this.requestInfoMap.event.invoke;
|
||||
try {
|
||||
this.serviceCalledByRequestEvent = this.aif.getServiceArtifactInfo(serviceName);
|
||||
if (this.serviceCalledByRequestEvent != null) {
|
||||
|
||||
@@ -85,7 +85,7 @@ public class ServiceArtifactInfo extends ArtifactInfoBase {
|
||||
SimpleMethod simpleMethodToCall = null;
|
||||
try {
|
||||
Map<String, SimpleMethod> simpleMethods = SimpleMethod.getSimpleMethods(this.modelService.location, null);
|
||||
simpleMethodToCall = (SimpleMethod) simpleMethods.get(this.modelService.invoke);
|
||||
simpleMethodToCall = simpleMethods.get(this.modelService.invoke);
|
||||
} catch (MiniLangException e) {
|
||||
Debug.logWarning("Error getting Simple-method [" + this.modelService.invoke + "] in [" + this.modelService.location + "] referenced in service [" + this.modelService.name + "]: " + e.toString(), module);
|
||||
}
|
||||
@@ -146,7 +146,7 @@ public class ServiceArtifactInfo extends ArtifactInfoBase {
|
||||
SimpleMethod simpleMethodToCall = null;
|
||||
try {
|
||||
Map<String, SimpleMethod> simpleMethods = SimpleMethod.getSimpleMethods(this.modelService.location, null);
|
||||
simpleMethodToCall = (SimpleMethod) simpleMethods.get(this.modelService.invoke);
|
||||
simpleMethodToCall = simpleMethods.get(this.modelService.invoke);
|
||||
} catch (MiniLangException e) {
|
||||
Debug.logWarning("Error getting Simple-method [" + this.modelService.invoke + "] in [" + this.modelService.location + "] referenced in service [" + this.modelService.name + "]: " + e.toString(), module);
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class LabelInfo {
|
||||
}
|
||||
|
||||
public LabelValue getLabelValue(String localeStr) {
|
||||
return (LabelValue)labelValues.get(localeStr);
|
||||
return labelValues.get(localeStr);
|
||||
}
|
||||
|
||||
public int getLabelValueSize() {
|
||||
|
||||
@@ -239,7 +239,7 @@ public class MacroFormRenderer implements FormStringRenderer {
|
||||
while (fieldIterator.hasNext()) {
|
||||
count++;
|
||||
Entry<String, Object> field = fieldIterator.next();
|
||||
extraParameter += (String) field.getKey() + ":'" + (String) field.getValue() + "'";
|
||||
extraParameter += field.getKey() + ":'" + (String) field.getValue() + "'";
|
||||
if (count < fieldSet.size()) {
|
||||
extraParameter += ',';
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class HtmlFormWrapper {
|
||||
}
|
||||
|
||||
// if a parameter was passed saying this is an error, it is an error
|
||||
if ("true".equals((String) parameterMap.get("isError"))) {
|
||||
if ("true".equals(parameterMap.get("isError"))) {
|
||||
context.put("isError", Boolean.TRUE);
|
||||
}
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ public class HtmlMenuWrapper {
|
||||
}
|
||||
|
||||
// if a parameter was passed saying this is an error, it is an error
|
||||
if ("true".equals((String) parameterMap.get("isError"))) {
|
||||
if ("true".equals(parameterMap.get("isError"))) {
|
||||
context.put("isError", Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ public class HtmlScreenRenderer extends HtmlWidgetRenderer implements ScreenStri
|
||||
if (uiLabelMap == null) {
|
||||
Debug.logWarning("Could not find uiLabelMap in context", module);
|
||||
} else {
|
||||
ofLabel = (String) uiLabelMap.get("CommonOf");
|
||||
ofLabel = uiLabelMap.get("CommonOf");
|
||||
ofLabel = ofLabel.toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public class HtmlTreeRenderer extends HtmlWidgetRenderer implements TreeStringRe
|
||||
String targetEntityId = null;
|
||||
List<String> targetNodeTrail = UtilGenerics.toList(context.get("targetNodeTrail"));
|
||||
if (depth < targetNodeTrail.size()) {
|
||||
targetEntityId = (String)targetNodeTrail.get(depth);
|
||||
targetEntityId = targetNodeTrail.get(depth);
|
||||
}
|
||||
|
||||
int openDepth = node.getModelTree().getOpenDepth();
|
||||
@@ -102,7 +102,7 @@ public class HtmlTreeRenderer extends HtmlWidgetRenderer implements TreeStringRe
|
||||
} else {
|
||||
context.put("processChildren", Boolean.TRUE);
|
||||
//expandCollapseLink.setText(" - ");
|
||||
String lastContentId = (String)currentNodeTrail.remove(currentNodeTrail.size() - 1);
|
||||
String lastContentId = currentNodeTrail.remove(currentNodeTrail.size() - 1);
|
||||
currentNodeTrailPiped = StringUtil.join(currentNodeTrail, "|");
|
||||
if (currentNodeTrailPiped == null) {
|
||||
currentNodeTrailPiped = "";
|
||||
|
||||
@@ -199,7 +199,7 @@ public class ModelMenuItem {
|
||||
public ModelMenuItem addUpdateMenuItem(ModelMenuItem modelMenuItem) {
|
||||
|
||||
// not a conditional item, see if a named item exists in Map
|
||||
ModelMenuItem existingMenuItem = (ModelMenuItem) this.menuItemMap.get(modelMenuItem.getName());
|
||||
ModelMenuItem existingMenuItem = this.menuItemMap.get(modelMenuItem.getName());
|
||||
if (existingMenuItem != null) {
|
||||
// does exist, update the item by doing a merge/override
|
||||
existingMenuItem.mergeOverrideModelMenuItem(modelMenuItem);
|
||||
|
||||
@@ -688,7 +688,7 @@ public class MacroScreenRenderer implements ScreenStringRenderer {
|
||||
if (uiLabelMap == null) {
|
||||
Debug.logWarning("Could not find uiLabelMap in context", module);
|
||||
} else {
|
||||
ofLabel = (String) uiLabelMap.get("CommonOf");
|
||||
ofLabel = uiLabelMap.get("CommonOf");
|
||||
ofLabel = ofLabel.toLowerCase();
|
||||
}
|
||||
|
||||
@@ -790,8 +790,8 @@ public class MacroScreenRenderer implements ScreenStringRenderer {
|
||||
if (uiLabelMap == null) {
|
||||
Debug.logWarning("Could not find uiLabelMap in context", module);
|
||||
} else {
|
||||
addColumnLabel = (String) uiLabelMap.get("CommonAddColumn");
|
||||
addColumnHint = (String) uiLabelMap.get("CommonAddAColumnToThisPortalPage");
|
||||
addColumnLabel = uiLabelMap.get("CommonAddColumn");
|
||||
addColumnHint = uiLabelMap.get("CommonAddAColumnToThisPortalPage");
|
||||
}
|
||||
|
||||
StringWriter sr = new StringWriter();
|
||||
@@ -835,13 +835,13 @@ public class MacroScreenRenderer implements ScreenStringRenderer {
|
||||
if (uiLabelMap == null) {
|
||||
Debug.logWarning("Could not find uiLabelMap in context", module);
|
||||
} else {
|
||||
delColumnLabel = (String) uiLabelMap.get("CommonDeleteColumn");
|
||||
delColumnHint = (String) uiLabelMap.get("CommonDeleteThisColumn");
|
||||
delColumnLabel = uiLabelMap.get("CommonDeleteColumn");
|
||||
delColumnHint = uiLabelMap.get("CommonDeleteThisColumn");
|
||||
|
||||
addPortletLabel = (String) uiLabelMap.get("CommonAddAPortlet");
|
||||
addPortletHint = (String) uiLabelMap.get("CommonAddPortletToPage");
|
||||
colWidthLabel = (String) uiLabelMap.get("CommonWidth");
|
||||
setColumnSizeHint = (String) uiLabelMap.get("CommonSetColumnWidth");
|
||||
addPortletLabel = uiLabelMap.get("CommonAddAPortlet");
|
||||
addPortletHint = uiLabelMap.get("CommonAddPortletToPage");
|
||||
colWidthLabel = uiLabelMap.get("CommonWidth");
|
||||
setColumnSizeHint = uiLabelMap.get("CommonSetColumnWidth");
|
||||
}
|
||||
|
||||
StringWriter sr = new StringWriter();
|
||||
@@ -908,8 +908,8 @@ public class MacroScreenRenderer implements ScreenStringRenderer {
|
||||
if (uiLabelMap == null) {
|
||||
Debug.logWarning("Could not find uiLabelMap in context", module);
|
||||
} else {
|
||||
delPortletHint = (String) uiLabelMap.get("CommonDeleteThisPortlet");
|
||||
editAttributeHint = (String) uiLabelMap.get("CommonEditPortletAttributes");
|
||||
delPortletHint = uiLabelMap.get("CommonDeleteThisPortlet");
|
||||
editAttributeHint = uiLabelMap.get("CommonEditPortletAttributes");
|
||||
}
|
||||
|
||||
StringWriter sr = new StringWriter();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user