Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 16994 invoked from network); 11 Mar 2010 11:39:20 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Mar 2010 11:39:20 -0000 Received: (qmail 33002 invoked by uid 500); 11 Mar 2010 11:38:47 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 32954 invoked by uid 500); 11 Mar 2010 11:38:47 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 32947 invoked by uid 99); 11 Mar 2010 11:38:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Mar 2010 11:38:47 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fmeschbe@gmail.com designates 209.85.220.221 as permitted sender) Received: from [209.85.220.221] (HELO mail-fx0-f221.google.com) (209.85.220.221) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Mar 2010 11:38:38 +0000 Received: by fxm21 with SMTP id 21so335530fxm.11 for ; Thu, 11 Mar 2010 03:38:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=1wD3Q55WFS77PLipoqi1kZ1qeELg5dgChKovxCvluSc=; b=kjfmPsC21tQ0p1PLwPhtmqOayWHsoCQXFnbdpl80Zy80eueevqgca5g5OFV3nXQzSb xKMZVdU8wpxcMGierLSIot4gh/9BAlA8lwMyPtwVs/hT/TilVNbeq2n92ZMnYMvE4eO0 xzC6PTy4U4x05XewMstXTDpxlCX27AxOPbkuQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=shw5fADmXO/WUnB7apfbm8o9JZGPS57OzBNMX6UgHzxMmb7C5+o14WZGg3VIGZPeNW KTdUF8rvjGIPM6DwfOh6Q+/CEEoeBQDRT5JVH7SipCG0f3rwvlo2vbiQEcdV6FF94Slu f2U55BOceHA7TDLqBwuLo35IPks9QWFe8U7P8= Received: by 10.223.7.4 with SMTP id b4mr3202745fab.102.1268307497756; Thu, 11 Mar 2010 03:38:17 -0800 (PST) Received: from [10.0.0.56] (bsl-rtr.day.com [62.192.10.254]) by mx.google.com with ESMTPS id 18sm7284459fkq.4.2010.03.11.03.38.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 11 Mar 2010 03:38:17 -0800 (PST) Message-ID: <4B98D625.4060909@gmail.com> Date: Thu, 11 Mar 2010 12:38:13 +0100 From: Felix Meschberger User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8pre) Gecko/20100120 Shredder/3.0.2pre MIME-Version: 1.0 To: dev@jackrabbit.apache.org Subject: Re: UserManager API strangeness (II) References: <4B98CBB5.7090306@gmail.com> <4B98CECB.5000105@day.com> In-Reply-To: <4B98CECB.5000105@day.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, On 11.03.2010 12:06, Angela Schreiber wrote: > 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. > Thanks for the information. For a hypothetical createGroup(String groupName) method, I would assume this to behave similar as createUser(String userName, String password): The groupName is used as the Group ID and a collision with an existing Authorizable ID would be considered an error. Regards Felix