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.
|
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 |
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
OidManager
public OidManager()
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 usersubscriberDN - 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 usersubscriberDN - the distinguished name of the subscriberpropertyName - 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 usersubscriberDN - the distinguished name of the subscribergroupDN - the distinguished name of a group- Returns:
- true if user is a member of the group otherwise false
Copyright (c) 2002, Oracle Corporation. All Rights Reserved.