diff --git a/.classpath b/.classpath
index c08f7a09ee..528ea3ff5a 100644
--- a/.classpath
+++ b/.classpath
@@ -15,7 +15,7 @@
-
+
diff --git a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java
index 8c5bed5d70..6bac472d51 100644
--- a/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java
+++ b/applications/accounting/src/org/ofbiz/accounting/payment/PaymentWorker.java
@@ -54,6 +54,7 @@ public class PaymentWorker {
private static int rounding = UtilNumber.getBigDecimalRoundingMode("invoice.rounding");
/** @deprecated */
+ @Deprecated
public static void getPartyPaymentMethodValueMaps(PageContext pageContext, String partyId, Boolean showOld, String paymentMethodValueMapsAttr) {
GenericDelegator delegator = (GenericDelegator) pageContext.getRequest().getAttribute("delegator");
List paymentMethodValueMaps = getPartyPaymentMethodValueMaps(delegator, partyId, showOld);
@@ -98,6 +99,7 @@ public class PaymentWorker {
/** TODO: REMOVE (DEJ 20030301): This is the OLD style and should be removed when the eCommerce and party mgr JSPs are */
/** @deprecated */
+ @Deprecated
public static void getPaymentMethodAndRelated(PageContext pageContext, String partyId,
String paymentMethodAttr, String creditCardAttr, String eftAccountAttr, String paymentMethodIdAttr, String curContactMechIdAttr,
String donePageAttr, String tryEntityAttr) {
diff --git a/applications/accounting/src/org/ofbiz/accounting/test/FinAccountTests.java b/applications/accounting/src/org/ofbiz/accounting/test/FinAccountTests.java
index f81c24f54a..74c55dcef4 100644
--- a/applications/accounting/src/org/ofbiz/accounting/test/FinAccountTests.java
+++ b/applications/accounting/src/org/ofbiz/accounting/test/FinAccountTests.java
@@ -40,10 +40,12 @@ public class FinAccountTests extends OFBizTestCase {
super(name);
}
+ @Override
protected void setUp() throws Exception {
userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system"));
}
+ @Override
protected void tearDown() throws Exception {
}
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
index aec7210787..ebb500c010 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCPaymentServices.java
@@ -18,29 +18,35 @@
*******************************************************************************/
package org.ofbiz.accounting.thirdparty.clearcommerce;
-import java.util.Map;
-import java.util.List;
-import java.util.Iterator;
-import java.util.ArrayList;
-import java.text.DecimalFormat;
-import java.io.OutputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.io.OutputStream;
import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.TransformerException;
-import org.ofbiz.base.util.*;
-import org.ofbiz.entity.GenericValue;
+import org.ofbiz.accounting.payment.PaymentGatewayServices;
+import org.ofbiz.base.util.Debug;
+import org.ofbiz.base.util.GeneralException;
+import org.ofbiz.base.util.HttpClient;
+import org.ofbiz.base.util.HttpClientException;
+import org.ofbiz.base.util.UtilGenerics;
+import org.ofbiz.base.util.UtilNumber;
+import org.ofbiz.base.util.UtilProperties;
+import org.ofbiz.base.util.UtilValidate;
+import org.ofbiz.base.util.UtilXml;
import org.ofbiz.entity.GenericEntityException;
+import org.ofbiz.entity.GenericValue;
import org.ofbiz.service.DispatchContext;
import org.ofbiz.service.ServiceUtil;
-import org.ofbiz.accounting.payment.PaymentGatewayServices;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.xml.sax.SAXException;
-import org.apache.xml.serialize.XMLSerializer;
-import org.apache.xml.serialize.OutputFormat;
/**
@@ -53,7 +59,7 @@ public class CCPaymentServices {
private static int rounding = UtilNumber.getBigDecimalRoundingMode("invoice.rounding");
- public static Map ccAuth(DispatchContext dctx, Map context) {
+ public static Map ccAuth(DispatchContext dctx, Map context) {
String ccAction = (String) context.get("ccAction");
if (ccAction == null) ccAction = new String("PreAuth");
Document authRequestDoc = buildPrimaryTxRequest(context, ccAction, (BigDecimal) context.get("processAmount"),
@@ -67,11 +73,11 @@ public class CCPaymentServices {
}
if (getMessageListMaxSev(authResponseDoc) > 4) { // 5 and higher, process error from HSBC
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
result.put("authResult", new Boolean(false));
result.put("processAmount", new BigDecimal("0.00"));
result.put("authRefNum", getReferenceNum(authResponseDoc));
- List messages = getMessageList(authResponseDoc);
+ List messages = getMessageList(authResponseDoc);
if (UtilValidate.isNotEmpty(messages)) {
result.put("internalRespMsgs", messages);
}
@@ -81,7 +87,7 @@ public class CCPaymentServices {
return processAuthResponse(authResponseDoc);
}
- public static Map ccCredit(DispatchContext dctx, Map context) {
+ public static Map ccCredit(DispatchContext dctx, Map context) {
String action = new String("Credit");
if (context.get("pbOrder") != null) {
action = new String("Auth"); // required for periodic billing....
@@ -97,11 +103,11 @@ public class CCPaymentServices {
}
if (getMessageListMaxSev(creditResponseDoc) > 4) {
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
result.put("creditResult", new Boolean(false));
result.put("creditAmount", new BigDecimal("0.00"));
result.put("creditRefNum", getReferenceNum(creditResponseDoc));
- List messages = getMessageList(creditResponseDoc);
+ List messages = getMessageList(creditResponseDoc);
if (UtilValidate.isNotEmpty(messages)) {
result.put("internalRespMsgs", messages);
}
@@ -111,7 +117,7 @@ public class CCPaymentServices {
return processCreditResponse(creditResponseDoc);
}
- public static Map ccCapture(DispatchContext dctx, Map context) {
+ public static Map ccCapture(DispatchContext dctx, Map context) {
GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
GenericValue authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference);
@@ -130,11 +136,11 @@ public class CCPaymentServices {
}
if (getMessageListMaxSev(captureResponseDoc) > 4) {
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
result.put("captureResult", new Boolean(false));
result.put("captureAmount", new BigDecimal("0.00"));
result.put("captureRefNum", getReferenceNum(captureResponseDoc));
- List messages = getMessageList(captureResponseDoc);
+ List messages = getMessageList(captureResponseDoc);
if (UtilValidate.isNotEmpty(messages)) {
result.put("internalRespMsgs", messages);
}
@@ -144,7 +150,7 @@ public class CCPaymentServices {
return processCaptureResponse(captureResponseDoc);
}
- public static Map ccRelease(DispatchContext dctx, Map context) {
+ public static Map ccRelease(DispatchContext dctx, Map context) {
GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
GenericValue authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference);
@@ -162,11 +168,11 @@ public class CCPaymentServices {
}
if (getMessageListMaxSev(releaseResponseDoc) > 4) {
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
result.put("releaseResult", new Boolean(false));
result.put("releaseAmount", new BigDecimal("0.00"));
result.put("releaseRefNum", getReferenceNum(releaseResponseDoc));
- List messages = getMessageList(releaseResponseDoc);
+ List messages = getMessageList(releaseResponseDoc);
if (UtilValidate.isNotEmpty(messages)) {
result.put("internalRespMsgs", messages);
}
@@ -176,7 +182,7 @@ public class CCPaymentServices {
return processReleaseResponse(releaseResponseDoc);
}
- public static Map ccReleaseNoop(DispatchContext dctx, Map context) {
+ public static Map ccReleaseNoop(DispatchContext dctx, Map context) {
GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
GenericValue authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference);
@@ -184,7 +190,7 @@ public class CCPaymentServices {
return ServiceUtil.returnError("No authorization transaction found; cannot release");
}
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
result.put("releaseResult", Boolean.valueOf(true));
result.put("releaseCode", authTransaction.getString("gatewayCode"));
result.put("releaseAmount", authTransaction.getBigDecimal("amount"));
@@ -195,7 +201,7 @@ public class CCPaymentServices {
return result;
}
- public static Map ccRefund(DispatchContext dctx, Map context) {
+ public static Map ccRefund(DispatchContext dctx, Map context) {
GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
GenericValue authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference);
@@ -216,11 +222,11 @@ public class CCPaymentServices {
}
if (getMessageListMaxSev(refundResponseDoc) > 4) {
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
result.put("refundResult", new Boolean(false));
result.put("refundAmount", new BigDecimal("0.00"));
result.put("refundRefNum", getReferenceNum(refundResponseDoc));
- List messages = getMessageList(refundResponseDoc);
+ List messages = getMessageList(refundResponseDoc);
if (UtilValidate.isNotEmpty(messages)) {
result.put("internalRespMsgs", messages);
}
@@ -230,7 +236,7 @@ public class CCPaymentServices {
return processRefundResponse(refundResponseDoc);
}
- public static Map ccReAuth(DispatchContext dctx, Map context) {
+ public static Map ccReAuth(DispatchContext dctx, Map context) {
GenericValue orderPaymentPreference = (GenericValue) context.get("orderPaymentPreference");
GenericValue authTransaction = PaymentGatewayServices.getAuthTransaction(orderPaymentPreference);
@@ -249,11 +255,11 @@ public class CCPaymentServices {
}
if (getMessageListMaxSev(reauthResponseDoc) > 4) {
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
result.put("reauthResult", new Boolean(false));
result.put("reauthAmount", new BigDecimal("0.00"));
result.put("reauthRefNum", getReferenceNum(reauthResponseDoc));
- List messages = getMessageList(reauthResponseDoc);
+ List messages = getMessageList(reauthResponseDoc);
if (UtilValidate.isNotEmpty(messages)) {
result.put("internalRespMsgs", messages);
}
@@ -264,7 +270,7 @@ public class CCPaymentServices {
}
- public static Map ccReport(DispatchContext dctx, Map context) {
+ public static Map ccReport(DispatchContext dctx, Map context) {
// configuration file
String paymentConfig = (String) context.get("paymentConfig");
@@ -345,28 +351,29 @@ public class CCPaymentServices {
UtilXml.addChildElementValue(value,"OrderId", orderId, requestDocument);
Debug.set(Debug.VERBOSE, true);
- Document reportResponseDoc = null;
+ //Document reportResponseDoc = null;
try {
- reportResponseDoc = sendRequest(requestDocument, (String) context.get("paymentConfig"));
+ //reportResponseDoc =
+ sendRequest(requestDocument, (String) context.get("paymentConfig"));
} catch (ClearCommerceException cce) {
return ServiceUtil.returnError(cce.getMessage());
}
Debug.set(Debug.VERBOSE, true);
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
return result;
}
- private static Map processAuthResponse(Document responseDocument) {
+ private static Map processAuthResponse(Document responseDocument) {
Element engineDocElement = UtilXml.firstChildElement(responseDocument.getDocumentElement(), "EngineDoc");
Element orderFormElement = UtilXml.firstChildElement(engineDocElement, "OrderFormDoc");
Element transactionElement = UtilXml.firstChildElement(orderFormElement, "Transaction");
Element procResponseElement = UtilXml.firstChildElement(transactionElement, "CardProcResp");
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
String errorCode = UtilXml.childElementValue(procResponseElement, "CcErrCode");
if ("1".equals(errorCode)) {
@@ -398,21 +405,21 @@ public class CCPaymentServices {
result.put("scoreCode", UtilXml.childElementValue(fraudInfoElement, "TotalScore"));
}
- List messages = getMessageList(responseDocument);
+ List messages = getMessageList(responseDocument);
if (UtilValidate.isNotEmpty(messages)) {
result.put("internalRespMsgs", messages);
}
return result;
}
- private static Map processCreditResponse(Document responseDocument) {
+ private static Map processCreditResponse(Document responseDocument) {
Element engineDocElement = UtilXml.firstChildElement(responseDocument.getDocumentElement(), "EngineDoc");
Element orderFormElement = UtilXml.firstChildElement(engineDocElement, "OrderFormDoc");
Element transactionElement = UtilXml.firstChildElement(orderFormElement, "Transaction");
Element procResponseElement = UtilXml.firstChildElement(transactionElement, "CardProcResp");
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
String errorCode = UtilXml.childElementValue(procResponseElement, "CcErrCode");
if ("1".equals(errorCode)) {
@@ -432,21 +439,21 @@ public class CCPaymentServices {
result.put("creditFlag", UtilXml.childElementValue(procResponseElement, "Status"));
result.put("creditMessage", UtilXml.childElementValue(procResponseElement, "CcReturnMsg"));
- List messages = getMessageList(responseDocument);
+ List messages = getMessageList(responseDocument);
if (UtilValidate.isNotEmpty(messages)) {
result.put("internalRespMsgs", messages);
}
return result;
}
- private static Map processCaptureResponse(Document responseDocument) {
+ private static Map processCaptureResponse(Document responseDocument) {
Element engineDocElement = UtilXml.firstChildElement(responseDocument.getDocumentElement(), "EngineDoc");
Element orderFormElement = UtilXml.firstChildElement(engineDocElement, "OrderFormDoc");
Element transactionElement = UtilXml.firstChildElement(orderFormElement, "Transaction");
Element procResponseElement = UtilXml.firstChildElement(transactionElement, "CardProcResp");
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
String errorCode = UtilXml.childElementValue(procResponseElement, "CcErrCode");
if ("1".equals(errorCode)) {
@@ -466,21 +473,21 @@ public class CCPaymentServices {
result.put("captureFlag", UtilXml.childElementValue(procResponseElement, "Status"));
result.put("captureMessage", UtilXml.childElementValue(procResponseElement, "CcReturnMsg"));
- List messages = getMessageList(responseDocument);
+ List messages = getMessageList(responseDocument);
if (UtilValidate.isNotEmpty(messages)) {
result.put("internalRespMsgs", messages);
}
return result;
}
- private static Map processReleaseResponse(Document responseDocument) {
+ private static Map processReleaseResponse(Document responseDocument) {
Element engineDocElement = UtilXml.firstChildElement(responseDocument.getDocumentElement(), "EngineDoc");
Element orderFormElement = UtilXml.firstChildElement(engineDocElement, "OrderFormDoc");
Element transactionElement = UtilXml.firstChildElement(orderFormElement, "Transaction");
Element procResponseElement = UtilXml.firstChildElement(transactionElement, "CardProcResp");
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
String errorCode = UtilXml.childElementValue(procResponseElement, "CcErrCode");
if ("1".equals(errorCode)) {
@@ -500,21 +507,21 @@ public class CCPaymentServices {
result.put("releaseFlag", UtilXml.childElementValue(procResponseElement, "Status"));
result.put("releaseMessage", UtilXml.childElementValue(procResponseElement, "CcReturnMsg"));
- List messages = getMessageList(responseDocument);
+ List messages = getMessageList(responseDocument);
if (UtilValidate.isNotEmpty(messages)) {
result.put("internalRespMsgs", messages);
}
return result;
}
- private static Map processRefundResponse(Document responseDocument) {
+ private static Map processRefundResponse(Document responseDocument) {
Element engineDocElement = UtilXml.firstChildElement(responseDocument.getDocumentElement(), "EngineDoc");
Element orderFormElement = UtilXml.firstChildElement(engineDocElement, "OrderFormDoc");
Element transactionElement = UtilXml.firstChildElement(orderFormElement, "Transaction");
Element procResponseElement = UtilXml.firstChildElement(transactionElement, "CardProcResp");
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
String errorCode = UtilXml.childElementValue(procResponseElement, "CcErrCode");
if ("1".equals(errorCode)) {
@@ -534,21 +541,21 @@ public class CCPaymentServices {
result.put("refundFlag", UtilXml.childElementValue(procResponseElement, "Status"));
result.put("refundMessage", UtilXml.childElementValue(procResponseElement, "CcReturnMsg"));
- List messages = getMessageList(responseDocument);
+ List messages = getMessageList(responseDocument);
if (UtilValidate.isNotEmpty(messages)) {
result.put("internalRespMsgs", messages);
}
return result;
}
- private static Map processReAuthResponse(Document responseDocument) {
+ private static Map processReAuthResponse(Document responseDocument) {
Element engineDocElement = UtilXml.firstChildElement(responseDocument.getDocumentElement(), "EngineDoc");
Element orderFormElement = UtilXml.firstChildElement(engineDocElement, "OrderFormDoc");
Element transactionElement = UtilXml.firstChildElement(orderFormElement, "Transaction");
Element procResponseElement = UtilXml.firstChildElement(transactionElement, "CardProcResp");
- Map result = ServiceUtil.returnSuccess();
+ Map result = ServiceUtil.returnSuccess();
String errorCode = UtilXml.childElementValue(procResponseElement, "CcErrCode");
if ("1".equals(errorCode)) {
@@ -568,23 +575,23 @@ public class CCPaymentServices {
result.put("reauthFlag", UtilXml.childElementValue(procResponseElement, "Status"));
result.put("reauthMessage", UtilXml.childElementValue(procResponseElement, "CcReturnMsg"));
- List messages = getMessageList(responseDocument);
+ List messages = getMessageList(responseDocument);
if (UtilValidate.isNotEmpty(messages)) {
result.put("internalRespMsgs", messages);
}
return result;
}
- private static List getMessageList(Document responseDocument) {
+ private static List getMessageList(Document responseDocument) {
- List messageList = new ArrayList();
+ List messageList = new ArrayList();
Element engineDocElement = UtilXml.firstChildElement(responseDocument.getDocumentElement(), "EngineDoc");
Element messageListElement = UtilXml.firstChildElement(engineDocElement, "MessageList");
- List messageElementList = UtilXml.childElementList(messageListElement, "Message");
+ List extends Element> messageElementList = UtilXml.childElementList(messageListElement, "Message");
if (UtilValidate.isNotEmpty(messageElementList)) {
- for (Iterator i = messageElementList.iterator(); i.hasNext();) {
- Element messageElement = (Element) i.next();
+ for (Iterator extends Element> i = messageElementList.iterator(); i.hasNext();) {
+ Element messageElement = i.next();
int severity = 0;
try {
severity = Integer.parseInt(UtilXml.childElementValue(messageElement, "Sev"));
@@ -631,7 +638,7 @@ public class CCPaymentServices {
return referenceNum;
}
- private static Document buildPrimaryTxRequest(Map context, String type, BigDecimal amount, String refNum) {
+ private static Document buildPrimaryTxRequest(Map context, String type, BigDecimal amount, String refNum) {
String paymentConfig = (String) context.get("paymentConfig");
if (UtilValidate.isEmpty(paymentConfig)) {
@@ -689,7 +696,7 @@ public class CCPaymentServices {
// TODO: determine if adding OrderItemList is worthwhile - JFE 2004.02.14
- Map pbOrder = (Map) context.get("pbOrder");
+ Map pbOrder = UtilGenerics.checkMap(context.get("pbOrder"));
if (pbOrder != null) {
if (Debug.verboseOn()) Debug.logInfo("pbOrder Map not empty:" + pbOrder.toString(),module);
Element pbOrderElement = UtilXml.addChildElement(orderFormDocElement, "PbOrder", requestDocument); // periodic billing order
@@ -702,16 +709,16 @@ public class CCPaymentServices {
else if (context.get("OrderFrequencyCycle") != null && context.get("OrderFrequencyInterval") != null && context.get("TotalNumberPayments") != null) {
Element pbOrderElement = UtilXml.addChildElement(orderFormDocElement, "PbOrder", requestDocument); // periodic billing order
UtilXml.addChildElementValue(pbOrderElement, "OrderFrequencyCycle", (String) context.get("OrderFrequencyCycle"), requestDocument);
- Element interval = UtilXml.addChildElementValue(pbOrderElement, "OrderFrequencyInterval", (String) pbOrder.get("OrderFrequencyInterval"), requestDocument);
+ Element interval = UtilXml.addChildElementValue(pbOrderElement, "OrderFrequencyInterval", (String) context.get("OrderFrequencyInterval"), requestDocument);
interval.setAttribute("DataType", "S32");
- Element total = UtilXml.addChildElementValue(pbOrderElement, "TotalNumberPayments", (String) pbOrder.get("TotalNumberPayments"), requestDocument);
+ Element total = UtilXml.addChildElementValue(pbOrderElement, "TotalNumberPayments", (String) context.get("TotalNumberPayments"), requestDocument);
total.setAttribute("DataType", "S32");
}
return requestDocument;
}
- private static Document buildSecondaryTxRequest(Map context, String id, String type, BigDecimal amount) {
+ private static Document buildSecondaryTxRequest(Map context, String id, String type, BigDecimal amount) {
String paymentConfig = (String) context.get("paymentConfig");
if (UtilValidate.isEmpty(paymentConfig)) {
@@ -875,17 +882,10 @@ public class CCPaymentServices {
OutputStream os = new ByteArrayOutputStream();
- OutputFormat format = new OutputFormat();
- format.setOmitDocumentType(true);
- format.setOmitXMLDeclaration(true);
- format.setIndenting(false);
-
- XMLSerializer serializer = new XMLSerializer(os, format);
try {
- serializer.asDOMSerializer();
- serializer.serialize(requestDocument.getDocumentElement());
- } catch (IOException ioe) {
- throw new ClearCommerceException("Error serializing requestDocument: " + ioe.getMessage());
+ UtilXml.writeXmlDocument(requestDocument, os, "UTF-8", true, false, 0);
+ } catch (TransformerException e) {
+ throw new ClearCommerceException("Error serializing requestDocument: " + e.getMessage());
}
String xmlString = os.toString();
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java
index 337acc05d7..677407ca49 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/clearcommerce/CCServicesTest.java
@@ -62,6 +62,7 @@ public class CCServicesTest extends OFBizTestCase {
super(name);
}
+ @Override
protected void setUp() throws Exception {
// populate test data
configFile = new String("paymentTest.properties");
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeApi.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeApi.java
index 4636427365..93738f370f 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeApi.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/PcChargeApi.java
@@ -165,6 +165,7 @@ public class PcChargeApi {
return UtilXml.childElementValue(req, name);
}
+ @Override
public String toString() {
try {
return UtilXml.writeXmlDocument(document);
diff --git a/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java b/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java
index a29242d40b..abc71bcc71 100644
--- a/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java
+++ b/applications/accounting/src/org/ofbiz/accounting/thirdparty/gosoftware/RitaApi.java
@@ -148,6 +148,7 @@ public class RitaApi {
return (String) document.get(name);
}
+ @Override
public String toString() {
StringBuilder buf = new StringBuilder();
Iterator i = document.entrySet().iterator();
diff --git a/applications/content/src/ControlApplet.java b/applications/content/src/ControlApplet.java
index 333e877730..d4e7f61111 100644
--- a/applications/content/src/ControlApplet.java
+++ b/applications/content/src/ControlApplet.java
@@ -57,6 +57,7 @@ public class ControlApplet extends Applet implements Runnable {
protected Thread thread = null;
+ @Override
public void init() {
ctx = this.getAppletContext();
this.sessionId = this.getParameter("sessionId");
@@ -106,6 +107,7 @@ public class ControlApplet extends Applet implements Runnable {
}
}
+ @Override
public void destroy() {
this.stopped = true;
}
diff --git a/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java b/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java
index d12231f26b..2e8f8e5b46 100644
--- a/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java
+++ b/applications/content/src/org/ofbiz/content/content/ContentMapFacade.java
@@ -283,6 +283,7 @@ public class ContentMapFacade implements Map {
}
}
+ @Override
public String toString() {
return this.renderThis();
}
@@ -342,6 +343,7 @@ public class ContentMapFacade implements Map {
}
class Content extends AbstractInfo {
+ @Override
public Object get(Object key) {
if (!(key instanceof String)) {
Debug.logWarning("Key parameters must be a string", module);
@@ -372,6 +374,7 @@ public class ContentMapFacade implements Map {
}
class SubContent extends AbstractInfo {
+ @Override
public Object get(Object key) {
if (!(key instanceof String)) {
Debug.logWarning("Key parameters must be a string", module);
@@ -406,6 +409,7 @@ public class ContentMapFacade implements Map {
}
class MetaData extends AbstractInfo {
+ @Override
public Object get(Object key) {
if (!(key instanceof String)) {
Debug.logWarning("Key parameters must be a string", module);
@@ -427,6 +431,7 @@ public class ContentMapFacade implements Map {
}
class DataResource extends AbstractInfo {
+ @Override
public Object get(Object key) {
if (!(key instanceof String)) {
Debug.logWarning("Key parameters must be a string", module);
diff --git a/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java b/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
index 7f8192afbd..3f2a2857a7 100644
--- a/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
+++ b/applications/content/src/org/ofbiz/content/data/DataResourceWorker.java
@@ -393,6 +393,7 @@ public class DataResourceWorker implements org.ofbiz.widget.DataResourceWorkerI
}
/** @deprecated */
+ @Deprecated
public static String getImageType(GenericDelegator delegator, GenericValue dataResource) {
String imageType = null;
if (dataResource != null) {
@@ -715,24 +716,28 @@ public class DataResourceWorker implements org.ofbiz.widget.DataResourceWorkerI
/** @deprecated */
+ @Deprecated
public static String renderDataResourceAsText(GenericDelegator delegator, String dataResourceId, Map templateContext,
GenericValue view, Locale locale, String mimeTypeId) throws GeneralException, IOException {
return renderDataResourceAsText(delegator, dataResourceId, templateContext, locale, mimeTypeId, false);
}
/** @deprecated */
+ @Deprecated
public static void renderDataResourceAsText(GenericDelegator delegator, String dataResourceId, Appendable out,
Map templateContext, GenericValue view, Locale locale, String targetMimeTypeId) throws GeneralException, IOException {
renderDataResourceAsText(delegator, dataResourceId, out, templateContext, locale, targetMimeTypeId, false);
}
/** @deprecated */
+ @Deprecated
public static String renderDataResourceAsTextCache(GenericDelegator delegator, String dataResourceId, Map templateContext,
GenericValue view, Locale locale, String mimeTypeId) throws GeneralException, IOException {
return renderDataResourceAsText(delegator, dataResourceId, templateContext, locale, mimeTypeId, true);
}
/** @deprecated */
+ @Deprecated
public static void renderDataResourceAsTextCache(GenericDelegator delegator, String dataResourceId, Appendable out,
Map templateContext, GenericValue view, Locale locale, String targetMimeTypeId) throws GeneralException, IOException {
renderDataResourceAsText(delegator, dataResourceId, out, templateContext, locale, targetMimeTypeId, true);
@@ -844,24 +849,28 @@ public class DataResourceWorker implements org.ofbiz.widget.DataResourceWorkerI
}
/** @deprecated */
+ @Deprecated
public static String getDataResourceTextCache(GenericValue dataResource, String mimeTypeId, Locale locale, Map context,
GenericDelegator delegator) throws IOException, GeneralException {
return getDataResourceText(dataResource, mimeTypeId, locale, context, delegator, true);
}
/** @deprecated */
+ @Deprecated
public static void writeDataResourceTextCache(GenericValue dataResource, String mimeTypeId, Locale locale, Map context,
GenericDelegator delegator, Appendable outWriter) throws IOException, GeneralException {
writeDataResourceText(dataResource, mimeTypeId, locale, context, delegator, outWriter, true);
}
/** @deprecated */
+ @Deprecated
public static String getDataResourceText(GenericValue dataResource, String mimeTypeId, Locale locale, Map context,
GenericDelegator delegator) throws IOException, GeneralException {
return getDataResourceText(dataResource, mimeTypeId, locale, context, delegator, false);
}
/** @deprecated */
+ @Deprecated
public static void writeDataResourceText(GenericValue dataResource, String mimeTypeId, Locale locale, Map context,
GenericDelegator delegator, Appendable out) throws IOException, GeneralException {
writeDataResourceText(dataResource, mimeTypeId, locale, context, delegator, out, false);
diff --git a/applications/content/src/org/ofbiz/content/search/ContentDocument.java b/applications/content/src/org/ofbiz/content/search/ContentDocument.java
index 1bb027652a..286ee295a1 100644
--- a/applications/content/src/org/ofbiz/content/search/ContentDocument.java
+++ b/applications/content/src/org/ofbiz/content/search/ContentDocument.java
@@ -76,7 +76,7 @@ public class ContentDocument {
// make a new, empty document
doc = new Document();
String contentId = content.getString("contentId");
- doc.add(new Field("contentId", contentId, Store.YES, Index.UN_TOKENIZED, TermVector.NO));
+ doc.add(new Field("contentId", contentId, Store.YES, Index.NOT_ANALYZED, TermVector.NO));
// Add the last modified date of the file a field named "modified". Use
// a
// Keyword field, so that it's searchable, but so that no attempt is
@@ -87,14 +87,14 @@ public class ContentDocument {
modDate = (Timestamp) content.get("createdDate");
}
if (modDate != null) {
- doc.add(new Field("modified", modDate.toString(), Store.YES, Index.UN_TOKENIZED, TermVector.NO));
+ doc.add(new Field("modified", modDate.toString(), Store.YES, Index.NOT_ANALYZED, TermVector.NO));
}
String contentName = content.getString("contentName");
if (UtilValidate.isNotEmpty(contentName))
- doc.add(new Field("title", contentName, Store.YES, Index.TOKENIZED, TermVector.NO));
+ doc.add(new Field("title", contentName, Store.YES, Index.ANALYZED, TermVector.NO));
String description = content.getString("description");
if (UtilValidate.isNotEmpty(description))
- doc.add(new Field("description", description, Store.YES, Index.TOKENIZED, TermVector.NO));
+ doc.add(new Field("description", description, Store.YES, Index.ANALYZED, TermVector.NO));
List ancestorList = FastList.newInstance();
GenericDelegator delegator = content.getDelegator();
ContentWorker.getContentAncestryAll(delegator, contentId, "WEB_SITE_PUB_PT", "TO", ancestorList);
@@ -102,7 +102,7 @@ public class ContentDocument {
//Debug.logInfo("in ContentDocument, ancestorString:" + ancestorString,
// module);
if (UtilValidate.isNotEmpty(ancestorString)) {
- Field field = new Field("site", ancestorString, Store.NO, Index.TOKENIZED, TermVector.NO);
+ Field field = new Field("site", ancestorString, Store.NO, Index.ANALYZED, TermVector.NO);
//Debug.logInfo("in ContentDocument, field:" + field.stringValue(),
// module);
doc.add(field);
@@ -165,7 +165,7 @@ public class ContentDocument {
}
//Debug.logInfo("in DataResourceDocument, text:" + text, module);
if (UtilValidate.isNotEmpty(text)) {
- Field field = new Field("content", text, Store.NO, Index.TOKENIZED, TermVector.NO);
+ Field field = new Field("content", text, Store.NO, Index.ANALYZED, TermVector.NO);
//Debug.logInfo("in ContentDocument, field:" + field.stringValue(), module);
doc.add(field);
}
@@ -188,7 +188,7 @@ public class ContentDocument {
String featureString = StringUtil.join(featureList, " ");
//Debug.logInfo("in ContentDocument, featureString:" + featureString, module);
if (UtilValidate.isNotEmpty(featureString)) {
- Field field = new Field("feature", featureString, Store.NO, Index.TOKENIZED, TermVector.NO);
+ Field field = new Field("feature", featureString, Store.NO, Index.ANALYZED, TermVector.NO);
doc.add(field);
}
return true;
diff --git a/applications/content/src/org/ofbiz/content/search/DataResourceDocument.java b/applications/content/src/org/ofbiz/content/search/DataResourceDocument.java
index 60e0fd6348..058c3cab50 100644
--- a/applications/content/src/org/ofbiz/content/search/DataResourceDocument.java
+++ b/applications/content/src/org/ofbiz/content/search/DataResourceDocument.java
@@ -60,7 +60,7 @@ public class DataResourceDocument {
// make a new, empty document
doc = new Document();
- doc.add(new Field("dataResourceId", id, Store.YES, Index.UN_TOKENIZED, TermVector.NO));
+ doc.add(new Field("dataResourceId", id, Store.YES, Index.NOT_ANALYZED, TermVector.NO));
String mimeTypeId = dataResource.getString("mimeTypeId");
if (UtilValidate.isEmpty(mimeTypeId)) {
@@ -84,7 +84,7 @@ public class DataResourceDocument {
String text = outWriter.toString();
Debug.logInfo("in DataResourceDocument, text:" + text, module);
if (UtilValidate.isNotEmpty(text))
- doc.add(new Field("content", text, Store.NO, Index.TOKENIZED, TermVector.NO));
+ doc.add(new Field("content", text, Store.NO, Index.ANALYZED, TermVector.NO));
return doc;
}
diff --git a/applications/content/src/org/ofbiz/content/search/SearchWorker.java b/applications/content/src/org/ofbiz/content/search/SearchWorker.java
index 6e3af9dde8..7ad8a4a6dd 100644
--- a/applications/content/src/org/ofbiz/content/search/SearchWorker.java
+++ b/applications/content/src/org/ofbiz/content/search/SearchWorker.java
@@ -139,9 +139,9 @@ public class SearchWorker {
// Now create
IndexWriter writer = null;
try {
- writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), false);
+ writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.UNLIMITED);
} catch (Exception e) {
- writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), true);
+ writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.UNLIMITED);
}
//if (Debug.infoOn()) Debug.logInfo("in indexContent, writer:" +
// writer, module);
@@ -189,10 +189,10 @@ public class SearchWorker {
String indexAllPath = getIndexPath(path);
IndexWriter writer = null;
try {
- writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), false);
+ writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.UNLIMITED);
if (Debug.infoOn()) Debug.logInfo("Used old directory:" + indexAllPath, module);
} catch (FileNotFoundException e) {
- writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), true);
+ writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.UNLIMITED);
if (Debug.infoOn()) Debug.logInfo("Created new directory:" + indexAllPath, module);
}
@@ -229,13 +229,13 @@ public class SearchWorker {
String indexAllPath = getIndexPath(path);
IndexWriter writer = null;
try {
- writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), false);
+ writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.UNLIMITED);
} catch (FileNotFoundException e) {
- writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), true);
+ writer = new IndexWriter(indexAllPath, new StandardAnalyzer(), true, IndexWriter.MaxFieldLength.UNLIMITED);
}
indexDataResource(delegator, context, id, writer);
writer.optimize();
- writer.close();
+ writer.close();
}
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/CheckPermissionTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/CheckPermissionTransform.java
index e90777b570..6d76cb15df 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/CheckPermissionTransform.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/CheckPermissionTransform.java
@@ -90,14 +90,17 @@ public class CheckPermissionTransform implements TemplateTransformModel {
return new LoopWriter(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
buf.append(cbuf, off, len);
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public int onStart() throws TemplateModelException, IOException {
List trail = (List)templateCtx.get("globalNodeTrail");
String trailCsv = ContentWorker.nodeTrailToCsv(trail);
@@ -195,6 +198,7 @@ public class CheckPermissionTransform implements TemplateTransformModel {
}
+ @Override
public void close() throws IOException {
FreeMarkerWorker.reloadValues(templateCtx, savedValues, env);
String wrappedContent = buf.toString();
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java
index 7da793da5d..b49441d0b8 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentCacheTransform.java
@@ -122,14 +122,17 @@ public class EditRenderSubContentCacheTransform implements TemplateTransformMode
return new Writer(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
buf.append(cbuf, off, len);
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public void close() throws IOException {
FreeMarkerWorker.reloadValues(templateCtx, savedValues, env);
String wrappedContent = buf.toString();
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentTransform.java
index e66977ee3c..b732c83a4b 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentTransform.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/EditRenderSubContentTransform.java
@@ -161,14 +161,17 @@ public class EditRenderSubContentTransform implements TemplateTransformModel {
return new Writer(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
buf.append(cbuf, off, len);
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public void close() throws IOException {
String wrappedFTL = buf.toString();
if (editTemplate != null && editTemplate.equalsIgnoreCase("true")) {
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java
index 04a43978d3..66decffbab 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/InjectNodeTrailCsvTransform.java
@@ -80,14 +80,17 @@ public class InjectNodeTrailCsvTransform implements TemplateTransformModel {
final String passedCsv = (String)templateCtx.get("nodeTrailCsv");
+ @Override
public void write(char cbuf[], int off, int len) {
buf.append(cbuf, off, len);
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public int onStart() throws TemplateModelException, IOException {
String csvTrail = null;
@@ -160,6 +163,7 @@ public class InjectNodeTrailCsvTransform implements TemplateTransformModel {
}
+ @Override
public void close() throws IOException {
templateCtx.put("nodeTrailCsv", passedCsv);
String wrappedContent = buf.toString();
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java
index f7ca0dd3c9..6254ec6cd0 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/LimitedSubContentCacheTransform.java
@@ -156,16 +156,19 @@ public class LimitedSubContentCacheTransform implements TemplateTransformModel {
return new LoopWriter(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
buf.append(cbuf, off, len);
//StringBuilder ctxBuf = (StringBuilder) templateRoot.get("buf");
//ctxBuf.append(cbuf, off, len);
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public int onStart() throws TemplateModelException, IOException {
List globalNodeTrail = (List) templateRoot.get("globalNodeTrail");
@@ -184,6 +187,7 @@ public class LimitedSubContentCacheTransform implements TemplateTransformModel {
}
}
+ @Override
public int afterBody() throws TemplateModelException, IOException {
FreeMarkerWorker.reloadValues(templateRoot, savedValues, env);
List list = (List) templateRoot.get("globalNodeTrail");
@@ -207,6 +211,7 @@ public class LimitedSubContentCacheTransform implements TemplateTransformModel {
}
}
+ @Override
public void close() throws IOException {
FreeMarkerWorker.reloadValues(templateRoot, savedValuesUp, env);
String wrappedContent = buf.toString();
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java
index 2b4218823b..924cdc5630 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/LoopSubContentTransform.java
@@ -178,14 +178,17 @@ public class LoopSubContentTransform implements TemplateTransformModel {
return new LoopWriter(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
buf.append(cbuf, off, len);
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public int onStart() throws TemplateModelException, IOException {
templateCtx.put("entityIndex", Integer.valueOf(0));
boolean inProgress = prepCtx(delegator, templateCtx);
@@ -196,6 +199,7 @@ public class LoopSubContentTransform implements TemplateTransformModel {
}
}
+ @Override
public int afterBody() throws TemplateModelException, IOException {
boolean inProgress = prepCtx(delegator, templateCtx);
if (inProgress) {
@@ -205,6 +209,7 @@ public class LoopSubContentTransform implements TemplateTransformModel {
}
}
+ @Override
public void close() throws IOException {
String wrappedFTL = buf.toString();
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java
index 847992ccb5..6e3767326d 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAndSubContent.java
@@ -76,13 +76,16 @@ public class RenderContentAndSubContent implements TemplateTransformModel {
return new Writer(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public void close() throws IOException {
renderSubContent();
//if (Debug.verboseOn()) Debug.logVerbose("in Render(2), globalNodeTrail ." + getWrapped(env, "globalNodeTrail") , module);
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java
index 2c01e87640..1e70344810 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentAsText.java
@@ -127,13 +127,16 @@ public class RenderContentAsText implements TemplateTransformModel {
return new Writer(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public void close() throws IOException {
List globalNodeTrail = (List)templateRoot.get("globalNodeTrail");
if (Debug.verboseOn()) Debug.logVerbose("Render close, globalNodeTrail(2a):" + ContentWorker.nodeTrailToCsv(globalNodeTrail), "");
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java
index 9d4c9edf89..8962b8017a 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderContentTransform.java
@@ -66,13 +66,16 @@ public class RenderContentTransform implements TemplateTransformModel {
return new Writer(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public void close() throws IOException {
renderSubContent();
}
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java
index 1e2ed9f39a..ac14c93a31 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentAsText.java
@@ -126,13 +126,16 @@ public class RenderSubContentAsText implements TemplateTransformModel {
return new Writer(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public void close() throws IOException {
List globalNodeTrail = (List)templateRoot.get("globalNodeTrail");
if (Debug.infoOn()) Debug.logInfo("Render close, globalNodeTrail(2a):" + ContentWorker.nodeTrailToCsv(globalNodeTrail), "");
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java
index 514c86a26c..a0d5cf0603 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentCacheTransform.java
@@ -126,13 +126,16 @@ public class RenderSubContentCacheTransform implements TemplateTransformModel {
return new Writer(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public void close() throws IOException {
List globalNodeTrail = (List)templateRoot.get("globalNodeTrail");
//if (Debug.infoOn()) Debug.logInfo("Render close, globalNodeTrail(2a):" + FreeMarkerWorker.nodeTrailToCsv(globalNodeTrail), "");
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java
index 65f751f838..2154920d74 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/RenderSubContentTransform.java
@@ -102,13 +102,16 @@ public class RenderSubContentTransform implements TemplateTransformModel {
return new Writer(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public void close() throws IOException {
try {
renderSubContent();
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java
index d03707ebda..f98ac94d61 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentCacheTransform.java
@@ -138,16 +138,19 @@ public class TraverseSubContentCacheTransform implements TemplateTransformModel
return new LoopWriter(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
//StringBuilder ctxBuf = (StringBuilder) templateContext.get("buf");
//ctxBuf.append(cbuf, off, len);
buf.append(cbuf, off, len);
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public int onStart() throws TemplateModelException, IOException {
//templateContext.put("buf", new StringBuilder());
List nodeTrail = null;
@@ -200,6 +203,7 @@ public class TraverseSubContentCacheTransform implements TemplateTransformModel
}
}
+ @Override
public int afterBody() throws TemplateModelException, IOException {
@@ -221,6 +225,7 @@ public class TraverseSubContentCacheTransform implements TemplateTransformModel
return TransformControl.END_EVALUATION;
}
+ @Override
public void close() throws IOException {
FreeMarkerWorker.reloadValues(templateRoot, savedValuesUp, env);
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java
index 96245d5cd8..c4bf6f8e18 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/TraverseSubContentTransform.java
@@ -155,16 +155,19 @@ public class TraverseSubContentTransform implements TemplateTransformModel {
return new LoopWriter(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
//StringBuilder ctxBuf = (StringBuilder) templateContext.get("buf");
//ctxBuf.append(cbuf, off, len);
buf.append(cbuf, off, len);
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public int onStart() throws TemplateModelException, IOException {
//templateContext.put("buf", new StringBuilder());
List nodeTrail = FastList.newInstance();
@@ -201,6 +204,7 @@ public class TraverseSubContentTransform implements TemplateTransformModel {
}
}
+ @Override
public int afterBody() throws TemplateModelException, IOException {
//out.write(buf.toString());
//buf.setLength(0);
@@ -217,6 +221,7 @@ public class TraverseSubContentTransform implements TemplateTransformModel {
return TransformControl.END_EVALUATION;
}
+ @Override
public void close() throws IOException {
String wrappedFTL = buf.toString();
diff --git a/applications/content/src/org/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java b/applications/content/src/org/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java
index 099b3a75ae..450340864b 100644
--- a/applications/content/src/org/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java
+++ b/applications/content/src/org/ofbiz/content/webapp/ftl/WrapSubContentCacheTransform.java
@@ -137,14 +137,17 @@ public class WrapSubContentCacheTransform implements TemplateTransformModel {
return new Writer(out) {
+ @Override
public void write(char cbuf[], int off, int len) {
buf.append(cbuf, off, len);
}
+ @Override
public void flush() throws IOException {
out.flush();
}
+ @Override
public void close() throws IOException {
FreeMarkerWorker.reloadValues(templateCtx, savedValues, env);
//if (Debug.infoOn()) Debug.logInfo("in Wrap(2), savedValues ." + savedValues , module);
diff --git a/applications/order/src/org/ofbiz/order/order/OrderListState.java b/applications/order/src/org/ofbiz/order/order/OrderListState.java
index 7cb972cf44..e5d207c021 100644
--- a/applications/order/src/org/ofbiz/order/order/OrderListState.java
+++ b/applications/order/src/org/ofbiz/order/order/OrderListState.java
@@ -259,6 +259,7 @@ public class OrderListState {
return orders;
}
+ @Override
public String toString() {
StringBuilder buff = new StringBuilder("OrderListState:\n\t");
buff.append("viewIndex=").append(viewIndex).append(", viewSize=").append(viewSize).append("\n\t");
diff --git a/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java b/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
index 2a5868dfd9..d03070db9a 100644
--- a/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
+++ b/applications/order/src/org/ofbiz/order/order/OrderReadHelper.java
@@ -471,6 +471,7 @@ public class OrderReadHelper {
}
/** @deprecated */
+ @Deprecated
public GenericValue getShippingAddress() {
try {
GenericValue orderContactMech = EntityUtil.getFirst(orderHeader.getRelatedByAnd("OrderContactMech", UtilMisc.toMap(
@@ -513,6 +514,7 @@ public class OrderReadHelper {
}
/** @deprecated */
+ @Deprecated
public GenericValue getBillingAddress() {
GenericValue billingAddress = null;
try {
diff --git a/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java b/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java
index b993812dff..195182b776 100644
--- a/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java
+++ b/applications/order/src/org/ofbiz/order/shoppingcart/product/ProductDisplayWorker.java
@@ -341,6 +341,7 @@ public class ProductDisplayWorker {
return ((Comparable) value).compareTo(value2);
}
+ @Override
public boolean equals(java.lang.Object obj) {
if ((obj != null) && (obj instanceof ProductByMapComparator)) {
ProductByMapComparator that = (ProductByMapComparator) obj;
diff --git a/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java b/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java
index 921f1bf33d..fab61ddebc 100644
--- a/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java
+++ b/applications/order/src/org/ofbiz/order/test/PurchaseOrderTest.java
@@ -39,10 +39,12 @@ public class PurchaseOrderTest extends OFBizTestCase {
super(name);
}
+ @Override
protected void setUp() throws Exception {
userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system"));
}
+ @Override
protected void tearDown() throws Exception {
}
diff --git a/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java b/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java
index 1ffc516c15..caf8dcad75 100644
--- a/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java
+++ b/applications/order/src/org/ofbiz/order/test/SalesOrderTest.java
@@ -37,10 +37,12 @@ public class SalesOrderTest extends OFBizTestCase {
super(name);
}
+ @Override
protected void setUp() throws Exception {
userLogin = delegator.findByPrimaryKey("UserLogin", UtilMisc.toMap("userLoginId", "system"));
}
+ @Override
protected void tearDown() throws Exception {
}
diff --git a/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java b/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java
index 9a08c30f6e..2191058c52 100644
--- a/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java
+++ b/applications/party/src/org/ofbiz/party/contact/ContactMechWorker.java
@@ -48,6 +48,7 @@ public class ContactMechWorker {
public static final String module = ContactMechWorker.class.getName();
/** @deprecated */
+ @Deprecated
public static void getPartyContactMechValueMaps(PageContext pageContext, String partyId, boolean showOld, String partyContactMechValueMapsAttr) {
GenericDelegator delegator = (GenericDelegator) pageContext.getRequest().getAttribute("delegator");
List