Skip navigation links

Oracle Internet Directory API Reference
10g(10.1.4)

B15992-01


oracle.ldap.util
Class Util

java.lang.Object
  extended byoracle.ldap.util.Util


public class Util
extends java.lang.Object

Util class provides a set of static utility methods that are used throughout the oracle.ldap.util package. Many of these APIs are generic LDAP methods that are extremely useful in performing LDAP operations.


Field Summary
static java.lang.String API_VERSION
          The API version number
static int CREDTYPE_PASSWD
          Using userpassword to authenticate
static java.lang.String DASURL_ACCOUNT_INFO
          DAS URL type - Account Info
static java.lang.String DASURL_BASE
          DAS URL type - Base URL
static java.lang.String DASURL_CREATE_GROUP
          DAS URL type - Create Group
static java.lang.String DASURL_CREATE_RESOURCE
          DAS URL type - Create Resource
static java.lang.String DASURL_CREATE_USER
          DAS URL type - Create User
static java.lang.String DASURL_DELEGATION_CONSOLE
          DAS URL type - Delegation Console
static java.lang.String DASURL_DELETE_GROUP
          DAS URL type - Delete Group
static java.lang.String DASURL_DELETE_GROUP_GIVEN_GUID
          DAS URL type - Delete Group Given GUID
static java.lang.String DASURL_DELETE_USER
          DAS URL type - Delete User
static java.lang.String DASURL_DELETE_USER_GIVEN_GUID
          DAS URL type - Delete User Given GUID
static java.lang.String DASURL_EDIT_GROUP
          DAS URL type - Edit Group
static java.lang.String DASURL_EDIT_GROUP_GIVEN_GUID
          DAS URL type - Edit Group Given GUID
static java.lang.String DASURL_EDIT_MY_PROFILE
          DAS URL type - Edit My Profile
static java.lang.String DASURL_EDIT_USER
          DAS URL type - Edit User
static java.lang.String DASURL_EDIT_USER_GIVEN_GUID
          DAS URL type - Edit User Given GUID
static java.lang.String DASURL_EUS_CONSOLE
          DAS URL type - EUS Console
static java.lang.String DASURL_GROUP_LOV
          DAS URL type - Group LOV
static java.lang.String DASURL_GROUP_PRIVILEGE
          DAS URL type - Group Privilege
static java.lang.String DASURL_GROUP_PRIVILEGE_GIVEN_GUID
          DAS URL type - Group Privilege Given GUID
static java.lang.String DASURL_GROUP_SEARCH
          DAS URL type - Group Search
static java.lang.String DASURL_PASSWORD_CHANGE
          DAS URL type - Password Change
static java.lang.String DASURL_RESET_PASSWORD
          DAS URL type - Reset Password
static java.lang.String DASURL_TIMEZONE
          DAS URL type - Time Zone
static java.lang.String DASURL_USER_LOV
          DAS URL type - User Lov
static java.lang.String DASURL_USER_PRIVILEGE
          DAS URL type - User Privilege
static java.lang.String DASURL_USER_PRIVILEGE_GIVEN_GUID
          DAS URL type - User Privilege Given GUID
static java.lang.String DASURL_USER_SEARCH
          DAS URL type - User Search
static java.lang.String DASURL_VIEW_USER_PROFILE
          DAS URL type - View User Profile
static int IDTYPE_DEFAULT
          Use default value
static int IDTYPE_DN
          The id type used is a DN
static int IDTYPE_FILTER
          The id type used is a filter
static int IDTYPE_GUID
          The id type used is a GUID
static int IDTYPE_KERB_PRINCIPAL
          The id type used is a Kerberos Principal
static int IDTYPE_SIMPLE
          The id type used is a simple id
static int IDTYPE_WINDOWS
          The id type used is a Windows user id
static java.lang.String INTERFACE_VERSION
          The Interface version number
static int PROPERTIES_DETACHED
          User detached properties
static int PROPERTIES_ENTRY
          User entry properties
static int PWD_VERIFIERTYPE_COMMON
          The Common Password Verifier

 

Constructor Summary
Util()
           

 

Method Summary
static java.util.Hashtable getAllDASUrl(javax.naming.directory.DirContext ctx)
          Returns a Hashtable containing all the DAS URLs.
static java.lang.String getDASUrl(javax.naming.directory.DirContext ctx, java.lang.String urlTypeDN)
          Returns a particular DAS url identified by the urlTypeDN.
static PropertySetCollection getGroupMembership(javax.naming.directory.DirContext ctx, java.lang.String dn, java.lang.String[] attrList, boolean nested)
           
static PropertySetCollection getGroupMembership(javax.naming.directory.DirContext ctx, java.lang.String dn, java.lang.String[] attrList, boolean nested, java.lang.String memberAttribute)
          Returns a PropertySetCollection of groups that the dn belongs to directly or indirectly.
static PropertySetCollection getGroupMembership(javax.naming.directory.DirContext ctx, User curUser, java.lang.String[] attrList, boolean nested)
          Return a list of groups the user belongs to directly or indirectly The groups are returned in a PropertySetCollection.
static PropertySetCollection getOwnership(javax.naming.directory.DirContext ctx, java.lang.String dn, java.lang.String[] attrList, boolean nested)
          Returns a PropertySetCollection of DNs where the input DN is an owner.
static PropertySetCollection getOwnership(javax.naming.directory.DirContext ctx, User curUser, java.lang.String[] attrList, boolean nested)
          Returns a PropertySetCollection of DNs where the user is an owner.
static java.lang.String getParentDN(java.lang.String dn)
          Returns the parent DN of the given DN For example, if dn is "dc=acme,dc=com", getParentDN returns "dc=com".
static java.lang.String getRDN(java.lang.String dn)
          Returns the RDN portion of the DN.
static java.lang.String getSubscriberDn(javax.naming.directory.DirContext ctx, java.lang.String subId, int subIdType)
          Deprecated. Use Subscriber.getDN(ctx)
static java.lang.String normalizeDN(java.lang.String inDN)
          Normalizes the DN.
static void printResults(PropertySetCollection resultSet)
          Prints the entries represented by the PropertySetCollecition in LDIF format to Standard Output

 

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

 

Field Detail

API_VERSION

public static java.lang.String API_VERSION
The API version number

INTERFACE_VERSION

public static java.lang.String INTERFACE_VERSION
The Interface version number

PWD_VERIFIERTYPE_COMMON

public static int PWD_VERIFIERTYPE_COMMON
The Common Password Verifier

IDTYPE_DN

public static int IDTYPE_DN
The id type used is a DN

IDTYPE_SIMPLE

public static int IDTYPE_SIMPLE
The id type used is a simple id

IDTYPE_GUID

public static int IDTYPE_GUID
The id type used is a GUID

IDTYPE_DEFAULT

public static int IDTYPE_DEFAULT
Use default value

IDTYPE_FILTER

public static int IDTYPE_FILTER
The id type used is a filter

IDTYPE_WINDOWS

public static int IDTYPE_WINDOWS
The id type used is a Windows user id

IDTYPE_KERB_PRINCIPAL

public static int IDTYPE_KERB_PRINCIPAL
The id type used is a Kerberos Principal

PROPERTIES_ENTRY

public static int PROPERTIES_ENTRY
User entry properties

PROPERTIES_DETACHED

public static int PROPERTIES_DETACHED
User detached properties

CREDTYPE_PASSWD

public static int CREDTYPE_PASSWD
Using userpassword to authenticate

DASURL_BASE

public static java.lang.String DASURL_BASE
DAS URL type - Base URL

DASURL_CREATE_USER

public static java.lang.String DASURL_CREATE_USER
DAS URL type - Create User

DASURL_EDIT_GROUP

public static java.lang.String DASURL_EDIT_GROUP
DAS URL type - Edit Group

DASURL_EDIT_GROUP_GIVEN_GUID

public static java.lang.String DASURL_EDIT_GROUP_GIVEN_GUID
DAS URL type - Edit Group Given GUID

DASURL_GROUP_SEARCH

public static java.lang.String DASURL_GROUP_SEARCH
DAS URL type - Group Search

DASURL_EDIT_USER

public static java.lang.String DASURL_EDIT_USER
DAS URL type - Edit User

DASURL_GROUP_LOV

public static java.lang.String DASURL_GROUP_LOV
DAS URL type - Group LOV

DASURL_DELETE_USER

public static java.lang.String DASURL_DELETE_USER
DAS URL type - Delete User

DASURL_USER_PRIVILEGE

public static java.lang.String DASURL_USER_PRIVILEGE
DAS URL type - User Privilege

DASURL_CREATE_GROUP

public static java.lang.String DASURL_CREATE_GROUP
DAS URL type - Create Group

DASURL_USER_SEARCH

public static java.lang.String DASURL_USER_SEARCH
DAS URL type - User Search

DASURL_ACCOUNT_INFO

public static java.lang.String DASURL_ACCOUNT_INFO
DAS URL type - Account Info

DASURL_EDIT_USER_GIVEN_GUID

public static java.lang.String DASURL_EDIT_USER_GIVEN_GUID
DAS URL type - Edit User Given GUID

DASURL_DELETE_USER_GIVEN_GUID

public static java.lang.String DASURL_DELETE_USER_GIVEN_GUID
DAS URL type - Delete User Given GUID

DASURL_DELETE_GROUP_GIVEN_GUID

public static java.lang.String DASURL_DELETE_GROUP_GIVEN_GUID
DAS URL type - Delete Group Given GUID

DASURL_GROUP_PRIVILEGE

public static java.lang.String DASURL_GROUP_PRIVILEGE
DAS URL type - Group Privilege

DASURL_USER_PRIVILEGE_GIVEN_GUID

public static java.lang.String DASURL_USER_PRIVILEGE_GIVEN_GUID
DAS URL type - User Privilege Given GUID

DASURL_PASSWORD_CHANGE

public static java.lang.String DASURL_PASSWORD_CHANGE
DAS URL type - Password Change

DASURL_USER_LOV

public static java.lang.String DASURL_USER_LOV
DAS URL type - User Lov

DASURL_GROUP_PRIVILEGE_GIVEN_GUID

public static java.lang.String DASURL_GROUP_PRIVILEGE_GIVEN_GUID
DAS URL type - Group Privilege Given GUID

DASURL_DELETE_GROUP

public static java.lang.String DASURL_DELETE_GROUP
DAS URL type - Delete Group

DASURL_CREATE_RESOURCE

public static java.lang.String DASURL_CREATE_RESOURCE
DAS URL type - Create Resource

DASURL_EUS_CONSOLE

public static java.lang.String DASURL_EUS_CONSOLE
DAS URL type - EUS Console

DASURL_DELEGATION_CONSOLE

public static java.lang.String DASURL_DELEGATION_CONSOLE
DAS URL type - Delegation Console

DASURL_EDIT_MY_PROFILE

public static java.lang.String DASURL_EDIT_MY_PROFILE
DAS URL type - Edit My Profile

DASURL_RESET_PASSWORD

public static java.lang.String DASURL_RESET_PASSWORD
DAS URL type - Reset Password

DASURL_VIEW_USER_PROFILE

public static java.lang.String DASURL_VIEW_USER_PROFILE
DAS URL type - View User Profile

DASURL_TIMEZONE

public static java.lang.String DASURL_TIMEZONE
DAS URL type - Time Zone

Constructor Detail

Util

public Util()

Method Detail

getSubscriberDn

public static java.lang.String getSubscriberDn(javax.naming.directory.DirContext ctx,
                                               java.lang.String subId,
                                               int subIdType)
                                        throws UtilException
Deprecated. Use Subscriber.getDN(ctx)
Returns the DN of the given subscriber.
Parameters:
ctx - a valid DirContext
subId - Subscriber ID
subIdType - The type of subscriber id being used - use one of IDTYPE_DN, IDTYPE_SIMPLE or Util.IDTYPE_GUID
Throws:
UtilException

getOwnership

public static PropertySetCollection getOwnership(javax.naming.directory.DirContext ctx,
                                                 User curUser,
                                                 java.lang.String[] attrList,
                                                 boolean nested)
                                          throws UtilException
Returns a PropertySetCollection of DNs where the user is an owner. If nested is set to true, the method will look for nested ownership as well.
Parameters:
ctx - DirContext
curUser - a valid User object
attrList - a set of attributes to be fetched
nested - true if nested ownership is desired
Throws:
UtilException

getOwnership

public static PropertySetCollection getOwnership(javax.naming.directory.DirContext ctx,
                                                 java.lang.String dn,
                                                 java.lang.String[] attrList,
                                                 boolean nested)
                                          throws UtilException
Returns a PropertySetCollection of DNs where the input DN is an owner. If nested is set to true, the method will look for nested ownership as well.
Parameters:
ctx - DirContext
dn - the DN to be looked up
attrList - a set of attributes to be fetched
nested - true if nested ownership is desired
Throws:
UtilException

getGroupMembership

public static PropertySetCollection getGroupMembership(javax.naming.directory.DirContext ctx,
                                                       User curUser,
                                                       java.lang.String[] attrList,
                                                       boolean nested)
                                                throws UtilException
Return a list of groups the user belongs to directly or indirectly The groups are returned in a PropertySetCollection.
Parameters:
ctx - a valid DirContext
curUser - a valid User object
attrList - a String array of attributes to be retrieved from each group
nested - Set to true to look for nested membership. Otherwise, only direct memberships are returned
Throws:
UtilException

getGroupMembership

public static PropertySetCollection getGroupMembership(javax.naming.directory.DirContext ctx,
                                                       java.lang.String dn,
                                                       java.lang.String[] attrList,
                                                       boolean nested,
                                                       java.lang.String memberAttribute)
                                                throws UtilException
Returns a PropertySetCollection of groups that the dn belongs to directly or indirectly. The groups are returned in a PropertySetCollection. The memberAttribute allows the choice of the uniqemember attribute or the member attribute to be used during the lookup.
Parameters:
ctx - a valid DirContext
dn - a valid DN
attrList - a String array of attributes to be retrieved from each group
nested - Set to true to look for nested membership. Otherwise, only direct memberships are returned
memberAttribute - use "uniquemember" or "member".
Returns:
a PropertySetCollection
Throws:
UtilException

getGroupMembership

public static PropertySetCollection getGroupMembership(javax.naming.directory.DirContext ctx,
                                                       java.lang.String dn,
                                                       java.lang.String[] attrList,
                                                       boolean nested)
                                                throws UtilException
Throws:
UtilException

normalizeDN

public static java.lang.String normalizeDN(java.lang.String inDN)
Normalizes the DN.
Parameters:
inDN - the DN to be normalized
Returns:
the normalized DN

getDASUrl

public static java.lang.String getDASUrl(javax.naming.directory.DirContext ctx,
                                         java.lang.String urlTypeDN)
                                  throws UtilException
Returns a particular DAS url identified by the urlTypeDN.
Parameters:
ctx - a valid DirContext
urlTypeDN - use one of Util.DASURL_* which represents a particular URL type.
Returns:
a String representing the URL
Throws:
UtilException

getAllDASUrl

public static java.util.Hashtable getAllDASUrl(javax.naming.directory.DirContext ctx)
                                        throws UtilException
Returns a Hashtable containing all the DAS URLs. Each individual url can then be retrieved from the Hashtable using Util.DASURL_* as the key to identify the URL type.
Parameters:
ctx - a valid DirContext
Returns:
a Hashtable containing all the DAS URLs
Throws:
UtilException

printResults

public static void printResults(PropertySetCollection resultSet)
Prints the entries represented by the PropertySetCollecition in LDIF format to Standard Output
Parameters:
resultSet - A valid ProperSetCollection

getParentDN

public static java.lang.String getParentDN(java.lang.String dn)
Returns the parent DN of the given DN For example, if dn is "dc=acme,dc=com", getParentDN returns "dc=com".
Parameters:
dn - a valid DN

getRDN

public static java.lang.String getRDN(java.lang.String dn)
Returns the RDN portion of the DN.
 For example, if dn is "dc=acme,dc=com", this returns "dc=acme".
 


Parameters:
dn - a valid DN


Skip navigation links

Oracle Internet Directory API Reference
10g(10.1.4)

B15992-01


Copyright © 1999, 2006 Oracle. All Rights Reserved.