Commit Graph
66 Commits
Author SHA1 Message Date
Jacques Le Roux 2b15c0302c Fixed: Add http to https redirect rule for ofbiz.apache.org (OFBIZ-10590)
This prevented to run the stable demo
2021-07-20 07:35:11 +02:00
Nicolas Malin e0ea10eabc Improved: In CSV export file from data-file add a new attribute to select the EOL type (OFBIZ-9536)
During the file CSV generation by data-file engine, it is not possible to choose the end of line char. It is always "CR". 
With this improvement it's now possible to define a eol-type attribute on data-file element with value CR or CRLF to use in the csv file result.
Example:
    <data-file name="MyCsvTest" separator-style="delimited" type-code="text" delimiter=";" eol-type="CRLF">
        <record name="Test">...
     </data-file>
Thanks Pierre Gaudin for this proposal.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1819151 13f79535-47bb-0310-9956-ffa450edef68
2017-12-23 14:14:45 +00:00
Nicolas Malin 28ff342414 Improved: Import file with data-file, add start-line to escape the header column line (OFBIZ-10108)
When you load a CSV file some time with a data-file definition, if it contains some header column you can use the format attribute of you column.
Example:
ref;date
100;2017-10-10
200;2017-12-11

This definition failed :
    <data-file name="MyCsvTest" separator-style="delimited" type-code="text" delimiter=";">
        <record name="Test">
            <field name="ref" type="String" position="1"/>
            <field name="date" type="CustomTimestamp" format="yyyyy-MM-dd" position="2"/>
        </record>
     </data-file>

You need to read the date as string and after convert it on your code to escape the first line.
To solve it I added a new attribute start-line on data-file element :
    <data-file name="MyCsvTest" separator-style="delimited" type-code="text" *start-line="1"* delimiter=";">
        <record name="Test">
            <field name="ref" type="String" position="1"/>
            <field name="date" type="CustomTimestamp" format="yyyyy-MM-dd" position="2"/>
        </record>
     </data-file>

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1819147 13f79535-47bb-0310-9956-ffa450edef68
2017-12-23 13:42:15 +00:00
Michael Brohl 41c9269d25 Improved: General refactoring and code improvements, package
org.apache.ofbiz.datafile.
(OFBIZ-9963)

Thanks Dennis Balkir for reporting and providing the patches.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1818434 13f79535-47bb-0310-9956-ffa450edef68
2017-12-16 16:18:45 +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
Michael Brohl 6ec41780eb Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.datafile.
(OFBIZ-9715)

I modified the patch slightly and did some additional code cleanup by 
removing commented out code and some formatting.

Thanks Julian Leichert for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813637 13f79535-47bb-0310-9956-ffa450edef68
2017-10-28 14:45:17 +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
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
Deepak Dixit 5fdc62745e Applied patch from jira issue OFBIZ-4837 - Separator Error in data file tools.
Thanks   Gil Portenseigne for reporting and providing the patch for the issue, Thanks Aditya for uploading the update patch and verifying it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1674447 13f79535-47bb-0310-9956-ffa450edef68
2015-04-18 06:40:32 +00:00
Jacques Le Roux 576a213948 No functional changes, code improvements
Fixes some dead code entries
Automatically adds some override annotations


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1550429 13f79535-47bb-0310-9956-ffa450edef68
2013-12-12 14:53:38 +00:00
Jacopo Cappellato fcdf07a0e6 Improved code that manages the cache:
* protected some UtilCache objects (static fields) by making them private and final

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343815 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 16:18:02 +00:00
Ashish Vijaywargiya e0971b304c Applied similar fix as we did on trunk r1300463.
On production systems you can't suppress Debug.log( message by the use of debug.properties file. It is always good to use Debug.* statements that are having log level setup in debug.properties file. The real problem comes with Debug.log( statement when you are printing any list or map object that contains so many records(or data) in it. Here I am changing all the occurrence of Debug.log( with Debug.logInfo(, Debug.logError( or Debug.logWarning( so that we can have better control of Debug.* statements on production system. :-)

Bad use of Debug statement. On production system you will get false alarm that you are having error in code base although the resultant statement is only giving additional information instead of error message.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335927 13f79535-47bb-0310-9956-ffa450edef68
2012-05-09 05:28:17 +00:00
Adam Heath a0108243f5 FIX/DEPRECATION: Fix all the HashCrypt deprecated uses. All proper methods in HashCrypt
now follow the same form: (String hashType, ..., String valueToHash).
Some methods also follow a polish notation suffix.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334172 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 20:42:45 +00:00
Adrian Crum 827290f103 Refactored ModelDataFileReader.java - fixed thread-safety issues, simplified some unnecessarily complicated code, un-hide exceptions so the UI can display them.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1291007 13f79535-47bb-0310-9956-ffa450edef68
2012-02-19 14:39:10 +00:00
Marco Risaliti a153d0a34f Removed some javadoc warning (wrong param/return) into framework components no functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1126708 13f79535-47bb-0310-9956-ffa450edef68
2011-05-23 20:11:12 +00:00
Marco Risaliti 0d8468c0f0 Add a @SuppressWarning("serial") in DataFileException/ModelField (OFBIZ-4102)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1068612 13f79535-47bb-0310-9956-ffa450edef68
2011-02-08 22:15:31 +00:00
Scott Gray 47f43a302a Remove unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1044931 13f79535-47bb-0310-9956-ffa450edef68
2010-12-12 21:31:27 +00:00
Scott Gray 6109808c8a Tabs to spaces
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@924378 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 17:28:01 +00:00
Jacques Le Roux f315019e6a Reformatted and cleaned following best practices
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@924211 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 10:33:35 +00:00
Jacques Le Roux b174d341a8 Reformatted and cleaned following best practices
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@924208 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 10:26:56 +00:00
Jacques Le Roux f681e37b98 A patch from BJ Freeman "Datafile does not catch lack of delimiter if at end of line." (https://issues.apache.org/jira/browse/OFBIZ-3026) - OFBIZ-3026
There was an issue if the datafile did not have the last delimiter before the CRLF.  This fixes it when there are not data for a field and also fixes the EOL.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@923828 13f79535-47bb-0310-9956-ffa450edef68
2010-03-16 16:00:32 +00:00
Adam Heath b17eb127ec Fix trailing whitespace, and mixed tab/space at the beginning of lines.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@899812 13f79535-47bb-0310-9956-ffa450edef68
2010-01-15 21:00:23 +00:00
Adam Heath 93cc17b5b0 Remove a bunch of wildcard imports.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@894106 13f79535-47bb-0310-9956-ffa450edef68
2009-12-27 19:54:58 +00:00
Adam Heath 18d0ceeaf9 Remove most docs targets, they are all the same anyways.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@894031 13f79535-47bb-0310-9956-ffa450edef68
2009-12-26 22:28:48 +00:00
Adam Heath 1c269fc012 Convert all javadoc calls to use fileset instead of sourcepath; this
allows excludes to be processed correctly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@894030 13f79535-47bb-0310-9956-ffa450edef68
2009-12-26 22:24:20 +00:00
Adam Heath 56dac0bf9e Add a classes target to common.xml, and switch most build.xml to use it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@894024 13f79535-47bb-0310-9956-ffa450edef68
2009-12-26 22:16:56 +00:00
Adam Heath 47b0a876ed Switch all javac15 to javac16.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@894022 13f79535-47bb-0310-9956-ffa450edef68
2009-12-26 22:12:04 +00:00
Jacques Le Roux c72b29cb1f Use UtilValidate.isNotEmpty methods instead of (obj != null) || (obj.length > 0) and (obj != null) || (obj.size > 0)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883549 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 23:41:34 +00:00
Jacques Le Roux 5518e9baf8 Use UtilValidate.isEmpty methods instead of (obj == null) || (obj.size == 0)
Complete r883492

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883516 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 22:02:05 +00:00
Adam Heath 820d11eb97 Deprecate UtilCache constructors, and add a create helper function.
This is the first step to making utilCacheTable concurrent, and
non-blocking.  To do so, the constructor has to have no side-effects.
This means it can't modify utilCacheTable itself; this will be moved to
the helper function created above.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@883217 13f79535-47bb-0310-9956-ffa450edef68
2009-11-23 02:56:28 +00:00
Jacques Le Roux a5eae6afcc Add an EncryptedString format possibilities in datafile (use in Record.java, needed some changes to build in framework/build.xml and datafile/build.xml)
+ datafile/dtd/datafiles.xsd enhanced with some documentations, and an enumeration for the type: I used all occurrences found in Record.setString() method)
+ datafile/dtd/datafiles-catalog.xml added
+ Few generics cleaning in login/LoginServices.java

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@882892 13f79535-47bb-0310-9956-ffa450edef68
2009-11-21 13:10:07 +00:00
Jacques Le Roux cd10618fcc A patch from Bob Morley "Resolve java warnings exposed in Eclipse : framework - datafile" (https://issues.apache.org/jira/browse/OFBIZ-3106) - OFBIZ-3106
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@832669 13f79535-47bb-0310-9956-ffa450edef68
2009-11-04 06:58:07 +00:00
Scott Gray 2afbb75457 Get rid of a whole pile of unnecessary string instantiations
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@818665 13f79535-47bb-0310-9956-ffa450edef68
2009-09-24 23:49:02 +00:00
Jacques Le Roux b9c3ddef08 2d part and end of an effort to remove trailing spaces
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)

Of course this effort to remove trailing spaces has no functional implications.

Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {

So these changes are also in this commit, should not be a problem anyway.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 10:54:51 +00:00
Adam Heath 054b456bc9 Fix lines that *only* have whitespace.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@759232 13f79535-47bb-0310-9956-ffa450edef68
2009-03-27 16:56:23 +00:00
David E. Jones 8c423bc529 Moved EntityDiagramGroupData.xml from entityext to commonext to resolve framework dependency; a few other little cleanups as well
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@757639 13f79535-47bb-0310-9956-ffa450edef68
2009-03-24 02:53:31 +00:00
Adam Heath 856ab123a8 Fix purely empty whitespace lines, and remove trailing whitespace.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@757073 13f79535-47bb-0310-9956-ffa450edef68
2009-03-21 23:23:48 +00:00
Jacques Le Roux f796e230d2 catch( => catch(
}else => } else

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@751005 13f79535-47bb-0310-9956-ffa450edef68
2009-03-06 17:55:43 +00:00
Jacques Le Roux 963f02faed Close https://issues.apache.org/jira/browse/OFBIZ-2168 - OFBIZ-2168
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@741491 13f79535-47bb-0310-9956-ffa450edef68
2009-02-06 09:30:09 +00:00
Jacques Le Roux 8251d2896c A patch from Ray Barlow "Export CSV file using specified text delimiter" '(https://issues.apache.org/jira/browse/OFBIZ-2101) - OFBIZ-2101
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@728718 13f79535-47bb-0310-9956-ffa450edef68
2008-12-22 16:11:01 +00:00
Jacques Le Roux 06f33869c3 A patch from Ray Barlow " Import CSV file using specify text delimiter" (https://issues.apache.org/jira/browse/OFBIZ-2031) - OFBIZ-2031
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@709002 13f79535-47bb-0310-9956-ffa450edef68
2008-10-29 20:30:15 +00:00
Jacques Le Roux e7905f2c8c Fix the anti-pattern
if (* != null && *.size() > 0) { 
where * is a variable name (String or Collection). Rewritten to
    if (UtilValidate.isNotEmpty(*)) {

Done with Eclipse regex replace feature with
search = if \((\w+) *!= *null *&& *(\w+)\.size\(\) *> *0\) *\{
replace = if (UtilValidate.isNotEmpty($1)) {

And of course some hand-work for imports and cleaning. I compiled and tested with ant run-tests

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@686591 13f79535-47bb-0310-9956-ffa450edef68
2008-08-17 07:47:18 +00:00
Adam Heath e410552cc9 No longer *copy* the extra support files into the classes dir;
instead, just add them straight to the final jar.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@685934 13f79535-47bb-0310-9956-ffa450edef68
2008-08-14 15:08:14 +00:00
Adam Heath b6a1ae5e5e Another minor optimization; no longer need to specify classpathref in
all the build.xml files.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@681935 13f79535-47bb-0310-9956-ffa450edef68
2008-08-02 03:41:46 +00:00
Adam Heath 18ea2f7faa Generics, enhanced-for, Number.valueOf.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672660 13f79535-47bb-0310-9956-ffa450edef68
2008-06-29 18:47:15 +00:00
Adam Heath 18391f98a9 The build.xml files are now much smaller and simpler; they reuse a
few global definitions.  1585 lines removed.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@672657 13f79535-47bb-0310-9956-ffa450edef68
2008-06-29 18:39:36 +00:00