Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 60023 invoked from network); 17 Dec 2010 13:38:09 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Dec 2010 13:38:09 -0000 Received: (qmail 54061 invoked by uid 500); 17 Dec 2010 13:38:09 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 53948 invoked by uid 500); 17 Dec 2010 13:38:08 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 53941 invoked by uid 99); 17 Dec 2010 13:38:08 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Dec 2010 13:38:08 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-ww0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Dec 2010 13:38:00 +0000 Received: by wwa36 with SMTP id 36so660985wwa.1 for ; Fri, 17 Dec 2010 05:37:40 -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:reply-to :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=u1UXqVvtJ4CWrSeJt26ndPSK1Xr0gx1NVEj/4iXHmkE=; b=kYG/XQmLpzmyZE9JwgH2KooJHYkjoIk5D6N2n/B6Oq58NNcA29e09q139s/az4Lgrx o2vmoTfjnT6ZBCTDI3qfVNj0/zYYhQjK61hVIBvDLw8HQBesvvcpR4foF4j5OU3EIbO8 iU1NViXXtHx5ufvUU0xkWqoHGJbl8obac9hu0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=LEF2+MCQp+ZC6HLZLq542ERG+T113GZsP6TueNMxI4EINdZcYHcdB5o+yg6tGM35a8 M8JsnqISzqYnzwNt7L5GSRiFUcrBdLH3k0x3p3tYtYz1hkxyq6lLEkCbddD0Sekgx7qm K76YmJTsjeAjvYoMSMHsWdx2qaqdG9Bl5qeYk= Received: by 10.216.166.139 with SMTP id g11mr351762wel.70.1292593059944; Fri, 17 Dec 2010 05:37:39 -0800 (PST) Received: from emmanuel-lecharnys-MacBook-Pro.local (lon92-10-78-226-4-211.fbx.proxad.net [78.226.4.211]) by mx.google.com with ESMTPS id m50sm194678wek.8.2010.12.17.05.37.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 17 Dec 2010 05:37:39 -0800 (PST) Message-ID: <4D0B67A1.4040208@gmail.com> Date: Fri, 17 Dec 2010 14:37:37 +0100 From: Emmanuel Lecharny Reply-To: elecharny@apache.org User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 MIME-Version: 1.0 To: Apache Directory Developers List Subject: [AdminPoint] Add operation Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Here is the description of an Add operation, and how it's handled by the AdministrativePoint handler. The parts between >>>--- and ---<<< are pseudo code. +--+ |AP| +--+ We have to deal with three cases : - the AP has a parent AP (IAP or SAP, it's irrelevant) and no subordinate IAP - the AP has a parent AP but some subordinate IAPs in this second case, we have to change the IAPs seqNumber to reflect the change in entries relationship, recusively. - the AP has no parent AP The second case is the most complex. >>>------------------------------------------- for each AP role get a new seqNumber, add it to the AP(role) update the AP(role) cache if hasParentAP( AP(role) ) then if hasSubordonateIAP( AP(role) ) then for each subordinate IAP(role) (and their own subordinates) modify the subordinate IAP(role) seqNumber with the new seqNumber store the IAP(role) done done continue down the chain -------------------------------------------<<< +--------+ |Subentry| +--------+ We can't add a subentry if the immediate parent is not an AP and if the parent AP does not have the same role (or of the parent is an IAP and there are no higher parent with the same role). Otherwise, adding a subentry is just a matter to update the parent's AP seqNumber (and all the hierarchy up to the first SAP if it's an IAP) As a subentry is only associated with one single role, we don't have to loop on all the roles >>>------------------------------------------- check the parentAP for the role get a new new seqNumber update the parentAP and all its IAP subordinate with the same role with the new seqNumber continue down the chain -------------------------------------------<<< +-----+ |Entry| +-----+ When we add an entry, we have to check if it depends on an AP for each roles. If so, we have to add the AP seqNumber into the entry, and add references to all the subentry it is related too. >>>------------------------------------------- for each role for each parent AP(role) get the parentAP(role) seqNumber, store it into the entry for each subentry associated with the AP(role) do if the entry is part of the subtree then add the subentry entryUUID into the entry references done done done continue down the chain -------------------------------------------<<< -- Regards, Cordialement, Emmanuel L�charny www.iktek.com