Commit Graph
510 Commits
Author SHA1 Message Date
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 a17298a06e Removed unused "authz" security code - https://issues.apache.org/jira/browse/OFBIZ-4839.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1360283 13f79535-47bb-0310-9956-ffa450edef68
2012-07-11 16:34:26 +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 eaaff20b2e Small change to Mini-language <set-calendar> element - removed the set-if-empty attribute, which is unnecessary because a Timestamp will never be empty.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1359599 13f79535-47bb-0310-9956-ffa450edef68
2012-07-10 11:03:56 +00:00
Adrian Crum 6d987730ef Mini-language JavaDocs and added missing @Override directives.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1356836 13f79535-47bb-0310-9956-ffa450edef68
2012-07-03 17:08:16 +00:00
Adrian Crum f34a9f1881 Added some Mini-language unit tests. These only test the <assert> and <check-errors> elements for now. More to come later.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1356762 13f79535-47bb-0310-9956-ffa450edef68
2012-07-03 14:44:13 +00:00
Adrian Crum fc32bb4cde Trivial, non-functional changes to SimpleMethod.java: JavaDocs, trace messages.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1356761 13f79535-47bb-0310-9956-ffa450edef68
2012-07-03 14:41:57 +00:00
Adrian Crum 237abc3592 Added trace support to Mini-language <assert> and <check-errors> elements. Also fixed a bug in the <assert> element where it created an error list when there were no errors.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1356759 13f79535-47bb-0310-9956-ffa450edef68
2012-07-03 14:40:12 +00:00
Adrian Crum ba24e91346 EmptyCondition.java bug fix - fixed the toString method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1356758 13f79535-47bb-0310-9956-ffa450edef68
2012-07-03 14:37:38 +00:00
Adrian Crum df13fee9c3 SimpleMethod.java bug fix - make sure the exec method always returns a non-null result when run as a service.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1356707 13f79535-47bb-0310-9956-ffa450edef68
2012-07-03 12:59:17 +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 db6b939afe Some code optimization work on Calculate.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1356245 13f79535-47bb-0310-9956-ffa450edef68
2012-07-02 14:23:33 +00:00
Adrian Crum 4112e1e880 Mini-language <find-by-and> element improvement: add a fields-to-select-list attribute.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1355348 13f79535-47bb-0310-9956-ffa450edef68
2012-06-29 12:56:33 +00:00
Adrian Crum 5d4c21feea Minor change to Mini-language <find-by-primary-key> element - prevent unnecessary copying of field name set.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1355347 13f79535-47bb-0310-9956-ffa450edef68
2012-06-29 12:54:42 +00:00
Adrian Crum 00644c541e Improved Mini-language <script> element - allow execution of inline scripts in addition to external scripts, matching the <call-bsh> behavior.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1353284 13f79535-47bb-0310-9956-ffa450edef68
2012-06-24 15:25:30 +00:00
Adrian Crum f6c8a9741a Deprecated MethodOperation.expandString and MethodOperation.rawString methods, moved their implementations from subclasses to the MethodOperation class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1350375 13f79535-47bb-0310-9956-ffa450edef68
2012-06-14 19:05:13 +00:00
Adrian Crum 05e8237049 Mini-language API cleanup - removed ContextAccessor.java that is no longer used, and simplified the MethodContext.java API. With this commit all script behavior has been moved to the model classes, and all script state is contained in MethodContext.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1350354 13f79535-47bb-0310-9956-ffa450edef68
2012-06-14 18:11:18 +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
Jacopo Cappellato 9d80b40c8d Improved code that manages the cache:
* protected the UtilCache object (static field) by making it private and final
* removed unnecessary synchronization



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343785 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 15:40:17 +00:00
Jacopo Cappellato 9fe920a3f7 Improved code that manages the cache:
* removed unnecessary synchronization
* protected the UtilCache object (static field) by making it private and final
* replaced non atomic containsKey+put+get with get + putIfAbsentAndGet
* replaced containsKey + null check + get with get + null check



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343692 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 12:10:54 +00:00
Adam Heath 83d37a796b DEPRECATION: framework: GenericValue.getRelated/getRelatedCache variants replaced with a single getRelated variant that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343509 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:17:17 +00:00
Adam Heath 1aa422773b DEPRECATION: framework: getRelatedOne variants replaced with a getRelatedOne variant that takes a boolean useCache parameter.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343478 13f79535-47bb-0310-9956-ffa450edef68
2012-05-29 04:11:19 +00:00
Adrian Crum 1002cfb510 Mini-language JavaDocs. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1343174 13f79535-47bb-0310-9956-ffa450edef68
2012-05-28 09:30:49 +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 3da5a8a129 Oops, forgot to add validation to the <filter-list-by-and> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1341408 13f79535-47bb-0310-9956-ffa450edef68
2012-05-22 11:13:26 +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
Adam Heath 0f2788d388 FIX: Remove "null" from the context, so that the real 'null' token can
be used.  What was occuring previously, was that any use of "null" would
actually end up using GenericEntity.NullField, which has a string value
of "[null-field]".

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1341094 13f79535-47bb-0310-9956-ffa450edef68
2012-05-21 16:22:57 +00:00
Adrian Crum 273010c771 Temporarily disable Mini-language validation until the overhaul is finished and the invalid/deprecated code is fixed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1341075 13f79535-47bb-0310-9956-ffa450edef68
2012-05-21 15:35: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 dacad3baac Minor change to MiniLangElement.java - hide static module field from subclasses.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340648 13f79535-47bb-0310-9956-ffa450edef68
2012-05-20 09:25:37 +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 133393f087 Small fixup for my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340148 13f79535-47bb-0310-9956-ffa450edef68
2012-05-18 16:04:03 +00:00
Adrian Crum 217445e8af Refactored the artifact info code in Mini-language. Made it less dependent on implementation details and made it more flexible and efficient.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1340143 13f79535-47bb-0310-9956-ffa450edef68
2012-05-18 15:52:11 +00:00
Adrian Crum b7025ca701 Small fixup for my last commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339774 13f79535-47bb-0310-9956-ffa450edef68
2012-05-17 18:25:49 +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 a3ebab15ff Consolidated some redundant Mini-language classes.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339610 13f79535-47bb-0310-9956-ffa450edef68
2012-05-17 14:14:03 +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 05132fa087 Added new class to model the Mini-language <fail-message> and <fail-property> elements. Updated the <add-error> element to use the new class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339290 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 18:04:30 +00:00
Adrian Crum 3b98e384e6 A bunch of small fixups in Mini-language.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339228 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 15:25:11 +00:00
Adrian Crum 25b6d442c9 Refactored FlexibleMessage.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339227 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 15:23:31 +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