Realm Configuration

The realm configuration for each realm is done in the file realm.xml in its root directory. For an example, see src/realms/from-scratch-realm-template/realm.xml or here.

Name of the Realm

The name of the realm is configured as follows:

<name>The name of my realm</name>

Custom Implementation of the Realm

The implementation of the realm can be configured as follows:

<realm-config class="org.wyona.yanel.impl.map.FOAFRealm" xmlns="http://www.wyona.org/yanel/realm/1.0">...</realm-config>

whereas if the class attribute is not set, then the default implementation will be used.

Custom web authenticator

The default web authenticator implementation org.wyona.yanel.servlet.security.impl.DefaultWebAuthenticatorImpl (which is set by org.wyona.yanel.core.map.RealmDefaultImpl) can be overwritten by configuring

<web-authenticator class="foo.bar.yanel.servlet.security.impl.FooBarWebAuthenticatorImpl">
<foo:bar xmlns:foo="http://bar.foo/yanel/web-authenticator/1.0">some-custom-config</foor:bar>
</web-authenticator>

Resource Configurations Repository

The resource configurations repository is configured as follows:

<rti>config/rti-repository.xml</rti>

Language handler

A custom language handler can be configured as follows:

<language-handler class="org.wyona.yanel.impl.StaticLanguageHandler"/>

whereas if no custom language handler is set, then the org.wyona.yanel.impl.DefaultLanguageHandler is used (see org.wyona.yanel.core.map.RealmDefaultImpl).

Additional Yarep based Repositories

Additional Yarep repositories can be configured as follows

<yarep-repositories>
<repository id="my-extra-repo" config="config/my-extra-repository.xml"/>
</yarep-repositories>

I18n Configuration

The i18n catalogue can be configured as follows

<i18n-catalogue>yanelrepo:/my-i18n-catalogue.xml</i18n-catalogue>

More information on i18n can be found within the i18n documentation.

Custom menu implementation

Custom menu implementation can be configured as follows, either by specifying a custom toolbar implementation

<menu class="org.wyona.yanel.servlet.toolbar.impl.FromScratchRealmToolbar"/>

or by specifying a custom menu implementation

<menu class="org.wyona.yanel.servlet.menu.impl.DefaultMenuV2"/>

Please note that both versions use the menu element to configure the Java class.

If neither nor is specified, then the DefaultYanelToolbar class and the DefaultMenu (version 1) class are used, which is set within src/webapp/src/java/org/wyona/yanel/servlet/YanelHTMLUI.java

More details on developing a custom Toolbar can be found inside the Toolbar documentation.

Custom Repository Navigation

The custom repository navigation can be configured as follows

<repo-navigation class="foo.bar.yanel.impl.navigation.CustomSitetreeImpl">"Custom Configuration"</repo-navigation>

whereas Yanel is offering various implementations within the package org.wyona.yanel.impl.navigation.

The default implementation is org.wyona.yanel.impl.navigation.SitetreeResConfigAndDataRepoImpl, whereas this is configured within spring-yanel-config.xml (Yanel source: conf/spring-yanel-config.xml, Yanel webapp binary: WEB-INF/classes/spring-yanel-config.xml).

The XML file implementation org.wyona.yanel.impl.navigation.SitetreeDOMImpl requires a source element:

<repo-navigation class="org.wyona.yanel.impl.navigation.SitetreeDOMImpl">
  <src>data-repo/data/sitetree.xml</src>
<!--
  <src>yanelrepo:/sitetree.xml</src>
-->
</repo-navigation>


Your comments are much appreciated

Is the content of this page unclear or you think it could be improved? Please add a comment and we will try to improve it accordingly.