Skip navigation links

Oracle Internet Directory API Reference
11g Release 1 (11.1.1)

E10664-01


oracle.ldap.util
Class OUILdap

java.lang.Object
  extended by oracle.ldap.util.OUILdap


public class OUILdap
extends java.lang.Object

This class resides in ldapjclnt9.jar. It contains the implementation of all the queries used in "LDAPGlobalQueries".

The main method in the LDAPGlobalQueries package is runLdapQuery(). It takes in two parameters - a query number and a String[]. Depending on the query number, the required input from the String[] varies.

Each query returns a String[] as a result. The first String element is the error code in String. Convert it using the Integer class will map to one of the error codes below. The error code relevant to each query will be discussed in details.

Some queries rely on the error code only. Any other results will come in the rest of the String[]. Again, the form of the results and the content vary from query to query. They will be discussed in details below.


Field Summary
static int AUTHENTICATE_USER_QUERY
           
static int AUTHENTICATION_ERROR
          Error Code - AUTHENTICATE_USER_QUERY only.
static int CANNOT_LOCATE_SSO_DB_ERROR
          Error Code - UPDATE_SSO_DB_DN_QUERY only.
static int CONNECTION_ERROR
          Error Code - Cannot establish an LDAP connection with the host, port, bindDN and bindPassword.
static int GET_OID_DB_INFO_QUERY
           
static int GET_OID_PORTS_QUERY
           
static int GET_OID_VERSION_QUERY
           
static int GET_REALMS_QUERY
           
static int GET_SSO_DB_INFO_QUERY
           
static int INVALID_DN_ERROR
          Error Code - VALIDATE_DN_QUERY only.
static int INVALID_QUERY_NUMBER
          Error Code - the query number is invalid
static int IS_MEMBER_QUERY
           
static int IS_NOT_MEMBER_ERROR
          Error Code - IS_MEMBER_QUERY only.
static int IS_NOT_SUPERUSER
          Error Code - IS_SUPERUSER_QUERY only.
static int IS_SUPERUSER_QUERY
           
static int LDAP_DELETE_QUERY
           
static int LDAP_OPERATION_ERROR
          Error Code - Error is encountered during one of the LDAP operations performed during the query.
static int NOT_INFRA_DB_ERROR
          Error Code - GET_*_DB_INFO_QUERY only.
static int PARAMETER_ERROR
          Error Code - Invalid Parameters in the String[] of arguments
static int SSO_NOT_CONFIGURED_ERROR
          Error Code - GET_SSO_DB_QUERY only.
static int SUCCESS
          Error Code - The operation has completed successfully
static int UPDATE_SSO_DB_DN_QUERY
           
static int VALIDATE_DN_QUERY
           

 

Constructor Summary
OUILdap()
           

 

Method Summary
protected static java.lang.String[] getSSODBInfo(javax.naming.directory.DirContext inCtx, java.lang.String[] argsArr)
           Query #6.
static void main(java.lang.String[] args)
          For testing purpose
static java.lang.String[] runLdapQuery(int queryNum, java.lang.String[] argsArr)
           The RunLdapQuery() is the main query of this package.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

GET_REALMS_QUERY

public static final int GET_REALMS_QUERY
See Also:
Constant Field Values

GET_OID_VERSION_QUERY

public static final int GET_OID_VERSION_QUERY
See Also:
Constant Field Values

VALIDATE_DN_QUERY

public static final int VALIDATE_DN_QUERY
See Also:
Constant Field Values

IS_MEMBER_QUERY

public static final int IS_MEMBER_QUERY
See Also:
Constant Field Values

AUTHENTICATE_USER_QUERY

public static final int AUTHENTICATE_USER_QUERY
See Also:
Constant Field Values

GET_OID_DB_INFO_QUERY

public static final int GET_OID_DB_INFO_QUERY
See Also:
Constant Field Values

GET_SSO_DB_INFO_QUERY

public static final int GET_SSO_DB_INFO_QUERY
See Also:
Constant Field Values

LDAP_DELETE_QUERY

public static final int LDAP_DELETE_QUERY
See Also:
Constant Field Values

GET_OID_PORTS_QUERY

public static final int GET_OID_PORTS_QUERY
See Also:
Constant Field Values

UPDATE_SSO_DB_DN_QUERY

public static final int UPDATE_SSO_DB_DN_QUERY
See Also:
Constant Field Values

IS_SUPERUSER_QUERY

public static final int IS_SUPERUSER_QUERY
See Also:
Constant Field Values

SUCCESS

public static final int SUCCESS
Error Code - The operation has completed successfully
See Also:
Constant Field Values

PARAMETER_ERROR

public static final int PARAMETER_ERROR
Error Code - Invalid Parameters in the String[] of arguments
See Also:
Constant Field Values

CONNECTION_ERROR

public static final int CONNECTION_ERROR
Error Code - Cannot establish an LDAP connection with the host, port, bindDN and bindPassword.
See Also:
Constant Field Values

LDAP_OPERATION_ERROR

public static final int LDAP_OPERATION_ERROR
Error Code - Error is encountered during one of the LDAP operations performed during the query. The may be a result of an invalid DIT structure in OID or insufficient access due to lack of privileges from the bindDN.
See Also:
Constant Field Values

IS_NOT_MEMBER_ERROR

public static final int IS_NOT_MEMBER_ERROR
Error Code - IS_MEMBER_QUERY only. The DN is not a member of the specified group
See Also:
Constant Field Values

AUTHENTICATION_ERROR

public static final int AUTHENTICATION_ERROR
Error Code - AUTHENTICATE_USER_QUERY only. User cannot be authenticated
See Also:
Constant Field Values

INVALID_DN_ERROR

public static final int INVALID_DN_ERROR
Error Code - VALIDATE_DN_QUERY only. The DN syntax is invalid.
See Also:
Constant Field Values

NOT_INFRA_DB_ERROR

public static final int NOT_INFRA_DB_ERROR
Error Code - GET_*_DB_INFO_QUERY only. The DB specified is not an infrastructure DB
See Also:
Constant Field Values

SSO_NOT_CONFIGURED_ERROR

public static final int SSO_NOT_CONFIGURED_ERROR
Error Code - GET_SSO_DB_QUERY only. SSO is not configured in this OID
See Also:
Constant Field Values

CANNOT_LOCATE_SSO_DB_ERROR

public static final int CANNOT_LOCATE_SSO_DB_ERROR
Error Code - UPDATE_SSO_DB_DN_QUERY only.
See Also:
Constant Field Values

IS_NOT_SUPERUSER

public static final int IS_NOT_SUPERUSER
Error Code - IS_SUPERUSER_QUERY only.
See Also:
Constant Field Values

INVALID_QUERY_NUMBER

public static final int INVALID_QUERY_NUMBER
Error Code - the query number is invalid
See Also:
Constant Field Values

Constructor Detail

OUILdap

public OUILdap()

Method Detail

main

public static void main(java.lang.String[] args)
For testing purpose

runLdapQuery

public static java.lang.String[] runLdapQuery(int queryNum,
                                              java.lang.String[] argsArr)

The RunLdapQuery() is the main query of this package. Currently, the following queries are supported:

 QueryNumber        Query
 ------------------------
    0                 getRealms()
    1                 getOIDVersion()
    2                 validateDN()
    3                 isMember()
    4                 authenticateUser()
    5                 getOIDDBInfo()
    6                 getSSODBInfo()
    7                 ldapDelete()
    8                 getOIDPorts()
    9                 updateSSODBDN()
   10                 isSuperUser()
 
Parameters:
queryNum - the query number
argsArr - a String array of arguments
Returns:
a String[] as a result. The first element is always the error code which is an Integer in the String format. The structure of the rest of the String[] varies from query to query. Please see individual query for details.

getSSODBInfo

protected static java.lang.String[] getSSODBInfo(javax.naming.directory.DirContext inCtx,
                                                 java.lang.String[] argsArr)

Query #6. Returns the SSO database information from OID. The expected arguments from the String[] are the following:

  argsArr[0] = host
  argsArr[1] = port
  argsArr[2] = bindDN - for anonymous bind, use an empty string ""
  argsArr[3] = bindPassword - for anonymous bind, use an empty string ""
  argsArr[4] = SSL Socket Factory 
                 - "" (set to empty String for non-ssl connection),
                 - "oracle.ldap.util.jndi.LDAPSSLSocketFactoryImpl" (during runtime)
              or - "oracle.ias.repqueries.InstallSSLSocketFactoryImpl" (OUI code should use this one)

 Returns a String[].  The first element of the String[] is the error code.
 If the error code is SUCCESS,  
 the second element will be the global database name;
 the third element will be the net descriptor string;
 the fourth element will be the DN of the database registration entry.

 The following error codes are supported:
    SUCCESS
    CONNECTION_ERROR
    PARAMETER_ERROR
    SSO_NOT_CONFIGURED_ERROR
    LDAP_OPERATION_ERROR
 

Skip navigation links

Oracle Internet Directory API Reference
11g Release 1 (11.1.1)

E10664-01


Copyright © 1999, 2009 Oracle. All Rights Reserved.