You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Russell Edens <ru...@speakeasy.net> on 2001/04/18 23:05:38 UTC

Seperating Application Flow from actions/views

John McNally wrote:
> I am not satisfied with the approach, though.  I think an xml
> specification of application flow would be much better, so that actions
> and templates do not have to contain so much of this logic.  I think
> this has broader scope than intake and just handling error screens and
> so should be built separately.  But of course that is quite a project.

This is a worthy project.  Before using Turbine we built a system that defined
the relationships between views and models in XML.  It worked great.  The
application flow was not defined in the view, this allowed views to be reused
without adding custom logic.  We also used this layer to define the binding
between the model and the view.  This way the same view could render different
data depending on the users context.  As an example, a screen that updates
employee information would bind to a different model depending on if the logged
in employee was 'self' or 'manager'.  The binding of the view and model used
roles to determine the appropriate binding.

An extreem example of the power of this system was a Shopping cart application
that allowed a customer service rep to logon to impersonate the user.  What
views they could see were determined by the XML.  It was a sub-set of what the
user saw.  They could see the shopping basket but could not submit it.  In
essense they could trouble shoot the entire application with the user in
read-only mode.  The views to render this did not change at all.  The models did
not change at all.  New XML defining what screen flow based on role was all that
was added to achieve this.

My intention was to either build this layer on top of Turbine or add it to
Turbine.  If there is a general consensus that this functionality is worth
building into Turbine - I'm game.


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


RE: Seperating Application Flow from actions/views

Posted by Pere Torrodellas <pt...@fihoca.com>.
Hi,

I'm not sure if the following is relevant to your discussion, but to add my 2
cents...

Just before discovering Turbine and getting involved in our present test, I
designed and developed a Workflow framework that I think follows some of your
ideas. It does work in our testing environment, but has not been used in any
real development yet. These are its general characteristics:

- A workflow is defined in XML as a set of states.

- A workflow can be applied to any Object that implements a specific interface.

- More than one workflow can be defined and launched on an Object at the same
time. The framework controls mutual pre-requisites and exclusive use of the
controlled object to synchronise them.

- Each workflow state has a set of actions, whose successfull completion leads
to a new state. An unsuccessful action leaves the Object in the state it was.
All this is defined in the XML file.

- Each action can have a set of pre-requisites (states of other workflows, also
defined in the XML file) that must be met for the action to be selectable for
execution (f.e. "Publish Document" can not be executed before the
"Authorisation" workflow reaches the "Is Authorised" state).

- Actions can be synchronous or asynchronous.

- An action can perform any process on the controlled Object. Actions can be
defined to have exclusive control on the controlled Object while executing, or
able to share control with actions of other wokflows that are running in
parallel

- Actions get input data from the requester as an object of a specific class,
and report the results in the same way.

- There is an interface to control permissions to launch workflows and execute
actions.

- Given a user, an object and a state, the framework reports what actions the
user can request according to his/her permissions.

- There's a log to register who does what and when.

Seen under the Turbine light:

- A Turbine Action/Screen would be the requester of the controlled object(s)
state and possible actions, reporting them to the user in any suitable way.

- A Turbine Action would request the execution of a workflow action selected by
the user, and decide what Screen to return in function of the results.

- The execution permissions would be managed with Turbine Security.

- The Object state(s) would be controlled with the Turbine DB and Peers.

- The framework log would be set to use Turbine Log.

I'm sure that there's still a lot of work to be done on it; maybe our next
project will use it with Turbine.

I'm not sure of the legal status of all this, but I certainly can discuss the
general ideas if anyone is interested.

Pere Torrodellas

----- Mensaje original -----
De: Russell Edens <ru...@speakeasy.net>
Para: <tu...@jakarta.apache.org>
Enviado: miƩrcoles 18 de abril de 2001 23:05
Asunto: Seperating Application Flow from actions/views


> John McNally wrote:
> > I am not satisfied with the approach, though.  I think an xml
> > specification of application flow would be much better, so that actions
> > and templates do not have to contain so much of this logic.  I think
> > this has broader scope than intake and just handling error screens and
> > so should be built separately.  But of course that is quite a project.
>
> This is a worthy project.  Before using Turbine we built a system that defined
> the relationships between views and models in XML.  It worked great.  The
> application flow was not defined in the view, this allowed views to be reused
> without adding custom logic.  We also used this layer to define the binding
> between the model and the view.  This way the same view could render different
> data depending on the users context.  As an example, a screen that updates
> employee information would bind to a different model depending on if the
logged
> in employee was 'self' or 'manager'.  The binding of the view and model used
> roles to determine the appropriate binding.
>
> An extreem example of the power of this system was a Shopping cart application

> that allowed a customer service rep to logon to impersonate the user.  What
> views they could see were determined by the XML.  It was a sub-set of what the
> user saw.  They could see the shopping basket but could not submit it.  In
> essense they could trouble shoot the entire application with the user in
> read-only mode.  The views to render this did not change at all.  The models
did
> not change at all.  New XML defining what screen flow based on role was all
that
> was added to achieve this.
>
> My intention was to either build this layer on top of Turbine or add it to
> Turbine.  If there is a general consensus that this functionality is worth
> building into Turbine - I'm game.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Seperating Application Flow from actions/views

Posted by Leon Messerschmidt <le...@opticode.co.za>.
> This is a worthy project.  Before using Turbine we built a system that
defined
> the relationships between views and models in XML.  It worked great.  The
> application flow was not defined in the view, this allowed views to be
reused
> without adding custom logic.  We also used this layer to define the
binding
> between the model and the view.  This way the same view could render
different
> data depending on the users context.  <snip>

AssemblerFactories are responsible for creating the screen or "logic" for a
specific view.  You can possibly create a custom AssemblerFactory that knows
about your mapping.  Just a thought...

~ Leon



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Location of javadoc api documentation for the tdk builds?

Posted by Jason van Zyl <jv...@apache.org>.
Darren Pamatat wrote:
> 
> Where is the javdoc api documentation for the tdk builds found at:
> http://jakarta.apache.org/turbine/tdk/
> 
> The tdk includes all kinds of documentation but is missing the api
> (javadocs) for the turbine packages. Where is the javadoc
> corresponding to these versions?

The missing turbine api docs has been noted. I forgot to
generate the docs before I built the last tdk.

> 
> Thanks
> Darren
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://tambora.zenplex.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Mail Archives???

Posted by Jon Stevens <jo...@latchkey.com>.
on 4/26/01 5:52 AM, "Darren Pamatat" <dp...@yahoo.com> wrote:

> It seems that the mail-archives for turbine is not being updated
> anymore. Is there a new archive somewhere else?
> 
> Thanks,
> Darren

Brian says that the emails are being sent to mail-archive.com yet they
aren't showing up and they want to see proof of that...and I haven't heard
back from Brian about it...

-jon


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Mail Archives???

Posted by Darren Pamatat <dp...@yahoo.com>.
It seems that the mail-archives for turbine is not being updated
anymore. Is there a new archive somewhere else?

Thanks,
Darren


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Help setting up TDK on Linux

Posted by "Randall G. Alley" <ir...@bellsouth.net>.
Thanks Jon.

Jon Stevens wrote:

> on 4/25/01 6:44 PM, "Randall G. Alley" <ir...@bellsouth.net> wrote:
>
> > That was the last thing I tried, and it didn't work for me. I've been fiddling
> > with this since the switch to Catalina, and I've never
> > got reloading to work with Catalina. Is anyone else actually got it working
> > now
> > ?
> >
> > last try was using the scarab example from server.xml :
> >
> >       <Context path="/scarab" docBase="scarab" reloadable="true" debug="0">
> >          <Logger className="org.apache.catalina.logger.FileLogger"
> >                    prefix="scarab_log." suffix=".txt"
> >                 timestamp="true"/>
> >          <Loader checkInterval="1"
> >               className="org.apache.catalina.loader.StandardLoader"/>
> >          <Manager debug="99"/>
> >       </Context>
>
> I'm sorry, but you are going to have to come up with a repeatable set of
> code (ie: a simple Turbine webapp) based on a recent Catalina nightly
> snapshot and instructions on how to duplicate it and then get Craig to look
> into it.
>
> Craig.McClanahan@eng.sun.com
>
> This is what I would have to do if I was in your shoes (and I would) but I
> don't have time to deal with the issue and it isn't a priority for me right
> now.
>
> -jon
>
>   ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Help setting up TDK on Linux

Posted by Jon Stevens <jo...@latchkey.com>.
on 4/25/01 6:44 PM, "Randall G. Alley" <ir...@bellsouth.net> wrote:

> That was the last thing I tried, and it didn't work for me. I've been fiddling
> with this since the switch to Catalina, and I've never
> got reloading to work with Catalina. Is anyone else actually got it working
> now
> ?
> 
> last try was using the scarab example from server.xml :
> 
>       <Context path="/scarab" docBase="scarab" reloadable="true" debug="0">
>          <Logger className="org.apache.catalina.logger.FileLogger"
>                    prefix="scarab_log." suffix=".txt"
>                 timestamp="true"/>
>          <Loader checkInterval="1"
>               className="org.apache.catalina.loader.StandardLoader"/>
>          <Manager debug="99"/>
>       </Context>

I'm sorry, but you are going to have to come up with a repeatable set of
code (ie: a simple Turbine webapp) based on a recent Catalina nightly
snapshot and instructions on how to duplicate it and then get Craig to look
into it.

Craig.McClanahan@eng.sun.com

This is what I would have to do if I was in your shoes (and I would) but I
don't have time to deal with the issue and it isn't a priority for me right
now.

-jon


Re: Help setting up TDK on Linux

Posted by "Randall G. Alley" <ir...@bellsouth.net>.
That was the last thing I tried, and it didn't work for me. I've been fiddling
with this since the switch to Catalina, and I've never
got reloading to work with Catalina. Is anyone else actually got it working now
?

last try was using the scarab example from server.xml :

        <Context path="/scarab" docBase="scarab" reloadable="true" debug="0">
           <Logger className="org.apache.catalina.logger.FileLogger"
                     prefix="scarab_log." suffix=".txt"
                  timestamp="true"/>
           <Loader checkInterval="1"
                className="org.apache.catalina.loader.StandardLoader"/>
           <Manager debug="99"/>
        </Context>


Jon Stevens wrote:

> on 4/25/01 4:01 PM, "Randall G. Alley" <ir...@bellsouth.net> wrote:
>
> [snipped to the meat of the message]
>
> > We're using tdk13 at present, and still have to restart Catalina after
> > recompiling classes. Is anyone else getting the class reloading to work ?
>
> I have gotten it to work in the past. If you try it with Scarab's sandbox
> settings, it will most likely work.
>
> -jon
>
> --
> If you come from a Perl or PHP background, JSP is a way to take
> your pain to new levels. --Anonymous
> <http://jakarta.apache.org/velocity/ymtd/ymtd.html>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Help setting up TDK on Linux

Posted by Jon Stevens <jo...@latchkey.com>.
on 4/25/01 4:01 PM, "Randall G. Alley" <ir...@bellsouth.net> wrote:

[snipped to the meat of the message]

> We're using tdk13 at present, and still have to restart Catalina after
> recompiling classes. Is anyone else getting the class reloading to work ?

I have gotten it to work in the past. If you try it with Scarab's sandbox
settings, it will most likely work.

-jon

-- 
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Help setting up TDK on Linux

Posted by "Randall G. Alley" <ir...@bellsouth.net>.
Ok, I admit it. I'm a Linux idiot. :>} But I'm trying to reform myself.

Could someone give me some pointers (possibly in private e-mail if this
is off topic) about where to install, what permissions, and so forth ? My
idea is to install the tdk/tomcat on my (underused) Linux box (which is
much faster than the NT stations), and continue editing, compiling and
controlling things primarily from NT workstations.

We're using tdk13 at present, and still have to restart Catalina after
recompiling classes. Is anyone else getting the class reloading to work ?
I've tried all the server.xml context settings mentioned on the list, but
no luck. Anyway, this forces us to continually restart Catalina. I would
think we could keep a telnet session open to the Linux machine to do
this. This would be vastly easier if I didn't have to restart all the
time. I've got Samba sharing going, so directory access from the NT
machines is no problem.

Thanks in advance.

I'd be infernally grateful.

Randy



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: TDK-Torque and ForiegnKey into TURBINE_USER

Posted by Chris Campbell <ca...@zodiacnetworks.com>.
Hmmm... when I try this, I still get errors.: The sql gets generated with an
unresolved $fk variable for Turbine_User, even if the whole Turbine_User
table is copied into the project.xml file! And the generated
TurbineUser.java file is generated as an empty file. Hmmm... something wierd
is gonig on in torque land, is it me?

Chris

----- Original Message -----
From: Leon Messerschmidt
To: turbine-user@jakarta.apache.org
Sent: Thursday, April 19, 2001 12:10 AM
Subject: Re: TDK-Torque and ForiegnKey into TURBINE_USER


Hi Chris,

You can create a dummy table for TURBINE_USER to prevent this error.
Unfortunately you'll end up with wrong TurbineUser* classes in your om
directory.  I usually delete these and edit the code by hand to make it
compile.

I'd be grateful if you have a patch that works :-)

~ Leon


----- Original Message -----
From: "Chris Campbell" <ca...@zodiacnetworks.com>
To: <tu...@jakarta.apache.org>
Sent: Thursday, April 19, 2001 2:13 AM
Subject: TDK-Torque and ForiegnKey into TURBINE_USER


> When I try to establish a foreignKey in a project-schema.xml table that
> refrences TURBINE_USER's USER_ID, my om classes are not correctly
generated.
>
> During om class generation I get this error:
>
> java.lang.NullPointerException
>         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:917)
>         at
>
org.apache.turbine.torque.transform.XmlToAppData.parseFile(XmlToAppData.java
> :134)
>         at
>
org.apache.turbine.torque.ant.VTorqueTask.initControlContext(VTorqueTask.jav
> a:230)
>         at
> org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:299)
>         at org.apache.tools.ant.Target.execute(Target.java:153)
>         at org.apache.tools.ant.Project.runTarget(Project.java:898)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
>         at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
>
>         at org.apache.tools.ant.Target.execute(Target.java:153)
>         at org.apache.tools.ant.Project.runTarget(Project.java:898)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:510)
>         at org.apache.tools.ant.Main.runBuild(Main.java:421)
>         at org.apache.tools.ant.Main.main(Main.java:149)
>
> And the class that has the foriegn key does not get fully rendered. For
> example, the following method:
>
>  public void setUserPrefrences(UserPrefrences v) throws Exception
>     {
>         aUserPrefrences = null;
>            set${column.JavaName}(v.get${colFK.JavaName}());
>            aUserPrefrences = v;
>     }
>
> Is setting the foreingKey to refrence Turbine_User user_id column
possible?
> ( Or the wrong thing to do ?)
>
> Thanks
> Chris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


problem with order-by

Posted by kidong <Ki...@public.uni-hamburg.de>.
hello,

i have problem with order-by function with criteria.
my first database connection to retrieve all rows is so:

Criteria crit2 = new Criteria();
Vector v2 = org.apache.turbine.ProjektePeer.doSelect( crit2 );

connection null!

i have tried again with this code:


Criteria crit2 = new Criteria();
Vector v2 = org.apache.turbine.ProjektePeer.doSelect( crit2,
GetDBConnection.getAnotherDBConnection()  );

it runs fine.

and now,

Criteria crit2 = new Criteria();
crit2.addOrderByColumn( ProjektePeer.NAME );
Vector v2 = org.apache.turbine.ProjektePeer.doSelect( crit2,
GetDBConnection.getAnotherDBConnection()  );

, where GetDBConnection class is following:

=================================================================
package de.silverscreen.turbine.bugtracker.util;

import java.lang.*;
import org.apache.turbine.util.db.pool.ConnectionPool;
import org.apache.turbine.util.db.pool.DBConnection;

/**
 *  the small database connections are made.
 *  When necessary, static final string could be modified.
 */

public class GetDBConnection
{

   public static final String DRIVER = "org.gjt.mm.mysql.Driver";


   public static final String URL =
"jdbc:mysql://127.0.0.1/bugtracker?user=root";
   public static final String ANOTHER_URL =
"jdbc:mysql://127.0.0.1/zef?user=root";
   public static final String USER = "root";
   public static final String PASSWORD = "";

   /*
   public static final String URL =
"jdbc:mysql://62.157.88.3:3306/bugtracker?user=silver";
   public static final String ANOTHER_URL =
"jdbc:mysql://62.157.88.3:3306/zef?user=silver";
   public static final String USER = "silver";
   public static final String PASSWORD = "tmfitsxy";
   */

   public static DBConnection getDBConnection() throws Exception
   {
      ConnectionPool cp = new ConnectionPool ( DRIVER, URL, USER,
PASSWORD );
      return cp.getConnection();
   }
   public static ConnectionPool getConnectionPool() throws Exception
   {
      return new ConnectionPool ( DRIVER, URL, USER, PASSWORD );
   }

   public static DBConnection getAnotherDBConnection() throws Exception
   {
      ConnectionPool cp = new ConnectionPool ( DRIVER, ANOTHER_URL, USER,
PASSWORD );
      return cp.getConnection();
   }
}
========================================================================

i got the following exception:

[Thu Apr 19 21:06:49 GMT+02:00 2001] -- INFO -- IDBroker thread was started.
[Thu Apr 19 21:06:49 GMT+02:00 2001] -- ERROR -- Turbine.handleException:
null
[Thu Apr 19 21:06:49 GMT+02:00 2001] -- ERROR --
 Exception:  java.lang.NullPointerException
 Stack Trace follows:
 java.lang.NullPointerException
 at
org.apache.turbine.om.peer.BasePeer.createQueryString(BasePeer.java:1004)
 at org.apache.turbine.om.peer.BasePeer.doSelect(BasePeer.java:1114)
 at
org.apache.turbine.BaseProjektePeer.doSelectVillageRecords(BaseProjektePeer.
java:187)
 at org.apache.turbine.BaseProjektePeer.doSelect(BaseProjektePeer.java:148)
 at
de.silverscreen.turbine.bugtracker.modules.screens.Index.doPerformThis(Index
.java:29)
 at
de.silverscreen.turbine.bugtracker.modules.screens.Index.doBuildTemplate(Ind
ex.java:18)
 at
org.apache.turbine.modules.screens.VelocityScreen.doBuildTemplate(VelocitySc
reen.java:115)
 at
org.apache.turbine.modules.screens.TemplateScreen.doBuild(TemplateScreen.jav
a:135)

any idea would be very thankful to me.

thanks,

kidong








---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: TDK-Torque and ForiegnKey into TURBINE_USER

Posted by John McNally <jm...@collab.net>.
I started down a path like this and reverted back to just declaring the
relevant parts of the table in the xml and then telling torque not to
generate sql for the table.

This way torque still generates methods and classes for the related
table.  I think it should be possible to set up the class hierarchy so
that the torque class extends your custom table class or the other way
around.  It is complicated, but the alternative of leaving out any
reference to an external table in the om/peer classes does not seem like
a very good solution.

John McNally

Chris Campbell wrote:
> 
> That's a bit beyond me at this point. But my initial guess would be to add
> an externalTable element to the database.dtd. It appears that the XmlParser
> is choking on the fact that the foreign-key's foriegnTable attribue doesn't
> match up to any of the tables defined in the xml.
> 
> For the sake of argument, maybe something like this would work:
> 
> <!ELEMENT externalTable >
> <!ATTLIST table
>   name CDATA #REQUIRED
>   javaName CDATA #IMPLIED
> >
> 
> and
> <!ELEMENT external-foreign-key (reference+)>
> <!ATTLIST external-foreign-key
>   externalForeignTable CDATA #REQUIRED
> >
> 
> and
> <!ELEMENT database(table+, externalTable*)>
> <blahblah>
> 
> Then in XML
> 
> <external-foreign-key externalForeignTable="TURBINE_USER">
>     <reference local="USER_ID" foreign="USER_ID"/>
> </foreign-key>
> 
> Does any of this make sense? If I was more competent with XML stuff I would
> try it, but I'm just so unfamiliar with the torque code and am swamped with
> work...
> 
> Chris
> 
> ----- Original Message -----
> From: Leon Messerschmidt
> To: turbine-user@jakarta.apache.org
> Sent: Thursday, April 19, 2001 12:10 AM
> Subject: Re: TDK-Torque and ForiegnKey into TURBINE_USER
> 
> Hi Chris,
> 
> You can create a dummy table for TURBINE_USER to prevent this error.
> Unfortunately you'll end up with wrong TurbineUser* classes in your om
> directory.  I usually delete these and edit the code by hand to make it
> compile.
> 
> I'd be grateful if you have a patch that works :-)
> 
> ~ Leon
> 
> ----- Original Message -----
> From: "Chris Campbell" <ca...@zodiacnetworks.com>
> To: <tu...@jakarta.apache.org>
> Sent: Thursday, April 19, 2001 2:13 AM
> Subject: TDK-Torque and ForiegnKey into TURBINE_USER
> 
> > When I try to establish a foreignKey in a project-schema.xml table that
> > refrences TURBINE_USER's USER_ID, my om classes are not correctly
> generated.
> >
> > During om class generation I get this error:
> >
> > java.lang.NullPointerException
> >         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:917)
> >         at
> >
> org.apache.turbine.torque.transform.XmlToAppData.parseFile(XmlToAppData.java
> > :134)
> >         at
> >
> org.apache.turbine.torque.ant.VTorqueTask.initControlContext(VTorqueTask.jav
> > a:230)
> >         at
> > org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:299)
> >         at org.apache.tools.ant.Target.execute(Target.java:153)
> >         at org.apache.tools.ant.Project.runTarget(Project.java:898)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
> >         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
> >         at
> > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
> >
> >         at org.apache.tools.ant.Target.execute(Target.java:153)
> >         at org.apache.tools.ant.Project.runTarget(Project.java:898)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
> >         at org.apache.tools.ant.Project.executeTargets(Project.java:510)
> >         at org.apache.tools.ant.Main.runBuild(Main.java:421)
> >         at org.apache.tools.ant.Main.main(Main.java:149)
> >
> > And the class that has the foriegn key does not get fully rendered. For
> > example, the following method:
> >
> >  public void setUserPrefrences(UserPrefrences v) throws Exception
> >     {
> >         aUserPrefrences = null;
> >            set${column.JavaName}(v.get${colFK.JavaName}());
> >            aUserPrefrences = v;
> >     }
> >
> > Is setting the foreingKey to refrence Turbine_User user_id column
> possible?
> > ( Or the wrong thing to do ?)
> >
> > Thanks
> > Chris
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: TDK-Torque and ForiegnKey into TURBINE_USER

Posted by Chris Campbell <ca...@zodiacnetworks.com>.
That's a bit beyond me at this point. But my initial guess would be to add
an externalTable element to the database.dtd. It appears that the XmlParser
is choking on the fact that the foreign-key's foriegnTable attribue doesn't
match up to any of the tables defined in the xml.


For the sake of argument, maybe something like this would work:

<!ELEMENT externalTable >
<!ATTLIST table
  name CDATA #REQUIRED
  javaName CDATA #IMPLIED
>

and
<!ELEMENT external-foreign-key (reference+)>
<!ATTLIST external-foreign-key
  externalForeignTable CDATA #REQUIRED
>

and
<!ELEMENT database(table+, externalTable*)>
<blahblah>

Then in XML

<external-foreign-key externalForeignTable="TURBINE_USER">
    <reference local="USER_ID" foreign="USER_ID"/>
</foreign-key>


Does any of this make sense? If I was more competent with XML stuff I would
try it, but I'm just so unfamiliar with the torque code and am swamped with
work...

Chris

----- Original Message -----
From: Leon Messerschmidt
To: turbine-user@jakarta.apache.org
Sent: Thursday, April 19, 2001 12:10 AM
Subject: Re: TDK-Torque and ForiegnKey into TURBINE_USER


Hi Chris,

You can create a dummy table for TURBINE_USER to prevent this error.
Unfortunately you'll end up with wrong TurbineUser* classes in your om
directory.  I usually delete these and edit the code by hand to make it
compile.

I'd be grateful if you have a patch that works :-)

~ Leon


----- Original Message -----
From: "Chris Campbell" <ca...@zodiacnetworks.com>
To: <tu...@jakarta.apache.org>
Sent: Thursday, April 19, 2001 2:13 AM
Subject: TDK-Torque and ForiegnKey into TURBINE_USER


> When I try to establish a foreignKey in a project-schema.xml table that
> refrences TURBINE_USER's USER_ID, my om classes are not correctly
generated.
>
> During om class generation I get this error:
>
> java.lang.NullPointerException
>         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:917)
>         at
>
org.apache.turbine.torque.transform.XmlToAppData.parseFile(XmlToAppData.java
> :134)
>         at
>
org.apache.turbine.torque.ant.VTorqueTask.initControlContext(VTorqueTask.jav
> a:230)
>         at
> org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:299)
>         at org.apache.tools.ant.Target.execute(Target.java:153)
>         at org.apache.tools.ant.Project.runTarget(Project.java:898)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
>         at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
>
>         at org.apache.tools.ant.Target.execute(Target.java:153)
>         at org.apache.tools.ant.Project.runTarget(Project.java:898)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:510)
>         at org.apache.tools.ant.Main.runBuild(Main.java:421)
>         at org.apache.tools.ant.Main.main(Main.java:149)
>
> And the class that has the foriegn key does not get fully rendered. For
> example, the following method:
>
>  public void setUserPrefrences(UserPrefrences v) throws Exception
>     {
>         aUserPrefrences = null;
>            set${column.JavaName}(v.get${colFK.JavaName}());
>            aUserPrefrences = v;
>     }
>
> Is setting the foreingKey to refrence Turbine_User user_id column
possible?
> ( Or the wrong thing to do ?)
>
> Thanks
> Chris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: TDK-Torque and ForiegnKey into TURBINE_USER

Posted by John McNally <jm...@collab.net>.
some things that I have added that could help with integration:

you can define a table in the xml schema and not have the sql generated
with the <table skipSql="true" attribute.

you can setup a class hierarchy like

BaseObject
TurbineUser
BaseTorqueTurbineUser
TorqueTurbineUser

and

BasePeer
TurbineUserPeer
BaseTorqueTurbineUserPeer
TorqueTurbineUserPeer
 

i.e. there are attributes <table baseClass and basePeer where you can
give the fully qualified classNames.
So it is conceivable to have torque generate the User class.  There
could be quite a bit of complication in that the user class is expected
to be manipulated through TurbineSecurity.

I know Jon Stevens is looking at this, time permitting, but I wanted to
throw this information out there in case it helps anyone else
considering the problem. 

John McNally

Leon Messerschmidt wrote:
> 
> Hi Chris,
> 
> You can create a dummy table for TURBINE_USER to prevent this error.
> Unfortunately you'll end up with wrong TurbineUser* classes in your om
> directory.  I usually delete these and edit the code by hand to make it
> compile.
> 
> I'd be grateful if you have a patch that works :-)
> 
> ~ Leon
> 
> ----- Original Message -----
> From: "Chris Campbell" <ca...@zodiacnetworks.com>
> To: <tu...@jakarta.apache.org>
> Sent: Thursday, April 19, 2001 2:13 AM
> Subject: TDK-Torque and ForiegnKey into TURBINE_USER
> 
> > When I try to establish a foreignKey in a project-schema.xml table that
> > refrences TURBINE_USER's USER_ID, my om classes are not correctly
> generated.
> >
> > During om class generation I get this error:
> >
> > java.lang.NullPointerException
> >         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:917)
> >         at
> >
> org.apache.turbine.torque.transform.XmlToAppData.parseFile(XmlToAppData.java
> > :134)
> >         at
> >
> org.apache.turbine.torque.ant.VTorqueTask.initControlContext(VTorqueTask.jav
> > a:230)
> >         at
> > org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:299)
> >         at org.apache.tools.ant.Target.execute(Target.java:153)
> >         at org.apache.tools.ant.Project.runTarget(Project.java:898)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
> >         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
> >         at
> > org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
> >
> >         at org.apache.tools.ant.Target.execute(Target.java:153)
> >         at org.apache.tools.ant.Project.runTarget(Project.java:898)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
> >         at org.apache.tools.ant.Project.executeTargets(Project.java:510)
> >         at org.apache.tools.ant.Main.runBuild(Main.java:421)
> >         at org.apache.tools.ant.Main.main(Main.java:149)
> >
> > And the class that has the foriegn key does not get fully rendered. For
> > example, the following method:
> >
> >  public void setUserPrefrences(UserPrefrences v) throws Exception
> >     {
> >         aUserPrefrences = null;
> >            set${column.JavaName}(v.get${colFK.JavaName}());
> >            aUserPrefrences = v;
> >     }
> >
> > Is setting the foreingKey to refrence Turbine_User user_id column
> possible?
> > ( Or the wrong thing to do ?)
> >
> > Thanks
> > Chris
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: turbine-user-help@jakarta.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: TDK-Torque and ForiegnKey into TURBINE_USER

Posted by Leon Messerschmidt <le...@opticode.co.za>.
Hi Chris,

You can create a dummy table for TURBINE_USER to prevent this error.
Unfortunately you'll end up with wrong TurbineUser* classes in your om
directory.  I usually delete these and edit the code by hand to make it
compile.

I'd be grateful if you have a patch that works :-)

~ Leon


----- Original Message -----
From: "Chris Campbell" <ca...@zodiacnetworks.com>
To: <tu...@jakarta.apache.org>
Sent: Thursday, April 19, 2001 2:13 AM
Subject: TDK-Torque and ForiegnKey into TURBINE_USER


> When I try to establish a foreignKey in a project-schema.xml table that
> refrences TURBINE_USER's USER_ID, my om classes are not correctly
generated.
>
> During om class generation I get this error:
>
> java.lang.NullPointerException
>         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:917)
>         at
>
org.apache.turbine.torque.transform.XmlToAppData.parseFile(XmlToAppData.java
> :134)
>         at
>
org.apache.turbine.torque.ant.VTorqueTask.initControlContext(VTorqueTask.jav
> a:230)
>         at
> org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:299)
>         at org.apache.tools.ant.Target.execute(Target.java:153)
>         at org.apache.tools.ant.Project.runTarget(Project.java:898)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
>         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
>         at
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)
>
>         at org.apache.tools.ant.Target.execute(Target.java:153)
>         at org.apache.tools.ant.Project.runTarget(Project.java:898)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:536)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:510)
>         at org.apache.tools.ant.Main.runBuild(Main.java:421)
>         at org.apache.tools.ant.Main.main(Main.java:149)
>
> And the class that has the foriegn key does not get fully rendered. For
> example, the following method:
>
>  public void setUserPrefrences(UserPrefrences v) throws Exception
>     {
>         aUserPrefrences = null;
>            set${column.JavaName}(v.get${colFK.JavaName}());
>            aUserPrefrences = v;
>     }
>
> Is setting the foreingKey to refrence Turbine_User user_id column
possible?
> ( Or the wrong thing to do ?)
>
> Thanks
> Chris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


TDK-Torque and ForiegnKey into TURBINE_USER

Posted by Chris Campbell <ca...@zodiacnetworks.com>.
When I try to establish a foreignKey in a project-schema.xml table that
refrences TURBINE_USER's USER_ID, my om classes are not correctly generated.

During om class generation I get this error:

java.lang.NullPointerException
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:917)
        at
org.apache.turbine.torque.transform.XmlToAppData.parseFile(XmlToAppData.java
:134)
        at
org.apache.turbine.torque.ant.VTorqueTask.initControlContext(VTorqueTask.jav
a:230)
        at
org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:299)
        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:213)
        at
org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:103)

        at org.apache.tools.ant.Target.execute(Target.java:153)
        at org.apache.tools.ant.Project.runTarget(Project.java:898)
        at org.apache.tools.ant.Project.executeTarget(Project.java:536)
        at org.apache.tools.ant.Project.executeTargets(Project.java:510)
        at org.apache.tools.ant.Main.runBuild(Main.java:421)
        at org.apache.tools.ant.Main.main(Main.java:149)

And the class that has the foriegn key does not get fully rendered. For
example, the following method:

 public void setUserPrefrences(UserPrefrences v) throws Exception
    {
        aUserPrefrences = null;
           set${column.JavaName}(v.get${colFK.JavaName}());
           aUserPrefrences = v;
    }

Is setting the foreingKey to refrence Turbine_User user_id column possible?
( Or the wrong thing to do ?)

Thanks
Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Location of javadoc api documentation for the tdk builds?

Posted by Jon Stevens <jo...@latchkey.com>.
on 4/18/01 4:56 PM, "Darren Pamatat" <dp...@yahoo.com> wrote:

> Where is the javdoc api documentation for the tdk builds found at:
> http://jakarta.apache.org/turbine/tdk/
> 
> The tdk includes all kinds of documentation but is missing the api
> (javadocs) for the turbine packages. Where is the javadoc
> corresponding to these versions?
> 
> Thanks
> Darren

Check out Turbine from CVS.

Type:

cd jakarta-turbine/build
./build-turbine.sh javadocs

-jon

-- 
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Location of javadoc api documentation for the tdk builds?

Posted by Darren Pamatat <dp...@yahoo.com>.
Where is the javdoc api documentation for the tdk builds found at:
http://jakarta.apache.org/turbine/tdk/

The tdk includes all kinds of documentation but is missing the api
(javadocs) for the turbine packages. Where is the javadoc
corresponding to these versions?

Thanks
Darren


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org