Commit Graph
137 Commits
Author SHA1 Message Date
Jacques Le Roux 9712ec2963 Improved: function parseBigDecimalForEntity is in wrong location
(OFBIZ-10689)

After I changed the method name from  ObjectType::simpleTypeConvert to
ObjectType::simpleTypeOrObjectConvert, Shikha Jaiswal noticed that I missed 
the groovy files.

Checking further I found that I also missed the simple-methods.xsd and 
ObjectTypeTests.java (though this last one was no really a problem)

Thanks: Shikha Jaiswal 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1851156 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 09:29:29 +00:00
Jacques Le Roux b0478d13f0 Improved: XML schemas should use predefined boolean type
(OFBIZ-10411)

To define boolean values, some ad-hoc enumeration of "true" and "false" are 
repeatedly used.  Since XML Schema defines a standard boolean datatype it's 
better to use it.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846727 13f79535-47bb-0310-9956-ffa450edef68
2018-11-16 16:38:24 +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
Jacopo Cappellato 539084a511 OFBIZ-7763 Removed a series of artifacts dependent on the old Beanshell jar that is going to be removed from the project; specifically:
* removed the code that implemented the deprecated "call-bsh" operation in Minilang
* removed the BeanShellContainer (it has been disabled a long time ago)
* removed the BeanShell service engine, no more used


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1751947 13f79535-47bb-0310-9956-ffa450edef68
2016-07-08 17:53:59 +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 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 3aadf4e8da A slightly modified patch from James Yong for "Autocompletion for Compound Widget" https://issues.apache.org/jira/browse/OFBIZ-7061
1. The following xsd are duplicated to use namespaces
  site-conf.xsd     ->  site-conf-ns.xsd
  widget-form.xsd   ->  widget-form-ns.xsd
  widget-screen.xsd ->  widget-screen-ns.xsd
  widget-menu.xsd   ->  widget-menu-ns.xsd
  simple-methods.xsd->  simple-methods-ns.xsd
For example, in site-conf-ns.xsd, we have the following document level attribute
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns="http://ofbiz.apache.org/Site-Conf" targetNamespace="http://ofbiz.apache.org/Site-Conf">
instead of 
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

2. The above schema are used into compound-widgets.xsd so that compound widgets use only one consolidated schema. 

3. Update ExampleCompoundWidgets.xml to use the new compound-widgets.xsd. For example
<compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:sc="http://ofbiz.apache.org/Site-Conf"
        xmlns:sm="http://ofbiz.apache.org/Simple-Method"
        xmlns:wf="http://ofbiz.apache.org/Widget-Form"
        xmlns:wt="http://ofbiz.apache.org/Widget-Tree"
        xmlns:wm="http://ofbiz.apache.org/Widget-Menu"
        xmlns:ws="http://ofbiz.apache.org/Widget-Screen"
        xsi:noNamespaceSchemaLocation="../../../../framework/widget/dtd/compound-widgets.xsd">
    
    <sc:site-conf>
        <sc:request-map uri="CompoundWidgets1">
            <sc:security https="true" auth="true"/>
            <sc:event type="simple" invoke="CompoundWidgetsFunc" path="component://example/widget/example/ExampleCompoundWidgets.xml"/>
            <sc:response name="success" type="view" value="CompoundWidgets1"/>
        </sc:request-map>
        <sc:request-map uri="CompoundWidgets2"><sc:security https="true" auth="true"/><sc:response name="success" type="view" value="CompoundWidgets2"/></sc:request-map>

        <sc:view-map name="CompoundWidgets1" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets1"/>
        <sc:view-map name="CompoundWidgets2" type="screen" page="component://example/widget/example/ExampleCompoundWidgets.xml#CompoundWidgets2"/>
    </sc:site-conf>
...... the rest

4. Change java code to support reading xml with namespace (i.e. xml for compound widgets)

jleroux: I simply replaced tabs by spaces in Java files and removed this commented out line 
  <compound-widgets xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/compound-widgets.xsd">
in ExampleCompoundWidgets.xml

We decided to duplicate the simple-methods.xsd rather than updating all concerned files. Else we would have to update the attributes at document level for rest of the controllers, menus, forms, simple methods and screens. For example, in controller.xml, we would have to change 
  xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd”
to 
  xmlns="http://ofbiz.apache.org/sc” xsi:schemaLocation="http://ofbiz.apache.org/dtds/site-conf-ns.xsd”>
But especially we would have to use the same syntax with namespaces prefixes than in ExampleCompoundWidgets.xml (see example above). This can be discussed because with auto-completion it's not a big deal, but could be overwhelming for existing custom projects...

James mentionned that "the schema location at compound-widgets.xsd is relative to the project...". I don't see any problems with that. We can keep as is as long as we maintain the relation (ie if the main XSDs are moved). Moreover with the previous addition of compound-widgets.xsd in widget-catalog.xml it seems all things work correctly (eg w/o the new *-ns.xsd yet committed, the auto-completion works well in ExampleCompoundWidgets.xml




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746302 13f79535-47bb-0310-9956-ffa450edef68
2016-05-31 16:48:09 +00:00
Jacques Le Roux 1e7d539a7a Removes old simple-methods.xsd from the trunk as it's useless now (was replaced by simple-methods-v2.xsd)
Also renames simple-methods-v2.xsd in simple-methods.xsd and replaces simple-methods-v2.xsd references by simple-methods.xsd references everywhere it's needed



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737087 13f79535-47bb-0310-9956-ffa450edef68
2016-03-30 09:13:03 +00:00
Jacques Le Roux a2ec1cbb64 Removes simple-methods.xsd from the catalog, it's no longer used
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1737078 13f79535-47bb-0310-9956-ffa450edef68
2016-03-30 06:00:25 +00:00
Jacques Le Roux d524de4d4c No functional change, replace &quot; by "
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1674292 13f79535-47bb-0310-9956-ffa450edef68
2015-04-17 12:36:12 +00:00
Jacques Le Roux d4ae38b2ae Revert r1673764 related with https://issues.apache.org/jira/browse/OFBIZ-6253 wrong: "Fixe <result-to-field> doc for <call-simple-method> in simple-methods-v2.xsd"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1673880 13f79535-47bb-0310-9956-ffa450edef68
2015-04-15 17:22:20 +00:00
Jacques Le Roux d80c881c57 Fixes a wrong assertion, <result-to-field can only be used with inline scope.
Minor &quot; to " changes

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1673764 13f79535-47bb-0310-9956-ffa450edef68
2015-04-15 13:45:43 +00:00
Adrian Crum b6818dd442 Some bug fixes in Mini-language:
1. Updated schema to indicate required attributes.
2. Fixed inconsistent implementation of the alternate delegator feature: https://issues.apache.org/jira/browse/OFBIZ-5531


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1566096 13f79535-47bb-0310-9956-ffa450edef68
2014-02-08 18:59:03 +00:00
Jacopo Cappellato ccbec25bf1 Fixed typos.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1561750 13f79535-47bb-0310-9956-ffa450edef68
2014-01-27 17:01:10 +00:00
Jacques Le Roux c06bd63860 This fixes "Set field in (at least) widget screen does not take into account a locale for (at least) the Float type" https://issues.apache.org/jira/browse/OFBIZ-5453
It actually does more than that. It follows Adrian's proposition of improving the GeoPoint data model. 
I did not applies all of Adrian's proposition (see our conversation in the Jira issue). Feel free to apply it completely if you are inclined so. 

I will also add an entry in wiki page "Revisions Requiring Data Migration (upgrade ofbiz)" at https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=7045166

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1557447 13f79535-47bb-0310-9956-ffa450edef68
2014-01-11 19:39:23 +00:00
Jacques Le Roux d57782908a Completes "Set field in (at least) widget screen does not take into account a locale for (at least) the Float type" https://issues.apache.org/jira/browse/OFBIZ-5453 for minilang.
Removes dead code.
Locale applies only when the type is also passed, like in widgets.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1554685 13f79535-47bb-0310-9956-ffa450edef68
2014-01-01 22:02:17 +00:00
Jacques Le Roux 22cdda72c4 This closes "Set field in (at least) widget screen does not take into account a locale for (at least) the Float type" https://issues.apache.org/jira/browse/OFBIZ-5453
And definitively fixes issues with i18n of geolocation 

It introduces a "locale" attribute to the "set" operation in widget (I only tested screen, form is quite similar, should be ok) and minilang.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1554681 13f79535-47bb-0310-9956-ffa450edef68
2014-01-01 21:30:12 +00:00
Adrian Crum 2d81f9049e An improvement to the Mini-language <set-service-fields> element - now you can specify the service attributes mode: IN or OUT.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1553776 13f79535-47bb-0310-9956-ffa450edef68
2013-12-28 01:17:40 +00:00
Jacques Le Roux ff5f0a5096 A patch for "Deprecate doCacheClear in Delegator interface and class and related minilang classes" https://issues.apache.org/jira/browse/OFBIZ-5325
* Deprecates methods in Delegator interface and class
* Deprecates cache clear related variable and methods in EntitySaxReader class
* Deprecates cache clear related variables in minilang related delegator classes
* In simple-method schema annotations, marks do-cache-clear attribute as deprecated 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1524704 13f79535-47bb-0310-9956-ffa450edef68
2013-09-19 12:03:47 +00:00
Jacques Le Roux b14d7c1ab9 Those are not needed and even counter productive now, see discussion on dev ML http://markmail.org/message/mqe6c6qm2rofa4gg
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1426605 13f79535-47bb-0310-9956-ffa450edef68
2012-12-28 18:32:23 +00:00
Adrian Crum b8b8a5fa49 Fixed booleanExpr type in Mini-language schema. Reported by Olivier on the dev mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361073 13f79535-47bb-0310-9956-ffa450edef68
2012-07-13 07:56:04 +00:00
Adrian Crum f5c4810955 Documentation work on the Mini-language schema to make the schema documentation and the Mini-language Reference the same.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1359600 13f79535-47bb-0310-9956-ffa450edef68
2012-07-10 11:06:39 +00:00
Adrian Crum cc2d6989e5 Overhauled the Mini-language schema. The schema elements have been reorganized to match the order in the Mini-language Reference (https://cwiki.apache.org/OFBADMIN/mini-language-reference.html) - which makes it easier to keep the two documents in sync.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1356263 13f79535-47bb-0310-9956-ffa450edef68
2012-07-02 14:36:12 +00:00
Adrian Crum b44c8ee752 Overhauled Mini-language <property-to-field> element.
The overhaul includes: removing unnecessary object creation, make the class thread-safe, add syntax validation, and misc code cleanups.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1350337 13f79535-47bb-0310-9956-ffa450edef68
2012-06-14 17:00:53 +00:00
Adrian Crum 9538d837db Overhauled Mini-language <calculate> element.
The overhaul includes: removing unnecessary object creation, make the class thread-safe, add syntax validation, and misc code cleanups.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1350214 13f79535-47bb-0310-9956-ffa450edef68
2012-06-14 12:36:25 +00:00
Adrian Crum cbf0c9bc0b Overhauled Mini-language <field-to-request>, <field-to-session>, <request-parameters-to-list>, <request-to-field>, <session-to-field>, <webapp-property-to-field> elements.
The overhaul includes: removing unnecessary object creation, make the class thread-safe, add syntax validation, and misc code cleanups.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1349819 13f79535-47bb-0310-9956-ffa450edef68
2012-06-13 13:01:18 +00:00
Adrian Crum 405f59615f Overhauled Mini-language <order-map-list>, <set-calendar>, <string-append>, <string-to-list>, <to-string> elements. Added a format attribute to the <set> element - to be used for type conversions. Also removed deprecated StringToField class.
The overhaul includes: removing unnecessary object creation, make the class thread-safe, add syntax validation, and misc code cleanups.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1349646 13f79535-47bb-0310-9956-ffa450edef68
2012-06-13 06:04:49 +00:00
Adrian Crum f299117fba Overhauled Mini-language <clear-field>, <create-object>, <field-to-list>, <first-from-list>, <list-to-list>, <map-to-map> elements.
The overhaul includes: removing unnecessary object creation, make the class thread-safe, add syntax validation, and misc code cleanups.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1349182 13f79535-47bb-0310-9956-ffa450edef68
2012-06-12 08:16:03 +00:00
Adrian Crum 03271eee55 Overhauled Mini-language <set-current-user-login>, <set-nonpk-fields>, <set-pk-fields>, <store-list>, <store-value>, <transaction-begin>, <transaction-commit>, <transaction-rollback> elements.
The overhaul includes: removing unnecessary object creation, make the class thread-safe, add syntax validation, and misc code cleanups.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1348620 13f79535-47bb-0310-9956-ffa450edef68
2012-06-10 16:21:41 +00:00
Adrian Crum 0d892adf1f Overhauled Mini-language <find-by-primary-key>, <get-related>, <get-related-one>, <make-next-seq-id>, <make-value>, <order-value-list>, <refresh-value>, <remove-by-and>, <remove-list>, <remove-related>, <remove-value>, <sequence-id> elements. Also, consolidated NowDateToEnv.java and NowTimestampToEnv.java into Now.java.
The overhaul includes: removing unnecessary object creation, make the class thread-safe, add syntax validation, and misc code cleanups.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1345652 13f79535-47bb-0310-9956-ffa450edef68
2012-06-03 11:13:32 +00:00
Adrian Crum 28c894cd6f Overhauled Mini-language <find-by-and> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343035 13f79535-47bb-0310-9956-ffa450edef68
2012-05-27 12:06:41 +00:00
Adrian Crum 2bab33d7aa Overhauled Mini-language <filter-list-by-date> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1342854 13f79535-47bb-0310-9956-ffa450edef68
2012-05-26 05:01:00 +00:00
Adrian Crum 75fe3886a4 Overhauled Mini-language <filter-list-by-and> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1341397 13f79535-47bb-0310-9956-ffa450edef68
2012-05-22 10:44:31 +00:00
Adrian Crum 6a6ad86bc3 Overhauled Mini-language <entity-one> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1341348 13f79535-47bb-0310-9956-ffa450edef68
2012-05-22 08:28:02 +00:00
Adrian Crum c6dec75e60 Overhauled Mini-language <entity-count> and <entity-data> elements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340651 13f79535-47bb-0310-9956-ffa450edef68
2012-05-20 09:48:06 +00:00
Adrian Crum 03d7a2c2d4 Overhauled Mini-language <entity-and> and <entity-condition> elements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340465 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 13:08:17 +00:00
Adrian Crum 7ce76dd6a8 Overhauled Mini-language <clear-cache-line>, <clear-entity-caches>, <clone-value>, and <create-value> elements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340408 13f79535-47bb-0310-9956-ffa450edef68
2012-05-19 10:24:42 +00:00
Adrian Crum e1e93d0eb2 Overhauled Mini-language <if-instance-of> and <if-not-empty> elements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339771 13f79535-47bb-0310-9956-ffa450edef68
2012-05-17 18:23:20 +00:00
Adrian Crum 162b7a7651 Overhauled Mini-language <check-permission> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339291 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 18:05:20 +00:00
Adrian Crum 34bb920e3b Overhauled Mini-language <call-service-asynch> and <call-map-processor> elements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339149 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 13:09:30 +00:00
Adrian Crum a1f823136f Overhauled Mini-language <call-service> element, final pass.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339079 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 09:20:03 +00:00
Adrian Crum 079551365a Overhauled <call-service> element, first pass.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338697 13f79535-47bb-0310-9956-ffa450edef68
2012-05-15 13:29:03 +00:00
Adrian Crum e3d62b1f76 Updated Mini-language schema.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338345 13f79535-47bb-0310-9956-ffa450edef68
2012-05-14 19:04:01 +00:00
Adrian Crum 3c9838c534 Added new element - <trace> - to Mini-language. Also updated the <simple-method> element to output trace messages.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1337137 13f79535-47bb-0310-9956-ffa450edef68
2012-05-11 13:02:35 +00:00
Adrian Crum 3aba61d402 Oops, forgot to include schema changes in my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1335025 13f79535-47bb-0310-9956-ffa450edef68
2012-05-07 13:53:50 +00:00
Adrian Crum 778871216f Moved some classes out of the org.ofbiz.minilang.method.conditional package that didn't belong there.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334997 13f79535-47bb-0310-9956-ffa450edef68
2012-05-07 12:59:21 +00:00
Adrian Crum e288d47d0c More work on Mini-language: API fixes, overhauled <if-regexp>, <if-validate-method>, and <check-id> elements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334971 13f79535-47bb-0310-9956-ffa450edef68
2012-05-07 12:26:01 +00:00
Adrian Crum 643d47d4ac Overhauled a bunch of Mini-language conditional elements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334915 13f79535-47bb-0310-9956-ffa450edef68
2012-05-07 08:28:47 +00:00