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 Object

Commonly used store utility operations.

Author:
Apache Directory Project

Constructor Summary
StoreUtils()
           
 
Method Summary
static org.apache.directory.shared.ldap.model.entry.Entry findPrincipalEntry(org.apache.directory.server.core.api.CoreSession session, org.apache.directory.shared.ldap.model.name.Dn searchBaseDn, String principal)
          Finds the Entry associated with the Kerberos principal name.
static org.apache.directory.shared.ldap.model.entry.Entry toServerEntry(org.apache.directory.server.core.api.CoreSession session, org.apache.directory.shared.ldap.model.name.Dn dn, PrincipalStoreEntry principalEntry)
          Creates a Entry for a PrincipalStoreEntry, doing what a state factory does but for Entry 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 org.apache.directory.shared.ldap.model.entry.Entry toServerEntry(org.apache.directory.server.core.api.CoreSession session,
                                                                               org.apache.directory.shared.ldap.model.name.Dn dn,
                                                                               PrincipalStoreEntry principalEntry)
                                                                        throws Exception
Creates a Entry for a PrincipalStoreEntry, doing what a state factory does but for Entry 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 Entry
Returns:
the resultant server entry for the PrincipalStoreEntry argument
Throws:
Exception - if there are problems accessing registries

findPrincipalEntry

public static org.apache.directory.shared.ldap.model.entry.Entry findPrincipalEntry(org.apache.directory.server.core.api.CoreSession session,
                                                                                    org.apache.directory.shared.ldap.model.name.Dn searchBaseDn,
                                                                                    String principal)
                                                                             throws Exception
Finds the Entry 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:
Exception - if there are problems while searching the directory


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.