Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 27120 invoked from network); 1 May 2005 15:51:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 May 2005 15:51:30 -0000 Received: (qmail 26456 invoked by uid 500); 1 May 2005 15:52:55 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 26396 invoked by uid 500); 1 May 2005 15:52:55 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 26383 invoked by uid 99); 1 May 2005 15:52:55 -0000 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Sun, 01 May 2005 08:52:54 -0700 Received: (qmail 27106 invoked by uid 65534); 1 May 2005 15:51:28 -0000 Message-ID: <20050501155128.27104.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: svn commit: r165520 - in /directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/store: ContextOperation.java PrincipalStoreImpl.java Date: Sun, 01 May 2005 15:51:28 -0000 To: commits@directory.apache.org From: akarasulu@apache.org X-Mailer: svnmailer-1.0.0-dev X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: akarasulu Date: Sun May 1 08:51:27 2005 New Revision: 165520 URL: http://svn.apache.org/viewcvs?rev=3D165520&view=3Drev Log: changes ... o added some doco or tried o made members private in store impl but added protected accessors o changed names of args and doco so it is understood that the search base is a relative name not a distinguished name o formatted code Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/sto= re/ContextOperation.java directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/sto= re/PrincipalStoreImpl.java Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerber= os/store/ContextOperation.java URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/s= rc/java/org/apache/kerberos/store/ContextOperation.java?rev=3D165520&r1=3D1= 65519&r2=3D165520&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/sto= re/ContextOperation.java (original) +++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/sto= re/ContextOperation.java Sun May 1 08:51:27 2005 @@ -14,17 +14,31 @@ * limitations under the License. * */ - package org.apache.kerberos.store; =20 + import java.io.Serializable; =20 import javax.naming.Name; import javax.naming.directory.DirContext; =20 =20 +/** + * Doc me. + * + * @author Apache Directory Pr= oject + * @version $Rev$ + */ public interface ContextOperation extends Serializable { + /** + * Doc me. + *=20 + * @param ctx + * @param searchBaseDn + * @return + * @throws Exception + */ public Object execute( DirContext ctx, Name searchBaseDn ) throws Exce= ption; } =20 Modified: directory/shared/kerberos/trunk/common/src/java/org/apache/kerber= os/store/PrincipalStoreImpl.java URL: http://svn.apache.org/viewcvs/directory/shared/kerberos/trunk/common/s= rc/java/org/apache/kerberos/store/PrincipalStoreImpl.java?rev=3D165520&r1= =3D165519&r2=3D165520&view=3Ddiff =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/sto= re/PrincipalStoreImpl.java (original) +++ directory/shared/kerberos/trunk/common/src/java/org/apache/kerberos/sto= re/PrincipalStoreImpl.java Sun May 1 08:51:27 2005 @@ -14,32 +14,69 @@ * limitations under the License. * */ - package org.apache.kerberos.store; =20 + import javax.naming.Name; import javax.naming.ldap.LdapContext; =20 =20 +/** + * A simple implementation of the PrincipalStore interface using a JNDI + * based store. + * + * @author Apache Directory Pr= oject + * @version $Rev$ + */ public class PrincipalStoreImpl implements PrincipalStore { /** a handle on the provider context */ - protected LdapContext ctx; - /** the search base relative to provider URL to use for reading entrie= s */ - protected Name searchBaseDn; - =20 + private LdapContext ctx; + + /** the search searchBase relative to the DN of the context supplied */ + private Name searchBase; + + /** - * Creates the action to be used against the embedded ApacheDS DIT. + * Creates the action to be used against the embedded ApacheDS DIT. N= ote + * the searchBase is a relative name to the context and not a DN. + * + * @param ctx the JNDI context to the store + * @param searchBase the name relative to the context to use as the se= arch base */ - public PrincipalStoreImpl( LdapContext ctx, Name searchBaseDn ) + public PrincipalStoreImpl( LdapContext ctx, Name searchBase ) { this.ctx =3D ctx; - this.searchBaseDn =3D searchBaseDn; + + this.searchBase =3D searchBase; } - =20 + + public Object execute( ContextOperation operation ) throws Exception { - return operation.execute( ctx, searchBaseDn ); + return operation.execute( ctx, searchBase ); + } + + + /** + * Gets the LdapContext used to search for principals in the JNDI stor= e=2E + * + * @return the context for the search searchBase + */ + protected LdapContext getContext() + { + return ctx; + } + + + /** + * Gets the search base use for finding principals in the the store. + * + * @return search base relative to the supplied context + */ + protected Name getSearchBase() + { + return searchBase; } } =20