Commit Graph
2421 Commits
Author SHA1 Message Date
Adrian Crum e93e73afaa ScriptUtil bug fix: the SCRIPT_NAMES field was initialized only when debug level was INFO. Removed enclosing debug level check so SCRIPT_NAMES will always be initialized.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1311011 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 14:21:01 +00:00
Jacques Le Roux bf5a242cf0 Creates an ant task which uses YUICompressor (yuicompressor-2.4.6.jar) to dynamically minify our own (or custom for users) js and css files (most of the biggest external ones are already compressed)
More work is needed, this is just the the minimum with an example.

Related to https://issues.apache.org/jira/browse/OFBIZ-4792


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310983 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 12:12:07 +00:00
Jacques Le Roux 838c5c52c4 No functional change, just shift a line in proper place
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310978 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 11:25:35 +00:00
Jacques Le Roux 8b2bfe325f Groups Tomcat http/s connectors compression properties and adds text/javascript,text/css as new compressableMimeTypes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310975 13f79535-47bb-0310-9956-ffa450edef68
2012-04-08 10:51:02 +00:00
Adrian Crum 3348ba5734 Bug fix in ScriptUtil.java - create a local copy of the calling context so script local variables are not copied to it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1310307 13f79535-47bb-0310-9956-ffa450edef68
2012-04-06 12:51:14 +00:00
Adrian Crum 533bd091b7 CVE-2012-1622: Disable support for nested scripts in FlexibleStringExpander.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309879 13f79535-47bb-0310-9956-ffa450edef68
2012-04-05 14:20:56 +00:00
Adrian Crum 99504db991 Added some static methods to FlexibleStringExpander that enable querying an expression about its component parts.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309360 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 12:49:12 +00:00
Adrian Crum e94ccd9369 Added a SCRIPT_NAMES field to ScriptUtil.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309359 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 12:47:30 +00:00
Erwan de Ferrieres e42a5f1c85 Reverting 1308301 as the commit could seems as a hack: ./ant can't find the class issue created for this: OFBIZ-4783
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1309337 13f79535-47bb-0310-9956-ffa450edef68
2012-04-04 11:38:40 +00:00
Sascha Rodekamp ceb27828a7 Changed the FileReader to a BufferedReader during script loading. The file reader throws an exception when the file path contains spaces (which are encoded). The result was that scripts aren't loaded and pages only showed an error message. Working with an InputStream solves this issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308896 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 13:36:03 +00:00
Jacopo Cappellato 7e8d52d3bf Fixed path to svninfo.ftl file that was not working after the switch to freemarker 2.3.19
Thanks to Scott for the solution.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308817 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 11:09:54 +00:00
Jacopo Cappellato ec02e2ac4f this is a workaround to fix errors when loading included templates with a relative path after the migration to Freemarker 2.3.19; I am still investigating the root cause.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308734 13f79535-47bb-0310-9956-ffa450edef68
2012-04-03 07:46:12 +00:00
Jacopo Cappellato 66e063b126 Removed the last webslinger jar that I missed in my previous commits.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308359 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 14:09:22 +00:00
Jacopo Cappellato 6567fca33d Upgrade to latest stable release of Freemarker: 2.3.19
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308358 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 14:08:17 +00:00
Jacopo Cappellato 7bc6142674 Set log levels for Freemarker (to disable all log messages under warning) to resolve performance issue in newer releases of freemarker.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308355 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 13:58:14 +00:00
Erwan de Ferrieres c5c75df222 Seems using ./ant for running install and tests is not detecting the class for cobertura. Testing if the jar is present is making it right. Resolves OFBIZ-4757
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1308301 13f79535-47bb-0310-9956-ffa450edef68
2012-04-02 11:16:10 +00:00
Adrian Crum e1a03aee17 Small code cleanup in ObjectType.simpleTypeConvert, added support for null target type (returns original object). Updated unit tests.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1307551 13f79535-47bb-0310-9956-ffa450edef68
2012-03-30 17:48:32 +00:00
Jacopo Cappellato 8c99e6b35e Upgrade to Groovy 1.8.6 (from Groovy 1.7.7).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1306769 13f79535-47bb-0310-9956-ffa450edef68
2012-03-29 09:43:54 +00:00
Erwan de Ferrieres 029f6e9410 Removing usage some more iterators
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1306568 13f79535-47bb-0310-9956-ffa450edef68
2012-03-28 20:18:13 +00:00
Joseph Eckard b4b7b1b0a5 fixed typos in example jetty config, NIO connectors did not have the correct types
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1305605 13f79535-47bb-0310-9956-ffa450edef68
2012-03-26 21:18:34 +00:00
Jacques Le Roux 8f6004c2eb This was missing in r1305004
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1305316 13f79535-47bb-0310-9956-ffa450edef68
2012-03-26 11:42:49 +00:00
Jacques Le Roux 7d943cb341 A patch from Anne Jessel "Support validation of resource xml files" https://issues.apache.org/jira/browse/OFBIZ-4723
The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard.

The attached patch:

    provides a valid xsd
    updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list
    includes simple unit tests for UtilProperties to ensure it does work with both formats
    changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file.

Some minor code cleanups to these files.

jleroux: the base test suite was successfully run locally once UtilIOTests have been commented out (still an issue with it on Windows)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1305004 13f79535-47bb-0310-9956-ffa450edef68
2012-03-25 11:07:57 +00:00
Jacques Le Roux 0c07b6df6f Revert r1304193 for now
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1304737 13f79535-47bb-0310-9956-ffa450edef68
2012-03-24 09:35:09 +00:00
Jacques Le Roux 1c5a0459c3 A patch from Anne Jessel "Support validation of resource xml files" https://issues.apache.org/jira/browse/OFBIZ-4723
The xsd for the resource xml files is invalid. In addition, the format of the value of the xml:lang attribute in resource xml files is invalid, according to the xml standard.

The attached patch:

    provides a valid xsd
    updates UtilProperties and the Label Manager to deal with the correct formatting of the xml:lang value, while still working with the old format, following Adrian Crum's recommendation on the mailing list
    includes simple unit tests for UtilProperties to ensure it does work with both formats
    changes the Label Manager to include a reference to the new xsd, and to use the correct format of the xml:lang value, when writing a resource xml file.

Some minor code cleanups to these files.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1304193 13f79535-47bb-0310-9956-ffa450edef68
2012-03-23 05:47:10 +00:00
Joseph Eckard ba4d9e2eee update jetty container to use the latest jetty-8 release, 8.1.2
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1303894 13f79535-47bb-0310-9956-ffa450edef68
2012-03-22 17:08:31 +00:00
Jacopo Cappellato dc4edc748e CVE-2012-1621: Removed the Webslinger component and all the framework dependencies on it; the reasons for this
* no active committer was maintaining the webslinger component
* the component was experimental and not really used by OFBiz
* the component was really big (lot of jars etc...) and we are trying to slim down the OFBiz framework and keep only the essential/useful features
* this fixes a security issue reported to the OFBiz PMC

The only Webslinger feature used by the OFBiz framework was the "service debug mode" (enabled by default with the property servicedispatcher.servicedebugmode): I have considered to keep it but it was impossible because it relied on Webslinger legacy code (in the org.webslinger.invoker.* package) that was never contributed as a source file to the OFBiz project; I have tried to review the source file from an external Webslinger repo but I couldn't find them; the only site about Webslinger I could find is this:
http://www.webslinger.org/Downloads
but the svn resources mentioned there are broken. The fact that the OFBiz frameework was dependent (for a feature useful only in development mode) on an external project that doesn't publish its source code (at least in an easy to find location) convinced me that it was better to clean up the dependency completely; on the bright side OFBiz should now use less memory.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1301866 13f79535-47bb-0310-9956-ffa450edef68
2012-03-17 05:35:45 +00:00
Jacopo Cappellato 4845c553ac The scripthelper object was created too early when the bindings were not set in the context; this caused the wrong scriptType to be set in the ContextHelper.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300202 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 15:47:50 +00:00
Sascha Rodekamp dd3c285da8 JCR container definition was placed between the cataline container definition description and th definition itself. That doesn't looked good.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1300014 13f79535-47bb-0310-9956-ffa450edef68
2012-03-13 09:00:43 +00:00
Adrian Crum fda9bad4cf More JSR-223 work - added a ScriptHelper object to the bindings. Also added a demonstration to the JavaScript test service.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299924 13f79535-47bb-0310-9956-ffa450edef68
2012-03-12 23:20:55 +00:00
Adrian Crum 1c162eb3d7 JSR-223 bug fix, added String constants for commonly used binding keys.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299636 13f79535-47bb-0310-9956-ffa450edef68
2012-03-12 11:41:03 +00:00
Adrian Crum 7f15204b03 JSR-223 bug fixes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299121 13f79535-47bb-0310-9956-ffa450edef68
2012-03-10 00:46:54 +00:00
Adrian Crum 484f0e6999 More JSR-223 work - added the ability to protect the bindings, plus some minor code formatting changes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1299040 13f79535-47bb-0310-9956-ffa450edef68
2012-03-09 20:41:18 +00:00
Jacopo Cappellato c8323e7ab5 Enhanced Groovy Event Handler to support the execution of a method (as an event) inside of a groovy source file (script class): the method can be specified in the "invoke" attribute.
Similarly to Groovy services, the Groovy Events Handler sets the base script class containing helper methods; these helper methods have been enhanced in order to be used by groovy method executed as services or events in a transparent way.
 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298908 13f79535-47bb-0310-9956-ffa450edef68
2012-03-09 16:34:18 +00:00
Jacopo Cappellato da59ea40b4 Enhanced Groovy service engine to inject a (configurable) script base class that provides a basic DSL language to the Groovy services; the DSL is still a work in progress but it is already enough to implement several services in Groovy following a programming style very close to Minilang.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298461 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 16:36:18 +00:00
Hans Bakker aa355b8fb5 Upgrade tomcat to 7.0.26: solve javax.naming.NameNotFoundException: Resource /WEB-INF/classes not found problem when OFBiz started. A contribution of Chattree
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1298261 13f79535-47bb-0310-9956-ffa450edef68
2012-03-08 02:38:40 +00:00
Adrian Crum 2ba7468eff More JSR-223 work - added a bsh engine so that bsh-specific code can be eliminated. Bsh is now invoked using JSR-223.
The engine comes from http://java.net/projects/scripting. I had to modify the code slightly because the BshScriptEngine class implemented Compilable - but the Compilable methods were not implemented. So I removed implements Compilable. I renamed the jar to signify that the code has been modified.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297478 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 14:06:13 +00:00
Adrian Crum 0a0903efb8 More JSR-223 work - added a generic script service engine.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1297323 13f79535-47bb-0310-9956-ffa450edef68
2012-03-06 02:16:29 +00:00
Adrian Crum 340e6c9d0a Added a helpful startup message to ScriptUtil.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296978 13f79535-47bb-0310-9956-ffa450edef68
2012-03-05 09:43:54 +00:00
Adrian Crum deac392f10 Refactored ScriptUtil.java to use the javax.script package (JSR-223).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296897 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 23:43:27 +00:00
Adrian Crum 6cb4c34e22 Minor changes to ScriptUtil.java: add private constructor, make class final, code format changes. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296771 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 09:02:07 +00:00
Jacopo Cappellato f18d49458f First pass in the direction of the implementation of a more flexible mechanism to plugin different scripting technologies and in the same time being able to get rid of a lot of framework related custom code to support them.
In particular these chenges should make it easier to implement JSR-223 (even if I think that we should still treat Groovy in a special way).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1296762 13f79535-47bb-0310-9956-ffa450edef68
2012-03-04 07:24:47 +00:00
Hans Bakker 92397979ed upgrade BIRT to 3.7.2 http://www.eclipse.org/birt/phoenix/project/notable3.7.php
- Addresses BIRT engine with a new POJO based runtime
- Add more content types
  * Post Script
  * Open Document Text
  * Open Document Spreadsheet
  * Open Document Presentation

- Remove warning messages at compile time
- Set an override content type in the view handler

A contribution of Chattree



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1293999 13f79535-47bb-0310-9956-ffa450edef68
2012-02-27 02:37:16 +00:00
Jacques Le Roux 5b43cd8035 Updates log4j from log4j-1.2.15.jar to log4j-1.2.16.jar.
BTW this remind me Jacopo's question (on user ML) about Selenium in OFBiz usage...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1293808 13f79535-47bb-0310-9956-ffa450edef68
2012-02-26 11:23:13 +00:00
Erwan de Ferrieres 195ebb9010 missing license header and xml prefix
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1244208 13f79535-47bb-0310-9956-ffa450edef68
2012-02-14 20:54:19 +00:00
Adrian Crum 4a48104212 Add private constructors to static utility classes. Patch provided by Rishi Solanki - https://issues.apache.org/jira/browse/OFBIZ-4656.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1243364 13f79535-47bb-0310-9956-ffa450edef68
2012-02-12 23:19:33 +00:00
Erwan de Ferrieres 89f188a776 Upgrading tomcat to version 7.0.25 - changelog @ http://tomcat.apache.org/tomcat-7.0-doc/changelog.html
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1234563 13f79535-47bb-0310-9956-ffa450edef68
2012-01-22 18:05:28 +00:00
Erwan de Ferrieres 7e204338d9 Adding missing logger for sl4j (no more log in console), -- Failed to load class org.slf4j.impl.StaticLoggerBinder -- and correcting some .classpath missing lines and licences badly referenced
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1231915 13f79535-47bb-0310-9956-ffa450edef68
2012-01-16 10:53:59 +00:00
Sascha Rodekamp aee44cea77 Remove obsolete slf4j lib
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1231656 13f79535-47bb-0310-9956-ffa450edef68
2012-01-15 12:19:37 +00:00
Sascha Rodekamp 0141c39f55 Reintegrating the Jackrabbit Development branch into the turnk.
The Merge contains the basic integration of jackrabbit into ofbiz and provides a simple API for further development.

Features:
API for easy CRUD operations
Versioning 
Multi Language Support
Object Content Mapping
Sample Implementation in Example Area

See this merge as first step. The development is still in progress but this is the stable starting point for all feature developments.


Detailed description can be found in the Wiki: https://cwiki.apache.org/OFBIZ/jackrabbit-branch-development.html

For any questions, requests, issues use the jira post: https://issues.apache.org/jira/browse/OFBIZ-4659

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1231647 13f79535-47bb-0310-9956-ffa450edef68
2012-01-15 10:41:50 +00:00
Adrian Crum 97082c457f Extracted FileUtil.java's OS-dependent file path conversion to a separate method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1231539 13f79535-47bb-0310-9956-ffa450edef68
2012-01-14 17:49:01 +00:00