Commit Graph
10472 Commits
Author SHA1 Message Date
Jacques Le Roux 34d30421dc Fixed: SOAPService does not work
(OFBIZ-11259)

This was broken by r1839451 committed at the bottom of OFBIZ-10438
A simple fix is to allow "webtools/control/SOAPService/serviceName?WSDL" scheme. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869155 13f79535-47bb-0310-9956-ffa450edef68
2019-10-30 09:41:14 +00:00
Mathieu Lirzin bc2747dd67 Fixed: Fix javadoc build
(OFBIZ-11007)

This fixes the javadoc errors introduced in revision 1868963.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869039 13f79535-47bb-0310-9956-ffa450edef68
2019-10-27 15:29:10 +00:00
Mathieu Lirzin 59efa181d2 Improved: Lint unit tests
This makes no behavioral changes, only coding style fixes.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869037 13f79535-47bb-0310-9956-ffa450edef68
2019-10-27 12:51:08 +00:00
Mathieu Lirzin d5e09638ba Improved: Merge ‘UtilObjectUnitTest’ into ‘UtilObjectTests’
(OFBIZ-11067)

Those classes were testing the same class.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869023 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 21:47:46 +00:00
Mathieu Lirzin e5933c677b Improved: Turn ‘UtilObjectTests’ into a unit test class
(OFBIZ-11067)

Adapt ‘UtilObjectUnitTest’ test class to avoid side effects when
testing allowed serialization classes.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869022 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 21:46:01 +00:00
Mathieu Lirzin 43c098c648 Improved: Use utilitary ‘OFBizTestCase#getLogin’ in ‘ServicePermissionTests’
(OFBIZ-11262)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869009 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 16:22:07 +00:00
Mathieu Lirzin 129ef1e601 Improved: Do not use deprecated ‘Class#newInstance’
(OFBIZ-11262)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869008 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 16:20:38 +00:00
Mathieu Lirzin 8f9fa569e0 Improved: Do not use deprecated ‘Proxyclass#getConstructor’
(OFBIZ-11262)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869007 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 16:18:24 +00:00
Mathieu Lirzin 81be0b893c Improved: Do not use deprecated ‘javax.security.cert.X509Certificate’
(OFBIZ-11262)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869006 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 16:16:13 +00:00
Mathieu Lirzin deec38ec43 Improved: Refactor ‘UtilObject#getObjectException’
(OFBIZ-11261)

This moves most of the behavior inside the ‘SafeObjectInputStream’
class which has been refactored too.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869004 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 15:17:56 +00:00
Mathieu Lirzin 197d7a515b Fixed: Handle whitelist of serializable classes from properties
(OFBIZ-11261)

There was a bug regarding the way the ‘ListOfSafeObjectsForInputStream’ value
defined in the “SafeObjectInputStream.properties” file was handled.  Mistakenly
only one class identifier was allowed.

Some unit tests have been added to check that the identified bug is fixed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1869001 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 14:42:02 +00:00
Mathieu Lirzin b1aaad3af6 Implemented: Handle URI templates in request maps
(OFBIZ-11007)

It is now possible to use segmented paths by using URI templates like
‘/foo/bar/{baz}’ in the ‘uri’ attribute of <request-map> elements.

Thanks: Artemiy Rozovyk for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868963 13f79535-47bb-0310-9956-ffa450edef68
2019-10-25 21:49:35 +00:00
Mathieu Lirzin b9d9f6144c Improved: Lint ‘ControlServlet’ partially
(OFBIZ-11007)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868962 13f79535-47bb-0310-9956-ffa450edef68
2019-10-25 21:43:02 +00:00
Gil Portenseigne 41618b1208 Improved: Remove unwanted error log by ‘ServiceSemaphore’ waiting process
(OFBIZ-11204)

This commit rewrites the error handling of the semaphore release/acquire methods
to return a boolean value indicating the result of the action instead of
throwing when waiting timeout is exceeded or if other issue is met. This with
the removal of confusing error log, that are normal and intended ones.

Javadoc has been added with some refactoring in regards to checkstyle rules.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868942 13f79535-47bb-0310-9956-ffa450edef68
2019-10-25 15:24:53 +00:00
Mathieu Lirzin de7a855ff5 Fixed: Use ‘ConcurrentHashMap’ to avoid ‘ConcurrentModificationException’
(OFBIZ-11258)

When trying to load components in their dependency order the
‘toBeLoadedComponents’ map is modified while being iterated over which
is not safe for non-concurrent maps.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868665 13f79535-47bb-0310-9956-ffa450edef68
2019-10-20 16:47:24 +00:00
Mathieu Lirzin 8553f0b5ae Fixed: Fix regression introduced in revision 1867409
(OFBIZ-11192)

‘null’ was an unspecified valid value for the second argument of the
‘ComponentContainer#retrieveComponentConfig’ method.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868657 13f79535-47bb-0310-9956-ffa450edef68
2019-10-20 16:13:50 +00:00
Mathieu Lirzin 2c37e2188b Improved: Move APACHE2_HEADER_FOR_XML to “src/main/resources”
(OFBIZ-11161)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868646 13f79535-47bb-0310-9956-ffa450edef68
2019-10-20 11:17:41 +00:00
Mathieu Lirzin 434a0160a2 Improved: Adapt ‘ContainerConfig#getConfigurations’
(OFBIZ-11256)

Remove unused declared ‘ContainerException’ in signature and fix the
javadoc to match the actual specification.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868630 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 14:56:50 +00:00
Mathieu Lirzin 29f814cd49 Improved: Mark ‘ContainerConfig#configurations’ as final
(OFBIZ-11256)

Use uppercase to match coding standards.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868629 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 14:29:26 +00:00
Mathieu Lirzin 2c686c4655 Improved: Avoid unecessary breakage in ‘ContainerConfig’
(OFBIZ-11256)

This restores ‘public’ modifiers on fields and move the ‘Property’
inner class back to ‘Configuration’ to avoid breakage of client code
extending the ‘Container’ interface.

In order to smooth the transition towards using getters instead of
direct field accesss, the public modifiers on fields are now marked as
deprecated.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868628 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 14:27:01 +00:00
Mathieu Lirzin 80c46f9c8c Improved: Add ‘PropertyChildren’ interface
(OFBIZ-11256)

This allows removing some duplicated method overloads.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868626 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 14:21:46 +00:00
Mathieu Lirzin 4cc9ba8968 Fixed: Format ‘XmlRpcEventHandler’
(OFBIZ-10284)

This removes coding style errors introduced in revision 1868611.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868621 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 13:20:01 +00:00
Jacques Le Roux 1ef831206d Improved: Handling tenant in XmlRpcEventHandler
(OFBIZ-10284)

The XMLRPC service does not support tenants. Even if the tenant domain is 
included in the HTTP request the call does not affect the correct tenant. 
The issue and fix has been discussed in  in the thread
https://markmail.org/message/bz4dofrxqp6i7ove

jleroux: I was able to port the R16 patch provided by Rajesh to the trunk. 

Thanks: Rajesh Kumar Mallah

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868611 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 06:42:07 +00:00
Mathieu Lirzin 7e7ccba7b3 Improved: Refactor ‘ContainerConfig’ class
(OFBIZ-11256)

This removes some code duplication, make things immutable and add some javadoc.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868601 13f79535-47bb-0310-9956-ffa450edef68
2019-10-18 19:46:32 +00:00
Jacques Le Roux 6db4ffdbcd Improved: Remove unused methods related to properties in UtilProperties and
EntityUtilProperties
(OFBIZ-11254)

While removing the POS I forgot to remove specific methods I added in 
UtilProperties: setPropertyValue(*,*,*) and setPropertyValueInMemory. 
I finally found that setPropertyValueInMemory is used in one test and so maybe
usefull. setPropertyValue(*,*,*) is unused and can be safemy removed. It's also 
called from EntityUtilProperties so should also be removed there.

This removes it, and also slightly formats 
EntityUtilProperties::setPropertyValueInMemory 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868589 13f79535-47bb-0310-9956-ffa450edef68
2019-10-18 11:44:29 +00:00
Nicolas Malin 1c1daf855a Fixed: Down the log level to inform to use genericBasePermissionCheck
After the migration of genericBasePermissionCheck from mini-lang to groovy, I set a warning message to inform that we need to migrate simple-method call.

But this simple-method is massively use on standard mini-lang script and finally populate with non interesting inform the log in production site.

I down the level to inform only on development state

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868581 13f79535-47bb-0310-9956-ffa450edef68
2019-10-18 09:26:29 +00:00
Nicolas Malin 193280addb Fixed: Down the log level to inform when a property number is empty
When you call a property number undefined, UtilProperty return the default value and you have in console a warning :

    UtilProperties |W| Error converting String  to Integer; using defaultNumber 60.

Or in general if you call and resolve an empty value for a property, they is no reason to inform it as error.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868580 13f79535-47bb-0310-9956-ffa450edef68
2019-10-18 09:22:11 +00:00
Jacques Le Roux e27022b5cd Implemented: Providing utilities for integration tests
(OFBIZ-11247)

First step to simply using "userLogin" in tests

Thanks: Mathieu for the idea on dev ML

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868436 13f79535-47bb-0310-9956-ffa450edef68
2019-10-14 09:59:31 +00:00
Jacques Le Roux 0bd6bf919b Fixed: NotSerializableException after uploading images to an order
(OFBIZ-11123)

I found that using in r1866259 the same fix than Si Chen used in OFBIZ-750 was 
wrong. The code just above this fix is

{code:java}
if (obj instanceof Serializable) {
    reqAttrMap.put(name, obj);
}
{code}

The problem with this code is that if does not handle inner Maps which may 
contain a non Serializable Object. So the solution is rather to get one level
deeper and apply the same. We can then remove the harcoded lines with 
"uploadedFile" and "_REQUEST_HANDLER_" below. Then all possible cases are handled
as long as we have not inner-inner-Maps




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868298 13f79535-47bb-0310-9956-ffa450edef68
2019-10-11 16:45:16 +00:00
Jacques Le Roux 530cf61808 Improved: Improve the job search view with a better limit and a default sort
(OFBIZ-11241)

Adds a 50 items limit by default instead of 20
Adds a default sort on -runtime to have a look on the lasts jobs executed

Thanks: Carl Demus 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868140 13f79535-47bb-0310-9956-ffa450edef68
2019-10-08 15:56:00 +00:00
Mathieu Lirzin 13188ab6cc Improved: Refactor ‘ComponentConfig.ClasspathInfo’
(OFBIZ-11192)(OFBIZ-11238)

The validity checks have been moved at construction time instead of
relying on client code to ensure that the class path information are
sound.

A new ‘ComponentConfig.ClasspathInfo.Type’ enum has been defined to
improve type safety.

The location of the class path information is now using a
‘java.nio.file.Path’ class instance.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868030 13f79535-47bb-0310-9956-ffa450edef68
2019-10-05 16:30:12 +00:00
Mathieu Lirzin f628dec8be Improved: Specify that the component dependencies are never ‘null’
(OFBIZ-11238)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868029 13f79535-47bb-0310-9956-ffa450edef68
2019-10-05 16:23:21 +00:00
Mathieu Lirzin 60f7041c3d Improved: Use ‘Path’ for component config ‘rootLocation’ attribute
(OFBIZ-11192)

The method ‘ComponentConfig#getRootLocation’ has been removed
and replaced by ‘ComponentConfig#rootLocation’.

The callers have been adapted.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868028 13f79535-47bb-0310-9956-ffa450edef68
2019-10-05 16:20:32 +00:00
Mathieu Lirzin c982df72c2 Improved: Rewrite ‘Classpath’ class
(OFBIZ-11237)

This class has been moved to ‘org.apache.ofbiz.base.container’ to be
able to reduce its visibility to the “package” level.

The API has been change to avoid unnecessary checks and simpler dataflow.

There was no need to provide thread safety so the ‘synchronized’
blocks have been removed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868027 13f79535-47bb-0310-9956-ffa450edef68
2019-10-05 15:44:21 +00:00
Mathieu Lirzin ee77723168 Improved: Remove unnecessary semicolon
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867986 13f79535-47bb-0310-9956-ffa450edef68
2019-10-04 14:37:45 +00:00
Mathieu Lirzin 0ba98fb97b Improved: Remove unused imports
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867985 13f79535-47bb-0310-9956-ffa450edef68
2019-10-04 14:36:33 +00:00
Mathieu Lirzin b37bd7ab79 Improved: Add missing generic types
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867984 13f79535-47bb-0310-9956-ffa450edef68
2019-10-04 14:35:07 +00:00
Nicolas Malin c619dd5491 Improved: Use website to generate links on email content
(OFBIZ-4361)
OFBiz contains a nice process to generate link through WebSite entity.
Unfortunately when you send an email, the standard service didn't propage the website 
to the body content email, so we can't use it.

This improvement is needed on forgot password process to resolve the correct uri 
and go back on good OFBiz component: where the user requested for a new password.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867960 13f79535-47bb-0310-9956-ffa450edef68
2019-10-04 07:32:48 +00:00
Jacques Le Roux 6bcc250a7c Improved: Clarify orders list headers at Find Order screen
(OFBIZ-10972)

Labels the drop-down
Second drop-down is not required to perform the action. So it should not be 
displayed if printer data is not available, adds required validation check

Thanks: Sanjay Yadav for report, Mohammed Rehan Khan foe review and patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867784 13f79535-47bb-0310-9956-ffa450edef68
2019-09-30 17:09:57 +00:00
Deepak Nigam 82f0df248b Implemented: Serbian CommonEntityLabelsfor geo entity.
(OFBIZ-11209)
Added missing entity label for Serbia.
Thanks: Ulrich Heidfeld for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867663 13f79535-47bb-0310-9956-ffa450edef68
2019-09-28 10:26:09 +00:00
Gil Portenseigne 42c208ee0c Improved: Refactor UelFunctions.java to remove error management via Exception
(OFBIZ-11213)

This refactoring was initiated since using UelFunction::getSize throws 
ClassCastException and log a consequent unneeded stack trace to test 
Object class type. The log is unnecessary, because it is the result of 
each supported class cast trial.

This issue show up that lot of possible NPE were not checked against,
but catched by 'Exception'.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867635 13f79535-47bb-0310-9956-ffa450edef68
2019-09-27 13:52:43 +00:00
Nicolas Malin 39f5dda302 Implemented: Add transaction timeout default properties for screen widget
(OFBIZ-11190)

Currently when you rendering a screen, the transaction timeout would be resolve from the context or use default value (60s)
I reviewed this code part to reorganize timeout resolution on dedicate function (transaction timeout on widget screen is pre-apache)
and introduce possibility to set a default value by properties on 'widget.property' with name 'widget.screen.transaction.defaultTimeout'.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867620 13f79535-47bb-0310-9956-ffa450edef68
2019-09-27 07:21:30 +00:00
Nicolas Malin 2132b9e60c Fixed: Default option for ModelFormField.DateFindField doesn't work
(OFBIZ-11212)
When you use a date-find element on form, the defaut option are in code like to greater_than and less _than

        public DateFindField(int fieldSource, String type) {
            super(fieldSource, type);
            this.defaultOptionFrom = greaterThanEqualTo;
            this.defaultOptionThru = lessThanEqualTo;
        }

but on macro

<#macro renderDateFindField ...
      <option value=greaterThan<#if defaultOptionFrom==greaterThan> selected=selected</#if>></option><#rt/>
      ...
      <option value=opLessThan<#if defaultOptionThru==opLessThan> selected=selected</#if>></option><#rt/>
      ...
</#macro>

So the value java isn't correct with ftl values and default value never used.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867582 13f79535-47bb-0310-9956-ffa450edef68
2019-09-26 15:29:11 +00:00
Jacques Le Roux 531793820e Improved: Add a discussion feature in order detail view for following
communication about the order (mail, phone etc.)
(OFBIZ-11210)

This is in order detail view for following communication about the order 
(mail, phone etc.) to keep an eye about all com' event linked to the order.

Thanks: Carl Demus

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867581 13f79535-47bb-0310-9956-ffa450edef68
2019-09-26 15:11:52 +00:00
Mathieu Lirzin 518edddf9c Improved: Refactor ‘ComponentContainer#loadComponentFromConfig’
(OFBIZ-11192)

The unnecessary declared ‘ContainerException’ exception has been removed. A
switch statement has been used and the javadoc has been rewritten.

Additionally the method has been renamed to ‘ComponentContainer#loadComponent’.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867499 13f79535-47bb-0310-9956-ffa450edef68
2019-09-24 22:23:59 +00:00
Mathieu Lirzin ee95f3bad3 Improved: Use ‘java.nio.file’ API in ‘ComponentContainer’ class
(OFBIZ-11192)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867409 13f79535-47bb-0310-9956-ffa450edef68
2019-09-23 21:37:57 +00:00
Mathieu Lirzin 6f54d35c91 Improved: Convert ‘Config#ofbizHome’ and ‘Config#logDir’ to a path
(OFBIZ-11192)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867399 13f79535-47bb-0310-9956-ffa450edef68
2019-09-23 20:04:43 +00:00
Mathieu Lirzin e3acbf6541 Improved: Refactor ‘ComponentLoaderConfig’ class
(OFBIZ-11192)

This redefines the ‘ComponentLoaderConfig#ComponentDef’ class by
removing its unused name attribute.

The ‘java.nio.file’ API has been used to represent the relative path
of a component location.

Various cleanups and Javadoc added.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867394 13f79535-47bb-0310-9956-ffa450edef68
2019-09-23 19:38:17 +00:00
Jacques Le Roux 6a89860bbc Improved: Move Groovy scripts from /groovyScripts/ to /src/main/groovy/
(OFBIZ-11205)

Moves FetchLogs.groovy as a 1st step

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867344 13f79535-47bb-0310-9956-ffa450edef68
2019-09-22 14:18:23 +00:00
Mathieu Lirzin 1fd1b030d9 Improved: Allow updating the ‘Config’ object of the server instance
(OFBIZ-11203)

When doing some informal tests, it is useful to be able to create
small programs using the OFBiz delegator without requiring every
components to be loaded as done by the ‘Start#main’ static method.

To achieve that with the current singleton based implementation, we
need to instantiate a custom ‘Config’ object and use it as the global
configuration.

Thanks: Samuel Trégouët for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1867343 13f79535-47bb-0310-9956-ffa450edef68
2019-09-22 12:56:08 +00:00