Hello All,

I recently posted a question regarding Extending JetspeedUser and
CreateNewUserAnd Confirm...

After some further research, here is my dilemma:

I have modified the torque security-schema.xml to add my new columns
I have generated OM objects to org.apache.jetspeed.om.security.turbine
(default)
I have updated my tables with newly created ddl's...

The docs (http://jakarta.apache.org/jetspeed/site/security.html) say to
extend JetspeedUser and cast to access additional columns... 

Here is the dilemma... JetspeedUser is located in
org.apache.jetspeed.om.security... the object model that contains
entries for the modified schema is
org.apache.jetspeed.om.security.turbine.TurbineUser (and
BaseTurbineUser) .... so if I cast JetspeedUser to MyJetspeedUser, set
MyJetspeedUser.title = "mr." and then call MyJetspeedUser.save() ....
the entry in the database is null, because the parent (JetspeedUser)
object model does not contain any reference to the modified field!! (the
reference is in TurbineUser)...

Tried casting JetspeedUser to TurbineUser ... resulted in class cast
exception ...

Not quite sure where to go from here...



-----Original Message-----
From: Amin Lalji [mailto:[EMAIL PROTECTED] 
Sent: June 25, 2003 4:54 PM
To: [EMAIL PROTECTED]
Subject: Extending User and CreateNewUserAndConfirm.java

Hello All,

 

I have been struggling with trying to extend JetspeedUser:

 

I have:

 

1)       modified torque-schema.xml

2)       generated new OM/SQL Scripts

3)       Updated database with new schemas

4)       Extended BaseJetspeedUser (MyJetspeedUser.class)

 

--- SO FAR SO GOOD, EVERYTHING CONTINUES TO OPERATE AS NORMAL ---

 

5)       Within the createUser method of CreateNewUserAndConfirm I have

 

  MyJetspeedUser myJetspeedUser = (MyJetspeedUser) user;

        myJetspeedUser.setTitle("MR."); // trying to force MR. entry
into db

 

                  --> Tried: data.setUser(myJetspeedUser);

                  --> Result after trying to add a new user using
"create account link", account created, TITLE field in database NULL!

                  

                  -->Tried: myJetspeedUser.save();

                  --> Result after trying to add a new user using
"create account link", exception, user already exists..

 

I would like clarification on the process to add additional fields to
TURBINE_USER / new account creation:

 

Do I have to replace the user object (currently JetspeedUser) with
MyJetspeedUser entirely? It seems to defeat the purpose of subclassing.

 

 

Your help is greatly appreciated!

 

Amin

      




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

Reply via email to