WEB-INF/classes/conf/system-config.xmlIt can be overridden by creating conf/system-config.xml under installation directory.
<cmobilecom.home>/conf/system-config.xmlFor example, conf/system-config.xml
<system-config xmlns="http://xmlns.cmobilecom.com/xml/ns/af/system-config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.cmobilecom.com/xml/ns/af/system-config system-config_1_0.xsd"
version="1.0">
<description>
<![CDATA[
#{bundle.About_CmobilecomAF_Examples}
<p>
<a href="http://Cmobilecom-AF-Examples.com" target="_blank">http://Cmobilecom-AF-Examples.com</a>
]]>
</description>
<param name="supported.locales" value="en-US,en,zh-Hans-*,zh-Hans,zh-Hant-*,zh-Hant,zh-*,zh" />
<param name="resource.bundle.locales" value="zh,zh-Hant" />
<param name="password.policy" value="8,ULNS"/>
<module name="System">
<class>com.cmobilecom.af.module.system.SystemModule</class>
</module>
<module name="HR">
<class>com.cmobilecom.af.example.hr.HrModule</class>
</module>
<instance-type id="system" name="System">
<version>5.19</version>
<icon>/images/icon.png</icon>
<logo>/images/logo.png</logo>
<domain>system.Cmobilecom-AF-Examples.com</domain>
<module-node module="System" />
<!-- mapped to a persistence unit defined in META-INF/persistence.xml -->
<persistence-unit>system</persistence-unit>
</instance-type>
<instance-type id="hr" name="HR">
<version>5.19</version>
<icon>/images/icon.png</icon>
<logo>/images/logo.png</logo>
<domain>hr.Cmobilecom-AF-Examples.com</domain>
<domain>localhost</domain>
<!-- containers: default is manageCntrBean -->
<module-node module="HR" />
<module-node module="System" />
<!-- file size limit -->
<param name="upload.max.file.size" value="5M" />
</instance-type>
</system-config>
See System Config XML Schema for detail.
<module name="System">
<class>com.cmobilecom.af.module.system.SystemModule</class>
<param name="help.enabled" value="false" />
</module>
If the module has implementation for web, the class name will be replaced at loading time. For example,
com.cmobilecom.af.module.system.SystemModulewill be replaced by:
com.cmobilecom.af.module.system.web.WebSystemModule
The order of loading modules is important if there is any dependencies between modules. If Module B has dependencies on Module A, load Module A before Module B.
The module parameter "help.enabled" indicates whether help is enabled for the module. default is true. If disabled, the Help menu nodes for entities of the module will not be shown.
<module-node module="Website">
<module-node module="FTP" visible-name="Websites">
<param name="docBase" value="#{dataAccessUnit.home}/www" />
</module-node>
<containers>
<indexCntrBean/>
<manageCntrBean/>
</containers>
</module-node>
<module-node module="Sales">
<module-node module="Pay">
<menu-node-factory name="default" data-access-unit-type="instance">
<extract-menu-node path="Settings/PaymentMethods" parent-menu-node="Settings"
before-menu-node="CustomerGroups"/>
<extract-menu-node path="Payments" before-menu-node="Shipments"/>
</menu-node-factory>
</module-node>
</module-node>
Suppose the Sales module has the following menu:
Sales Settings Initialize Products PriceList CustomerGroups Orders Invoices ShipmentsAnd the Pay module has the following menu:
Pay Settings Initialize PaymentMethods PaymentsPay module is added as a child module of Sales module. The Pay module configures a menu-node-factory that is enabled for instances only. "Settings/PaymentMethods" of Pay module is extracted and added under the "Settings" (before "CustomerGroups") of parent Sales module. "Payments" of the Pay module is extracted and added under the root (before "Shipments") of parent Sales module. For instance DataAccessUnit(s), the resulting Sales module menu with embedded Pay module:
Sales Settings Initialize Products PriceList PaymentMethods CustomerGroups Orders Invoices Payments ShipmentsFor instanceType DataAccessUnit, menu-node-factory configuration will not be applicable, and so the whole menu of the Pay module will be appended to its parent menu. The resulting Sales module menu with embedded Pay module:
Sales Settings Initialize Products PriceList CustomerGroups Orders Invoices Shipments Pay Settings Initialize PaymentMethods Payments
<instance-type id="hr" name="HR"> <query-hints data-access-unit-type="instanceType"> <hint name="instance" value="NULL"/> </query-hints> </instance-type>
<instance-type id="hr" name="HR"> <entity-type-invisible name="com.cmobilecom.af.entity.system.SecuritySettings" data-access-unit-type="instance"/> </instance-type>