Commit Graph
136 Commits
Author SHA1 Message Date
Suraj Khurana 51cb1d7958 Merge branch 'trunk' of https://gitbox.apache.org/repos/asf/ofbiz-plugins into trunk 2020-07-21 12:29:01 +05:30
Suraj Khurana 22ccc6801f Improved: Corrected some single line statements to fix checkstyle issues, also removed some remaining extra spaces from code to avoid checkstyle erros in plugins component.
(OFBIZ-11886)
2020-07-21 12:28:45 +05:30
holivier 7ecfaebc72 Documented: ofbiz-plugins / ebay, migration for Help docbook file to
asciidoc
(OFBIZ-11587)

- ebay.adoc call (with include) other files
2020-07-20 11:48:40 +02:00
Suraj Khurana 2144763bc0 Improved: Corrected all checkstyle formatting issues: 'typecast' is not followed by whitespace in plugins component.
(OFBIZ-11887)
2020-07-18 12:26:04 +05:30
Suraj Khurana e7ead3697f Improved: Corrected all checkstyle formatting issues: Line has trailing spaces in plugins component.
(OFBIZ-11880)
Thanks Jacques for review.
2020-07-13 14:14:42 +05:30
Suraj Khurana b18669cddc Improved: Corrected checkstyle formatting issues, 'is preceded/not preceded with whitespace' for plugins component.
(OFBIZ-11874)
This fixes following checkstyle issues:
'{' is not preceded with whitespace.

'{' is not followed by whitespace.

'}' is not followed by whitespace.

'}' is not preceded with whitespace.

'typecast' is not followed by whitespace.

'try' is not followed by whitespace.

';' is preceded with whitespace.
2020-07-11 14:27:09 +05:30
Pawan Verma 1f97f89bae Improved: Merge identical catch blocks in single catch block(OFBIZ-11827)
In Java SE 7 and later, a single catch block can handle more than one type of exception. This feature can reduce code duplication and lessen the temptation to catch an overly broad exception.

Thanks: Jacques for the review.
2020-06-27 11:24:33 +05:30
Suraj Khurana b4bdfcdf92 Improved: Changed dependency of decimals, rounding static variables as per best practices in ebay component. (#28)
* Improved: Changed dependency of decimals, rounding static variables as per best practices in ebay component.
(OFBIZ-11804)
2020-06-13 14:42:35 +05:30
Suraj Khurana ae31c01fa7 Improved: Change resources with proper naming convention in all plugin components.
(OFBIZ-11739)
Also, made MODULE as private data member of class instead of public. Thanks Jacques for review.
2020-05-29 13:14:02 +05:30
Jacques Le Roux 208ef1b1be Improved: replaces module by MODULE everywhere 2020-04-06 12:14:23 +02:00
Mathieu Lirzin 5ae9892e4e Improved: Inline ‘UtilGenerics#checkList’
(OFBIZ-11141)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1863492 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:22:24 +00:00
Mathieu Lirzin 31fa95fd91 Improved: Inline ‘UtilGenerics#checkMap’
(OFBIZ-11141)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1863491 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:21:23 +00:00
Mathieu Lirzin 6e211a7c2a Improved: Use ‘UtilGenerics#checkCollection’ when possible
(OFBIZ-11141)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1863488 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:17:32 +00:00
Mathieu Lirzin 9354ac2997 Improved: Remove redundant type declarations
(OFBIZ-10937)

Since Java 1.7, when defining generic types it is unnecessary to
redefine those types in the constructor when it is already done in the
declared type.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860025 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 23:42:00 +00:00
Deepak Dixit 5579e37bde Improved: Updated plugin code to fix console warning related to deprecated method. Removed Double constructor call as its depracated since jdk 9. Also replace the CellType::getCellTypeEnum method call with CellTyoe::getCellType
(OFBIZ-10757)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1853904 13f79535-47bb-0310-9956-ffa450edef68
2019-02-19 17:30:35 +00:00
Jacques Le Roux 695301d303 Improved: Fix or Silence various warnings
(OFBIZ-10701)

In order to detect potential issues early, the linting compiler option should be 
used by default and disabled with {{./gradlew -PXlint:none build}}.

Additionally it is important to reduce the number of warnings otherwise new 
warnings will remain unnoticed.

The warning related to the com.googlecode.concurrentlinkedhashmap dependency 
should resolves itself once we handle upgrade to Caffeine like proposed in 
OFBIZ-6747.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
2018-12-11 13:33:49 +00:00
Nicolas Malin 0058d13c54 Implemented: Calculate estimated shipment delivery time
(OFBIZ-10372)
resynchronise ShoppingCart.makeAllShipGroupInfos function on ebay component with trunk at revision 1840579

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1840581 13f79535-47bb-0310-9956-ffa450edef68
2018-09-11 14:49:49 +00:00
Gil Portenseigne bd389e0fd0 Improved : Remove all unnecessary boxing and unboxing in Java classes
(OFBIZ-10504)

Thanks Taher, Jacques, Mathieu and Rishi for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1837578 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 07:36:13 +00:00
Jacques Le Roux 7d9b898e92 Improved: Handle service response effectively
(OFBIZ-9981)

As per discussion on Dev ML:
==========================
Every service calling from java/groovy must handle errors by service util 
methods such as isError, returnError etc. 
and similarly in case of XML <call-service, there should be <check-error/> 
to make sure service was executed successfully.

Apart from this, one suggestion is to include *Debug.logError* in 
*ServiceUtil.returnProblem* so that in case of any error occurred and handled, 
it will always be logged on the console.
==========================

jleroux: this is the plugins part with some slight changes

Thanks: Suraj Khurana and Anushi Gupta

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1819735 13f79535-47bb-0310-9956-ffa450edef68
2017-12-31 12:30:48 +00:00
Jacques Le Roux f22a20c7ab Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

This completes the work done so far by removing double check in cases not using 
brackets, like
if (Debug.verboseOn())
  if (Debug.verboseOn()) Debug.logVerbose()

Forgot to commit those one in plugins :/



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1818530 13f79535-47bb-0310-9956-ffa450edef68
2017-12-18 08:26:33 +00:00
Jacques Le Roux c39cafc697 Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

We discussed on this point: http://markmail.org/message/mplvusuqn7oshl4v 
and we agreed about better doing a check when using Debug.logVerbose().

I checked there are 300+ cases like that. Since it's an easy S/R 
This implements it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1818005 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:43:05 +00:00
Deepak Dixit 1e984db782 Inconsistent String Comparisons, Applied patch for plugins classes.
Thanks Devanshu Vyas for your contribution (OFBIZ-9254)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1812282 13f79535-47bb-0310-9956-ffa450edef68
2017-10-16 10:43:56 +00:00
Divesh Dutta bef0bc4eb3 Improvement: Generic value is null or not should be checked using native checks. Utility method isEmpty or isNotEmpty is not needed to check if generic value is null or not because generic values can never be empty. They can be null or not nulls. So made changes accordingly all over the places.
(OFBIZ-8471)

Thanks: Ratnesh Upadhyay for reporting the improvement and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1768192 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 11:27:46 +00:00
Arun Patidar d24ff76d52 Fixed: Catch GenericEntityException and GenericServiceException and other instead of Exception in Java classes.
(OFBIZ-8909)(OFBIZ-8910)(OFBIZ-8911)(OFBIZ-8912)(OFBIZ-8913)(OFBIZ-8914)(OFBIZ-8915)(OFBIZ-8917)(OFBIZ-8918)(OFBIZ-8919)(OFBIZ-8920)(OFBIZ-8921)(OFBIZ-8922)

Thanks: Divesh Dutta for reporting and Amit Gaadaley for providing patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1768168 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 09:30:07 +00:00
Deepak Dixit 6e9fe7cc0e Fixed: Search Single Transactions From eBay is not working
(OFBIZ-8624)

Thanks Pawan Verma for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1766861 13f79535-47bb-0310-9956-ffa450edef68
2016-10-27 17:15:38 +00:00
Deepak Dixit b3efdbfc73 (OFBIZ-7990) Applied patch from jira issue
=====================================
Add UI labels for success / error messages in ebay component
=====================================
Thanks Tanmay for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1759080 13f79535-47bb-0310-9956-ffa450edef68
2016-09-03 12:11:21 +00:00
Deepak Dixit 8f3141cd46 (OFBIZ-6274) Renamed OFBiz artefacts from org.ofbiz.* to org.apache.ofbiz.*.Thanks to Taher for working on it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Taher A. Alkhateeb 2963cd7188 Migrate ALL java files from /src to /src/main/java - OFBIZ-7790
This is the first of two steps in the above mentioned JIRA. This
first step changes the java source directory for every component
from /src to /src/main/java. The next step will be adding unit
tests to every component in /src/test/java

Thank you to Deepak Dixit for tips on how to use the SVN commands
to make the appropriate file moving.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1752838 13f79535-47bb-0310-9956-ffa450edef68
2016-07-15 14:17:14 +00:00
Jacques Le Roux 91e7b32278 Implements "Can not display product category name in Unicode." https://issues.apache.org/jira/browse/OFBIZ-6739
Rerported by Thanakrit Wongyued
I found problem to display product category name in Unicode (Thai UTF-8) . The problem is services in CategoryContentWrapper are create content mimeType in "text/html". Then i try to fixed this problem by replace "text/html" with "text/html; charset=utf-8". After that i recompile and restart OFBiz the problem is disappear.

jleroux: uses a new defaultMimeType content property, defaulting to "text/html; charset=utf-8", retrieved by EntityUtilProperties.getPropertyValue()


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1716261 13f79535-47bb-0310-9956-ffa450edef68
2015-11-24 21:10:24 +00:00
Jacques Le Roux 4d69546d0d A modified patch from Pierre Smits for "Remove superfluous .properties extension from EntityUtilProperties requests" https://issues.apache.org/jira/browse/OFBIZ-6719
Currently many EntityUtilProperties requests have the .properties extension in the parameters for the resource, but this is not needed as it is stripped later on.

jleroux: I found 5 others, replaced also


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1713985 13f79535-47bb-0310-9956-ffa450edef68
2015-11-12 09:22:38 +00:00
Jacques Le Roux 596359c680 I found a possible XSS attack through ProductContentWrapper.java.getProductContentAsText() which is notably used in several FTL files. This exists also in others *ContentWrapper.java.
Note that in supported releases it's hard to exploit, it's a Stored XSS https://www.owasp.org/index.php/Types_of_Cross-Site_Scripting which means you need 1st to somehow inject exploiting code in the DB.

This fixes it by changing the ContentWrapper interface
from
    public interface ContentWrapper {
        public StringUtil.StringWrapper get(String contentTypeId);
    }
to
    public interface ContentWrapper {
        public StringUtil.StringWrapper get(String contentTypeId, String encoderType) {
    }

And changing the Category, Party, Product, ProductPromo and WorkEffort ContentWrapperS accordingly. This means to use 2 types of encoderTypes: "html" and "url".
The "html"  encoderType will be used for all ProductContentTypes but those who contain URL in their ContentTypeIdS (actually end with, "_URL") which will use "url" encoderType.
It concerns not only the get() method but also methods like getPartyContentAsText(), getProductContentAsText(), etc.

It seems a big change but it's straightforward. It's normally complete. 

There are some (unrelated) tabs replaced by spaces here and there, and few trailing spaces removed but nothing big

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1705329 13f79535-47bb-0310-9956-ffa450edef68
2015-09-25 16:27:12 +00:00
Nicolas Malin 1e3600618d Convert javolution FastMap, FastSet and FastList by standard java.util.*
Related to OFBIZ-5781 Convert Javolution collections into Java collections
Thanks to Deepak Dixit and Adrian Crum for their help.

By defautl converted :
 * FastMap by HashMap
 * FastList by LinkedList
 * FastSet by HashSet

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1672752 13f79535-47bb-0310-9956-ffa450edef68
2015-04-10 20:22:54 +00:00
Adrian Crum d504b6ffde Fix warnings in trunk in Java source code - https://issues.apache.org/jira/browse/OFBIZ-6217.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1669537 13f79535-47bb-0310-9956-ffa450edef68
2015-03-27 10:04:14 +00:00
Jacopo Cappellato 7def4558d6 Moved code dependent on OWASP ESAPI and utilities for codec tasks from StringUtil to a new UtilCodec class: now the UtilCodec class is the only class dependent on OWASP ESAPI.
The DefaultEncoder from OWASP ESAPI, used internally by UtilCodec is now built with the default constructor that also adds the JavascriptCodec to the list of codecs used to canonicalize and validate the input.
Renamed the UrlEncoder class to UrlCodec in order to better describe its behavior.
Misc minor cleanups.
Added to the list of tests of the base component a series of Junit test classes that were missing.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1648403 13f79535-47bb-0310-9956-ffa450edef68
2014-12-29 18:24:57 +00:00
Ashish Vijaywargiya b06039daf6 Applied patch from jira issue - OFBIZ-5902 - Fetch configurable settings data driven by replacing UtilProperties.getPropertyValue() method with EntityUtilProperties.getPropertyValue(). Thanks so much Arun for this important contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1644015 13f79535-47bb-0310-9956-ffa450edef68
2014-12-09 10:09:22 +00:00
Ashish Vijaywargiya 8a138d9992 Applied patch from jira issue OFBIZ-5844 - Convert java files to EntityQuery.
Thanks Arun for the contribution. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1642398 13f79535-47bb-0310-9956-ffa450edef68
2014-11-29 08:00:37 +00:00
Scott Gray bc6d579570 Regex search/replace for delegator.findOne() to EntityQuery.queryOne()
Apologies for the large commit.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1635383 13f79535-47bb-0310-9956-ffa450edef68
2014-10-30 04:18:05 +00:00
Jacques Le Roux abf0b0bd69 An enhanced patch from John McDonald for "Customer's Shipment Address Not Assigned to Dropship Purchase Orders" https://issues.apache.org/jira/browse/OFBIZ-3883
When buying drop ship products from the demo store the customer's shipping address is not saved with the purchase order, so the shipping address cannot be provided to the drop ship supplier. 

Steps to Reproduce:
* From the DropShip Category add "DropShip from BigSupplier" and "DropShip from DemoSupplier" to your cart. 
* Login as admin
* Use the one page checkout to order the products

Resulting Order: 
https://demo-trunk.ofbiz.apache.org:8443/ordermgr/control/orderview?orderId=WSCO10002
The purchase orders WS10003 and WS10004 are associated correctly with the order items, but as the shipping groups don't have addresses, the purchase orders don't have either.

Expectation:
All Shipment groups should have the shipping address assigned.

Actual:
Only the first shipment group has the shipping address assigned. 


jleroux: thanks to Paul Foxworthy's help I rather removed than deprecate the old methods and replaced them where relevant

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1407116 13f79535-47bb-0310-9956-ffa450edef68
2012-11-08 15:15:04 +00:00
Adam Heath 123e69b53f DEPRECATION: specialpurpose: GenericValue.getRelated(ByAnd|OrderBy)(|Cache)
replaced by the single getRelated variant.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1343530 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:21:13 +00:00
Adam Heath a5352e0565 DEPRECATION: specialpurpose/ebay: findByAnd variants replaced with findByAnd that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1338413 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 21:02:19 +00:00
Adam Heath 60ae46f59d DEPRECATION: specialpurpose/ebay: findByPrimaryKey variants replaced
with findOne

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1337674 13f79535-47bb-0310-9956-ffa450edef68
2012-05-12 21:20:38 +00:00
Hans Bakker b0597a399b get default currency from entity and if not available from general.properties
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1294940 13f79535-47bb-0310-9956-ffa450edef68
2012-02-29 02:01:29 +00:00
Marco Risaliti e7d6a78e40 Remove some reduntant cast warning in ebay component (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1081078 13f79535-47bb-0310-9956-ffa450edef68
2011-03-13 11:36:21 +00:00
Marco Risaliti 2edf34dd98 Remove all compilation warnings of ShoppingCart/ShoppingCartItem and related invoked methods (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1068103 13f79535-47bb-0310-9956-ffa450edef68
2011-02-07 20:29:21 +00:00
Marco Risaliti 7b39c5d21f Internationalization of java services for ebay component and remove a java compile warning (OFBIZ-4091)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1063459 13f79535-47bb-0310-9956-ffa450edef68
2011-01-25 21:00:03 +00:00
Jacques Le Roux dcf0745558 A patch from Arun Patidar "Some misc issues in ebayStore component." (https://issues.apache.org/jira/browse/OFBIZ-4118) - OFBIZ-4118
one more patch to fix following issues in ebay and ebayStore components
1 Fixed issue of set complete order status in ebay when we complete order in ofbiz.
2 Created record of OrderPaymentPreference in PAYMENT_RECEIVED status.
3 Updated qty of cart item, if same product is adding again in cart during import order from ebay.
4 Set transactionId in cart.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1063265 13f79535-47bb-0310-9956-ffa450edef68
2011-01-25 13:23:19 +00:00
Jacques Le Roux 543686d499 A patch from Norbert Rieger "NPE in EbayOrderServices.createShoppingCar" (https://issues.apache.org/jira/browse/OFBIZ-3926) - OFBIZ-3926
Due to missing property "stateProvinceGeoId" in shippingAddressCtx the following call raises an NPE (EbayOrderServices.createShoppingCart, line 1118ff):

List<GenericValue> shipInfo = PartyWorker.findMatchingPersonPostalAddresses(delegator, shippingAddressCtx.get("shippingAddressStreet1").toString(),
(UtilValidate.isEmpty(shippingAddressCtx.get("shippingAddressStreet2")) ? null : shippingAddressCtx.get("shippingAddressStreet2").toString()), shippingAddressCtx.get("city").toString(),
shippingAddressCtx.get("stateProvinceGeoId").toString(), shippingAddressCtx.get("shippingAddressPostalCode").toString(), null, shippingAddressCtx.get("countryGeoId").toString(), firstName, null, lastName);

Checking whether the property is set (not empty) will solve this.

JLR: Norbert did the same for shippingAddressStreet2. I did not check if others were missing, hopefully there are none...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1062762 13f79535-47bb-0310-9956-ffa450edef68
2011-01-24 13:12:02 +00:00
Jacques Le Roux 905bfde351 A patch from Arun Patidar "Some misc issues in ebayStore component." (https://issues.apache.org/jira/browse/OFBIZ-4118) - OFBIZ-4118
One more patch for setting shipping method in ofbiz order during import order by ebayStore component. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1062152 13f79535-47bb-0310-9956-ffa450edef68
2011-01-22 13:15:36 +00:00
Jacques Le Roux 6195a7ee3c A patch from Arun Patidar "Some misc issues in ebayStore component." (https://issues.apache.org/jira/browse/OFBIZ-4118) - OFBIZ-4118
Patch for an issue in ebay component. Ebay category code may have more than 3 character so removed condition of ebay category code length. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1061346 13f79535-47bb-0310-9956-ffa450edef68
2011-01-20 15:32:04 +00:00
Scott Gray d1d8905fef Remove unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk/specialpurpose@1044931 13f79535-47bb-0310-9956-ffa450edef68
2010-12-12 21:31:27 +00:00