Steve Jobs Project/POS/Documentation:en

From iDempiere
Revision as of 11:36, 14 August 2014 by Trigger (talk | contribs) (Created page with "=Technical Documentation= <br>Do you know anything about [http://sourceforge.net/projects/openbravopos Point Of Sale]? <br>This is an essay about technical documentation of th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Technical Documentation


Do you know anything about Point Of Sale?
This is an essay about technical documentation of the source code of OpenBravo Point Of Sale.


Default Database Configuration Properties

Pos project tree.png

Let's start by describing the data model and show, into the code,
how the script define the DataBase and configuration properties...

I suppose you have imported the project source code successfully.

In NetbeansIDE your project should be like that on the picture below.
When you run the project the first time, the application notifies you because it does not find a database and informs you that it will create a default database. Just click on Yes!
Notification.png

Now take a look at the IDE console. We can see that the class responsible to application configurations is com.openbravo.pos.forms.AppConfig.

Output-run-screen.png

The following is an UML Class diagram for com.openbravo.pos.forms.AppConfig

AppConfig-UML-Model.png

Try to open the file into your IDE and focus on the part of code in which database parameters are configured. Into this class, the method in charge to initialise the default value of configuration parameters is loadDefault.

private void loadDefault() {

       m_propsconfig = new Properties();

       String dirname = System.getProperty("dirname.path");
       dirname = dirname == null ? "./" : dirname;

       m_propsconfig.setProperty("db.driverlib", 
             new File(new File(dirname), "lib/derby.jar").getAbsolutePath());
       m_propsconfig.setProperty("db.driver", "org.apache.derby.jdbc.EmbeddedDriver");
       m_propsconfig.setProperty("db.URL", "jdbc:derby:" + 
             new File(new File(System.getProperty("user.home")), 
                 AppLocal.APP_ID + "-database").getAbsolutePath() + ";create=true");
       m_propsconfig.setProperty("db.user", "");
       m_prop
Cookies help us deliver our services. By using our services, you agree to our use of cookies.