Commit Graph
42 Commits
Author SHA1 Message Date
Nicolas Malin 7165768251 Implemented: Add a framework method to get main webapp menu with the webapp name
(OFBIZ-10601)

To improve theme management and provide better tools for new themes, we implement a method to obtain the main menu of a webapp.
Instead of just managing a menu, we extend the functionality by offering a method to expose a summary of the webapp, to simplify the navigation.

For this we add a new attribute on webapp definition app-shortcut-screen :

    <webapp name="mywebapp"
            ...
            app-shortcut-screen="component://mycomponent/widget/CommonScreens.xml#ShortcutApp"
            ...
    />

The idea is to define a new purpose screen *Shortcut* that contains what defines a webapp when an action or navigation has been requested. With this screen you can load a menu, a search, a complex description and use all screen powerfulness to resolve what displaying and support by theming

    <screen name="ShortcutApp">
        <section>
            <actions>
                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
            </actions>
            <widgets>
                <decorator-screen name="ShortcutDecorator" location="component://common/widget/CommonScreens.xml">
                    <decorator-section name="body">
                        <include-menu name="MyShortcutAppBar" location="component://mycomponent/widget/CommonMenus.xml"/>
                    </decorator-section>
                </decorator-screen>
            </widgets>
        </section>
    </screen>

Each component are self-sufficient to define what shortcuts to display without framework change or knowledge about other component.
Each theme can implement and customize the display rendering at will.

To illustrate an example of implementation we set sub menu for each webapp defined on applications and exploit it on bluelight theme.

Thanks for Dennis Balkir, Jacques Leroux, Leila Mekika and Julien Nicolas for their involvement
2021-01-15 08:56:23 +01:00
Mathieu Lirzin 72aba3778c Improved: Remove support for “ofbiz-containers.xml”
(OFBIZ-11100)

To extend the containers loaded on startup, it was possible too both
edit the “ofbiz-containers.xml” file or alternatively to define a
container in a component.

This redundancy adds extra complexity in the startup process for no
good extensibility reason. The component container loader is more
flexible since it allows developper to add new containers without
touching the framework so it is better to only rely on this option.

The component loader is now hard-coded directly in code.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1863019 13f79535-47bb-0310-9956-ffa450edef68
2019-07-13 21:37:40 +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
Jacques Le Roux 102dd5d242 Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

Renames "keep-autologin-cookie" to "use-autologin-cookie", and only create 
Autologin cookies when needed. No need to create Autologin cookies in 
applications that don't need it.

Don't pass webAppName to LoginWorker::getSecuredUserLoginId, that can be handled
with improved LoginWorker::getSecuredLoginIdCookieName

Removes LoginWorker::autoLogoutCleanCookies, no longer needed since only those
needed are created and kept (1 year at least after creation).

For both autoLogin and securedLoginId cookies sets the path to the application.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845558 13f79535-47bb-0310-9956-ffa450edef68
2018-11-02 09:46:42 +00:00
Jacques Le Roux a5fd3fd7eb Implemented: Implement Depends on support for Component Loading.
(OFBIZ-10368)

Components are loaded in the order they are found (i.e. alphabetic or creation 
date). 

Here is a feature which supports in ofbiz-component to create a series of 
dependencies for components loading, before loading a particular component.
We can define a dependency for a component, like component ebaystore is 
dependent on Component ebay (even multiple dependencies for a single component 
is supported). 

We can declare it in this fashion in ofbiz-component.xml file.
  <ofbiz-component name="ebaystore" enabled="true"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
  <depends-on component-name="ebay"/>

If any anomaly is found loading of components will stop.  

Thanks: Pradhan Yash Sharma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840141 13f79535-47bb-0310-9956-ffa450edef68
2018-09-05 16:29:48 +00:00
Jacques Le Roux e62d31667e Implemented: Implement Depends on support for Component Loading.
(OFBIZ-10368)

Components are loaded in the order they are found (i.e. alphabetic or creation 
date). 

Here is a feature which supports in ofbiz-component to create a series of dependency for component loading, before loading a particular component.
 
Here we can define dependency for a component like Component ebaystore is dependent on Component ebay (even multiple dependencies for a single component is also supported). We can declare it in this fashion in ofbiz-component.xml file.
 

<ofbiz-component name="ebaystore" enabled="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
<depends-on component-name="ebay"/>

 
Now we can declare dependency and if any anomaly is found loading of components will stop.  

Thanks:

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840139 13f79535-47bb-0310-9956-ffa450edef68
2018-09-05 16:23:04 +00:00
Jacques Le Roux 84bc50b994 Fixed: Logout do not remove autoLogin
(OFBIZ-4959)

Logout method do not disable autoLogin functionality. 
Instead of that it just initializes autoLogin in session and request.

jleroux: this was also needed by OFBIZ-10206 "Security issue in Token Based 
Authentication". 
This creates a keep-autologin-cookie boolean attribute in the webapp element of 
the  ofbiz-component.xml, documented in ofbiz-component.xsd
This attribute is used to get the value from the ofbiz-component.xml files in a
new autoLogoutCleanCookies() LoginWorker method. This method is used not only 
when login out but also when login in. This to be sure that in every cases the 
cookies related to the webapps are removed.
For now only the ecommerce, ecomseo et webpos webapps are keeping and using 
their autologin cookies

Thanks: Roberto Benítez Monje for report and Taher for discussion and suggestion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824803 13f79535-47bb-0310-9956-ffa450edef68
2018-02-19 19:23:36 +00:00
Jacques Le Roux 98637715bb No functional change, updates "depends-on" documentation regarding plugins
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1793840 13f79535-47bb-0310-9956-ffa450edef68
2017-05-04 17:52:35 +00:00
Jacques Le Roux 3a2497a7a1 Completed: Removes the now useless hot-deploy directory
(OFBIZ-9268)

The hot-deploy removal was discussed at https://s.apache.org/7Y2w

This completes the previous commit at r1787461

Note: 
We need to remove or implement with Gradle the "depends-on" feature in 
ofbiz-component files
IMO, the applyOfbizPatchesAndHotDeploy.sh and svnUpHotdeploy.bat scrupts should 
be removed, done




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1787473 13f79535-47bb-0310-9956-ffa450edef68
2017-03-17 18:39:25 +00:00
Jacques Le Roux 084c4fd9db No functional changes
completes r1781219 by putting svn:eol-style=native to all file types declared 
in [auto-props] section of the svn config files.css

Actually this is only a 1st pass, it was too complicated to do it for  
all file types at once only concerned here
*.java;*.bsh;*.groovy;*.jsp;*.tld;*.ftl;*.js;*.sql;*.c;*.cpp;*.h;*.txt;*.sgml;
*.properties;*.xml;.classpath;.project;*.sld;*.gml;*.xsl;*.xsd
*.html;*.htm;*.css;*.md;README;NOTICE;LICENSE;rc.ofbiz.*;*.less;*.dsp;*.dsw

Most files should not be concerned by this change, but it's impossible to do
it one by one.

There are also changes in files with have mixed EOLs; because this has no sense
when using native which automatically resolves this issue

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781731 13f79535-47bb-0310-9956-ffa450edef68
2017-02-05 11:09:59 +00:00
Taher A. Alkhateeb 72b9013f24 Implemented: renamed the directory specialpurpose to plugins
(OFBIZ-7972)

In another step towards completing the plugin system for OFBiz, we renamed
the /specialpurpose directory to /plugins and changed all occurences of the
word "specialpurpose" to "plugins" in all files found in the system

Reference discussion: http://markmail.org/message/hpyuxkmftiyn44w2


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1778271 13f79535-47bb-0310-9956-ffa450edef68
2017-01-11 10:48:47 +00:00
Deepak Dixit 47d0d09ada Improved: Remove commented code elements from ofbiz-component.xsd file.
(OFBIZ-8340)

Thanks Pierre Smits for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1770483 13f79535-47bb-0310-9956-ffa450edef68
2016-11-19 11:28:05 +00:00
Jacques Le Roux 7316ee4818 A patch from Pierre Smits for "Remove limitation regarding menu-name in ofbiz-component.xsd" https://issues.apache.org/jira/browse/OFBIZ-6667
Currently the following is in the ofbiz-component.xsd:
        <xs:attribute name="menu-name" default="main">
            <xs:simpleType>
                <xs:restriction base="xs:token">
                    <xs:enumeration value="main"/>
                    <xs:enumeration value="secondary"/>
                </xs:restriction>
            </xs:simpleType>
        </xs:attribute>

However, this is limiting the options that can be applied generates unnecessary errors when developers opt for another methodology.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1739968 13f79535-47bb-0310-9956-ffa450edef68
2016-04-19 17:56:07 +00:00
Jacques Le Roux e4a0586ff2 Gets rid of the session-cookie-accepted feature - https://issues.apache.org/jira/browse/OFBIZ-6871
Since OFBIZ-6867 is now done, it will no longer be used OOTB and anyway should not be needed because we should preferably always use sessionIds in cookies and newer have sessionsIds in URLs.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1728121 13f79535-47bb-0310-9956-ffa450edef68
2016-02-02 14:10:08 +00:00
Adrian Crum 79ecbea037 Bug fix: add missing attribute to ofbiz-properties.xsd.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649668 13f79535-47bb-0310-9956-ffa450edef68
2015-01-05 21:39:46 +00:00
Adrian Crum 63462fa908 Added a new attribute to the ofbiz-component.xml <webapp> element - access-permission. It is used to specify an explicit permission to allow access to the web application, instead of the implied permissions specified in the base-permission attribute (which causes unpredictable behavior).
Also moved web application authorization code from the Flat Grey visual theme to LoginWorker.java. This change needs to be copied to other visual themes as well.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1546891 13f79535-47bb-0310-9956-ffa450edef68
2013-12-02 04:19:48 +00:00
Jacopo Cappellato 3cad56e33b Moved Jetty component from framework to specialpurpose
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1465283 13f79535-47bb-0310-9956-ffa450edef68
2013-04-06 18:04:11 +00:00
Adrian Crum 85d2a421a0 Updated ofbiz-properties.xsd.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1372510 13f79535-47bb-0310-9956-ffa450edef68
2012-08-13 16:58:31 +00:00
Adrian Crum fe73aed662 Small cleanup in properties schema.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1361922 13f79535-47bb-0310-9956-ffa450edef68
2012-07-16 07:16:35 +00:00
Jacopo Cappellato 42db3b8ca8 Removed "loader" element and all supporting code that I had recently introduced and that it is no more needed now that I have completed (in rev. 1360637) the support to set loader profiles in the startup properties.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1360681 13f79535-47bb-0310-9956-ffa450edef68
2012-07-12 13:50:25 +00:00
Jacopo Cappellato 7b65f2dfbc Added ability to define "loaders" for loading selectively specific containers defined in components.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1355460 13f79535-47bb-0310-9956-ffa450edef68
2012-06-29 16:33:22 +00:00
Jacopo Cappellato 50c2e0e089 It is now possible for a component to define new "containers" that are loaded after the ones defined in base/conf/*-containers.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1354884 13f79535-47bb-0310-9956-ffa450edef68
2012-06-28 09:31:37 +00:00
Jacques Le Roux 2da70363b5 Revert all the changes related to CommonEmptyHeader, apart base-catalog.xml and labels in CommonUiLabels.xml.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1339081 13f79535-47bb-0310-9956-ffa450edef68
2012-05-16 09:27:31 +00:00
Jacques Le Roux 1c972bf684 Fixes https://issues.apache.org/jira/browse/OFBIZ-4652 "The Label Manager is wrongly overriding CommonEmptyHeader"
* Adds a keepSpace boolean to UtilXml.writeXmlDocument(), this allows to use xsl:preserve-space into UtilXml.createOutputTransformer()
* Uses it into SaveLabelsToXmlFile.saveLabelsToXmlFile()
* Adds some French labels into CommonUiLabels.xml using Labels Manager to test the new functionality 
* Adds the xml:space attribute into the valueType complexType
* Adds the ofbiz-properties.xsd schema into the base-catalog.xml

I got an issue when 1st trying to commit: 
Commit failed (details follow):
While preparing
 'D:\workspace\ofbizClean\framework\common\config\CommonUiLabels.xml' for commit
Inconsistent line ending style

So I forced the EOLs to my locale platform value (Win XP)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1338831 13f79535-47bb-0310-9956-ffa450edef68
2012-05-15 19:03:26 +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
Jacques Le Roux 2b97e68c4f Put a doc about this unimplemented tag. A guy in the team thought it could rely on it for data loading order.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1097382 13f79535-47bb-0310-9956-ffa450edef68
2011-04-28 09:40:43 +00:00
Scott Gray 6109808c8a Tabs to spaces
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@924378 13f79535-47bb-0310-9956-ffa450edef68
2010-03-17 17:28:01 +00:00
Jacques Le Roux 48fda8a035 A patch from Brett Palmer "Adding Tomcat Catalina configuration for "privileged" applications" (https://issues.apache.org/jira/browse/OFBIZ-2945) - OFBIZ-2945
Out of the box Tomcat allows you to configure "privileged" applications by specifying the context as follows.
<Context path="/manager" debug="0" privileged="true"
   docBase="/usr/local/kinetic/tomcat6/server/webapps/manager">
</Context>

Since OFBiz is an embedded version of Tomcat it does not currently include a similar configuration for privileged applications.

The Tomcat manager application is a "privileged" application that includes utilities for monitoring JMX resources such as thread counts, connections, and any other configured JMX parameter. We use JMX with Hyperic to monitor our OFBiz servers

BTW, I used almost the same for Lambda Probe (https://issues.apache.org/jira/browse/OFBIZ-1397)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@816335 13f79535-47bb-0310-9956-ffa450edef68
2009-09-17 18:56:36 +00:00
Jacques Le Roux b9c3ddef08 2d part and end of an effort to remove trailing spaces
[ \t]+$ => "" (empty)
Should be easier to review when committing changes with trailing spaces removed automatically by anyedit or such tool (please refer to http://docs.ofbiz.org/x/mg)

Of course this effort to remove trailing spaces has no functional implications.

Actually, I was doing a 1st commit and as it's long to upload, I got conflicts with r763135
In the meantime I did some refactoring also in *.java and *.groovy files :
){ => ) {
if( => if (
while( => while (
}else => } else
else{ => else {
switch( => switch (
try{ => try {
}catch => } catch
catch( => catch (
}finally{ => } finally {

So these changes are also in this commit, should not be a problem anyway.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@763175 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 10:54:51 +00:00
Jacques Le Roux 10676abb06 A patch from Michael Brohl "Configure cookie use for a module through the ofbiz-component.xml" (https://issues.apache.org/jira/browse/OFBIZ-1831) - OFBIZ-1831
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@670268 13f79535-47bb-0310-9956-ffa450edef68
2008-06-21 23:02:59 +00:00
Jacopo Cappellato 4e5d5791b3 New attributes for the webapp element in the ofbiz-component.xml files: description, menu-name and position.
menu-name is used to separate the menu items in different menus, the position element che be used to sort them (alphanumerically) in the group.
There are now two menu groups: "main", for the main applications, in the top bar, and "secondary" for applications (specialized or not still 'mature'), in the footer. 
Thanks to Bilgim Ibryam for the patch OFBIZ-1714, that I have committed with a few changes.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@640307 13f79535-47bb-0310-9956-ffa450edef68
2008-03-24 04:07:34 +00:00
Adrian Crum b91ca87911 UtilProperties bug fix and enhancements.
This commit fixes the bug reported in https://issues.apache.org/jira/browse/OFBIZ-1488 and it includes a few of the improvements mentioned in https://issues.apache.org/jira/browse/OFBIZ-1485. This commit also lays the groundwork for improved properties file support in the future.

This commit contains a new xsd file - it needs to be included on the apache ofbiz website. XML properties files will generate console error messages until it is.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@603024 13f79535-47bb-0310-9956-ffa450edef68
2007-12-10 20:04:01 +00:00
Jacques Le Roux ae76370a04 Replace all www.ofbiz.org by ofbiz.apache.org (mostly links to dtds). Note that there are 2 void links :
http://ofbiz.apache.org/service/
http://ofbiz.apache.org/cgi-bin/http_test.pl

Those links were useless before also

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@586802 13f79535-47bb-0310-9956-ffa450edef68
2007-10-20 21:17:45 +00:00
Jacopo Cappellato 989624f0f5 Applied patch from Adrian Crum (OFBIZ-1349) to remove a redundant security check (recently added to the app bar) and documentation for the base-permissions attribute.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@585879 13f79535-47bb-0310-9956-ffa450edef68
2007-10-18 06:03:06 +00:00
Andrew Zeneski a8eec804d5 added missing keystore element
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@532068 13f79535-47bb-0310-9956-ffa450edef68
2007-04-24 20:14:14 +00:00
Andrew Zeneski 7cbcc85cbd refactored x509 implementations; now it will use the certificate to determine the userlogin; tomcat changed to ignore cert files (just pass through) so all checking can be handled by ofbiz; login worker updated to use new method of cert checking; added isser entity to configure what issuers are allowed to sign login certs (the certificate must also be included in a trust store) new component based trust/cert stores configured in ofbiz-component.xml
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@531272 13f79535-47bb-0310-9956-ffa450edef68
2007-04-22 20:56:58 +00:00
Jacques Le Roux dad67935f7 A (large) patch from Scott Gray "Update ASL header" (https://issues.apache.org/jira/browse/OFBIZ-637).
I put also some svn:ignore for shark build and lib diretories and assetmaint/build 

I did some by hand lately, too much to remember. They were files with old header but without copyright. A 1st attempt I suppose, will have to check this after this commit.

I add some problems to commit this patch in one piece because it's so huge (specially with Eclipse I had to turn to Tortoise) !

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@499486 13f79535-47bb-0310-9956-ffa450edef68
2007-01-24 17:15:54 +00:00
Hans Bakker e278aa30c2 license change inserted double first record <?xml: corrected
git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@422606 13f79535-47bb-0310-9956-ffa450edef68
2006-07-17 02:47:21 +00:00
Jacopo Cappellato 674ac0aaae Conversion from MIT to ASL2.0 for the files of the base component.
Many thanks to Scott Gray for the patch (Apache OFBIZ-87).


git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@422417 13f79535-47bb-0310-9956-ffa450edef68
2006-07-16 09:30:14 +00:00
David E. Jones 94fe6d1cda Initial OFBiz import from revision 7923 of the old svn.ofbiz.org SVN repository.
git-svn-id: https://svn.apache.org/repos/asf/incubator/ofbiz/trunk@418498 13f79535-47bb-0310-9956-ffa450edef68
2006-07-01 19:05:20 +00:00