directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ckopp...@apache.org
Subject svn commit: r762156 - in /directory/apacheds/trunk: kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/ kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/ protocol-changepw/src/test/...
Date Sun, 05 Apr 2009 20:46:13 GMT
Author: ckoppelt
Date: Sun Apr  5 20:46:12 2009
New Revision: 762156

URL: http://svn.apache.org/viewvc?rev=762156&view=rev
Log:
removed dead code fragments for adding, deleting and get all Principals from the kerberos
server, because they were not used anywhere. This functionality is so far  handled by the
LDAP-Server and there are no plans for implementing a kadmin-Service in the near future. 


Removed:
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/AddPrincipal.java
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/DeletePrincipal.java
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/GetAllPrincipals.java
Modified:
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/DirectoryPrincipalStore.java
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java
    directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
    directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/MapPrincipalStoreImpl.java
    directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/MapPrincipalStoreImpl.java

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/DirectoryPrincipalStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/DirectoryPrincipalStore.java?rev=762156&r1=762155&r2=762156&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/DirectoryPrincipalStore.java
(original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/DirectoryPrincipalStore.java
Sun Apr  5 20:46:12 2009
@@ -30,7 +30,6 @@
 /**
  * A PrincipalStore backing entries in a DirectoryService.
  * 
- * TODO implement it!!
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
@@ -52,15 +51,6 @@
         this.directoryService = directoryService;
         this.searchBaseDn = searchBaseDn;
     }
-    
-    
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.kerberos.shared.store.PrincipalStore#addPrincipal(org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry)
-     */
-    public String addPrincipal( PrincipalStoreEntry entry ) throws Exception
-    {
-        throw new NotImplementedException();
-    }
 
 
     /* (non-Javadoc)
@@ -68,24 +58,7 @@
      */
     public String changePassword( KerberosPrincipal principal, String newPassword ) throws
Exception
     {
-        throw new NotImplementedException();
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.kerberos.shared.store.PrincipalStore#deletePrincipal(javax.security.auth.kerberos.KerberosPrincipal)
-     */
-    public String deletePrincipal( KerberosPrincipal principal ) throws Exception
-    {
-        throw new NotImplementedException();
-    }
-
-
-    /* (non-Javadoc)
-     * @see org.apache.directory.server.kerberos.shared.store.PrincipalStore#getAllPrincipals(java.lang.String)
-     */
-    public PrincipalStoreEntry[] getAllPrincipals( String realm ) throws Exception
-    {
+        //TODO check if this method is still in use, otherwise remove it
         throw new NotImplementedException();
     }
 
@@ -95,7 +68,7 @@
      */
     public PrincipalStoreEntry getPrincipal( KerberosPrincipal principal ) throws Exception
     {
-        SingleBaseSearch singleBaseSearch = new SingleBaseSearch (directoryService, searchBaseDn);
-        return singleBaseSearch.getPrincipal (principal);
+        SingleBaseSearch singleBaseSearch = new SingleBaseSearch( directoryService, searchBaseDn
);
+        return singleBaseSearch.getPrincipal( principal );
     }
 }

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java?rev=762156&r1=762155&r2=762156&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
(original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/MultiBaseSearch.java
Sun Apr  5 20:46:12 2009
@@ -28,10 +28,7 @@
 
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.kerberos.shared.store.operations.AddPrincipal;
 import org.apache.directory.server.kerberos.shared.store.operations.ChangePassword;
-import org.apache.directory.server.kerberos.shared.store.operations.DeletePrincipal;
-import org.apache.directory.server.kerberos.shared.store.operations.GetAllPrincipals;
 import org.apache.directory.server.kerberos.shared.store.operations.GetPrincipal;
 import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
 import org.apache.directory.server.protocol.shared.catalog.Catalog;
@@ -70,47 +67,6 @@
     }
 
 
-    public String addPrincipal( PrincipalStoreEntry entry ) throws Exception
-    {
-        try
-        {
-            return ( String ) execute( directoryService.getSession(), new AddPrincipal( entry
) );
-        }
-        catch ( NamingException ne )
-        {
-            String message = "Failed to get initial context " + entry.getRealmName();
-            throw new ServiceConfigurationException( message, ne );
-        }
-    }
-
-    public String deletePrincipal( KerberosPrincipal principal ) throws Exception
-    {
-        try
-        {
-            return ( String ) execute( directoryService.getSession(), new DeletePrincipal(
principal ) );
-        }
-        catch ( NamingException ne )
-        {
-            String message = "Failed to get initial context " + principal.getRealm();
-            throw new ServiceConfigurationException( message, ne );
-        }
-    }
-
-
-    public PrincipalStoreEntry[] getAllPrincipals( String realm ) throws Exception
-    {
-        try
-        {
-            return ( PrincipalStoreEntry[] ) execute( directoryService.getSession(), new
GetAllPrincipals() );
-        }
-        catch ( NamingException ne )
-        {
-            String message = "Failed to get initial context " + realm;
-            throw new ServiceConfigurationException( message, ne );
-        }
-    }
-
-
     public PrincipalStoreEntry getPrincipal( KerberosPrincipal principal ) throws Exception
     {
         try

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java?rev=762156&r1=762155&r2=762156&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java
(original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/PrincipalStore.java
Sun Apr  5 20:46:12 2009
@@ -31,15 +31,6 @@
  */
 public interface PrincipalStore
 {
-    /**
-     * Add a principal.
-     *
-     * @param entry
-     * @return The name of the principal being added.
-     * @throws Exception
-     */
-    public String addPrincipal( PrincipalStoreEntry entry ) throws Exception;
-
 
     /**
      * Change a principal's password.
@@ -53,26 +44,6 @@
 
 
     /**
-     * Delete a principal.
-     *
-     * @param principal
-     * @return The name of the principal being deleted.
-     * @throws Exception
-     */
-    public String deletePrincipal( KerberosPrincipal principal ) throws Exception;
-
-
-    /**
-     * Get all principals for a given realm.
-     *
-     * @param realm
-     * @return An array of {@link PrincipalStoreEntry}'s.
-     * @throws Exception
-     */
-    public PrincipalStoreEntry[] getAllPrincipals( String realm ) throws Exception;
-
-
-    /**
      * Get a {@link PrincipalStoreEntry} given a Kerberos principal.
      *
      * @param principal

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java?rev=762156&r1=762155&r2=762156&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
(original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/SingleBaseSearch.java
Sun Apr  5 20:46:12 2009
@@ -20,18 +20,15 @@
 package org.apache.directory.server.kerberos.shared.store;
 
 
+import javax.security.auth.kerberos.KerberosPrincipal;
+
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.kerberos.shared.store.operations.AddPrincipal;
 import org.apache.directory.server.kerberos.shared.store.operations.ChangePassword;
-import org.apache.directory.server.kerberos.shared.store.operations.DeletePrincipal;
-import org.apache.directory.server.kerberos.shared.store.operations.GetAllPrincipals;
 import org.apache.directory.server.kerberos.shared.store.operations.GetPrincipal;
 import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
-import javax.security.auth.kerberos.KerberosPrincipal;
-
 
 /**
  * A JNDI-backed search strategy implementation. This search strategy searches 
@@ -52,33 +49,15 @@
         {
             session = directoryService.getAdminSession();
             this.searchBaseDn = searchBaseDn;
-        } 
+        }
         catch ( Exception e )
         {
-            throw new ServiceConfigurationException("Can't get a session", e);
+            throw new ServiceConfigurationException( "Can't get a session", e );
         }
 
     }
 
 
-    public String addPrincipal( PrincipalStoreEntry entry ) throws Exception
-    {
-        return ( String ) new AddPrincipal( entry ).execute( session, null );
-    }
-
-
-    public String deletePrincipal( KerberosPrincipal principal ) throws Exception
-    {
-        return ( String ) new DeletePrincipal( principal ).execute( session, null );
-    }
-
-
-    public PrincipalStoreEntry[] getAllPrincipals( String realm ) throws Exception
-    {
-        return ( PrincipalStoreEntry[] ) new GetAllPrincipals().execute( session, null );
-    }
-
-
     public PrincipalStoreEntry getPrincipal( KerberosPrincipal principal ) throws Exception
     {
         return ( PrincipalStoreEntry ) new GetPrincipal( principal ).execute( session, searchBaseDn
);

Modified: directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/MapPrincipalStoreImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/MapPrincipalStoreImpl.java?rev=762156&r1=762155&r2=762156&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/MapPrincipalStoreImpl.java
(original)
+++ directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/MapPrincipalStoreImpl.java
Sun Apr  5 20:46:12 2009
@@ -77,24 +77,6 @@
     }
 
 
-    public String addPrincipal( PrincipalStoreEntry entry ) throws Exception
-    {
-        return null;
-    }
-
-
-    public String deletePrincipal( KerberosPrincipal principal ) throws Exception
-    {
-        return null;
-    }
-
-
-    public PrincipalStoreEntry[] getAllPrincipals( String realm ) throws Exception
-    {
-        return null;
-    }
-
-
     private static PrincipalStoreEntry getEntry( String principalName, String passPhrase
)
     {
         KerberosPrincipal clientPrincipal = new KerberosPrincipal( principalName );

Modified: directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/MapPrincipalStoreImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/MapPrincipalStoreImpl.java?rev=762156&r1=762155&r2=762156&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/MapPrincipalStoreImpl.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/test/java/org/apache/directory/server/kerberos/protocol/MapPrincipalStoreImpl.java
Sun Apr  5 20:46:12 2009
@@ -80,30 +80,12 @@
     }
 
 
-    public String addPrincipal( PrincipalStoreEntry entry ) throws Exception
-    {
-        return null;
-    }
-
-
     public String changePassword( KerberosPrincipal principal, String newPassword ) throws
Exception
     {
         return null;
     }
 
 
-    public String deletePrincipal( KerberosPrincipal principal ) throws Exception
-    {
-        return null;
-    }
-
-
-    public PrincipalStoreEntry[] getAllPrincipals( String realm ) throws Exception
-    {
-        return null;
-    }
-
-
     private static PrincipalStoreEntry getEntry( String principalName, String passPhrase
)
     {
         KerberosPrincipal clientPrincipal = new KerberosPrincipal( principalName );



Mime
View raw message