i thought i would share my efforts at getting Intake and Torque to be used 
with my Jetspeed app.  The following represents how i get form data to and 
from a Velocity FORM portlet through the persistence layer to the database:

(it probably leaves a lot to be desired, but since i could not find any 
guidance on the subject, i gave it my best shot (what a way to expose one's 
ignorance, huh?))

(the newapp project had been built prior to this time and has not been 
included)

The Object Model (OM) classes are created by:

Change directory to  /usr/tools/tdk/webapps/newapp/WEB-INF/build
Run " $ANT_HOME/bin/ant init".

The build.xml file, build.properties, and the newapp-schema.xml in the 
build directory provide for the creation  of the database tables and the 
Object Model (OM) classes.

Four classes are created for each database table - TableName.java, 
TableNamePeer.java, BaseTableName.java, and BaseTableNamePeer.java.  These 
source files are located in  /usr/tools/tdk/webapps/newapp/WEB-INF/src/o  
rg/mycompany/modules/om.

"ant init" also compiles the source files and places the .class files into 
/usr/tools/tdk/webapps/newapp/WEB-INF/classes/org/mycompany/modules/om.

"ant init" can be run any number of times to recreate the database tables 
and the OM files.  If an OM file already exists, it will not be overwritten 
(this saves a developer's code, which has been placed into an OM file, from 
getting wiped out).  However, any data that was saved in a table will get 
wiped out because the tables are recreated every time that "init' is run 
from this build directory..

$ANT_HOME/bin/ant compile will cause the .java files that have been 
modified to be recompiled.

A directory was created in Jetspeed to accept the OM class files.  The 
directory is 
/usr/tools/tomcat/webapps/jetspeed/WEB-INF/classes/org/mycompany/modules  
/om.

The .class files are copied from the tdk environment to the Jetspeed 
environment (CLASSPATH/package) directory noted in the previous paragraph.

It appears that developer code is placed into either TableName.java or 
TableNamePeer.java - with the latter being the better of the two.

Source files that extend VelocityPortletActions are developed in a 
directory named /usr/wardance/src/action/portlets.  These files are 
provided with a package name of 
 org.apache.jetspeed.modules.actions.portlets .

"javac" is used to compile these source files.  The resulting .class files 
are then copied  to 
/usr/tools/tomcat/webapps/jetspeed/WEB-INF/classes/org/apache/jetspeed/m  
odules/actions/portlet

Note: I tried to place my action/portlet source files into the tdk 
environment so that I could simply use "ant compile".  I could not get it 
to work no matter how I searched into the classpath - finally I gave up and 
I am doing it this hackie way instead.  So - I have two locations for 
source files - the tdk environment and my wardance directory - not pretty. 
 Then there are two locations for the resulting class files.  The one 
location is about Object Model (Torque/Peer) issues.  The other location is 
about Velocity/Intake issues.

Other things that were done:
Copied newapp-inputs.xml (created by "ant init" and located in 
/usr/tools/tdk/webapps/newapp/WEB-INF/conf) to 
/usr/tools/tomcat/webapps/jetspeed/WEB-INF/conf and renamed intake.xml

Modified TurbineResources.properties - uncommented several lines and added 
a line - used the Intake Howto to do this

Currently my core tables are:
Org, Person, Incidents, Hot_Items

and my relationship tables are:
Persons_Incidents and Person_Hot_Items

Note: I am sitting writing this evening to recap my day and share with 
others my attempt at using Jetspeed with Turbine.  I am writing from the 
best of my memory.  If anyone wishes more details or clarifications, please 
ask.  If anyone has some suggestions on how to do things better - PLEASE 
please send that too.



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to