Novell
exteNd Director 4.1

com.sssw.fw.directory.client
Class EboDirectoryHelper

java.lang.Object
 |
 +--com.sssw.fw.directory.client.EboDirectoryHelper

public class EboDirectoryHelper
extends Object

Directory helper class that provides some convenient methods.


Constructor Summary
EboDirectoryHelper()
           
 
Method Summary
 String encryptPassword(String username, String password)
          Encrypts a password given a password and username.
static String getLoginName(EbiContext context)
          Gets the login name from the EbiContext.
static String getNewUserContainer()
          Gets the new user container (dn) that is configured in the config.xml of the directory service.
protected static Principal getPrincipal(EbiContext context)
          Gets the security object for the current user.
static String getUpdateUser(EbiContext ctx)
          Gets the userUniqueID from the EbiContext for use in UPDATEUSER column.
static String getUserBaseDN()
          Gets the user root container (base dn) that is configured in the config.xml of the directory service.
static String getUserFullQualifiedName(EbiContext context)
          Gets the authenticated user's full qualified name from the EbiContext.
static String getUserID(EbiContext context)
          Gets the userID (i.e.
static int getUserSearchScope()
          Gets the user search scope that is configured in the config.xml of the directory service.
static boolean isLoginNewUsersEnabled()
          Gets a boolean value indicating whether users should be able to self-register
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EboDirectoryHelper

public EboDirectoryHelper()
Method Detail

getUserID

public static String getUserID(EbiContext context)
                        throws EboUnrecoverableSystemException
Gets the userID (i.e. authenticated user's principal name) from the EbiContext.
Returns:
The userID for the authenticated user in the EbiContext.

getUserFullQualifiedName

public static String getUserFullQualifiedName(EbiContext context)
                                       throws EboUnrecoverableSystemException
Gets the authenticated user's full qualified name from the EbiContext. The fully qualified name is a combination of the realm name and principal name with a backslash as the delimiter between the two, e.g. "weblogic\admin".
Returns:
The fully qualified name for the authenticated user in the EbiContext.

getUpdateUser

public static String getUpdateUser(EbiContext ctx)
                            throws EboUnrecoverableSystemException
Gets the userUniqueID from the EbiContext for use in UPDATEUSER column.
Returns:
A userUUID for the authenticated user in the EbiContext.

getLoginName

public static String getLoginName(EbiContext context)
                           throws EboUnrecoverableSystemException
Gets the login name from the EbiContext. This is the same as the name of the principal.
Returns:
The login name for the authenticated user in the EbiContext.

getUserBaseDN

public static String getUserBaseDN()
Gets the user root container (base dn) that is configured in the config.xml of the directory service.
Returns:
the user root container as the base DN.

getUserSearchScope

public static int getUserSearchScope()
Gets the user search scope that is configured in the config.xml of the directory service.

getNewUserContainer

public static String getNewUserContainer()
Gets the new user container (dn) that is configured in the config.xml of the directory service.
Returns:
the new user container DN.

isLoginNewUsersEnabled

public static boolean isLoginNewUsersEnabled()
Gets a boolean value indicating whether users should be able to self-register
Returns:
boolean

encryptPassword

public String encryptPassword(String username,
                              String password)
Encrypts a password given a password and username.
Parameters:
username - Name of the user.
password - Password to encrypt.
Returns:
The encrypted password.

getPrincipal

protected static Principal getPrincipal(EbiContext context)
                                 throws EboException
Gets the security object for the current user.
Returns:
A Principal object.

Novell
exteNd Director 4.1