Commit Graph
1203 Commits
Author SHA1 Message Date
Arun Patidar 1b814bd613 Implemented: Added CRUD services for EmplPositionClassType, ConfigOptionProductOption and Component entity.
(OFBIZ-8049) (OFBIZ-8058)(OFBIZ-8059)

Thanks: Amit Gadaley for the contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761175 13f79535-47bb-0310-9956-ffa450edef68
2016-09-17 10:10:15 +00:00
Jacques Le Roux dc7c438e9a Improves: Use try-with-resources statement wherever it's possible
(OFBIZ-8202)

These are a non functional changes for the accounting component
I forgot to commit the change in EntityListIterator.java, hence a lot of confusion, sorry guys

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761047 13f79535-47bb-0310-9956-ffa450edef68
2016-09-16 15:15:34 +00:00
Jacques Le Roux d642114ff7 Fixes: reverts r1760566, unfortunately in this commit I did not see that not only the ToirtoiseSvn was removed but also other pending changes where ticked (I did not, thanks ToirtoiseSvn to make me show silly :/)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760567 13f79535-47bb-0310-9956-ffa450edef68
2016-09-13 16:07:50 +00:00
Jacques Le Roux 47761c3f62 Completes: (no functionnal change) remove the ToirtoiseSvn template to avoid confusion for other possible users of ToirtoiseSvn. I keep my local change, not a bid deal, to be revisited...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760566 13f79535-47bb-0310-9956-ffa450edef68
2016-09-13 16:02:31 +00:00
Jacopo Cappellato 66554a45a5 Improved: Removed the "geronimo" component and moved GeronimoTransactionFactory into the "entity" component.
(OFBIZ-8179)

Without functional changes, this design removes a cyclic dependency between the "entity" and "geronimo" components.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1760376 13f79535-47bb-0310-9956-ffa450edef68
2016-09-12 14:09:00 +00:00
Jacopo Cappellato 8150cf2e2d Throw an exception rather than failing with a NPE if delegatorInfo is null: this can happen for example when the entityconfig.xml file is missing.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759372 13f79535-47bb-0310-9956-ffa450edef68
2016-09-06 07:18:01 +00:00
Jacopo Cappellato 4cbedfc518 Improved error message logged by DelegatorFactoryImpl.getInstance(...) when a delegator can't be created; added a TODO comment to remind that the code should be refactored to throw the exception instead.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759371 13f79535-47bb-0310-9956-ffa450edef68
2016-09-06 07:15:21 +00:00
Jacopo Cappellato 8fdaa37885 Fixed wrong module name in the DelegatorFactory class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759370 13f79535-47bb-0310-9956-ffa450edef68
2016-09-06 07:12:28 +00:00
Shi Jinghai 5981061dcf OFBIZ-8137 Entityname starts with schema name causes error in PostgreSQL
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759155 13f79535-47bb-0310-9956-ffa450edef68
2016-09-04 08:57:44 +00:00
Jacques Le Roux 4dd6a0475b Fixes "a bunch of small leaks (closes missing, reported as warnings in Eclipse)" - https://issues.apache.org/jira/browse/OFBIZ-8115
No functional changes, simply use the try-with-resources statement everywhere it's possible, mostly to clean the finally statements and have consistent code

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1759088 13f79535-47bb-0310-9956-ffa450edef68
2016-09-03 12:49:47 +00:00
Jacques Le Roux 38e9885d3d Fixes "a bunch of small leaks (closes missing, reported as warnings in Eclipse)" - https://issues.apache.org/jira/browse/OFBIZ-8115
At r1758927 I tried to fixe a bunch of closes missing, reported as warnings in Eclipse

Jacopo noticed and reported on dev ML http://markmail.org/message/b4hvzi7foftfq3j5 2 possible issues:
1) you are adding a close statement to code that already had the close statement in the "finally" block; your modification actually introduces a code pattern that is not correct (if an exception is thrown your close statement are not executed)
2) I suspect that you are closing the socket connection too early in PcChargeApi

1)The best option when closing resources (which implement AutoCloseable) is actually to use the try-with-resources statement. At least when there are no performance issues.
I have fixed the issue (only in DatabaseUtil.java) this way because
* there are not performance issues, we anyway create a Statement in both cases, we don't reuse one.
* The finally part is cleaner

I have also used the try-with-resources statement in other places where it fitted.

There is only 1 place where I was undecided: ScriptUtil.parseScript() which uses GroovyUtil.parseClass().
I put only a logError() there and returned null. 
I did not throw an IOException because else it spreads everywhere in FlexibleStringExpander.
Here introducing Optional would be better, but I have no time or that today.

2) was not a problem


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758951 13f79535-47bb-0310-9956-ffa450edef68
2016-09-02 13:18:35 +00:00
Jacques Le Roux 8bf34869da Reverts r1758927 to check issues reported by Jacopo on dev ML
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758935 13f79535-47bb-0310-9956-ffa450edef68
2016-09-02 10:47:30 +00:00
Jacques Le Roux 6636d4ae01 Fixes "a bunch of small leaks (closes missing, reported as warnings in Eclipse)" - https://issues.apache.org/jira/browse/OFBIZ-8115
Fixes a bunch of small leaks (closes missing, only warnings in Eclipse)
By-product: automatically sort few imports

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1758927 13f79535-47bb-0310-9956-ffa450edef68
2016-09-02 10:07:31 +00:00
Arun Patidar 3e7e7db27b Applied patch from jira issue - OFBIZ-7911 - Enforce noninstantiability to TransactionUtil class. Thanks Rishi Solanki and Pratik Kulshreshth for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1757962 13f79535-47bb-0310-9956-ffa450edef68
2016-08-27 07:56:48 +00:00
Jacques Le Roux 19010d1ae9 No functional changes, simply updates the documentation: deprecated wiki links
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1756335 13f79535-47bb-0310-9956-ffa450edef68
2016-08-14 21:46:21 +00:00
Jacques Le Roux b4cf32a0de No functional changes, simply update the documentation with respect to Gradle changes - OFBIZ-7677
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1756334 13f79535-47bb-0310-9956-ffa450edef68
2016-08-14 21:45:22 +00:00
Jacques Le Roux ef7996c983 Fixes "Remove warnings regarding missing component lib folders" - https://issues.apache.org/jira/browse/OFBIZ-7776 - by cleaning/clearing the references to non existent/empty dirs.
Notes: 
* Also removes empty framework/base/lib/scripting and useless applications\content\lib\uno\README (miss doc in wiki)
* When jpim-0.1.jar will be (hopefully) replaced we can drop lib ref in framework/base/ofbiz-component.xml
* I wonder if we should let the geronimo component alone with only 2 classes, could we not put that in entity or entityext?
 
    



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1755306 13f79535-47bb-0310-9956-ffa450edef68
2016-08-05 12:27:21 +00:00
Deepak Dixit 834691742b (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@1752920 13f79535-47bb-0310-9956-ffa450edef68
2016-07-16 10:30:49 +00:00
Taher A. Alkhateeb b37ef2d280 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@1752838 13f79535-47bb-0310-9956-ffa450edef68
2016-07-15 14:17:14 +00:00
Taher A. Alkhateeb 4d2b415a91 Another major patch for OFBIZ-7534 replacing Ant with Gradle
This is the first patch that takes OFBiz to the point of no return
in terms of switching from Ant to Gradle build system. Specifically
this patch applies the following items:

- Delete all old Ant and Maven build scripts
- Delete 169 Jar libraries and replace them with remote ones in the
  gradle build script
- update the gradle build scripts for the dependencies and other minor
  changes needed for the script work correctly

All tests pass with the command ./gradlew cleanAll loadDefault testIntegration

Again, thank you for everyone who contributed valueble time and effort in this
process.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1752033 13f79535-47bb-0310-9956-ffa450edef68
2016-07-09 18:10:19 +00:00
Jacopo Cappellato e0da901504 OFBIZ-7760 Removed from UtilCache the ability to persist entries in the file system.
This feature has been contributed a long time ago as an experimental feature but never really matured into a production ready artifact: since it was contributed, no users asked about how to use it, or tested it, or reported bugs or enhancement requests.
More importantly, the feature has always been disabled in the OFBiz framework (i.e. the widget code and the entity engine code were not using it).
This removal should not impact our user base; however, after the removal, an entry to the Attic will be created to keep track of it and to make it easier, to interested users, to get this code, improve it (e.g. by making it dependent on a live external jar, for example MapDB instead of JDBM) and possibly contribute it back to the project.
The most compelling reason for its removal is that the feature was based on a snapshot, unreleased version of JDBM, which is now a mostly dead project: for licensing reasons we are no more allowed to bundle jars in our releases. Additionally, having code that relies an old jar from a no more active project represents a maintenance issue for the community.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751817 13f79535-47bb-0310-9956-ffa450edef68
2016-07-07 17:00:05 +00:00
Nicolas Malin fa265a8460 no functionnal change, fix formating if
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751670 13f79535-47bb-0310-9956-ffa450edef68
2016-07-06 12:21:04 +00:00
Nicolas Malin 5bb21306a6 no functionnal change, remove space end line
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751667 13f79535-47bb-0310-9956-ffa450edef68
2016-07-06 12:18:32 +00:00
Nicolas Malin 55660a9859 no functionnal change, remove space end line
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751660 13f79535-47bb-0310-9956-ffa450edef68
2016-07-06 11:43:35 +00:00
Nicolas Malin 9e72d270f1 Add new process on entity-auto for create invocation to populate automatically the field changeUserLoginId and statusDate for EntityStatus. The purpose is track userlogin for status change, and apply on all entity that cover the EntityStatus concept. The origin issue has been raise by Nameet Jain on OFBIZ-7611
This improvement add a control to not update or delete an EntityStatus by entity-auto (for help developer) and complete unit test

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751530 13f79535-47bb-0310-9956-ffa450edef68
2016-07-05 19:06:52 +00:00
Arun Patidar 7d7fba2cd2 Applied patch from jira issue - OFBIZ-7717 - Enforce noninstantiability to EntityTypeUtil class. Thanks Rahul Singh Kushwah and Rishi Solanki for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751482 13f79535-47bb-0310-9956-ffa450edef68
2016-07-05 14:05:06 +00:00
Deepak Dixit dd05dbe7a3 (OFBIZ-7750) Applied patch jira issue.
===========================================
Error adding foreign key: ModelEntity was null for related entity name Tenant
===========================================

Thanks Nameet Jain for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751423 13f79535-47bb-0310-9956-ffa450edef68
2016-07-05 08:54:26 +00:00
Arun Patidar 002513ff7e Applied patch from jira issue - OFBIZ-7740 - Enforce noninstantiability to EntityUtilProperties class. Thanks Rohit Koushal for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751324 13f79535-47bb-0310-9956-ffa450edef68
2016-07-04 15:50:27 +00:00
Arun Patidar 9372e9a540 Applied patch from jira issue - OFBIZ-7733 - Enforce noninstantiability to EntityUtil class. Thanks Rohit Koushal for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751306 13f79535-47bb-0310-9956-ffa450edef68
2016-07-04 15:06:34 +00:00
Arun Patidar 74afcc004d Applied patch from jira issue - OFBIZ-7710 - Enforce noninstantiability to EntityFinderUtil class. Thanks Rishi Solanki and Rohit Koushal for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751305 13f79535-47bb-0310-9956-ffa450edef68
2016-07-04 15:04:00 +00:00
Arun Patidar 1316f3e26f Applied patch from jira issue - OFBIZ-7732 - Enforce noninstantiability to ModelUtil class. Thanks Rohit Koushal for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751298 13f79535-47bb-0310-9956-ffa450edef68
2016-07-04 14:47:30 +00:00
Arun Patidar c25b45ab1a Applied patch from jira issue - OFBIZ-7715 - Enforce noninstantiability to SqlJdbcUtil class. Thanks Rishi solanki and Rohit Koushal for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751296 13f79535-47bb-0310-9956-ffa450edef68
2016-07-04 14:36:44 +00:00
Jacques Le Roux 6e54fba04e A last slightly modified patch from James Yong for "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
I have uploaded a patch for the simple methods schema.
In general, the top level attributes are converted to simpleType, and attributeGroups to complexType.

Changed the following attribute name
1. ‘field’ to ‘fieldType’
2. ‘level’ to ‘levelType'

Denormalize the following attributeGroups
1. attlist.compare
2. attlist.compare-field

Left attributeGroup ‘typeDefaultString’ unchanged, cos it doesn’t matter. Not in use, it seem.

jleroux: we also fixed an issue with 
<xs:element name="field" type="fieldType"/> 
to 
<xs:element ref="field"/>
In the patch 

And I found a small issue (not minilang related) in ExampleCompoundWidgets.xml
-            <sm:log message="CompoundWidgetsFunc runs" sm:level="info"/>
+            <sm:log message="CompoundWidgetsFunc runs" level="info"/>


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750647 13f79535-47bb-0310-9956-ffa450edef68
2016-06-29 14:06:29 +00:00
Jacques Le Roux 642f42886e A temporary workaround for "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
Reverts the simple method to use the original schema without namespace. "Duplicates" simple-methods.xsd in simple-methods-ns.xsd as we did, to get the simple-method namespace for compound-widgets.

For myself: when we will do the 3rd more elegant option (no schema duplication), have been changed also:
minilang-catalog.xml
compound-widgets.xsd


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749938 13f79535-47bb-0310-9956-ffa450edef68
2016-06-23 16:40:22 +00:00
Jacques Le Roux c8ba932772 Fixes a "typo" in last commit for "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
We used targetNamespace (should only be used in schema) instead of xsi:schemaLocation



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749634 13f79535-47bb-0310-9956-ffa450edef68
2016-06-22 05:58:26 +00:00
Jacques Le Roux 89212904bd Completes and finish "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061
This is the 2nd step: puts back the original names, so it will be transparent for remaining references in xml catalogs, Java code, etc.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749489 13f79535-47bb-0310-9956-ffa450edef68
2016-06-21 11:37:47 +00:00
Jacques Le Roux 4931db1ed9 Completes and finish "Autocompletion for Compound Widget" - https://issues.apache.org/jira/browse/OFBIZ-7061 by replacing xsd files references in xml files by -ns.xsd files and removing the concerned xsd files
This is a 1st step, in a 2nd I will put back the original names, so it will be transparent for remaining reference in xml catalogs, Java code, etc.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749488 13f79535-47bb-0310-9956-ffa450edef68
2016-06-21 11:14:16 +00:00
Jacques Le Roux 11b4e86332 A patch from Gareth Carter for "connection pooling not working" https://issues.apache.org/jira/browse/OFBIZ-7346
Connection pooling does not seem to work. Connections are created fine but as the close() method is called (outside of transaction) or the transaction is committed the connections are closed to the db server and not returned to the pool.

I believe the issue is with org.apache.commons.dbcp2.PoolableConnectionFactory passivateObject method. This will call rollback() when rollbackOnReturn is set to true even if the transaction is committed. This is because any connection wrappers extending org.apache.commons.dbcp2.DelegatingConnection cache autoCommit status. At some point, this cached autoCommit is different from the underlying connection autoCommit. The rollback() method will throw an exception and the connection is destroyed rather than put back to the pool

Environment this has been tested on:
ofbiz: rev 1725574 and latest trunk (as of 2016-06-14)
db: postgresql 9.1
jdbc driver: postgresql-9.3-1101.jdbc4
os: linux and windows

jleroux: this issue doest not exist with Derby, it's a matter of driver (DBMS actually) see Derby vs Postgres

    https://db.apache.org/derby/docs/10.9/devguide/cdevconcepts29416.html
    https://www.postgresql.org/docs/9.1/static/ecpg-sql-set-autocommit.html

Another solution would be to force Postgres to autocommit but I'd not do that, better not change this DBMS dependent behaviour.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748837 13f79535-47bb-0310-9956-ffa450edef68
2016-06-17 11:51:13 +00:00
Jacques Le Roux 6eaa2239a6 Fixes "The Connection Pool Status feature in webtools is broken" - https://issues.apache.org/jira/browse/OFBIZ-7363
Completes the work I did in r1748689. Actually I worked on different editors and mixed things so not all was committed previously, here they are

Removes now useless commented out line about DebugManagedDataSource (// Useful to debug the usage of connections in the pool). I put more information in the class head while fixing the type warnings

Fixes other type warnings I missed previously

Eventually removes the old comment
        // Hmm... then how do we close the JDBC connections?
Because "we" don't close JDBC connections, DBPC takes care of that (or at least should, I did not check).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748693 13f79535-47bb-0310-9956-ffa450edef68
2016-06-16 12:13:02 +00:00
Jacques Le Roux e0c49bb75f Fixes "The Connection Pool Status feature in webtools is broken" - https://issues.apache.org/jira/browse/OFBIZ-7363
The Connection Pool Status feature was introduced by OFBIZ-4864 hence 1st in R13.07 where it still work well (see demo), as the connection pooling. But has been broken since, with the pooling.
Fortunately, it's easy to fix and has no implications has long has you don't enable verbose logging (the DebugManagedDataSource only extends ManagedDataSource for verbose logging and to generate the info needed for the Connection Pool Status feature).

I fixed it by using directly the DebugManagedDataSource. It's not an issue as long as you don't set the logging level to verbose which is anyway not something you would do in production. In case you do so and don't want to be disturbed in the log (focusing on something else), it's still easy to comment out the line from DebugManagedDataSource. I also fixed some type warnings while at it.

I also removed this old comment
        // Hmm... then how do we close the JDBC connections?
Because "we" don't close JDBC connections, DBPC takes care of that (or at least should, I did not check).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748689 13f79535-47bb-0310-9956-ffa450edef68
2016-06-16 11:46:03 +00:00
Jacques Le Roux bd0b57613c A patch from Wai for "EntityUtilProperties" https://issues.apache.org/jira/browse/OFBIZ-7112
OFBiz reads properties from either a properties file or the entity:SystemProperty. The way it worked previously is that OFBiz reads from the entity:SystemProperty first and if there is no value associated with the target propertyname, it would then locate the value from the relevant properties file.
In other words, if there is a database entry for a property, the database entry should override the associated properties file.
The issue is that if a database entry exist but the value is empty, it would look for a value from the properties file.  It should not do so.  If a database entry exists for the propertyname of interest, the value should be taken from the database even if it holds an empty value.

"isExistInDb" is first defined in Map<String, String> getSystemPropertyValue(String, String, Delegator).  This method is call by many other methods.  "isExistInDb" is used to indicate whether the method is returning an empty value for the property that 'exists' in the database rather than as a result of an absent database entry for the property.

The other methods...
  boolean propertyValueEqualsIgnoreCase(String, String, String, Delegator)
  String getPropertyValue(String, String, String, Delegator)
  String getPropertyValue(String, String, Delegator) 
  String getMessage(String, String, Locale, Delegator)
uses the above method and needs to decide whether to use the empty value returned (ie. empty value from an existing property entry in database) or decide if it needs to read from the property file (ie. property entry does not exist in database)

jleroux: this also add systemPropertyValue data in CommonSystemPropertyData.xml

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748560 13f79535-47bb-0310-9956-ffa450edef68
2016-06-15 11:23:54 +00:00
Jacques Le Roux 99de8f8705 A patch from Gareth Carter for "DB connections remain open and unused on startup" https://issues.apache.org/jira/browse/OFBIZ-7344
When ofbiz starts and checks the database, it will leave open connections and they will not get reused.

If you run Check/Update database from webtools, you can see a new connection is created for your selected group

As far as I can tell, the problem lies in DatabaseUtil.getDatabaseMetaData. If the parameter connection is null, a new connection object is created but not closed (like any resource should be!)

jleroux: I was unable to "see a new connection is created for your selected group" when running "Check/Update database from webtools". But I tested with Postgres while and after discussing with Gareth about this.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748543 13f79535-47bb-0310-9956-ffa450edef68
2016-06-15 10:35:18 +00:00
Jacques Le Roux 27b736e3ed No functional changes. While reviewing Wai's patch for OFBIZ-7112 I noticed that he (re)used this pattern introduced earlier:
(resource == null || resource.length() <= 0)
From Java spec. a String, Collection, Map or CharSequence can't have a negative length, so the pattern above can be reduced to 
  (resource == null || resource.length() == 0)
which can be replaced using 
  UtilValidate.isEmpty()
I checked, there are several other occurrences of this pattern (some very old, I guess most were routinely copied from an initial occurrence). I decided to replace all of them, here they are.

I did that already long ago for the 
  (resource == null || resource.length() == 0)
pattern. It remains 4 of them. Three are justified (because of the dependency on base component or because using isEmpty() on Object is disputable for performance reasons). I took care of the remaining one right aways (in SplashScreen.java)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747976 13f79535-47bb-0310-9956-ffa450edef68
2016-06-12 10:43:58 +00:00
Jacques Le Roux ec66e361e1 A big but straightforward commit for "Move minilang scripts from component://componentname/script/org/ofbiz to component://componentname/minilang" - https://issues.apache.org/jira/browse/OFBIZ-7267
I removed duplicate paths were componentname was uselessly repeated after component://componentname/script/org/ofbiz (projectmngr was the only one using there project instead)

I had few typos, easily fixed thanks to the tests. There could be still typos but they are unexpected and anyway no-brainer to fix 

I'm still wondering about specialpurpose/example/minilang/README.txt.
I changed its content to 
  "The minilang directory is for static resources that are interpreted at run time rather than being compiled. This goes on the classpath, but does not get built or put into a JAR file."
not sure it makes any sense, I don't see how this relates to the classpath. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747712 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 14:04:30 +00:00
Jacques Le Roux 317e53a702 Non functional change, removes an useless private static final var, spotted by chance
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1744397 13f79535-47bb-0310-9956-ffa450edef68
2016-05-18 11:54:36 +00:00
Jacques Le Roux 9d6072b3d8 Changes for "Use SecureRandom instead of Random where appropriate, and randomUUID for externalKey" - https://issues.apache.org/jira/browse/OFBIZ-7028
Because using SecureRandom comes with a cost, I have identified the places where it's reasonable to keep the non secured Random (like tests, internal sequences, etc.).
Ant to use UUID.randomUUID to generate the external link id

Also, though there are no real proven vulnerabilities, I decided to backport as much as possible since it's now public.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1741684 13f79535-47bb-0310-9956-ffa450edef68
2016-04-29 18:54:49 +00:00
Jacques Le Roux 4f243ac529 No functional changes, removes duplicate ";"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1741674 13f79535-47bb-0310-9956-ffa450edef68
2016-04-29 17:36:31 +00:00
Jacques Le Roux 6455c9382c A sightly modified patch from Wai for "ofbizsetup create product store cause exception, remove use of temp file to load entity data" - https://issues.apache.org/jira/browse/OFBIZ-5949
The exception is caused by foreign key constraint violation between ShipmentCostEstimate and  CarrierShipmentMethod entities.
Currently, when creating a new product store using ofbizsetup component default data associated with the product store is loaded into the database using the following steps.
1. read default data from entity xml file and replace specific items in the read data and write to temp file.
2. use service=parseEntityXmlFile to load the processed file into database.
The issue with this method is that the temp file can present a problem when ofbiz is operating in multitenant mode.
The solution is to modify the relevant services so that no temp file needs generated.

jleroux: I simply used an UtilValidate.isNotEmpty() method in  EntitySaxReader class

I was initially reluctant to these changes because you can no longer load the content of the GlAccountData.xml and ProductStoreData.xml files, or the files themselves, using the import XML feature of webtools. But those files are specific to the setup component, so they should not be missed, they are supposed to be used in this context only.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1740008 13f79535-47bb-0310-9956-ffa450edef68
2016-04-19 21:09:14 +00:00
Jacques Le Roux 92e56e4078 A patch from Gareth Carter for "some files set viewIndex to 1 by default rather than 0" https://issues.apache.org/jira/browse/OFBIZ-6705
Implements a PagedList object (stores list of data items, resultset size, viewSize, viewIndex, lowIndex (called startIndex) and highIndex (called endIndex), also a utils class that returns the PagedList object based on a EntityListIterator, viewSize and viewIndex. 
And implements a queryPagedList method in EntityQuery, used as an example in findOrders service Java implementation

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1738900 13f79535-47bb-0310-9956-ffa450edef68
2016-04-13 07:29:11 +00:00
Nicolas Malin f81916c504 correct error when sort a localized field with the order way is present like '-field', '+field', 'field ASC', 'field DESC'
This error raise by james yong on the issue OFBIZ-6987. Thanks to him for the issue and Deepak Dixit to spot the source

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1738258 13f79535-47bb-0310-9956-ffa450edef68
2016-04-08 15:16:22 +00:00