[Yanel-commits] rev 38804 -
public/yanel/trunk/src/realms/yanel-website/content
michi at wyona.com
michi at wyona.com
Mon Sep 22 11:15:06 CEST 2008
Author: michi
Date: 2008-09-22 11:15:05 +0200 (Mon, 22 Sep 2008)
New Revision: 38804
Modified:
public/yanel/trunk/src/realms/yanel-website/content/85d5aaeb-3f3a-4456-9119-9df00d960967
Log:
note about overwriting default by local and also a note about maven added
Modified: public/yanel/trunk/src/realms/yanel-website/content/85d5aaeb-3f3a-4456-9119-9df00d960967
===================================================================
--- public/yanel/trunk/src/realms/yanel-website/content/85d5aaeb-3f3a-4456-9119-9df00d960967 2008-09-22 08:42:19 UTC (rev 38803)
+++ public/yanel/trunk/src/realms/yanel-website/content/85d5aaeb-3f3a-4456-9119-9df00d960967 2008-09-22 09:15:05 UTC (rev 38804)
@@ -1,2 +1,3 @@
-<?xml version="1.0"?><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Using a resource type</title> <link rel="neutron-introspection" type="application/neutron+xml" href="?yanel.resource.usecase=introspection"/></head><body> <h1>Registering and using a resource type</h1><br/><h2>Registering a resource type<br/></h2>In order to use an existing resource type within a realm one first needs to register the resource type such that the Yanel core knows about it. A resource can either be registered by providing a directory path to where the definition of the resource type is located<br/><br/><i><yanel:resource-type src="/home/USER/yanel-resource-types/calendar/"/><br/></i><br/>or by providing a package name if the resource type is available as jar file<br/><br/><i><yanel:resource-type package="org.wyona.yanel.impl.resources.redirect"/></i><br/><br/>In the case of a binary webapp distribution one needs to add such an entry to the file <i>W!
EB-INF/classes/resource-types.xml</i>.<br/><br/>In the case of the source distribution one should copy the file <i>conf/resource-types.xml</i> to <i>conf/local/local.resource-types.xml</i> and add such a resource-type entry to this local file (which can also be configured within <i>src/build/(local.)build.properties</i> with the l<i>ocal.config.dir</i> parameter). Please note that a resource is basically a Java class which is compiled during the build process of Yanel, hence once needs to add a src attribute also for resource types which shall be made available as a package, e.g.<br/><br/><i><yanel:resource-type package="org.wyona.yanel.impl.resources.redirect" src="/home/USER/yanel/contributions/resources/redirect/" compile="true"/></i><br/><br/><h2>Using a resource type</h2><p>Depending on the realm configuration one first has to figure out where the realm specific resource configurations are located. Take a look at the realm configurat!
ion file <i>realm.xml</i> and search for the XML element with !
the name
"rti". In the case of the "from scratch" realm the value should be <i>config/rti-repository.xml</i> (whereas the path is resolved relative to the file <i>realm.xml</i>). <br/></p><p>Then take a look at this file and depending on the configured repository implementation one should be able to figure out where the resource configurations are located. In the case of the "from scratch" realm, the resource configurations are located within the directory <i>res-configs</i>.<br/></p></body>
+<?xml version="1.0"?><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>Using a resource type</title> <link rel="neutron-introspection" type="application/neutron+xml" href="?yanel.resource.usecase=introspection"/></head><body> <h1>Registering and using a resource type</h1><br/><h2>Registering a resource type<br/></h2>In order to use an existing resource type within a realm one first needs to register the resource type such that the Yanel core knows about it. A resource can either be registered by providing a directory path to where the definition of the resource type is located<br/><br/><i><yanel:resource-type src="/home/USER/yanel-resource-types/calendar/"/><br/></i><br/>or by providing a package name if the resource type is available as jar file<br/><br/><i><yanel:resource-type package="org.wyona.yanel.impl.resources.redirect"/></i><br/><br/>whereas such a package needs to contain a <i>resource.xml</i> file and if no <i>src</i> att!
ribute was specified, then it needs to be referenced by some maven dependencies file in order to be downloaded. As an example see the redirect resource configured within <i>YANEL_HOME/conf/resource-types.xml</i>.<br/><br/>In the case of a binary webapp distribution one needs to add such an entry to the file <i>WEB-INF/classes/resource-types.xml</i>.<br/><br/>In the case of the source distribution one should copy the file <i>conf/resource-types.xml</i> to <i>conf/local/local.resource-types.xml</i> and add such a resource-type entry to this local file (whereas the path to this local configuration file can be configured within <i>src/build/(local.)build.properties</i> with the l<i>ocal.config.dir</i> parameter). Please note that the local configuration file is overwriting the default configuration (and is NOT additional).<br/><br/>Please note that a resource is basically a Java class which is compiled during the build process of Yanel, hence once needs to add a src attribute !
also for resource types which shall be made available as a pac!
kage, e.
g.<br/><br/><i><yanel:resource-type package="org.wyona.yanel.impl.resources.redirect" src="/home/USER/yanel/contributions/resources/redirect/" compile="true"/></i><br/><br/>except the library containing the package is referenced within some maven dependencies file of a realm or another resource.
+<h2>Using a resource type</h2><p>Depending on the realm configuration one first has to figure out where the realm specific resource configurations are located. Take a look at the realm configuration file <i>realm.xml</i> and search for the XML element with the name "rti". In the case of the "from scratch" realm the value should be <i>config/rti-repository.xml</i> (whereas the path is resolved relative to the file <i>realm.xml</i>). <br/></p><p>Then take a look at this file and depending on the configured repository implementation one should be able to figure out where the resource configurations are located. In the case of the "from scratch" realm, the resource configurations are located within the directory <i>res-configs</i>.<br/></p></body>
</html>
\ No newline at end of file
More information about the Yanel-commits
mailing list