oracle.ldap.util
Class User

java.lang.Object
  |
  +--oracle.ldap.util.User

public class User
extends java.lang.Object


Field Summary
static int CREDTYPE_PASSWD
          Using userpassword to authenticate
static int EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR
          Extended Preference Type to be used with getExtendedProperties() - Resource Access Descriptor
 
Constructor Summary
User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, int inSubIdType, java.lang.String inSubIdName, boolean validate)
          Constructs a User
User(javax.naming.directory.DirContext ctx, int inUserIdType, java.lang.String inUserIdName, Subscriber inSubscriber, boolean validate)
          Constructs a User
 
Method Summary
 void authenticateUser(javax.naming.directory.DirContext ctx, int authType, java.lang.Object cred)
          Authenticate User using the appropriate credentials
 java.lang.String getDn(javax.naming.directory.DirContext ctx)
          Return the DN of this user.
 PropertySetCollection getExtendedProperties(javax.naming.directory.DirContext ctx, int propType, java.lang.String[] attrList)
          Returns a property set collection of all the extended properties of this user based on the property type specified.
 PropertySetCollection getExtendedProperties(javax.naming.directory.DirContext ctx, int propType, java.lang.String[] attrList, java.lang.String filter)
          Returns a property set collection of the extended properties of this user based on the property type specified
 PropertySetCollection getProperties(javax.naming.directory.DirContext ctx, java.lang.String[] attrList)
          Retrieves selected attributes associated with this user.
 java.lang.String locateSubscriber(javax.naming.directory.DirContext ctx)
          Locate the subscriber this user belongs to
 void resolve(javax.naming.directory.DirContext ctx)
          Validates the user by identifying its DN
 void setProperties(javax.naming.directory.DirContext ctx, javax.naming.directory.ModificationItem[] mods)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CREDTYPE_PASSWD

public static int CREDTYPE_PASSWD
Using userpassword to authenticate

EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR

public static int EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR
Extended Preference Type to be used with getExtendedProperties() - Resource Access Descriptor
Constructor Detail

User

public User(javax.naming.directory.DirContext ctx,
            int inUserIdType,
            java.lang.String inUserIdName,
            Subscriber inSubscriber,
            boolean validate)
     throws UtilException
Constructs a User
Parameters:
ctx - A valid DirContext
inUserIdType - The type of user id being used - use one of Util.IDTYPE_DN, Util.IDTYPE_SIMPLE or Util.IDTYPE_GUID
inUserIdName - User ID
inSubscriber - A valid Subscriber object
validate - Set to true to validate the user by the constructor
Throws:
UtilException -  

User

public User(javax.naming.directory.DirContext ctx,
            int inUserIdType,
            java.lang.String inUserIdName,
            int inSubIdType,
            java.lang.String inSubIdName,
            boolean validate)
     throws UtilException
Constructs a User
Parameters:
ctx - A valid DirContext
inUserIdType - The type of user id being used - use one of Util.IDTYPE_DN, Util.IDTYPE_SIMPLE or Util.IDTYPE_GUID
inUserIdName - User ID
inSubIdType - The type of subscriber id being used - use one of Util.IDTYPE_DN, Util.IDTYPE_SIMPLE or Util.IDTYPE_GUID
inSubIdName - Subscriber ID
validate - Set to true to validate the user by the constructor
Throws:
UtilException -  
Method Detail

getExtendedProperties

public PropertySetCollection getExtendedProperties(javax.naming.directory.DirContext ctx,
                                                   int propType,
                                                   java.lang.String[] attrList,
                                                   java.lang.String filter)
                                            throws UtilException
Returns a property set collection of the extended properties of this user based on the property type specified
Parameters:
ctx - a valid DirContext
proptype - currently only supporting EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR
attrList - a String array of attributes to be retrieved; null indicates that all attributes should be retrieved; an empty array indicates that none should be retrieved
filter - a search filter to identify an particular applications whose properties is to be retrieved
Returns:
a PropertySetCollection containing the results

getExtendedProperties

public PropertySetCollection getExtendedProperties(javax.naming.directory.DirContext ctx,
                                                   int propType,
                                                   java.lang.String[] attrList)
                                            throws UtilException
Returns a property set collection of all the extended properties of this user based on the property type specified.
Parameters:
ctx - a valid DirContext
proptype - currently only supporting EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR
attrList - a String array of attributes to be retrieved; null indicates that all attributes should be retrieved; an empty array indicates that none should be retrieved
Returns:
a PropertySetCollection containing the results

getProperties

public PropertySetCollection getProperties(javax.naming.directory.DirContext ctx,
                                           java.lang.String[] attrList)
                                    throws UtilException
Retrieves selected attributes associated with this user.
Parameters:
ctx - A valid DirContext
attrList - An array of attributes to be retrieved. null indicates that all attributes should be retrieved. An empty array indicates that none should be retrieved.
Throws:
UtilException -  

setProperties

public void setProperties(javax.naming.directory.DirContext ctx,
                          javax.naming.directory.ModificationItem[] mods)
                   throws UtilException

resolve

public void resolve(javax.naming.directory.DirContext ctx)
             throws UtilException
Validates the user by identifying its DN
Parameters:
ctx - A valid DirContext
Throws:
UtilException -  

getDn

public java.lang.String getDn(javax.naming.directory.DirContext ctx)
                       throws UtilException
Return the DN of this user.
Throws:
UtilException -  

locateSubscriber

public java.lang.String locateSubscriber(javax.naming.directory.DirContext ctx)
                                  throws UtilException
Locate the subscriber this user belongs to
Throws:
UtilException -  

authenticateUser

public void authenticateUser(javax.naming.directory.DirContext ctx,
                             int authType,
                             java.lang.Object cred)
                      throws UtilException
Authenticate User using the appropriate credentials
Parameters:
ctx - a valid DirContext
authType - User.CREDTYPE_PASSWD is the only one supported at the moment
cred - the credentials based on the authType
Throws:
UtilException -