[Yanel-commits] rev 32416 - public/yanel/trunk/src/realms/yanel-website/content

michi at wyona.com michi at wyona.com
Mon Feb 25 12:42:08 CET 2008


Author: michi
Date: 2008-02-25 12:42:08 +0100 (Mon, 25 Feb 2008)
New Revision: 32416

Modified:
   public/yanel/trunk/src/realms/yanel-website/content/1dd57442-911a-408d-b389-d3911255b0a1
   public/yanel/trunk/src/realms/yanel-website/content/85d5aaeb-3f3a-4456-9119-9df00d960967
Log:
more explanations added

Modified: public/yanel/trunk/src/realms/yanel-website/content/1dd57442-911a-408d-b389-d3911255b0a1
===================================================================
--- public/yanel/trunk/src/realms/yanel-website/content/1dd57442-911a-408d-b389-d3911255b0a1	2008-02-25 11:07:41 UTC (rev 32415)
+++ public/yanel/trunk/src/realms/yanel-website/content/1dd57442-911a-408d-b389-d3911255b0a1	2008-02-25 11:42:08 UTC (rev 32416)
@@ -2,11 +2,9 @@
 
 * ./build.sh new-resource-type
 ** The resource type should be created within the directory src/contributions/resources/MY_FIRST_RESOURCE_TYPE
-* Add new resource type path to conf/resource-types.xml resp. conf/local/local.resource-types.xml
+* Register new resource within [(local.)resource-types.xml|resources/using-a-resource-type.html]
 * Rebuild Yanel (./build.sh)
+** Please note that a resource type can also be built on its own (e.g. ./build.sh -f src/resources/xml/build.xml), whereas one might has to update the dependencies (e.g. src/resources/xml/src/build/dependencies.xml)
 * Restart Yanel (./yanel.sh start)
 * Your new resource type should be listed now at http://127.0.0.1:8080/yanel/
-
-__Getting started with your new resource type:__
-* Implement the most recent [Viewable|http://yanel.wyona.org/javadoc/org/wyona/yanel/core/api/attributes/package-summary.html] interface. A very simple implementation example is the [World Time Resource|http://svn.wyona.com/repos/public/yanel/contributions/resources/world-time/src/java/org/wyona/yanel/impl/resources/ExampleResource.java].
-* Implement the most recent [Creatable|http://yanel.wyona.org/javadoc/org/wyona/yanel/core/api/attributes/package-summary.html] interface and test it by applying the query string ''?yanel.usecase=create''
+* Starting using a new resource type within a specific realm by adding a [resource configuration|resources/using-a-resource-type.html] to the resource configuration repository of the specific realm.

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-02-25 11:07:41 UTC (rev 32415)
+++ public/yanel/trunk/src/realms/yanel-website/content/85d5aaeb-3f3a-4456-9119-9df00d960967	2008-02-25 11:42:08 UTC (rev 32416)
@@ -1,2 +1,2 @@
-<?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>&lt;yanel:resource-type src=&quot;/home/USER/yanel-resource-types/calendar/&quot;/&gt;<br/></i><br/>or by providing a package name if the resource type is available as jar file<br/><br/><i>&lt;yanel:resource-type package=&quot;org.wyona.yanel.impl.resources.redirect&quot;/&gt;</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 src/build/(local.)build.properties with the local.config.dir parameter).<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 configuration file <i>realm.xml</i> and search for the XML element with the name &quot;rti&quot;. In the case of the &quot;from scratch&quot; 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 a!
 re located. In the case of the &quot;from scratch&quot; realm,!
  the res
ource 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>&lt;yanel:resource-type src=&quot;/home/USER/yanel-resource-types/calendar/&quot;/&gt;<br/></i><br/>or by providing a package name if the resource type is available as jar file<br/><br/><i>&lt;yanel:resource-type package=&quot;org.wyona.yanel.impl.resources.redirect&quot;/&gt;</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>&lt;yanel:resource-type package=&quot;org.wyona.yanel.impl.resources.redirect&quot; src=&quot;/home/USER/yanel/contributions/resources/redirect/&quot; compile=&quot;true&quot;/&gt;</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
 &quot;rti&quot;. In the case of the &quot;from scratch&quot; 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 &quot;from scratch&quot; 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