Helma Logo
main list history
previous version  overview  next version

Version 1 by zumbrunn on 18. February 2009, 21:38

The class.properties is used to tell an application that it should not use standard <a href="http://helma.server-side-javascript.org/reference/HopObject.html">HopObjects</a> as basic building blocks but rather custom Java classes.

It is possible to use any public Java classes as building blocks of a Helma application. If classes implement the <a href="http://adele.helma.org/source/cvsweb.cgi/helma/src/helma/framework/IPathElement.java?rev=1.2&content-type=text/x-cvsweb-markup&cvsroot=hop">helma.framework.IPathElement</a> interface, the methods defined therein will be called to resolve the URI paths of incoming requests and assign a scripted prototype to each class. If objects do not implement the IPathElement interface, these methods can be implemented as JavaScript functions in the object's prototypes.

<table width="95%" border="1" cellspacing="0" cellpadding="5">
<tr class="small">
<th>Property</th>
<th>Description</th>
</tr>

<tr bgcolor="#ccccff">
<td valign="top">root</td>
<td>The root property defines the class name of the application's root object. Unless factory class and method are defined as described below, Helma will try to create an instance of this class by calling the zero-argument constructor on the class.</td>
</tr>

<tr bgcolor="#ccccff">
<td valign="top">root.factory.class</td>
<td>The class to be used as factory for the root object.</td>
</tr>

<tr bgcolor="#ccccff">
<td valign="top">root.factory.method</td>
<td>The method to be called as factory method for the root object. If defined, Helma will try to invoke the static method of this name on the class defined by the root.factory.class property.</td>
</tr>

<tr bgcolor="#ccccff">
<td valign="top">com.any.java.Class</td>
<td>All other properties will be interpreted as mappings between Java class names and Helma prototypes. Each of these mappings specifies that Java objects of the given class will be wrapped into the Helma prototype defined as property value. For example:
<tt>
helma.main.Server = root
helma.framework.core.Application = application
</tt></td>
</tr>

</table>

See also:
http://helma.org/pipermail/helma-user/2001-September/003865.html


     removed
     added