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 Chetan Patel <ch...@webmail.aruhat.com> on 2008/12/31 07:52:41 UTC

Re: Accessing Jetspeed Database

Hello All,

I have use usermanagement service of j2-admin.

I have use MySql as a database.

Now, I have created myuser table(two fields id and name) in same database. 
When admin or any user add new user; we need to insert id and name of
created user in this table.

For that what I have to do?

Please help me, I am new in jetspeed2.

Thanks in advance.

--Chetan Patel
-- 
View this message in context: http://www.nabble.com/Accessing-Jetspeed-Database-tp17626623p21228019.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


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


Re: Accessing Jetspeed Database

Posted by Roberto Rossi <ro...@cone.it>.
You can find the user id and encrypted password inside
SECURITY_CREDENTIAL table but I cannot help you in finding the username.
I don't know where Jetspeed developers store username info.

In some tables you can find it directly, for exampl USER_STATITICS, but
there is no connection between principal id and username.

Maybe some developer is reading this post?


			ROb


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


Re: store psml in database

Posted by Vivek Kumar <fi...@gmail.com>.
Try this

mvn -P tomcat,dbpsml

The above command is for Maven 2 plugin

Vivek

*

*Frank Otto wrote:
> the latest --> 2.1.3
>
> Vivek Kumar schrieb:
>> Hi
>>
>> Which version of jetspeed are you using ?
>>
>> Vivek
>>
>> Frank Otto wrote:
>>> thanks for your answer.
>>>
>>> okay, but I have build my custom portal with maven. is there a 
>>> possibility to change the storing method?
>>>
>>> Vivek Kumar schrieb:
>>>> Hi
>>>>
>>>> Jetspeed installer gives you options to store pages in database.
>>>>
>>>> Vivek
>>>>
>>>> Frank Otto wrote:
>>>>> hi,
>>>>>
>>>>> how can I save the psml in the database? Is there a configuration 
>>>>> entry in jetspeed?
>>>>>
>>>>> I don't want a folder for each user under WEB-INF/pages/_user/.
>>>>>
>>>>>
>>>>> kind regards,
>>>>>
>>>>> Frank
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>>>>> For additional commands, e-mail: 
>>>>> jetspeed-user-help@portals.apache.org
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>>>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>


Re: store psml in database

Posted by Frank Otto <ot...@delta-barth.de>.
the latest --> 2.1.3

Vivek Kumar schrieb:
> Hi
> 
> Which version of jetspeed are you using ?
> 
> Vivek
> 
> Frank Otto wrote:
>> thanks for your answer.
>>
>> okay, but I have build my custom portal with maven. is there a 
>> possibility to change the storing method?
>>
>> Vivek Kumar schrieb:
>>> Hi
>>>
>>> Jetspeed installer gives you options to store pages in database.
>>>
>>> Vivek
>>>
>>> Frank Otto wrote:
>>>> hi,
>>>>
>>>> how can I save the psml in the database? Is there a configuration 
>>>> entry in jetspeed?
>>>>
>>>> I don't want a folder for each user under WEB-INF/pages/_user/.
>>>>
>>>>
>>>> kind regards,
>>>>
>>>> Frank
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>>>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 



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


Re: store psml in database

Posted by Vivek Kumar <fi...@gmail.com>.
Hi

Which version of jetspeed are you using ?

Vivek

Frank Otto wrote:
> thanks for your answer.
>
> okay, but I have build my custom portal with maven. is there a 
> possibility to change the storing method?
>
> Vivek Kumar schrieb:
>> Hi
>>
>> Jetspeed installer gives you options to store pages in database.
>>
>> Vivek
>>
>> Frank Otto wrote:
>>> hi,
>>>
>>> how can I save the psml in the database? Is there a configuration 
>>> entry in jetspeed?
>>>
>>> I don't want a folder for each user under WEB-INF/pages/_user/.
>>>
>>>
>>> kind regards,
>>>
>>> Frank
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>


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


Re: store psml in database

Posted by Frank Otto <ot...@delta-barth.de>.
thanks for your answer.

okay, but I have build my custom portal with maven. is there a 
possibility to change the storing method?

Vivek Kumar schrieb:
> Hi
> 
> Jetspeed installer gives you options to store pages in database.
> 
> Vivek
> 
> Frank Otto wrote:
>> hi,
>>
>> how can I save the psml in the database? Is there a configuration 
>> entry in jetspeed?
>>
>> I don't want a folder for each user under WEB-INF/pages/_user/.
>>
>>
>> kind regards,
>>
>> Frank
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 



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


Re: store psml in database

Posted by Vivek Kumar <fi...@gmail.com>.
Hi

Jetspeed installer gives you options to store pages in database.

Vivek

Frank Otto wrote:
> hi,
>
> how can I save the psml in the database? Is there a configuration 
> entry in jetspeed?
>
> I don't want a folder for each user under WEB-INF/pages/_user/.
>
>
> kind regards,
>
> Frank
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>


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


store psml in database

Posted by Frank Otto <ot...@delta-barth.de>.
hi,

how can I save the psml in the database? Is there a configuration entry 
in jetspeed?

I don't want a folder for each user under WEB-INF/pages/_user/.


kind regards,

Frank


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


Re: Accessing Jetspeed Database

Posted by Michael Binette <je...@adinquiry.com>.
Yes, you will need to use the FULL_PATH if you need to do it from a database
trigger.  I believe you can use UserManager and User objects in code to do
some of that for you if you were doing it in code (but haven't looked into
it).

--
Michael

On Wed, Dec 31, 2008 at 9:01 AM, Roberto Rossi <ro...@cone.it>wrote:

> So, to obtain the username we have to extract it from the FULL_PATH, is
> this right?
>
> Thank you Michael.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

Re: Accessing Jetspeed Database

Posted by Roberto Rossi <ro...@cone.it>.
So, to obtain the username we have to extract it from the FULL_PATH, is this right?

Thank you Michael.




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


RE: Accessing Jetspeed Database

Posted by James Winburn <jw...@computerguidance.com>.
Chetan,

Also be aware that users are usually assigned to one or more security
roles ("user", "admin", etc.)  Roles are defined in the
SECURITY_PRINCIPAL table along with the usernames, but are distinguished
from usernames by the FULL_PATH column.  Usernames paths will contain
the "/user/" string but roles will be prepended with "/role/".  (e.g.
/role/admin)

Roles are mapped to users in the SECURITY_USER_ROLE table which has just
two columns:
	USER_ID: a foreign key to the SECURITY_PRINCIPAL table
corresponding
			to the user.
	ROLE_ID: a foreign key to the SECURITY_PRINCIPAL table
corresponding
			to the role.     

Users are assigned to multiple roles by defining multiple rows per user
in this table.

Oh, and if you want to store user information beyond username/password
(i.e. user profiles), note that this information is considered a user
preference and is stored in the PREF-NODE table. 

Hope this helps,
James Winburn

-----Original Message-----
From: Michael Binette [mailto:jetspeed@adinquiry.com] 
Sent: Wednesday, December 31, 2008 6:45 AM
To: Jetspeed Users List
Subject: Re: Accessing Jetspeed Database

The username is in SECURITY_PRINCIPAL along with names of groups and
roles.
You will notice that the CLASSNAME column will have a value of
org.apache.jetspeed.security.InternalUserPrincipalImpl for all users.
Or,
you can look at the FULL_PATH column and see that all user rows start
with
/user/.

I don't think the user name is saved anywhere else in its plain form
while
adding a new user.

--
Michael


On Wed, Dec 31, 2008 at 5:43 AM, Chetan Patel
<ch...@webmail.aruhat.com>wrote:

>
> Hi Rob,
>
> Thanks for suggestion.
>
> The first solution is easy.
>
> I have see the all table but I am not able to find out which table is
use
> for storing user information in jetspeed.
>
> Please help me.
>
> Thanks again for help.
>
> --Chetan Patel
>
>
>
>
> Roberto Rossi-3 wrote:
> >
> > I think you can:
> >
> > 1) write a trigger of Jetspeed user tables to update to your own
table
> > whenever new records are inserted or when some records are updated,
in
> > this way you have not to change j2-admin source code.
> > To use triggers you should have mysql version 5.0.2 or greater, see
> > http://dev.mysql.com/doc/refman/5.0/en/triggers.html for more
details.
> > 2) modify j2-admin source code to adapt it to your needs
> >
> > I think the 1) approach is simples even if less elegant. Obviously
check
> > your mysql version
> >
> >
> >
> >                              ROb
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail:
jetspeed-user-help@portals.apache.org
> >
> >
> >
>
> --
> View this message in context:
>
http://www.nabble.com/Accessing-Jetspeed-Database-tp17626623p21229679.ht
ml
> Sent from the Jetspeed - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

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


Re: Accessing Jetspeed Database

Posted by Michael Binette <je...@adinquiry.com>.
The username is in SECURITY_PRINCIPAL along with names of groups and roles.
You will notice that the CLASSNAME column will have a value of
org.apache.jetspeed.security.InternalUserPrincipalImpl for all users.  Or,
you can look at the FULL_PATH column and see that all user rows start with
/user/.

I don't think the user name is saved anywhere else in its plain form while
adding a new user.

--
Michael


On Wed, Dec 31, 2008 at 5:43 AM, Chetan Patel <ch...@webmail.aruhat.com>wrote:

>
> Hi Rob,
>
> Thanks for suggestion.
>
> The first solution is easy.
>
> I have see the all table but I am not able to find out which table is use
> for storing user information in jetspeed.
>
> Please help me.
>
> Thanks again for help.
>
> --Chetan Patel
>
>
>
>
> Roberto Rossi-3 wrote:
> >
> > I think you can:
> >
> > 1) write a trigger of Jetspeed user tables to update to your own table
> > whenever new records are inserted or when some records are updated, in
> > this way you have not to change j2-admin source code.
> > To use triggers you should have mysql version 5.0.2 or greater, see
> > http://dev.mysql.com/doc/refman/5.0/en/triggers.html for more details.
> > 2) modify j2-admin source code to adapt it to your needs
> >
> > I think the 1) approach is simples even if less elegant. Obviously check
> > your mysql version
> >
> >
> >
> >                              ROb
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> > For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Accessing-Jetspeed-Database-tp17626623p21229679.html
> Sent from the Jetspeed - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
>
>

Re: Accessing Jetspeed Database

Posted by Chetan Patel <ch...@webmail.aruhat.com>.
Hi Rob,

Thanks for suggestion.

The first solution is easy. 

I have see the all table but I am not able to find out which table is use
for storing user information in jetspeed.

Please help me.

Thanks again for help. 

--Chetan Patel




Roberto Rossi-3 wrote:
> 
> I think you can:
> 
> 1) write a trigger of Jetspeed user tables to update to your own table
> whenever new records are inserted or when some records are updated, in
> this way you have not to change j2-admin source code. 
> To use triggers you should have mysql version 5.0.2 or greater, see
> http://dev.mysql.com/doc/refman/5.0/en/triggers.html for more details.
> 2) modify j2-admin source code to adapt it to your needs
> 
> I think the 1) approach is simples even if less elegant. Obviously check
> your mysql version
> 
> 
> 
>                              ROb     
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Accessing-Jetspeed-Database-tp17626623p21229679.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


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


Re: Accessing Jetspeed Database

Posted by Roberto Rossi <ro...@cone.it>.
I think you can:

1) write a trigger of Jetspeed user tables to update to your own table
whenever new records are inserted or when some records are updated, in
this way you have not to change j2-admin source code. 
To use triggers you should have mysql version 5.0.2 or greater, see
http://dev.mysql.com/doc/refman/5.0/en/triggers.html for more details.
2) modify j2-admin source code to adapt it to your needs

I think the 1) approach is simples even if less elegant. Obviously check
your mysql version



                             ROb     


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