Commit Graph
27737 Commits
Author SHA1 Message Date
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
Hans Bakker 7f14038f90 fix duplicate relation name
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334927 13f79535-47bb-0310-9956-ffa450edef68
2012-05-07 08:58:06 +00:00
Jacques Le Roux 3f7748f393 We missed a lookup there
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334923 13f79535-47bb-0310-9956-ffa450edef68
2012-05-07 08:46:04 +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
Adrian Crum 1a9c764f4e Minor code cleanup in ObjectType.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334840 13f79535-47bb-0310-9956-ffa450edef68
2012-05-07 00:13:35 +00:00
Adrian Crum 315b486c47 Overhauled Mini-language <assert> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334579 13f79535-47bb-0310-9956-ffa450edef68
2012-05-06 09:28:14 +00:00
Adrian Crum 11ccf4ebcb Some code cleanups/fixes for the Mini-language <add-error> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334578 13f79535-47bb-0310-9956-ffa450edef68
2012-05-06 09:27:20 +00:00
Adrian Crum a854aa7d55 Added a convenience method to MiniLangValidate.java.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334577 13f79535-47bb-0310-9956-ffa450edef68
2012-05-06 09:25:49 +00:00
Jacques Le Roux 80af13f2c1 Non functional changes. Removes useless exceptions catches.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334576 13f79535-47bb-0310-9956-ffa450edef68
2012-05-06 09:06:39 +00:00
Adrian Crum ae64f8dfc8 FlexibleStringExpander performance improvement - eliminate costly call to UtilValidate.isEmpty(Object).
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334575 13f79535-47bb-0310-9956-ffa450edef68
2012-05-06 08:59:24 +00:00
Adrian Crum b968e62da5 Overhauled Mini-language <iterate-map>, <loop>, and <while> elements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334536 13f79535-47bb-0310-9956-ffa450edef68
2012-05-06 00:43:58 +00:00
Adrian Crum 40b48b9a34 Overhauled Mini-language <iterate> element.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334502 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 20:53:13 +00:00
Adrian Crum 96145d0819 Mini-language validation bug fix - allow nested expressions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334501 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 20:52:35 +00:00
Jacques Le Roux 8f1f8c2e79 Non functional changes.
Removes a bunch of useless exceptions catches. There are still few cases to discuss, I believe there are useless (or at least without much more information) as well. we will decide on dev ML later...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334497 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 20:46:39 +00:00
Jacques Le Roux c4ca1b90fc Simplify code, non functional changes
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334483 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 20:23:39 +00:00
Adrian Crum e0313918de Reverting my previous commit because it breaks nested expressions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334473 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 19:45:19 +00:00
Adrian Crum 272d627686 Improved Mini-language <set-service-fields> auto-correction.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334469 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 19:09:26 +00:00
Adrian Crum d1cd637f11 Bug fix in Mini-language <iterate> element - the <break> and <continue> elements were ignored for collections and iterators.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334459 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 17:36:13 +00:00
Adrian Crum 7ea995a955 Small fixup for my previous commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334452 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 17:06:36 +00:00
Adrian Crum a3d9a9d004 Overhauled Mini-language <set-service-fields> element. This commit includes some minor behavior changes.
In the previous version, if the source Map was not found, the target Map was not created. Now the target Map is always created if it doesn't already exist.

In the previous version, any errors encountered during the copying process were added to the error message list and script execution continued. Now the error messages are added to the error message list and script execution is stopped.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334450 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 17:00:36 +00:00
Adrian Crum 8c35d76140 More work on the Mini-language <simple-method> element: Simplified script caching. This prepares the way to have simple methods cached individually, instead of caching the entire file.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334427 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 15:05:40 +00:00
Adrian Crum a14a4384ab Refactored FlexibleLocation.java - removed unnecessary synchronized lazy-load code (LocationResolvers don't cost anything to build), and made the class thread-safe. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334426 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 15:02:36 +00:00
Scott Gray c54d605219 Fix incorrectly cased private field on ShoppingCartItem, EstimatedShipDate -> estimatedShipDate
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334424 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 14:06:05 +00:00
Adrian Crum 02e87f4e51 More work on the Mini-language <simple-method> element: I added the SimpleMethod object to the environment (bindings) to permit introspection.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334404 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 11:39:55 +00:00
Adrian Crum ea8ef272d5 More work on the Mini-language <simple-method> element: I removed the attributes that specify some of the environment map (bindings) keys. Those keys should be under the control of the framework so they are consistent across scripting languages.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334402 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 11:34:12 +00:00
Adrian Crum 2044f8779a Small fixup for my previous commit.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334382 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 10:17:44 +00:00
Adrian Crum 38430074c5 Added UTF-8 encoding to UtilPropertiesTests, simplified the code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334370 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 09:53:16 +00:00
Adrian Crum 91d1f4f982 More work on the Mini-language <simple-method> element: moved convenience methods from MethodOperation.java to SimpleMethod.java - so all sub-elements can use them (not just operations elements), simplified some code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334358 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 09:25:03 +00:00
Jacques Le Roux 2bd37215c5 Better way to read the distributable element from web.xml files.
I did not put any distributable elements in web.xml files. So people still needs to follow the advice in catalina-container element in ofbiz-containers.xml

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334336 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 07:59:34 +00:00
Hans Bakker 32b7ee65bf reverting 1334331: unwanted commit
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334333 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 07:52:25 +00:00
Hans Bakker 42341068ec set memory back to 640k and add demo message
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334331 13f79535-47bb-0310-9956-ffa450edef68
2012-05-05 07:43:19 +00:00
Adam Heath f1be0a1e0c FEATURE: Add key-encrypting-key support; this is to bring ofbiz *much*
closer to PCI compliance.  This key handler is *still* not active.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334257 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 23:37:06 +00:00
Adam Heath 48a8ed8b34 OPTIMIZE: Move delegatorInfo assignment into the constructor; in all
cases, this will always be configured, so might as well do it early.
This really should be final, but that change will come later.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334256 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 23:36:56 +00:00
Adam Heath a1f182fe02 FEATURE: Add SaltedBase64StorageHandler to EntityCrypto; key names are
base-64 crypted({hashType}$text), key values are base64 encoded,
encrypted row values are $salt$encoded.  Note, however, that this code
is not yet active, as it hasn't been added to the list of key handlers.

This new handler is *not* active yet.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334255 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 23:36:50 +00:00
Adam Heath 31f3253361 OPTIMIZE/FEATURE: Move a bunch of code around, into a set of abstract
classes and concrete instances.  This allows for adding new types of key
management blocks, so that enhanced features can be added.  No
functional changes have actually been implemented yet; all existing
systems should behave *exactly* the same.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334254 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 23:36:44 +00:00
Adam Heath 53d1aa5762 OPTIMIZE: Remove the use of a few internal variables, and return results
directly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334253 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 23:36:37 +00:00
Adam Heath 53492a9a9a OPTIMIZE: Now that safe locking/threading is supported, there is no
longer a need to pre-populate the EntityKeyStore table with 20 random
keys; in reality, these 20 keys were enought to expand the keyMap
HashMap's internal structure, to a size that wouldn't normally be
auto-expanded during production.  And it was this lack of auto-expanding
that was keeping the map from becoming corrupted in very rare
circumstances.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334252 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 23:36:31 +00:00
Adam Heath 1db44dbbd7 FEATURE: Use a ConcurrentHashMap to store the keys loaded from the
database; as such, there is no longer any synchronization on the keyMap.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334251 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 23:36:25 +00:00
Adam Heath 4e8ed7763d FEATURE: Make EntityCrypto final.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334218 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 21:58:51 +00:00
Adam Heath b7572e89b8 FEATURE: call UtilObject.getObjectException, and rethrow any exceptions,
so that the exception doesn't get logged multiple times.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334217 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 21:58:45 +00:00
Adam Heath 486f43495b FIX: When decrypting a value from the database, throw a useful exception
if the key couldn't be found; previously, an NPE would be thrown.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334215 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 21:58:37 +00:00
Adam Heath 2a05c1a04e OPTIMIZE: Rename secretKey variable to key; this makes it just like the
rest of the code.  The key stored in the database is not only just for
decrypting or encrypting, it's just a key.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334214 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 21:58:30 +00:00
Adam Heath b69f181a54 OPTIMIZE: Move the 2 similiar blocks of key/value decryption code in
decrypt() into a separate internal helper method.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334213 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 21:58:24 +00:00
Adam Heath cc85b5e604 OPTIMIZE/FIX: Split the creation and searching of keys in the database
into two separate methods; a find for an old-style hashed key will no
longer create the old-style key.  This commit does not fix the existing
issue when multiplle threads try to encrypt a value with a key that
hasn't been created or loaded from the database yet; that is still to
come.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334212 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 21:58:17 +00:00
Adam Heath 2774841b66 OPTIMIZE: Use TransactionUtil.doNewTransaction, instead of suspending it
locally; makes the code simpler to follow.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334211 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 21:58:10 +00:00
Jacques Le Roux ffe1e4b1b0 A slightly modified patch from Ankit Jain "Error on View Facility Inventory Items Details Page" https://issues.apache.org/jira/browse/OFBIZ-4851
Error on https://demo-trunk.ofbiz.apache.org:8443/facility/control/ViewFacilityInventoryItemsDetails Page, when you select Report Type - "By Inventory Item" or "By Product" its throwing error.

org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen component://common/widget/CommonScreens.xml#GlobalDecorator: java.lang.IllegalArgumentException: Return value from use-when condition eval was not a Boolean: null [null] on the field inventoryItemId of form ListFacilityInventoryItemsDetailsByItem (Return value from use-when condition eval was not a Boolean: null [null] on the field inventoryItemId of form ListFacilityInventoryItemsDetailsByItem)

jleroux: I supposed it was related to recent changes on scripts language, but was not sure. So I searched for ${bsh:* type="Boolean"/> and found some others of the same kind: in UpdateProductFacilityLocations, FindProject, sprintBacklogListItems forms and more in scrumForms.xml. I tried with UpdateProductFacilityLocations & FindProject but surprisingly did not reproduce the problem. At this stage I gave up...

Sligth changes from Ankit's patch: I simply used real ' instead of &quot; and reformatted to make things more legible

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334201 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 21:46:25 +00:00
Adam Heath da8bf922fc FIX: Properly fix 1327736, which was reverted in 1327866. I have no
idea where those bad digest password values came from.  Really, I have
no clue.  Everything worked in testing.  I'm very confused.  I have
verified that I can log in now with the demo accounts.  Sorry about the
breakage.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334173 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 20:42:57 +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
Adam Heath ad92b98bd9 FIX: Handle the case of a field being encrypted that is currently null;
this is really just moving the null check into the local toString().

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334171 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 20:42:34 +00:00
Adam Heath 33101dbaa2 FEATURE/DEPRECATION: Deprecate HashCrypt.cryptPassword; previously,
it would call String.getBytes(), without specifying an encoding.  That
meant that the platform default encoding would be used, which might
change between different installs(if someone changed an environment
variable, for instance).  Now, there are explicit variants to be called.

When creating a new value, use cryptValueUTF8.  If, for some reason,
calling code is doing it's own comparison, it must continue to use
cryptValueBytes(password.getBytes()).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1334170 13f79535-47bb-0310-9956-ffa450edef68
2012-05-04 20:42:26 +00:00