(OFBIZ-11100)
Since there is no global container configuration file anymore this
method should not be used. It has been superseded by an overload
which do not require to pass the file name of the configuration file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863020 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10939)
The ‘@Override’ annotation helps readers understand that the method at
hand is overriding a super class or implementing an interface.
Additionally it allows the compiler to check if the methods annotated
with ‘@Override’ are actually implementing an abstract method.
Using that annotation makes ‘@see foo.bar.ParentClass#myMethod’
comments useless, so those they have been removed for the newly
annotated methods.
Thanks Jacques Le Roux and Swapnil M Mane for acknowledging the commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858295 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10937)
Since Java 1.7, when defining generic types it is unnecessary to
redefine those types in the constructor when it is done in the
declared type.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857906 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10818)
Set transaction timeout of 2hrs for the actual data transmission services.
Removed unwanted service updateEntitySyncRunning
Called the tracking and status update services in new transaction so that record can be maintain after current transaction rollback
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1852587 13f79535-47bb-0310-9956-ffa450edef68
places
(OFBIZ-10812)
While reviewing OFBIZ-10811 I found that I could improve ObjectType class on 2
points:
doRealCompare returning null instead of a boolean
simpleTypeOrObjectConvert Javadoc (2 other instance not documented)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851363 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10760)
This fixes an engine declaration mistake introduced in OFBIZ-9111,
removes an unused service which should have been deleted in OFBIZ-8722
and removes unused services which should have been deleted in
OFBIZ-10146.
Thanks Mathieu Lirzin for reporting and providing the patches.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851158 13f79535-47bb-0310-9956-ffa450edef68
(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-framework/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10488)
Since Java 8 it is possible to instantiate functional interfaces
(interfaces with one non-static method) with lambda expressions instead
of anonymous classes.
This replaces the creation of callable objects with lambda expressions.
Thanks: Mathieu Lirzin
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848514 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10390)
No functional changes while working on EntitySync-manual.adoc and checking the
opportunity of existing debug log (it's a bit verbose, but it's OK as is)
Simply uses a multi-catch where possible
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832411 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10390)
The current EntitySync documentation in wiki is POS oriented so somehow
deprecated.
I have recently worked on a project with EntitySync and collected as much
possible information.
I also got David E. Jones's agreement to reuse the part on EntitySync in his
2006 "Apache OFBiz Advanced Framework - Training Video Transcription" document.
So this is a new replacing asciidoc document, it's a WIP...
Thanks: David for agreement on reusing his doc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830972 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10282)
Thanks to Arun Patidar for reporting and review.
Thanks to Suraj Khurana for providing patch for the improvement.
Thanks to Jacques for discussion and finalizing the work.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830545 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10052)
This completes r1818020, there were still few cases, a last review is never too
much
In PriceServices, I spotted
for (GenericValue orderItemPriceInfo: orderItemPriceInfos) {
if (Debug.verboseOn()) Debug.logVerbose(" --- " + orderItemPriceInfo
but it's OK with me, this should be rarely used, so not a perf issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818075 13f79535-47bb-0310-9956-ffa450edef68
org.apache.ofbiz.entityext.data.
(OFBIZ-9721)
The changes for EntityDataLoadContainer had to be applied manually
because of changes made in between.
Thanks Julian Leichert for reporting and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817566 13f79535-47bb-0310-9956-ffa450edef68
We have enabled flag in EntityEcaRule class, if its set false then entity eca rule will not be execute.
But there is not way to disable entity eca.
We can add enabled flag in Entity ECA definition to disable the existing entity eca rule.
Add new attribute on entity eca tag named enabled
Default value will be true for this.
If user want to disable existing OOTB entity eca rule, then user can define same rule in custom component and set the enabled=false
Also as per current flow if same seca rule is define more then once, system will execute all the rule, ideally it should not execute same rule (same rule, condition and action) if its defined more than one.
Also need to ovride hasCode, equals and toString method for EntityEcaRule, EntityEcaAction and EntityEcaCondition class file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814160 13f79535-47bb-0310-9956-ffa450edef68
Consistency on the attribute order for make-value element as : entity-name, value-field
Thanks to Ankush Upadhyay and Devanshu Vyas for the issue and the corrective patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805956 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9441)
A major refactoring patch that applies the following changes:
- Fully refactor the EntityDataLoadContainer
- Fully refactor the TestRunContainer
- In both above mentioned containers the logic is broken up into smaller
methods to enhance code readability. It also changes the signature of
the method calls to rely on StartupCommand instead of String[] arrays
- Remove most old documentation and commented out code where applicable
- Delete the StratupCommandToArgsAdapter as it is no longer needed
- Create a new feature in which OFBiz by default fails if any data file
fails to load. This can be overridden by passing a flag called
"continue-on-failure" e.g. ./gradlew "ofbiz --load-data continue-on-failure"
- Add a new property to --test called "loglevel" (old code but working properly)
- Add many new properties to the --load-data command including repair-columns,
try-inserts, maintain-txs, etc ... These properties are old, but somehow
did not make it into the command line arguments. This code is now exposed
through the command line to set a direction in the future of whether to
keep or delete these extra commands
- Update the documentation output of ./gradlew "ofbiz --help" to incorporate
the new mentioned properties
- Refactor README.md to incorporate the changes to the gradle commands for both
"-load-data" and "-test" properties. Also remove the gradle GUI
documentation as it is now deprecated.
- Also refactor README.md in other locations to cleanup and make it more
consistent. This icludes moving long notes into new sections and reducing
the verbosity of the security header. Furthermore, created a new header
called Miscellaneous documentation to house the newly created sections
- lots of small changes to remove EOL white space
Thanks: Jacques Le Roux for reviewing and testing
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805947 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9571)
No functional change.
We read at http://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html :
<<Using the integer fields in this class (such as ROUND_HALF_UP) to represent
rounding mode is largely obsolete; the enumeration values of the RoundingMode
enum, (such as RoundingMode.HALF_UP) should be used instead.>>
That's an easy global replacement. But it also needs to import the RoundingMode
class. It was 26 files so I decided to rather clean all the imports in all files
with the help of Eclipse.
This is a 1st step. I will need to closely look at 2 special class: UtilNumber
and Calculate.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804953 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9385)
This is an improvement only because no cases were reported. But obviously in
case of unlucky exception after the EntityListIterator creation and before it's
closed the EntityListIterator remains in memory.
It should be closed in EntityListIterator.finalize() but the less happens there
the better.
The solution is to use try-with-ressources when possible
This completes OFBIZ-9385, there are no other cases left.
There are few methods like FindServices.executeFind() or performFindParty
service which can't be improved because they return an EntityListIterator.
So methods using them must be carefully crafted to close the EntityListIterator.
Most where already documented (in the framework). I completed few in
applications at r1798495
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798566 13f79535-47bb-0310-9956-ffa450edef68
<<With code like the above, I think that embedding everything in the try
clause makes the code a bit less readable. One option would be to split the
entity query code in two lines>>
I used this suggestion on all locations it made sense. In few places it was
better to let it as is; separating would rather make the code a bit less
readable.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1788263 13f79535-47bb-0310-9956-ffa450edef68