Most of the spring read configuration files are within this directory structure. There are three types of configuration files to find here and a simple mechanism of overwriting default values with your customized ones. In this installation and administration guide only the configuration files and their meaning is outlined. The build.properties file is copied to the webapp/WEB-INF/classes/serviceconfig during the build process. This is needed, because the spring config files make use of the defined property values.
Always propagate changes to the build.properties with an ant config-all copy-resources and a restart of tomcat.
The three types
Framework settings
brasatoconfig.xml
org/olat/core/_spring/olatcoreconfig.xml
org/olat/core/commons/scheduler/_spring/olatdefaultconfig.xml This file is located inside the olat-core.jar providing defaults to be overriden.
org/olat/core/commons/scheduler/_spring/olatextconfig.xml
General OLAT web application settings
org/olat/_spring/brasatoconfigpart.xml
org/olat/_spring/olat_userconfig.xml
org/olat/_spring/olatextconfig.xml
Module/Component/Service Settings
org/olat/search/service/_spring/olatdefaultconfig.xml
Overriding mechanism
olatdefaultconfig.xml contains default values and is placed under src/serviceconfig/...>a_package_path</_spring/olatdefaultconfig.xml containing all bean definitions and attributes defined by a service
Any olatextconfig.xml containing the same bean definitions, overrides the values from the olatdefaultconfig.xml.
Basic settings from build.properties injected in various classes by spring. Here the list of AJAX accepted user agent strings is defined.
Defines a mapping of paths to dispatchers in <bean id="org.olat.core.dispatcher.Dispatcher"...
Some examples are:
/dmz/ refers to dmzbean which loads and configures the org.olat.dispatcher.DMZDispatcher
/auth/ refers to authbean which loads and configures the org.olat.dispatcher.AuthenticatedDispatcher
This feature was started, designed and developed by BPS Bildungsportal Sachsen and finished by Frentix . The last tests and fixes were done by MELS .
This configuration file defines the user attributes available and mandatory/optional, moreover it is the place where their usage is specified. This means you can remove, add, rename user attributes, and also define their availability in different forms, tables/listings, and read only views here.
Each new release means that you must track the changes in this configuration and act accordingly - e.g. adding of new forms, removing forms, etc.
This custom fields may not only appear in forms and read only views. There are table data models, bulk imports, exports, configuration managers to be taken into account. Thus it is a configuration to be tested, and thought about twice.
Search with custom fields works only for the users having those user fields filled.
The configuration file consists of three parts. First of all there is a list of User properties defining at least a name , group and deletable boolean value. Then there is a list of code places which are user property enabled. Hence you can configure each table, form, read only view with the set of user properties visible. In the first part the implementation for the org.olat.user.UserManager is specified.
The three parts
The property name="userPropertyHandlers" in the bean id="org.olat.user.UserPropertiesConfig" contains the list of available user properties in the system.
The property name="userPropertyUsageContexts" in the bean id="org.olat.user.UserPropertiesConfig" defines where the user properties are used.
The bean id="org.olat.user.UserManager" defines which user manager implementation is used - you probably do not change this.
The following examples introduce the concepts used:
Example 4.1. Definition of a user property
<bean name="userPropertyFirstName" class="org.olat.user.propertyhandlers.Generic127CharTextPropertyHandler"> <property name="name" value="firstName" /> <property name="group" value="account" /> <property name="deletable" value="false" /> </bean>
The beans name must be unique over all properties, the class refers to a java class responsible for handling input, output, and validation. This Generic127CharTextPropertyHandler needs the three values initialized via spring properties - name, group, deletable. | |
name i18n key for translation | |
group you can group properties together, e.g. address if your property belongs to address information | |
deletable if the value can/should be deleted in case the user is deleted. Should be true in most cases. |
Example 4.2. userPropertyHandlers is a list of previous defined properties
<bean id="org.olat.user.UserPropertiesConfig" class="org.olat.user.propertyhandlers.UserPropertiesConfigImpl"> <property name="userPropertyHandlers"> <list> <ref bean="userPropertyFirstName" /> <ref bean="userPropertyLastName" /> <ref bean="userPropertyEmail" /> <ref bean="userPropertyBirthDay" /> <ref bean="userPropertyGender" /> <ref bean="userPropertyTelPrivate" /> <ref bean="userPropertyTelMobile" /> <ref bean="userPropertyTelOffice" /> <ref bean="userPropertySkype" /> <ref bean="userPropertyHomepage" /> <ref bean="userPropertyStreet" /> <ref bean="userPropertyExtendedAddress" /> <ref bean="userPropertyPoBox" /> <ref bean="userPropertyZipCode" /> <ref bean="userPropertyRegion" /> <ref bean="userPropertyCity" /> <ref bean="userPropertyCountry" /> <ref bean="userPropertyInstitutionalName" /> <ref bean="userPropertyInstitutionalUserIdentifier" /> <ref bean="userPropertyInstitutionalEmail" /> <ref bean="userPropertyOrgUnit" /> <ref bean="userPropertyStudySubject" /> </list> </property>
Example 4.3. Home settings configuration
<bean id="org.olat.user.UserPropertiesConfig" class="org.olat.user.propertyhandlers.UserPropertiesConfigImpl"> <property name="userPropertyHandlers"> <list> <ref bean="userPropertyFirstName" /> <ref bean="userPropertyLastName" /> . . . <ref bean="userPropertyStudySubject" /> </list> </property> <property name="userPropertyUsageContexts"> <map> <!-- Forms that show user properties --> <entry key="org.olat.user.ProfileForm"> <bean class="org.olat.user.propertyhandlers.UserPropertyUsageContext"> <property name="propertyHandlers"> <list> <ref bean="userPropertyFirstName" /> <ref bean="userPropertyLastName" /> . . . <ref bean="userPropertyStudySubject" /> </list> </property> <property name="mandatoryProperties"> <set> <ref bean="userPropertyFirstName" /> <ref bean="userPropertyLastName" /> <ref bean="userPropertyEmail" /> </set> </property> <property name="userViewReadOnlyProperties"> <set> <ref bean="userPropertyFirstName" /> <ref bean="userPropertyLastName" /> . . . <ref bean="userPropertyStudySubject" /> </set> </property> <property name="adminViewOnlyProperties"> <set /> </property> </bean> </entry>
The configuration affects the | |
The list of properties are shown as input fields in the specified order to the user. | |
The set of properties are mandatory and a validity check for a not empty semantic is called on each property. | |
This set defines which properties are only in read-only mode for the user. | |
The last set are the properties visible to administrators only. Make sure you do not have them here and also in read-only for users list. |
The interesting configuration parts are, and simply ignore the rest:
Layout defining controllers for header, topnav and footer
id="fullWebApp.HeaderControllerCreator" defines layout and work flows for the header part.
id="fullWebApp.TopNavControllerCreator" defines layout and work flows for the top nav part.
id="fullWebApp.FooterControllerCreator" defines layout and work flows for the footer part.
Bootstrap for the olatcore, mainly for services which have to be configured, created before anything else happens.
Default values of the scheduler. This file is inside of the olat-core.jar and own values must be specified in the olatextconfig.xml