Commit Graph
292 Commits
Author SHA1 Message Date
Suraj Khurana f637e3c5fe Improved: Converted all EntitySyncInclude services from simple to entity-auto (#84)
* Improved: Converted all EntitySyncInclude services from simple to entity-auto
(OFBIZ-11613)
2020-04-30 13:14:26 +05:30
Jacques Le Roux ddb8f4273a Improved: replaces module by MODULE everywhere 2020-04-05 19:46:34 +02:00
Jacques Le Roux 28b658e260 Improved: Equivalent of svn:auto-props properties on the server
(OFBIZ-OFBIZ-11279)

As explained at https://s.apache.org/i86ht

This is needed after b424d2683e
2019-12-19 13:19:59 +01:00
Mathieu Lirzin aae1c8a8f5 Reverted: "Improved: Use ‘depends-on’ attribute instead of “component-load.xml”"
(OFBIZ-11296)

This reverts commit eeabe69813.
2019-12-18 12:09:20 +01:00
Mathieu Lirzin eeabe69813 Improved: Use ‘depends-on’ attribute instead of “component-load.xml” (OFBIZ-11296)
We currently have two ways to define component loading order. Either
by using ‘depends-on’ attribute in “component-config.xml” or by adding
a “component-load.xml” file at the root of a component directory.

“depends-on” is more flexible because it handles partial ordering when
“component-load.xml” defines a total order which is not necessarily
meaningful, so it is better to rely only “depends-on”.

This removes the usage of “component-load.xml” to use ‘depends-on’
instead. The dependency declarations correspond to the total ordering
previously defined but will need to be refined in the future to relax
unnecessary dependency declarations.

Only “framework/base/config/component-load.xml” which defines the
top-level directories order (framework, applications, themes and
plugins) is kept.
2019-11-25 15:28:54 +01:00
Mathieu Lirzin 2c686c4655 Improved: Avoid unecessary breakage in ‘ContainerConfig’
(OFBIZ-11256)

This restores ‘public’ modifiers on fields and move the ‘Property’
inner class back to ‘Configuration’ to avoid breakage of client code
extending the ‘Container’ interface.

In order to smooth the transition towards using getters instead of
direct field accesss, the public modifiers on fields are now marked as
deprecated.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868628 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 14:27:01 +00:00
Mathieu Lirzin 7e7ccba7b3 Improved: Refactor ‘ContainerConfig’ class
(OFBIZ-11256)

This removes some code duplication, make things immutable and add some javadoc.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868601 13f79535-47bb-0310-9956-ffa450edef68
2019-10-18 19:46:32 +00:00
Mathieu Lirzin 60f7041c3d Improved: Use ‘Path’ for component config ‘rootLocation’ attribute
(OFBIZ-11192)

The method ‘ComponentConfig#getRootLocation’ has been removed
and replaced by ‘ComponentConfig#rootLocation’.

The callers have been adapted.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868028 13f79535-47bb-0310-9956-ffa450edef68
2019-10-05 16:20:32 +00:00
Mathieu Lirzin 1b34cf7982 Improved: Inline ‘UtilValidate#areEqual’
(OFBIZ-11172)

‘Objects#equals’ is already providing the same functionality of ‘null’
safe equality check.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1865843 13f79535-47bb-0310-9956-ffa450edef68
2019-08-24 12:52:12 +00:00
Mathieu Lirzin 7999e3adc1 Improved: Remove useless imports
(OFBIZ-11142)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863507 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 18:45:21 +00:00
Mathieu Lirzin fc6f9023d2 Improved: Use ‘StandardCharsets.UTF_8’
(OFBIZ-11142)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863505 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 18:41:37 +00:00
Mathieu Lirzin e9a56a78e5 Improved: Inline ‘UtilGenerics#checkList’
(OFBIZ-11141)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863501 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:35:13 +00:00
Mathieu Lirzin c2e2c3fb15 Improved: Make ‘UtilGenerics#checkCollection(Object, Class)’ more generic
(OFBIZ-11141)

Remove ‘checkList’, ‘checkSet’ and ‘checkStack’ by using
‘checkCollection’ instead.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863489 13f79535-47bb-0310-9956-ffa450edef68
2019-07-20 16:18:23 +00:00
Mathieu Lirzin 16ee111ec3 Improved: Deprecate ‘ContainerConfig#getConfiguration(String, String)’
(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
2019-07-13 21:38:51 +00:00
Mathieu Lirzin e2c85737e4 Improved: Add static modifiers in ‘EntityDataLoadContainer’
(OFBIZ-11070)

When no reference to ‘this’ is made, it is better to declare methods
as static.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860838 13f79535-47bb-0310-9956-ffa450edef68
2019-06-08 14:59:02 +00:00
Mathieu Lirzin 8b2de5fae2 Improved: Rewrite ‘EntityDataLoadContainer#isDataReadersEnabled’
(OFBIZ-11070)

Use a boolean expression instead of a conditional.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860837 13f79535-47bb-0310-9956-ffa450edef68
2019-06-08 14:57:08 +00:00
Mathieu Lirzin 0a465fa748 Improved: Rewrite ‘EntityDataLoadContainer#isPropertySet’
(OFBIZ-11070)

Use a boolean expression instead of a conditional.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860836 13f79535-47bb-0310-9956-ffa450edef68
2019-06-08 14:54:38 +00:00
Jacques Le Roux 87fc949af8 Reverted: Refactor EntityDataLoadContainer
(OFBIZ-11070)

There is something wrong with Mathieu's changes, reverting all for now


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860113 13f79535-47bb-0310-9956-ffa450edef68
2019-05-27 09:29:28 +00:00
Mathieu Lirzin 07406d341d Improved: Add static modifiers in ‘EntityDataLoadContainer’
(OFBIZ-11070)

When no reference to ‘this’ is made, it is better to declare methods
as static.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860064 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 12:40:21 +00:00
Mathieu Lirzin 655f19c2fa Improved: Inline ‘EntityDataLoadContainer#getLoadFiles’
(OFBIZ-11070)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860063 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 12:35:13 +00:00
Mathieu Lirzin b71cd98911 Improved: Rewrite ‘EntityDataLoadContainer#isDataReadersEnabled’
(OFBIZ-11070)

Use a boolean expression instead of a conditional.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860062 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 12:33:13 +00:00
Mathieu Lirzin 388f4c8b52 Improved: Rewrite ‘EntityDataLoadContainer#isPropertySet’
(OFBIZ-11070)

Use a boolean expression instead of a conditional.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860061 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 12:31:19 +00:00
Mathieu Lirzin b37e315aef Improved: Use the ‘@Override’ annotation
(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
2019-04-27 19:34:25 +00:00
Mathieu Lirzin 5982be8161 Improved: Remove unnecessary declared exceptions for ‘ContainerException’
(OFBIZ-10938)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857913 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 14:22:36 +00:00
Mathieu Lirzin 990c8a3aab Improved: Remove redundant specification of type arguments
(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
2019-04-21 12:49:52 +00:00
Arun Patidar 8ef6a2b7ac Fixed: Services of EntitySync Push and Pull functionalities
(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
2019-01-31 11:54:45 +00:00
Arun Patidar 6ae8fe69b8 Fixed: EntitySync Push and Pull functionalities
(OFBIZ-10818)

Removed unneccessary service implementation and used entity-auto
Fixed some create/update code block in the flow

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851805 13f79535-47bb-0310-9956-ffa450edef68
2019-01-22 11:51:46 +00:00
Jacques Le Roux 6393eca331 Improved: ObjectType::doRealCompare returns null instead of a boolean in few
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
2019-01-15 14:22:31 +00:00
Michael Brohl acbfbfda3f Fixed: Errors and warnings in webtools' ArtifactInfo
(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
2019-01-12 11:25:50 +00:00
Jacques Le Roux bbfc62d47a 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-framework/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
2018-12-11 13:33:49 +00:00
Jacques Le Roux 13f8b82f51 Improved: Replace Callable objects with lambda expressions
(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
2018-12-09 13:04:23 +00:00
Gil Portenseigne ceea6ce791 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-framework/trunk@1837577 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 07:30:43 +00:00
Jacques Le Roux 16ad1e4870 Improved: New documentation for EntitySync
(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
2018-05-28 17:34:20 +00:00
Rishi Solanki bc4a0cbfc3 Improved: Remove Entity suffix from title of all entities. In all EntityModel.xml files, title should not contain Entity as suffix.
(OFBIZ-10408)
Thanks to Suraj Khurana for reporting the improvement and providing fix for that.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832235 13f79535-47bb-0310-9956-ffa450edef68
2018-05-25 12:19:07 +00:00
Jacques Le Roux 1848294a22 Documented: New documentation for EntitySync
(OFBIZ-10390)

Adds the PDF generation information for stand alone document

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831017 13f79535-47bb-0310-9956-ffa450edef68
2018-05-06 07:20:56 +00:00
Jacques Le Roux 1129ac14c7 Documented: New documentation for EntitySync
(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
2018-05-05 13:13:58 +00:00
Rishi Solanki cfef87d6f1 Improved: Remove empty field values from xml data files so that it will not override existing data with empty values. Removed all empty data fields from data files.
(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
2018-04-30 10:52:55 +00:00
Arun Patidar ac125443c7 Improved: Introduce support for condition-service for entity eca's as well.
(OFBIZ-10220)
Thanks Suraj Khurana for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1825191 13f79535-47bb-0310-9956-ffa450edef68
2018-02-24 07:27:54 +00:00
Jacques Le Roux 735f946b83 Improved: Always check if debug verbose is on when using Debug.logVerbose()
(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
2017-12-13 22:24:25 +00:00
Jacques Le Roux 40e8be83df Improved: Always check if debug verbose is on when using Debug.logVerbose()
(OFBIZ-10052)

This completes r1818010, there were much more cases.
Also few tabs automatically replaced by spaces

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818020 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 14:11:38 +00:00
Jacques Le Roux e0d2057456 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-framework/trunk@1818005 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:43:05 +00:00
Deepak Dixit 7e19de9966 Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818003 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 12:03:17 +00:00
Deepak Dixit 63258e90f8 Reverted r#1817989, workign fine locally, reverted for now will check and commit again
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817998 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 10:42:32 +00:00
Deepak Dixit d1f85a7e5d Improved: Replace all delegator findByAnd and findOne method calling by EntityQuery methods (OFBIZ-10029)
Applied slightly modified patch, rearrange import properly, 
Thanks Suraj Khurana for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817989 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 09:21:33 +00:00
Michael Brohl 1f2d67a35f Improved: Fixing defects reported by FindBugs, package
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
2017-12-08 21:02:21 +00:00
Deepak Dixit aae3cebccc Improved: Add ability to disable entity eca rule (OFBIZ-9897)
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
2017-11-03 10:28:05 +00:00
Deepak Dixit 2a8a37f308 Improved: Manage life span of SecurityGroupPermission entity.
Applied patch from jira issue(OFBIZ-9801) Thanks Suraj Khurana for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812383 13f79535-47bb-0310-9956-ffa450edef68
2017-10-17 10:47:47 +00:00
Deepak Dixit 1620e4e0ca Improved: No functional change, Only added license header
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1812309 13f79535-47bb-0310-9956-ffa450edef68
2017-10-16 18:43:14 +00:00
Nicolas Malin deebac1bb1 Fixed: Consistency and Readability improvements for make-value tag (OFBIZ-8986)
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
2017-08-23 20:44:44 +00:00
Taher A. Alkhateeb 3806cad490 Refactor OFBiz containers and remove StartupCommandToArgsAdapter
(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
2017-08-23 18:56:15 +00:00