jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: UserManager API strangeness (II)
Date Thu, 11 Mar 2010 11:06:51 GMT
Felix Meschberger wrote:
> Hi
> another thing striked me looking at the UserManager API: there are 4
> create methods:
>    createGroup(Principal);
>    createGroup(Principal, String);
>    createUser(String userID, String password, Principal principal,
>                     String intermediatePath);
>    createUser(String userID, String password;
> I am missing a method
>    createGroup(String groupName);
> in this picture. Is there a reason to not have such a method ?

yes. what should that groupName reflect?
if you expect this to be the displayName you should
use 'setProperty' instead.
if you expect this to be the ID -> for groups the
ID is generated based on the principalName which the
following valiation:

- principalName already present with another user/group
   -> attempt to create a duplicate -> fails

- principalName collides with a UserID in those cases
   where principalName != userID -> generation of a unique
   id for the group since the principalName is valid

- all other cases: principalName is the same as the groupID.

hope that helps.

View raw message