You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Javed Mahmud <jm...@it.uts.edu.au> on 2002/12/05 02:39:02 UTC

Extending User??

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Is anyone out there using Cocoon instead of Turbine?

Posted by James Moliere <jm...@ucsd.edu>.
Hello,
Is anyone out there using Cocoon instead of Turbine to dynamically render 
HTML content?  The HTML editors that our developers use (DreamWeaver MX) do 
not bode well with Turbine.  The comments (#) look ugly in the HTML page 
and they get in the way of precise layout.  We also prefer cocoon because 
we may want to render future pages whose XML is a SOAP response.

How was the transition from Turbine to Cocoon?  Were there any "GOTCHAS!"?

thanks!


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Extending User??

Posted by David Sean Taylor <da...@bluesunrise.com>.
> -----Original Message-----
> From: Javed Mahmud [mailto:jmsyed@it.uts.edu.au]
> Sent: Wednesday, December 04, 2002 5:39 PM
> To: jetspeed-user@jakarta.apache.org
> Subject: Extending User??
>
>
> 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:
>
See:

http://jakarta.apache.org/jetspeed/site/security.html


Often you may need to extend the Jetspeed User to support extra columns for
your own database implementation. Here are the steps to do so:

1. Modify build/torque/security_schema.xml, adding the new columns to the
Torque XML schema.
2. Modify build/torque/build.properties to generate DDL for your particular
database (database=)
3. Rebuild Jetspeed to auto-generate the DDL script for your db, and
generate the OM objects The OM objects are generated to the
org/apache/jetspeed/om/security/turbine package. The destination package is
configurable in build/torque/build.properties. The DDL script is written to
src/sql/security-schema.sql.
4. Extend JetspeedUser to, for ex, MyUser, and cast to it whenever you need
to access your new columns
For an overview of modifying Torque schemas, see: Torque Schemas
5. Modify JetspeedSecurity.properties:
services.JetspeedSecurity.user.class=myclasses.portal.om.security.MyUser



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>