soloist-config.xml
soloist-config.xml represents the basic file for SOLoist project configuration. This file is used for configuring the most important aspects of the framework, such as: referenced database, model files, path to file repository etc.
The easiest way to edit this file is from an IDE (such as Eclipse) with autocomplete.
Referenced Database
RDBMS (Relational Database Management System) to be used in project is configured by way of an rdmbs tag. The tag contains an attribute dbPropFile which specifies the database configuration file with all the details about the database (in is named db.properties by default). For more details on how to write this file, see Database Configuration.
The value of rdbms tag can be one of: mysql, oracle and sybase_asa, for MySQL, Oracle and Sybase SQL Anywhere, respectively. In the EmptyProject, which can be downloaded from SOLoist website, there are three db.properties files for the three databases that SOLoist currently supports (mysql_db.propreties, oracle_db.properties and asa_db.properites).
<rdbms dbPropFile="mysql_db.properties">mysql</rdbms>
Model files
As model-driven development framework, SOLoist needs to reference one or more files containing the domain model. These models are written in XMI (XML Metadata Interchange) files, which are generated by the modeling tool (currently StarUML). These XMI files should be configured with model-files tag.
<model-files> <xmi-file>soloist.xmi</xmi-file> <xmi-file>domainmodel.xmi</xmi-file> </model-files>
The path to the XMI file is resolved against file-system first, then against Java's classpath.
File Repository
SOLoist stores instances of the data-type File inside a directory which is called the file repository. It is necessary to configure an absolute path to this directory. To do so, you should use the file-repository tag, as in the examples below.
On Windows
<file-repository>d:/temp/repository</file-repository>
On Linux
<file-repository>/home/user/soloist/repository</file-repository>
Internationalization and Localization
SOLoist has a full support for internationalization and localization which means supporting multiple languages. The default-locale tag sholud be used for setting the default locale for SOLoist applications.
<default-locale>en</default-locale>
The list of supported locale codes is the same as in GWT.
Maximum Size for File Uploads
The maximum file size for file uploads for all file upload components in SOLoist applications, is set by way of a maxFileSize tag (in KB). It can be overridden in each file upload component in UI configuration, or by setting a tagged value maxFileSize to a file slot in the UML model.
<maxFileSize>5120</maxFileSize>
This section is optional, and can be omitted from the soloist-config.xml. In that case, maxFileSize will default to 5120KB.
Shared Cache Usage
use-shared-cache tag controls whether the system will use the shared cache initially.
<use-shared-cache>true</use-shared-cache>
Other Options
The cacheAppInfo tag is used to optimize loading of SOLoist application in browser. It is set to true by default, and it is recommended not to change it.
The cacheLazyPanel tag is used for configuring whether lazy panels components will be cached or not. During development, it is recommended to set it to false, but for production it should be set to true.
<cacheAppInfos>true</cacheAppInfos> <cacheLazyPanel>false</cacheLazyPanel>
Complete soloist-config.xml Example
Below is the complete soloist-config.xml from the Empty Project.
- soloist-config.xml
<?xml version="1.0"?> <soloist-config> <file-repository>d:/temp/repository</file-repository> <model-files> <xmi-file>emptyproject.xmi</xmi-file> </model-files> <use-shared-cache>true</use-shared-cache> <notifications excludeSlotsForNewInstances="true" visitContexts="true"> <excluded-class>rs::sol::SOLoist::server::BuiltInDomains::Commands::Command </excluded-class> <excluded-class>rs::sol::SOLoist::server::BuiltInDomains::Common::ElementDescriptor </excluded-class> </notifications> <resource-bundles> <bundle name="SoloistClient" client="true" /> <bundle name="SoloistServer" /> <bundle name="emptyproject" default="true" /> </resource-bundles> <default-locale>en</default-locale> <readGUIFromCache>true</readGUIFromCache> <cacheAppInfos>true</cacheAppInfos> <cacheLazyPanel>false</cacheLazyPanel> <maxFileSize>5120</maxFileSize> </soloist-config>