(OFBIZ-10691)
Unecessary ‘this’ has been removed and the javadoc has been
expanded. The visibility of the class has been reduced to package
only. The ‘conditionList’ field has been renamed to ‘conditions’ and
the subclasses has been adapted.
Thanks Mathieu for the contribution
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850385 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10691)
Remove useless ‘this’ and useless imports. An ‘isNullField’ private
method has been addded to factorize the check of null field.
Additionally the 120 characters per line limit has been enforced.
Thanks Mathieu for the contribution
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850384 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10691)
This class is now final. The ‘getConditionListSize’ and
‘getConditionIterator’ methods has been inlined instead of overidding
them from ‘EntityConditionListBase’. The Javadoc has been expanded.
Thanks Mathieu for the contribution
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850377 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10691)
‘EntityConditionFunction’ was representing an expression containing a
unary prefix condition operator or in other words a one argument
predicate. Actually, there exists only one meaningful implementation
for this kind of operators in the SQL language which is the NOT·
predicate. Having a ‘EntityNotCondition’ class allows us to have
simpler semantics while achieving the same completeness in term of SQL·
support.
The ‘EntityConditionVisitor’ and its documentation has been adapted to
the new class hierarchy.
Thanks Mathieu for the contribution
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850376 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10691)
This is done in the spirit of favouring abstraction over
implementation. To achieve that the following change has been made:
* The useless ‘EntityCondition#eval’ methods has been removed
* The ‘PriceServices#calculatePurchasePrice’ method has been fixed to
refer to ‘EntityCondition#makeCondition’ instead of
‘EntityExpr#makeCondition’.
Additionally, the genericity of the ‘makeCondition’ methods has been
improved to allow having a hierarchy of class between the
‘EntityCondition’ type and the subtypes.
Exceptionally a ‘serialVersionUID’ has been used instead of
suppressing the 'serial' warning for the ‘EntityCondition’ interface
to satisfy both Eclipse and OpenJDK linting features which disagree on
the validity of using the ‘@SuppressWarnings’ annotation in the case
of interfaces extending ‘Serializable’.
Thanks Mathieu for the contribution
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850373 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10691)
This is removing an abuse of inheritance for code reuse which was·
breaking Liskov substitution principle. This has been achieved with
the following changes:
* The ‘Serializable’ interface which was implemented by
‘EntityConditionBase’ is now implemented directly by the·
‘EntityCondition’, ‘EntityConditionValue’, and ‘EntityOperator’
classes.
* ‘emptyList’ and ‘_emptyMap’ useless static members has been removed
and ‘emptyAliases’ has been move down to the ‘EntityConditionValue’
subclass.
* The ‘castBoolean’ method has been removed due to the automatic
boxing/unboxing of boolean and Boolean values which make it useless.
* ‘equals’ and ‘hashCode’ pseudo abstract methods (meaning methods
throwing an unsupported operation exception) has been moved down to
the ‘EntityCondition’ and ‘EntityConditionValue’ sub classes.
‘Objects#equals’ and ‘Objects#hashCode’ standard methods has been
used in the EntityCondition class hierarchy instead.
* The ‘getColName’ methods has been moved down to the·
‘EntityConditionValue’ class which is the unique class using those
methods.
* The remaining static methods ‘getField’ and ‘addValue’ has been
moved to a new ‘EntityConditionUtils’ class. The unused override of
‘addValue’ has been removed which allowed us to make this method
static.
Thanks Mathieu for the contribution
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850372 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10763)
The use of an overridden abstract method for isEncrypted is a bit overkill and
could be replaced by a simple equality check
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850253 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10761)
Remove deprecated entity fields deprecated for more 10 years and without impact with source code
Add since deprecate release on comment for PartyAcctgPreference definition and demo data to help the next analyse
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850182 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10449)
various improvements:
* Inheriting from HttpFilter instead of implementing Filter
* Using streams when getting the allowed paths
No functional change
Thanks to Mathieu Lirzin for this refactoring
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850171 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10689)
Actually this is a firts step that simply renames
ObjectType::simpleTypeConvert to
ObjectType::simpleTypeOrObjectConvert
and improves the simpleTypeOrObjectConvert Javadoc
Thanks: Pierre Smits for report, Deepak Dixit for discussion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850027 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-3907)
Completes initial work from Sascha Rodekamp
Returns promoName then promoText if promoName absent then and
"No promotion name nor text" if either are present.
We lose the information in promoText but at least it's correctly rendered in
invoices PDF and accounting component.
Thanks: Scott for report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850023 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10756)
Fixes CVE-2018-17200
We currently use the UnsupportedClassConverter method in UtilXml class.
When the 1.5 version of XStream will be available another way to handle this
kind of things will be available and used by default. It's already possible to
use the same with the 1.4 version of XStream with its setupDefaultSecurity method.
So this replaces the UnsupportedClassConverter in UtilXml class by
XStream::setupDefaultSecurity method.
It's an improvement but better to backport it as much as possible
The UtilXmlTests class and its use is removed and the UnsupportedClassConverter
method deprecated (no use OOTB)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850015 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10553) (OFBIZ-9350)
Convert all QuoteServices.xml and their xml test
Thanks to Antoine Ouvrard, Leila Mekika, Gil Portenseigne and Mathieu Lirzin for this team work to convert all function and tests case
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849800 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10725)
Improved boolean returns with a single statement, replacing if blocks with the explicit boolean return.
Improves code in methods:
isPrimaryKey() of GenericEntity
hasNext() and hasPrevious() of EntityListIterator
isValueActive() of EntityUtil
Additional change:
Improved return for getStartIndexFromViewIndex() method in EntityUtil. Instead of using if-else block, a ternary operator is used for improving readability.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849741 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10744)
It was due to missing default entity name in service definition while using entity-auto.
Thanks Ayushi Rathod for reporting the issue and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849740 13f79535-47bb-0310-9956-ffa450edef68
EntityQuery
(OFBIZ-9890)
queryList() and queryFirst() both call internal private query() method.
This method calls delegator.findList if a normal Entity/ViewEntity is used
(not a DVE).
DVE has no option to include a having condition and so must opt to use
queryIterator(). Even queryCount() can use a having condition.
Thanks: Rupert Howell and Gareth Carter for report, Prakhar Kumar for discussion
and Gareth Carter for the fix
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849693 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10745)
Improves code in isPaymentMethodType() and isValidateGCFinAccount().
Improved boolean returns with single statement, replacing if blocks with explicit boolean return.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849688 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10728)
Improved boolean returns with single statement, replacing if blocks with explicit boolean return.
Improves code in isGiftCard().
Thanks Suraj Khurana for the review.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849673 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10745)
Improved boolean returns with single statement, replacing if blocks with explicit boolean return.
Thanks Suraj Khurana and Jacques Le Roux for the review.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849672 13f79535-47bb-0310-9956-ffa450edef68
Set Billing screens of ordermgr.
(OFBIZ-10681)
If you create an EFT account from the quick finalyse page, at
ordermgr/control/createPostalAddress the US states which are proposed by default
are not the US states but all states.
You still can pick one US state, but it's counter intuitive.
Thanks: Aman Mishra for the fix and finding of Set Billing screen
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849567 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10111)
While if we add an existing event it is listed in the WorkEffort component
Thanks, Rubia Elza Joshep and Pradeep Choudhary for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849528 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10713)
The table header in the box containing the list of config options on top of the page Config Options has for the first column the title Config Item, it should be Config Option instead.
Thanks Sebastian Wachinger for reporting and Anushi Gupta for providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849522 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10580)
Parties which are under the selected classification group should only be listed, there was code missing on groovy to handle this.
Thanks Anushi Gupta for reporting, Saurabh Dixit for providing the patch and Jacques Le Roux for reviewing it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849518 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10588)
createUpdateBillingAddress and createUpdateShippingAddress services create incorrect
PartyContactMechPurpose records with userLogin.partyId.
These services works well in case of when e-commerce logged-in user perform these operation.
But in-correct data is created by these services if called from admin or any other user.
I called createUpdateBillingAddress service from webtools and and didn't get desired results.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849514 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10721)
stats related entities foreign key relation has been removed by Jacopo at r#1647271 and new group org.apache.ofbiz.stats introduced for stats related entity. Some remnants were still left in stats entities.
Removed relations of Party, ContactMech and Content from ServerHit entity.
Removed relations of Content from ServerHitBin entity.
Removed relations of UserLogin from Visitor entity.
Thanks Jacques Le Roux and Deepak Dixit for the review.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1849275 13f79535-47bb-0310-9956-ffa450edef68