Hello there,,
I am a bit confused in how to extend the TUBINE_USER Table.
So far I have seen two kinds of approach in this mailing list was
wondering which one is the best way to do or they both need to be done in
order to add a field in the TURBINE_USER Table.
Following are the approaches:

Approach 1:
===========
1. Modify the torque schema.xml :

I changed the name of the table user to MYUSER, but I specified
JavaName=TurbineUser, so that the generated classes keep the same name.
Added the 'title' field.
<table name="MYUSER" idMethod="idbroker" javaName="TurbineUser">
...
 <column name="TITLE" size="99" type="VARCHAR" />
...
</table>

I rebuilt to generate the peer classes.


2. Create a MyUser interface and a MyUserImpl class

MyUser extends JetspeedUser and add the setTitle and getTitle methods, and
the static final String TITLE = "title".

MyUserImpl extends BaseJetspeedUser and implements MyUser :

public class MyUserImpl extends BaseJetspeedUser implements MyUser {
    public String getTitle(){
       return (String) getPerm(MyUser.TITLE);
    }
    public void setTitle(String title){
        setPerm(PcsUser.TITLE, title);
    }
}


3. Modifiy the JetspeedSecurity.* files

set
"services.JetspeedSecurity.user.class=myclasses.portal.om.security.MyUserImp
l"

Wherever this parameter appears.


APPROACH 2:
===========
If its 1.4, then its best to change your Torque schema and regenerate
(build/torque/schema/security-schema.xml).

***********************************
The Map Builder method does not work with Jetspeed 1.4.
However it does work with Jetspeed 1.3.
Jetspeed 1.4 no longer uses the Turbine Security model.

The approach to take for Jetspeed 1.4 is to modify the Torque XML and to
regenerate the model, not to modify Java code and adaptors.


Now for the Approach 2 I have tried to get in to the Torque directory and
run "ant main" but nothing changes.
I have added
<column name="KEY_WORD" size = "100" type = "VARCHAR"/>
in the security-schema.xml.
Any help will be great. (If there is any way without getting into the Code
:=)) because I want my application to be independent of any change to
Jetspeed.

Thanks Javed







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

Reply via email to