org.apache.directory.server.kerberos.shared.store.operations
Class StoreUtils

java.lang.Object
  extended by org.apache.directory.server.kerberos.shared.store.operations.StoreUtils

public class StoreUtils
extends java.lang.Object

Commonly used store utility operations.

Version:
$Rev$, $Date$
Author:
Apache Directory Project

Constructor Summary
StoreUtils()
           
 
Method Summary
static ServerEntry findPrincipalEntry(CoreSession session, org.apache.directory.shared.ldap.name.LdapDN searchBaseDn, java.lang.String principal)
          Finds the ServerEntry associated with the Kerberos principal name.
static ServerEntry toServerEntry(CoreSession session, org.apache.directory.shared.ldap.name.LdapDN dn, PrincipalStoreEntry principalEntry)
          Creates a ServerEntry for a PrincipalStoreEntry, doing what a state factory does but for ServerEntry instead of Attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreUtils

public StoreUtils()
Method Detail

toServerEntry

public static ServerEntry toServerEntry(CoreSession session,
                                        org.apache.directory.shared.ldap.name.LdapDN dn,
                                        PrincipalStoreEntry principalEntry)
                                 throws java.lang.Exception
Creates a ServerEntry for a PrincipalStoreEntry, doing what a state factory does but for ServerEntry instead of Attributes.

Parameters:
session - the session to use to access the directory's registries
dn - the distinguished name of the principal to be
principalEntry - the principal entry to convert into a ServerEntry
Returns:
the resultant server entry for the PrincipalStoreEntry argument
Throws:
java.lang.Exception - if there are problems accessing registries

findPrincipalEntry

public static ServerEntry findPrincipalEntry(CoreSession session,
                                             org.apache.directory.shared.ldap.name.LdapDN searchBaseDn,
                                             java.lang.String principal)
                                      throws java.lang.Exception
Finds the ServerEntry associated with the Kerberos principal name.

Parameters:
session - the session to use for the search
searchBaseDn - the base to use while searching
principal - the name of the principal to search for
Returns:
the server entry for the principal or null if non-existent
Throws:
java.lang.Exception - if there are problems while searching the directory


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.