Overview | Package | Class | Tree | Deprecated | Index | Help
| OracleAS PDK for Java 9.0.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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(ProviderContext pc)` Constructs an 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.
`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.
`java.lang.String` | `test()` Tests the Oid connection and configuration.

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

See Also:
  Constant Field Values

### DEPLOYMENT_PARAM_OID_ADMIN_CLASS

    public static final java.lang.String DEPLOYMENT_PARAM_OID_ADMIN_CLASS

See Also:
  Constant Field Values

### OID_USER_GIVEN_NAME

    public static final java.lang.String OID_USER_GIVEN_NAME

See Also:
  Constant Field Values

### OID_USER_FAMILY_NAME

    public static final java.lang.String OID_USER_FAMILY_NAME

See Also:
  Constant Field Values

### OID_USER_TITLE

    public static final java.lang.String OID_USER_TITLE

See Also:
  Constant Field Values

### OID_USER_INITIALS

    public static final java.lang.String OID_USER_INITIALS

See Also:
  Constant Field Values

### OID_USER_MAIL

    public static final java.lang.String OID_USER_MAIL

See Also:
  Constant Field Values

### OID_USER_TELEPHONE

    public static final java.lang.String OID_USER_TELEPHONE

See Also:
  Constant Field Values

### OID_USER_DESCRIPTION

    public static final java.lang.String OID_USER_DESCRIPTION

See Also:
  Constant Field Values

### OID_USER_DISPLAY_NAME

    public static final java.lang.String OID_USER_DISPLAY_NAME

See Also:
  Constant Field Values

Constructor Detail

### OidManager

    public OidManager(ProviderContext pc)
               throws ProviderException

  Constructs an OidManager.

Parameters:
  `pc` - the `ProviderContext`

Method Detail

### 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
    `javax.naming.NamingException`
    `ProviderException`

### 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.
    `javax.naming.NamingException`

### 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
    `javax.naming.NamingException`
    `ProviderException`

### 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
    `javax.naming.NamingException`
    `ProviderException`

### test

    public java.lang.String test()

  Tests the Oid connection and configuration. Runs some tests to establish if the configuration is set up correctly and the OID can be communicated.

  Returns:
    a message of any error found or the empty string if ok

Overview | Package | Class | Tree | Deprecated | Index | Help
| OracleAS PDK for Java 9.0.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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