Commit Graph
1263 Commits
Author SHA1 Message Date
Rishi Solanki 8d9b566605 Reverted: Local changes mistakenly committed in revision 1806258
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806259 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 06:05:15 +00:00
Rishi Solanki b0651cbe4d Improvement: Move all data in applications to the datamodel component. (OFBIZ-9501)
Moved the data which belongs to content with seed reader.
Thanks Saurabh Dixit for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806258 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 05:54:15 +00:00
Jacques Le Roux 29a3f4d2f1 Fixed: NullPointerException when calling EntityQuery#getFieldList
(OFBIZ-9624)

When performing EntityQuery#getFieldList without specifying distinct a 
NullPointerException is thrown, because of the condition if (this.distinct). 
It implicitly calls this.distinct.booleanValue() which throws the exception if 
distinct is null.

Thanks: Tobias Laufkötter

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806220 13f79535-47bb-0310-9956-ffa450edef68
2017-08-25 19:49:15 +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
Jacques Le Roux d6b89bc509 Fixed: Collection added to itself
(OFBIZ-9578)

In a recent github mirror, I've found suspicious code.
Branch: master
path: framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java

...
1588         protected final List<String> messages = new LinkedList<String>();
...
1596         protected int updateData(Collection<String> messages) {
1597             if (messages != null && UtilValidate.isNotEmpty(this.messages)) {
1598                 messages.addAll(messages);
1599             }
1600             return count;
1601         }
1602     }

In Line 1598, `messages.addAll' should be `this.messages.addAll'? 
This might not be an issue but I wanted to report this just in case.

Thanks: JC (jaechang.nam@gmail.com)for report 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1805143 13f79535-47bb-0310-9956-ffa450edef68
2017-08-16 07:41:31 +00:00
Jacques Le Roux bfd533ccc3 Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(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
2017-08-14 08:32:21 +00:00
Nicolas Malin 082d629aa9 Implemented: Connect OFBiz to a read only database (OFBIZ-6401)
Add a DAO helper class to use a datasource as readonly
This helper is disable by default. To enable it change the helper class on your datasource use in entityengine.xml like

    <datasource name="localderby"
            helper-class="org.ofbiz.entity.datasource.ReadOnlyHelperDAO"
            schema-name="OFBIZ" ...



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804826 13f79535-47bb-0310-9956-ffa450edef68
2017-08-11 17:09:08 +00:00
Nicolas Malin 8deead6052 Fixed: Related to the issue OFBIZ-6401Connect OFBiz to a read only database
Escape null pointer exception stack trace when the helper return no value 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804824 13f79535-47bb-0310-9956-ffa450edef68
2017-08-11 17:02:34 +00:00
Jacques Le Roux f1fb12bd0b Improved: Refactor EntityListIterator
(OFBIZ-9549)

The EntityListIterator contains duplicate code and has need for refactoring in 
general.

Thanks: Tobias Laufkötter

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804328 13f79535-47bb-0310-9956-ffa450edef68
2017-08-07 12:43:54 +00:00
Jacques Le Roux 82ce693f5a Fixed: Bug SQL Count Distinct command in GenericDAO.java
(OFBIZ-5701)

jleroux: Kieuanhvu's explanation was not totally clear. So I rather provide
Renuka Srishti's at OFBIZ-9428 "getResultsSizeAfterPartialList() return wrong 
count with distinct() for View Entity"

Here is the code sample to test the issue:

EntityListIterator productAssocListItr = null;
productAssocListItr = from("ProductAndAssoc").distinct().queryIterator();
productAssocListSize = productAssocListItr.getResultsSizeAfterPartialList();

productAssocListSize will differ from the actual distinct records in the 
ProductAndAssoc View Entity.
This issue exists because it gives distinct records on the basis of the 
first column in the table.

Thanks: Kieuanhvu for the patch, Renuka Srishti for a clear explanation and a 
simple way to test (in a groovy for me)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804319 13f79535-47bb-0310-9956-ffa450edef68
2017-08-07 10:40:32 +00:00
Deepak Dixit ca74d2496a Improved: Remove unnecessary field types (OFBIZ-9351)
Applied patch from jira issue, also removed -ne field refereces from code.

Thanks Aditya Sharma for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804031 13f79535-47bb-0310-9956-ffa450edef68
2017-08-03 18:11:45 +00:00
Deepak Dixit a0d99ed40f Improved: Replace fields with id-ne, id-long-ne and id-vlong-ne by id, id-long and id-vlong respectively which are not primary keys (OFBIZ-9355)
Thanks Aditya Sharma for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804026 13f79535-47bb-0310-9956-ffa450edef68
2017-08-03 17:51:07 +00:00
Deepak Dixit 5f54acf159 Fixed: Corrected condition to ignore type check for datetime and time field.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803025 13f79535-47bb-0310-9956-ffa450edef68
2017-07-26 08:14:17 +00:00
Deepak Dixit bedad64f14 Fixed: Added check to avoid datetime and time field warning (OFBIZ-9496)
The warning message generated by OFBiz is a false positive caused by the fact that the way OFBiz performs the check is too simplistic: OFBiz parses for the content of the "()" in the fieldtype mapping and assumes that it is the column size.
However, in MySQL and possibly other database management systems, this is only true for varchar field definitions but not for datetime fields.
The column size for DATETIME(3) is not 3.
We should probably refactor the code in DatabaseUtil to compare the SQL field type from the JDBC driver, if possible to retrieve, (i.e. from the database) with the whole content (without any sting manipulation) of the attribute sql-type of the element field-type-def type (in fieldtype*.xml) i.e. "DATETIME(3)"; if they differ then a warning should be printed.
In this way we will have a more generic, simpler and more reliable tool to spot differences in the database

This is a workaround to fix the warning.
Thanks Jacopo.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802693 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 13:14:43 +00:00
Nicolas Malin 7d3ad82758 Improved: for EntityQuery.findOne() with context,
Instead of iterating fields, used GenericPk class object to get the PK fileds from parameters/fieldMap.
Thanks Deepak for this nice improvement

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802684 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 12:23:59 +00:00
Nicolas Malin 3080813151 Improved: Improve EntityQuery.queryOne() function to resolve a record by auto matching the primary key on a given context. (OFBIZ-9447)
Like that :
     GenericValue product = from('Product').where(context).queryOne()
This improvement simulate the minilang element <entity-one entity-name=Product value-name=product/> for helping the minilang migration to groovy
Thanks Jacopo to help the conception, Taher for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1802660 13f79535-47bb-0310-9956-ffa450edef68
2017-07-22 09:02:44 +00:00
Jacopo Cappellato 5a97d0de2b Fixed: unit test failure when "verbose" logging was on.
(OFBIZ-9305)

When print.verbose was set to true in debug.properties, the unit test 
EntitySaxReaderTests.parse was failing because it is using some mock objects; 
fixed by temporarily disabling the verbose logging during the test.

Thanks: William Wang for the report.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1799417 13f79535-47bb-0310-9956-ffa450edef68
2017-06-21 09:41:38 +00:00
Jacques Le Roux d952873c74 Implemented: Rename "loadAll" the "loadDefault" Gradle task
(OFBIZ-9411)

As discussed on user ML (https://s.apache.org/xjFj) rename "loadAll" 
the "loadDefault" Gradle task.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798844 13f79535-47bb-0310-9956-ffa450edef68
2017-06-15 15:35:59 +00:00
Jacques Le Roux df46ff51de No functional change
Improves the documentation of few methods which return an EntityListIterator

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798495 13f79535-47bb-0310-9956-ffa450edef68
2017-06-12 17:20:36 +00:00
Jacques Le Roux 29a55bc4b0 No functional change, just a debug log change
As mentioned by Scott on dev ML the stack trace at this point is irrelevant

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798422 13f79535-47bb-0310-9956-ffa450edef68
2017-06-12 07:35:54 +00:00
Jacques Le Roux b291ec839b No functional change.
Adds a suggestion to report in case of EntityListIterator Not Closed

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798104 13f79535-47bb-0310-9956-ffa450edef68
2017-06-08 18:39:23 +00:00
Jacques Le Roux d9a24d5a34 This fixes a bug introduced with r1797097
As noted in code the EntityListIterator was not closed for a "good" reason: it
might be used later by the framework though not passed as a var. I think I found
1 case where it's closed after the returned list have been used (in 
EntityAnd.getChildren() in ModelTree.java); but I have to check the whole thing

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1798086 13f79535-47bb-0310-9956-ffa450edef68
2017-06-08 16:16:29 +00:00
Jacques Le Roux 004cd686b2 No functional change,
Improves EntityListIterator.close() warning

It was something like

ContentAssoc] has already been closed, not closing again.

It's now properly

This EntityListIterator for Entity [ContentAssoc] has already been closed, 
not closing again.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797356 13f79535-47bb-0310-9956-ffa450edef68
2017-06-02 09:49:32 +00:00
Jacques Le Roux 842e1b21cd No functional changes.
Replaces entityListIterator.close() in finally by try-with-ressource

This is a weirdo badly written double case but with some refactoring 
I can confirm it works at 
https://localhost:8443/facility/control/ViewFacilityInventoryByProduct
which uses the getProductInventoryAndFacilitySummary service

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797161 13f79535-47bb-0310-9956-ffa450edef68
2017-06-01 08:18:48 +00:00
Jacques Le Roux 12ecb8926f Improved: EntityListIterator closed but not in case of exception
(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

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797160 13f79535-47bb-0310-9956-ffa450edef68
2017-06-01 08:14:41 +00:00
Jacques Le Roux e49d09f7dd No functional changes.
Replaces entityListIterator.close() in finally by try-with-ressource

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797097 13f79535-47bb-0310-9956-ffa450edef68
2017-05-31 18:43:05 +00:00
Jacques Le Roux ff4e16e98e Implemented: Replace fields with "id-ne", "id-long-ne" and "id-vlong-ne"
with "id", "id-long" and "id-vlong" respectively which are primary keys
(OFBIZ-9354)

As discussed in http://markmail.org/message/d2tpovewhtotukwa the "not empty" 
field types  ("id-ne", "id-long-ne" and  "id-vlong-ne") were initially added 
to implement validations on data. But, because the validations where only 
implemented in some place like webtools, it contradicts the distinction to be 
upheld on various layers. So it is better to remove these field types. 
So we will remove all those field types and will create sub tickets to replace 
them in entity definitions by corresponding "id" types.

When replacing the "not empty" field types in entity definitions by 
corresponding "id" types we will add a *not-null="true"* attribute to "makes 
the field NOT NULL on the database (like primary key fields)" as explained in 
"not-null" documentation in fieldtypemodel.xsd.  
We will finally clean the documentation of the "not-null" in fieldtypemodel.xsd.

Deepak: If field is define as primary key field so by default is will be set as 
not-null=true, so we can replace all the primary key field type from id-ne to id
 in one shot. 

Thanks: Deepak and Aditya

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1794743 13f79535-47bb-0310-9956-ffa450edef68
2017-05-10 18:40:24 +00:00
Jacques Le Roux c15fafa454 Documented: Remove unnecessary field types
(OFBIZ-9351)

Removes the reference to id-ne similar field types. They will be removed and
replaced by simple id field types.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1794377 13f79535-47bb-0310-9956-ffa450edef68
2017-05-08 14:16:37 +00:00
Deepak Dixit 75a79e7ee2 Improved: Updated msyql sql-type for datetime field-type to support Fractional Seconds in Time Values (OFBIZ-9337)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1793300 13f79535-47bb-0310-9956-ffa450edef68
2017-05-01 10:16:52 +00:00
Jacques Le Roux 880383068a Fixes a typo, thanks to Deepak on dev ML
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1793294 13f79535-47bb-0310-9956-ffa450edef68
2017-05-01 08:53:31 +00:00
Deepak Dixit 7fb5c14fe3 Improved: Removed deprecated entity related migration service, also removed some more deprecated entities that are located in entitymodel.xml instead entitymodel_old.xm (OFBIZ-9327)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1792182 13f79535-47bb-0310-9956-ffa450edef68
2017-04-21 11:21:32 +00:00
Jacques Le Roux 0f6a7a6638 After changing the How+to+migrate+OFBiz+from+Derby+to+MySQL+database page in
wiki following Ingo's suggestion on user ML, adapts also the entityengine
definition to modern mySQL use

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791361 13f79535-47bb-0310-9956-ffa450edef68
2017-04-14 13:02:33 +00:00
Jacopo Cappellato 92b5652156 Improved: cleaned up some old code without altering its functional behavior.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1790520 13f79535-47bb-0310-9956-ffa450edef68
2017-04-07 08:34:57 +00:00
Jacques Le Roux 16f0d33d79 Improved: Use try-with-resources statement wherever it's possible
(OFBIZ-8202)

Replace finally blocks closing EntityListIterator by 
try-with-resource, and refactors around

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1787949 13f79535-47bb-0310-9956-ffa450edef68
2017-03-21 12:20:55 +00:00
Jacques Le Roux 9b2209ef5d Fixed: Missing reference to the delegator in HtmlFormMacroLibrary.ftl
(OFBIZ-9230)

This has been temporarily fixed with r1784259. After a discussion on dev ML and
a code analysis reported in the Jira issue, I decided to follow Rishi Solanki's 
idea of using the delegatorName.

Since we have no context when executing a macro in the widget form, I decided 
to pass it to the macro. I had though to create an 
EntityUtilProperties.getPropertyValueFromDelegatorName() method to eventually 
pass the delegatorName. Two macros were concerned renderLookupField and 
renderTextField.

Note: while analysing the code I found that EntityExpr.checkRhsType() can face
a related kind of problem. I'll commit an improvement later...

Thanks: Wai for report and discussion and Rishi for pursuing his idea of using 
the delegatorName

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1785882 13f79535-47bb-0310-9956-ffa450edef68
2017-03-07 20:33:09 +00:00
Jacques Le Roux 18dfa2e799 No functional change, from Debug.Info to Debug.logError
More to test the Buildbot triggering

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1785485 13f79535-47bb-0310-9956-ffa450edef68
2017-03-04 13:44:30 +00:00
Jacques Le Roux 97a98e7d4c No functional change, related with "Missing reference to the delegator in
framework/widget/templates/HtmlFormMacroLibrary.ftl"
(OFBIZ-9230)

To reproduce

1. Load test data <SystemProperty systemResourceId="widget" 
systemPropertyId="widget.autocompleter.defaultMinLength" 
systemPropertyValue="3"/> 
2. Open https://localhost:8443/partymgr/control/main
3. You will still get warning below in log file


|EntityUtilProperties          |I| Could not get a system property for 
widget.autocompleter.defaultMinLength : null


jleroux: the reason is in the context of a FTL macro we lose the delegator 
(in context) when calling  
executeMacro(writer, sr.toString()); 
from 
MacroFormRenderer.renderTextField()
So we need to find a way to pass the delegator to be used when evaluating 
the Freemarker template. For now I have simply added a clearer explanation 
of the reason.

Thanks: Wei Zhang for report

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1784259 13f79535-47bb-0310-9956-ffa450edef68
2017-02-24 10:52:09 +00:00
Jacques Le Roux 49df69cdd6 No functional change, remove unused and failing EntityClassLoader
Relates with OFBIZ-6210

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1782943 13f79535-47bb-0310-9956-ffa450edef68
2017-02-14 09:57:00 +00:00
Jacques Le Roux 6dbbf2ee8f Fixed: In entitymodel.xsd entity-alias for condition-expr must be required
(OFBIZ-9184)

Currently in the entitymodel.xsd the line

<xs:attribute name="entity-alias" type="xs:string"/>

is wrong, should be

<xs:attribute name="entity-alias" type="xs:string"  use="required"/>

Else in line

this.entityAlias = entityAlias;

in ModelViewEntity.ViewConditionExpr() 

this.entityAlias 

receives null.

All supported branches are concerned


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1779625 13f79535-47bb-0310-9956-ffa450edef68
2017-01-20 14:20:47 +00:00
Michael Brohl 945a8afd9c Improved: refactor javadocs in OFBiz to be standards compliant
(OFBIZ-9144)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1774922 13f79535-47bb-0310-9956-ffa450edef68
2016-12-18 18:12:21 +00:00
Michael Brohl 97ba34128e Improved: refactor javadocs in OFBiz to be standards compliant
(OFBIZ-9144)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1774815 13f79535-47bb-0310-9956-ffa450edef68
2016-12-17 23:34:51 +00:00
Jacopo Cappellato 635657bbc5 Fixed: removed a redundant null check and parenthesis.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1773405 13f79535-47bb-0310-9956-ffa450edef68
2016-12-09 14:21:56 +00:00
Jacopo Cappellato bd40d8526f Fixed: a series of wrong argument names in Javadoc comments.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1773338 13f79535-47bb-0310-9956-ffa450edef68
2016-12-09 08:49:56 +00:00
Paul Foxworthy 40119e0db0 [Improved]: Recognise BASE TABLE table type in database metadata (OFBIZ-7129)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1771995 13f79535-47bb-0310-9956-ffa450edef68
2016-11-30 06:42:42 +00:00
Paul Foxworthy 90c531b032 Fixed typo in error messages
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768808 13f79535-47bb-0310-9956-ffa450edef68
2016-11-09 00:44:27 +00:00
Divesh Dutta 8e8272b4fa 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@1768192 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 11:27:46 +00:00
Arun Patidar 80498ef38d Implemented: Refer to objects by their interfaces rather than class when instantiating Collection implementation classes in Java files
(OFBIZ-9023) (OFBIZ-9026)(OFBIZ-9027)(OFBIZ-9032)(OFBIZ-9034)(OFBIZ-9036)(OFBIZ-9030)

Thanks: Divesh Dutta, Amit Gadaley and Shubham Agrawal for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1768189 13f79535-47bb-0310-9956-ffa450edef68
2016-11-05 11:16:49 +00:00
Deepak Dixit b150af15ea Improved: UtilValidate isEmpty and isNotEmpty methods not used correctly
(OFBIZ-8413)

Thanks Pawan Verma for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1766868 13f79535-47bb-0310-9956-ffa450edef68
2016-10-27 19:21:41 +00:00
Arun Patidar f025354c2c Fixed: Error due missing entry of service resource in ofbiz-component.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1765287 13f79535-47bb-0310-9956-ffa450edef68
2016-10-17 13:51:02 +00:00
Taher A. Alkhateeb d44020f0d6 Improved: Refactor and simplify the startup sequence in OFBiz
(OFBIZ-8337)

This is a major refactoring exercise to simplify the startup sequence in
OFBiz. There are no functional changes, however, both the logic and the
API signatures of the core classes in OFBiz are changed to help simplify
the startup sequence. The changes insofar are summarized as:

- Rename ContainerConfig.Container to ContainerConfig.Configuration, the old
  nameing was very confusing as it confuses it with actual containers
- Change the signature of ContainerLoader and Container to accept
  List<StartupCommand> instead of String[]. And also migrate the adapter for
  converting these args into a standalone class called
  StartupCommandsToArgsAdapter
- Remove the LockedBy annotation as it is not used
- Substantially simplify the ContainerLoader load and unload logic and delete
  the start logic (merge it with load). The interface StartupLoader was updated
  accordingly
- Remove old logic to load containers in hot-deploy components
- Remove printThreadDump output from ContainerLoader which used to exist for
  debugging purposes and is no longer necessary
- Cleanup the AdminServer startup logic
- Change the StartupControlPanel logic to use only one StartupLoader instead
  of a list. The only implementation is ContainerLoader
- Remove the synchronized blocks in StartupControlPanel due to having only one
  loader
- Update the startup .properties files to reflect the changes in the startup
  logic
- Update the TestRunContainer to use List<StartupCommand> in its logic

We expect more commits (specifically to the containers) to complete this
refactoring initiative



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1765127 13f79535-47bb-0310-9956-ffa450edef68
2016-10-16 09:07:08 +00:00