Book Image

Apache OfBiz Cookbook

Book Image

Apache OfBiz Cookbook

Overview of this book

Apache Open For Business (OFBiz) is an enterprise resource planning (ERP) system that provides a common data model and an extensive set of business processes. But without proper guidance on developing performance-critical applications, it is easy to make the wrong design and technology decisions. The power and promise of Apache OFBiz is comprehensively revealed in a collection of self-contained, quick, practical recipes in this Cookbook. This book covers a range of topics from initial system setup to web application and HTML page creation, Java development, and data maintenance tasks. Focusing on a series of the most commonly performed OFBiz tasks, it provides clear, cogent, and easy-to-follow instructions designed to make the most of your OFBiz experience. Let this book be your guide to enhancing your OFBiz productivity by saving you valuable time. Written specifically to give clear and straightforward answers to the most commonly asked OFBiz questions, this compendium of OFBiz recipes will show you everything you need to know to get things done in OFBiz. Whether you are new to OFBiz or an old pro, you are sure to find many useful hints and handy tips here. Topics range from getting started to configuration and system setup, security and database management through the final stages of developing and testing new OFBiz applications.
Table of Contents (15 chapters)
Apache OFBiz Cookbook
About the Author
About the Reviewers

Locating an OFBiz Component

The OFBiz project is organized into groups of directories and files where some directories have a special meaning and are called "Components". To find an OFBiz Component is to find the top-level directory where the Component begins and to locate the configuration file ofbiz-component.xml used to configure that Component.


Note: OFBiz is flexible enough to support an unlimited number of Components. To enable this feature, OFBiz has its own Component configuration files starting with the file located in ~framework/base/config/component-load.xml. This recipe assumes you are looking for and wish to navigate to the top-level location of an existing Component as configured in this and other OFBiz Component configuration settings files.

Getting ready

Before the Component can be located, the following prerequisites should be met:

  1. 1. Determine the name of the Component you are searching for.

  2. 2. Make sure you have the Component name and not the Application name.

  3. 3. If you know which parent grouping the Component falls into, make note of this directory name. The basic OFBiz directory layout is shown here:

How to do it...

To locate the Component, perform the following:

  1. 1. Navigate to the OFBiz install directory.

  2. 2. If you know the parent directory name for this Component, navigate to that directory.

  3. 3. If you do not know the name of the parent Component directory, search each of the OFBiz Component parent directories for the directory with the same name as the Component name you are looking for.

  4. 4. When you find a match, you will have located your Component.


Note: This technique only works if you have not altered any of the Component configuration files discussed later. Because OFBiz may be configured to support any number of Components located anywhere within the code base, a Component's name and a Component's location are only guaranteed to be the same out-of-the-box. This guarantee is predicated on nothing more than best practices. Take note that under normal circumstances, the Component's name and top-level directory name most probably will be the same.

How it works...

The OFBiz distribution is organized into directories and files. At the highest level is the installation or install directory. This directory contains all the files needed by OFBiz to start up and run. It also contains the five parent Component directories:

  • The framework directory contains all the Components necessary to run OFBiz. Many of the other Components have dependencies on Components in this directory. This directory is loaded first during system initialization.

  • The applications directory contains Components that represent many of the business related Applications packaged with OFBiz. For example, you will find the manufacturing, content management, and order management Components and associated Applications in this directory.

  • The specialpurpose directory contains yet more OFBiz packaged Applications and Components.

  • The themes directory contains the resources necessary to implement one or more OFBiz themes.

  • The hot-deploy directory is intended for the placement of new Components and Applications. Out-of-the-box it is empty, containing no OFBiz artifacts.

These parent directories are not Components in and of themselves, but rather are directories that group similar Components. Organizing Components this way makes it easier for humans to find specific Components. It also allows OFBiz to load Components in a pre-set order.

A master list of all Components within an OFBiz installation is found in the ~framework/base/config/component-load.xml file. This file informs OFBiz which parent Component directories should be searched for the parent Component directory configuration file: component-load.xml. Within each component-load.xml file are found directives instructing OFBiz on which Components to load per parent Component directory.

There's more...

You may exclude an entire parent Component directory and all its contained Components from being loaded by commenting out directives in the ~framework/base/config/component-load.xml. You may also exclude individual Components from loading by commenting the appropriate component-load.xml for each individual parent Component.