The System Configuration has various parts:
Name | XML file | Table | Description |
Application | application.xml | - | Application properties (Locale, Application Name, Application Manager) |
System | system-config.xml | - | System configuration |
Data Source | application-context-ds.xml | - | Data Source configuration |
JDBC | jdbc.properties | - | JDBC properties |
RMI | application-context-rmi.xml (Server) rmi.properties (Client) |
- | RMI properties |
Entitites | - | system_entity | Entitites configuration |
Plazma ERM | erm.properties | - | Plazma ERM configuration |
Services | application-context.xml packages/<package name>/service.xml packages/<package name>/service-impl.xml |
- | Spring configuration (services) |
Forms | form-config.xml | - | Forms configuration |
Reports | report-config.xml | - | Reports configuration |
Acceptors | acceptor-config.xml | - | Report acceptors configuration |
Actions | action-config.xml | - | Actions configuration |
MenuBar | menubar-config.xml | - | Menu configuration |
ToolBar | toolbar-config.xml | - | ToolBar configuration |
Interface | interface-config.xml | - | Interface configuration |
Associations | association-config.xml | - | Associations configuration |
Packages | package-config.xml | - | Packages configuration |
Application pproperties is presented in file application.xml
For example:
<properties>
<locale>en_US</locale>
<application-name>Plazma ERP+CRM</application-name>
<application-manager>org.plazmaforge.bsolution.base.client.SWTClientApplicationManager</application-manager>
<is-external-config>true</is-external-config>
</properties>
You can use following application managers:
System
System configuration is presented in file system-config.xml (DTD)
For example:
<system-config>
<!--
Configure components
-->
<configurer name="PackageConfigurer" type="XMLPackageConfigurer"></configurer> <!-- Configure packages -->
<configurer name="ActionConfigurer" type="XMLActionConfigurer"></configurer> <!--Configure actions -->
<configurer name="InterfaceConfigurer" type="XMLInterfaceConfigurer"></configurer> <!-- Configure UIs -->
<configurer name="MenuBarConfigurer" type="XMLMenuBarConfigurer"></configurer> <!-- Configure menu -->
<configurer name="ToolBarConfigurer" type="XMLToolBarConfigurer"></configurer> <!-- Configure toolbar -->
<configurer name="FormConfigurer" type="XMLFormConfigurer"></configurer> <!-- Configure forms -->
<configurer name="AssociationConfigurer" type="XMLAssociationConfigurer"></configurer> <!-- Configure associations -->
<!--
Configure reporting system entities
-->
<configurer name="ReportConfigurer" type="XMLReportConfigurer"></configurer> <!-- Configure reports -->
<configurer name="AcceptorConfigurer" type="XMLAcceptorConfigurer"></configurer> <!-- Configure report acceptors -->
<!--
System properties
-->
<system-properties>
<property name="javax.xml.transform.TransformerFactory">org.apache.xalan.processor.TransformerFactoryImpl</property>
<property name="report.engine.class">org.plazmaforge.framework.report.engine.jasperreports.JasperReportsEngine</property> <!-- Set reporting system -->
</system-properties>
<!--
Platform properties
-->
<platform-properties>
<property name="config.loader.class">org.plazmaforge.bsolution.base.EnterpriseConfigLoader</property>
<property name="period.creator.class">org.plazmaforge.bsolution.base.EnterprisePeriodCreator</property>
<!--
Configure report storage
-->
<property name="report.storage.path">${root.dir}/reports</property>
<!--
Configure Service Locator
-->
<!-- RMIServiceLocator (Lite Server) -->
<!--
<property name="service.locator.class">org.plazmaforge.framework.platform.service.impl.rmi.RMIServiceLocator</property>
-->
</platform-properties>
<property-stores>
<!-- Stores example -->
<!--
<store name="storename">
<property name="prop1">value1</property>
<property name="prop2">value2</property>
</store>
-->
</property-stores>
</system-config>
Consider following pointsData Source
You can configure Data Source in file application-context-ds.xml (DTD).
Setting JDBC connection to the database
For example:
# Set connection properties to the database Firebird
jdbc.driverClassName=org.firebirdsql.jdbc.FBDriver
jdbc.url=jdbc:firebirdsql:localhost/3050:C:\\DATA\\plazma.gdb
jdbc.username=sysdba
jdbc.password=masterkey
Setting RMI properties to connect to Server Application.
rmi.host = localhost
rmi.port = 2005
Meta info of the entities (persistence objects) is stored in the table SYSTEM_ENTITY.
General fileds::
SELECT * FROM system_entity
and get more useful information about system entities.
Anywhere program, knowing only the code of entity,
you can quickly build association of the entity.Class Country.
The class corresponds to other elements (classes) different type.
Plazma ERM
The system uses technology Plazma ERM,
DAO (Data Access Object) layer uses the mapping between database objects and Java objects.
Setting Plazma ERM made in the file erm.properties.
<!-- org/plazmaforge/bsolution/base/server/entities/Country.erm.xml --> <entity-mapping> <entity class="org.plazmaforge.bsolution.base.common.beans.Country" table="COUNTRY"> <key name="id" column="ID" type="Integer" generator-type="increment"/> <attribute name="code" column="COUNTRY_CODE" type="String" /> <attribute name="name" column="NAME" type="String" reqired="true" /> </entity> </entity-mapping>
Services
Services are an important part of the system.
They manage entities (persistence objects).
Services are responsible for loading, adding, changing, deleting data.
Also, the services execute other actions in the system.
In general, each entity corresponds to own service.
Each service has own implementation.
For example:
Country -> CountyService -> CountryServiceImpl
Common services are configured in file application-context.xml (DTD)
For each package we can configure service in files packages/<package name>/service-impl.xml, packages/<package name>/service.xml (DTD)
For example:
<!-- Configure Country Service Implementation packages/base/service-impl.xml --> <bean id="CountryServiceImpl" class="org.plazmaforge.bsolution.base.server.services.CountryServiceImpl" lazy-init="true"> <property name="sessionFactory"><ref local="sessionFactory"/></property> <!-- set session factory --> </bean> .... <!-- Configure Country Service packages/base/service.xml --> <bean id="CountryService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"> <property name="transactionManager"><ref local="transactionManager"/></property> <!-- set transaction manager --> <property name="target"><ref bean="CountryServiceImpl"/></property> <!-- set CountryService implementation --> <property name="transactionAttributes"> <!-- set transaction attributes --> <props> <prop key="*">PROPAGATION_REQUIRED</prop> </props> </property> <property name="preInterceptors"> <!-- set security interceptor --> <list> <ref local="securityInterceptor"/> </list> </property> </bean>More information about configure services see on the site Spring Framework
Forms
GUI client uses forms (Java classes).
In general, each entity corresponds to two base forms:
List (Table) form and Edit form.
For example, for Country:
<form-config> <form id="PersonEditForm"> <actions> <action id="PersonEducationListForm"/> <action id="PersonFamilyListForm"/> <action id="PersonJobListForm"/> <action id="PersonLanguageListForm"/> </actions> </form> <form id="EmployeeListForm"> <reports> <report id="PersonCardReport"/> </reports> </form> <form-config>The PersonEditForm form can execute the actions, which configure in the file action-config.xml (DTD).
The basic reporting system is JasperReports.
Report templates are located in the Report Storage.
The Report Storage is configured in the file system-config.xml (DTD)
For example:
<system-config>
<property name="report.storage.path">${root.dir}/reports</property>
</system-config>
It is relative path. You can also set the absolute path: C:\MyReports<report id="SaleOrder" single="true" folder="goods" file="SaleOrder"/>Here full path is <ReportStorage>/goods/SaleOrder.jasper Extention .jasper is added automatically, because we use JasperReports by default. To set report parameters you can use repport acceptors.
<report id="GoodsSale" folder="goods" file="GoodsSale"> <acceptor id="OrganizationPeriodDialogAcceptor"/> </report>In this example acceptor is dialog which read start and end date. You can use other type of acceptors too.
Acceptors
Acceptors are components that read parameters of reports.
Acceptors is configured in the file acceptor-config.xml (DTD)
For example:
<acceptor id="OrganizationAcceptor" class="org.plazmaforge.bsolution.base.common.acceptors.OrganizationAcceptor"/> <acceptor id="OrganizationPeriodAcceptor" class="org.plazmaforge.bsolution.base.common.acceptors.OrganizationPeriodAcceptor"/> <acceptor id="OrganizationPeriodDialogAcceptor" class="org.plazmaforge.bsolution.base.client.swt.acceptors.OrganizationPeriodDialogAcceptor"/> <acceptor id="OrganizationYearDialogAcceptor" class="org.plazmaforge.bsolution.base.client.swt.acceptors.OrganizationYearDialogAcceptor"/>1 and 2 acceptors read parameters without a dialog, 3 and 4 acceptors show a dialog for input parameters.
Actions
Actions that execute on the client part are configured in the file action-config.xml (DTD).
Here you can set Java class or specify command
For example:
<action id="AboutAction" class="org.plazmaforge.bsolution.base.client.swt.actions.AboutAction"/> <action id="CountryListForm" command="OPEN_LIST_FORM" parameters="base/CountryListForm"/> <action id="PriceListReport" command="PREVIEW_REPORT" parameters="PriceListReport"/>Here the action AboutAction uses Java class. The action CountryListForm uses command OPEN_LIST_FORM with form name (perform form). The action PriceListReport uses command PREVIEW_REPORT with report name (perform report).
MenuBar
The System menu is configured in the file menubar-config.xml (DTD)
<menubar-config> <menubar> .... <!-- Documents menu --> <menu code="Documents" text=""> <menuitem action="NewDocument"/> <menuitem action="ChooseDocument"/> <menuitem text="-"/> <menuitem action="DocumentListForm"/> <menuitem text="-"/> <menuitem action="ContractListForm"/> <menuitem text="-"/> <menu code="Documents.Sale" text=""> <menuitem action="SalePlanListForm"/> <menuitem text="-"/> <menuitem action="SaleOrderListForm"/> .... </menu> </menu> </menubar> </menubar-config>The attribute action of tag menuitem is name of action, which configure in the file action-config.xml.
ToolBar
The ToolBar is configured in the file toolbar-config.xml (DTD)
For example:
<toolbar-config> <toolbar> <toolitem action="PartnerListForm"/> <toolitem action="EmployeeListForm"/> <toolitem action="BankListForm"/> <toolitem action="-"/> <toolitem action="GoodsListForm"/> <toolitem action="-"/> <toolitem action="DocumentListForm"/> <toolitem action="ContractListForm"/> <toolitem action="-"/> <toolitem action="ProjectListForm"/> <toolitem action="TaskListForm"/> <toolitem action="-"/> <toolitem action="ReportListForm"/> <toolbar> <toolbar-config>The attribute action of tag toolitem is name of action which configure in the file action-config.xml.
Interface
The Interface is configured in the file interface-config.xml (DTD)
For example:
<interface-config> <interface id="Sale"/> <interface id="Purchase"/> <interface id="Inventory"/> <interface id="Accounting"/> <interface id="HR"/> <interface id="Payroll"/> <interface id="Project" is-enable="false"/> <interface id="Admin"/> <interface-config>
Associations
The Association is union of class, which have different type, but they have common characteristic. In general, the characteristic is entity (persistence object), which is center of the association. Each member of the association has own type. For example: service, list-form, edit-form, etc. In general, association is created automatically (using standard rules for creating name of java classes and packages). You can configure associations in the file association-config.xml (DTD)
The Packages (Java package) are configured in the file package-config.xml (DTD)