The PDK Java API is part of the Portal Developer Kit on Portal Studio

oracle.portal.provider.v2.oid
Class OidManager

java.lang.Object
  |
  +--oracle.portal.provider.v2.oid.OidManager

public class OidManager
extends java.lang.Object

An OidManager communicates with the OID server to get details of users and user group membership. This class uses a class derived from OidInfo to get the OID connection details. This class manages a pool of OID connections to the OID server. It is imperitive that code using this class that gets a connection also calls the release method so the connection can be reused.


Field Summary
static java.lang.String DEPLOYMENT_PARAM_OID_ADMIN_CLASS
           
static java.lang.String DEPLOYMENT_PARAM_OID_MANAGER
           
static java.lang.String OID_USER_DESCRIPTION
           
static java.lang.String OID_USER_DISPLAY_NAME
           
static java.lang.String OID_USER_FAMILY_NAME
           
static java.lang.String OID_USER_GIVEN_NAME
           
static java.lang.String OID_USER_INITIALS
           
static java.lang.String OID_USER_MAIL
           
static java.lang.String OID_USER_TELEPHONE
           
static java.lang.String OID_USER_TITLE
           
 
Constructor Summary
OidManager()
           
 
Method Summary
 javax.naming.directory.DirContext getUserLDAPContext(java.lang.String userDN, java.lang.String subscriberDN)
          Get the user LDAP context.
 java.lang.String getUserProperty(java.lang.String userDN, java.lang.String subscriberDN, java.lang.String propertyName)
          Get a user property.
 void init(ProviderContext pc)
          Initialise the OidManager.
 boolean isUserInGroup(java.lang.String userDN, java.lang.String subscriberDN, java.lang.String groupDN)
          Test if a user is in a specified group.
 void releaseLDAPContext(javax.naming.directory.DirContext ctx)
          Release an LDAP context.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEPLOYMENT_PARAM_OID_MANAGER

public static final java.lang.String DEPLOYMENT_PARAM_OID_MANAGER

DEPLOYMENT_PARAM_OID_ADMIN_CLASS

public static final java.lang.String DEPLOYMENT_PARAM_OID_ADMIN_CLASS

OID_USER_GIVEN_NAME

public static final java.lang.String OID_USER_GIVEN_NAME

OID_USER_FAMILY_NAME

public static final java.lang.String OID_USER_FAMILY_NAME

OID_USER_TITLE

public static final java.lang.String OID_USER_TITLE

OID_USER_INITIALS

public static final java.lang.String OID_USER_INITIALS

OID_USER_MAIL

public static final java.lang.String OID_USER_MAIL

OID_USER_TELEPHONE

public static final java.lang.String OID_USER_TELEPHONE

OID_USER_DESCRIPTION

public static final java.lang.String OID_USER_DESCRIPTION

OID_USER_DISPLAY_NAME

public static final java.lang.String OID_USER_DISPLAY_NAME
Constructor Detail

OidManager

public OidManager()
Method Detail

init

public void init(ProviderContext pc)
          throws ProviderException
Initialise the OidManager. Initialise the OidManager with the ProviderContext. This method is called immediately after construction and before any other method is called.
Parameters:
pc - the ProviderContext

getUserLDAPContext

public javax.naming.directory.DirContext getUserLDAPContext(java.lang.String userDN,
                                                            java.lang.String subscriberDN)
                                                     throws javax.naming.NamingException,
                                                            ProviderException
Get the user LDAP context. This is the LDAP context for the user identified by the parameters. What can be done with the context depends on the privileges of the user. When the client code has finished with this connection context releaseLDAPContext(DirContext) must be called.
Parameters:
userDN - the distinguished name of the user
subscriberDN - the distinguished name of the subscriber
Returns:
the directory Context of the user

releaseLDAPContext

public void releaseLDAPContext(javax.naming.directory.DirContext ctx)
                        throws javax.naming.NamingException
Release an LDAP context. Puts the LDAP context back into the pool for reuse by another request.
Parameters:
ctx - The LDAP context to be released.

getUserProperty

public java.lang.String getUserProperty(java.lang.String userDN,
                                        java.lang.String subscriberDN,
                                        java.lang.String propertyName)
                                 throws javax.naming.NamingException,
                                        ProviderException
Get a user property. Gets a user property from Oracle Internet Directory.
Parameters:
userDN - the distinguished name of the user
subscriberDN - the distinguished name of the subscriber
propertyName - the name of a user property
Returns:
the value of the user property or null if not found

isUserInGroup

public boolean isUserInGroup(java.lang.String userDN,
                             java.lang.String subscriberDN,
                             java.lang.String groupDN)
                      throws javax.naming.NamingException,
                             ProviderException
Test if a user is in a specified group.
Parameters:
userDN - the distinguished name of the user
subscriberDN - the distinguished name of the subscriber
groupDN - the distinguished name of a group
Returns:
true if user is a member of the group otherwise false

The PDK Java API is part of the Portal Developer Kit on Portal Studio

Copyright (c) 2002, Oracle Corporation. All Rights Reserved.