Skip Headers

Oracle Internet Directory Application Developer's Guide
Release 9.2

Part Number A96577-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

6
Java API for Oracle Internet Directory

This chapter contains reference material for the Java API for Oracle Internet Directory.

This chapter contains these sections:

Class Descriptions

This section describes classes. It contains these topics:

User Class

The user class is used to represent a particular user under a subscriber. You can create a user object using a DN, a GUID, or a simple name, along with the appropriate subscriber identification also based on a DN, a GUID, or a simple name. When a simple name is used, additional information from the Root Oracle Context and the Subscriber Oracle Context is used to identify the user. An example of a user construction follows:

User myuser = new User ( ctx,     // A valid InitialDirContext


                      Util.IDTYPE_DN,
                      "cn=user1,cn=users,o=oracle,dc=com",
                      Util.IDTYPE_DN,
                      "o=oracle,dc=com",
                      false);

myuser is defined in the previous example using its DN. The corresponding subscriber is also identified by its DN. If you have an existing subscriber object, you can also create a user object directly by using the subscriber object. For example, given a subscriber object, myOracleSubscriber, representing "o=oracle,dc=com", you can create the same user object as above by using the following:

User myuser = new User ( ctx,     // A valid InitialDirContext


                      Util.IDTYPE_DN,
                      "cn=user1,cn=users,o=oracle,dc=com",
                      myOracleSubscriber,
                      false);

Some common user object uses include setting and getting user properties, and authenticating the user. An example of authenticating a user follows:

if(myuser.authenticateUser( ctx


                         User.CREDTYPE_PASSWD,
                         "welcome" )) {
// do work here
}

In the previous example, the user is authenticated using the clear text password "welcome".

The following is an example of getting the telephone number of the user:

String[] userAttrList = {"telephonenumber"};
PropertySetCollection result = myuser.getProperties( ctx,userAttrList );
See Also:

"Java Sample Code" for more sample uses of the user class

Subscriber Class

The subscriber class is used to represent a subscriber with a valid Oracle Context. You can create a subscriber object using a DN, a GUID, or a simple name. When a simple name is used, additional information from the Root Oracle Context is used to identify the user. A default subscriber object creation is also supported. The information regarding the default subscriber is stored in the Root Oracle Context. An example of a subscriber construction follows:

Subscriber mysub =  new Subscriber( ctx, //a valid InitialDirContext
                                    Util.IDTYPE_DN,
                                    "o=oracle,dc=com",
                                    false );

mysub is defined in the previous example by its DN, "o=oracle,dc=com".

A common subscriber object use is getting subscriber properties is. For example:

String[] attrList = { "cn", "orclguid" };
PropertySetCollection result= mysub.getProperties(ctx,attrList);
// do work with result

A subscriber object can also be used during a user object construction to identify the subscriber. An example to create a user object with simple name "user1" under the subscriber created above follows:

myuser1 = new User ( ctx,  //a valid InitialDirContext
                     Util.IDTYPE_SIMPLE,
                     "user1",
                     mysub,
                     false );
See Also:

"Java Sample Code" for more sample uses of the subscriber class

Group Class

The group is used to represent a valid group entry. You can create a group object using its DN or GUID. An example of a group construction follows:

Group mygroup = new Group ( Util.IDTYPE_DN,
                            "cn=group1,cn=Groups,o=oracle,dc=com" );

mygroup is defined in the previous example by its DN.

A sample usage of the group object is getting group properties. For example:

PropertySetCollection result = mygroup.getProperties( ctx, null );

The group class also supports membership related functionality. Given a user object, you can find out if it is a direct or a nested member of a group by using the ismember() method. For example:

if (mygroup.isMember( ctx,  // a valid InitialDirContext


                   myuser,
                   true ) ) {  // set to true for nested member
// do work
}

myuser is a user object. The third argument is set to true to indicate that nested membership is being considered. If set to false, then only direct membership is considered.

You can also obtain a list of groups that a particular user belongs to using Util.getGroupMembership(). For example:

PropertySetCollection result = Util.getGroupMembership( ctx,   
                                                        myuser, 
                                                        new String[0], 
                                                        true );
See Also:

"Java Sample Code" for more sample uses of the group class

PropertySetCollection, PropertySet, and Property Classes

Many of the methods in the user, subscriber, and group classes return a PropertySetCollection object. The object represents a collection of results. It is a collection of one or more LDAP entries. Each of these entries is represented by a PropertySet, identified by a DN. A PropertySet can contain attribute(s), each represented as a Property. A Property is a collection of one or more values for the particular attribute it represents. An example of the use of these classes follows:

PropertySetCollection psc = Util.getGroupMembership( ctx,
                                                     myuser,
                                                     null,
                                                     true );
    // for loop to go through each PropertySet
    for (int i = 0; i < psc.size(); i++ ) {

    PropertySet ps = psc.getPropertySet(i);

    // Print the DN of each PropertySet
    System.out.println("dn:  " + ps .getDN());

    // Get the values for the "objectclass" Property
    Property objectclass = ps.getProperty( "objectclass" );

    // for loop to go through each value of Property "objectclass"
    for (int j = 0; j< objectclass.size(); j++) {
       
        // Print each "objectclass" value
        System.out.println("objectclass:  " + objectclass.getValue(j));
    }
}

myuser is a user object. psc contains all the nested groups that myuser belongs to. The code loops through the resulting entries and prints out all the "objectclass" values of each entry.

See Also:

"Java Sample Code" for more sample uses of the PropertySetCollection, PropertySet, and Property classes

Classes

This section explains classes.

This section contains these topics:

oracle.ldap.util.Base64

Syntax:

public class oracle.ldap.util.Base64
Description:

Provides encoding of raw bytes to base64-encoded bytes and decoding of base64-encoded bytes to raw bytes.

Constructors

Base64()

Syntax:

public Base64()

Methods

encode(String inStr)

Syntax:

public static java.lang.String encode(String inStr)
 

Description:

Use this method to convert a string to base64-encoded string.

Parameters:

inStr - String to be base64 encoded.

Returns:

outStr Base64 encoded string.

decode(String inStr)

Syntax:

public static java.lang.String encode(String inStr)
 

Description:

Use this method to convert a string to base64-encoded string.

Parameters:

inStr - String to be base64 encoded.

Returns:

outStr Base64 encoded string.

decode(String inStr)

Syntax:

public static java.lang.String decode(String inStr)
 

Description:

Use this method to decode a base64-encoded string to the orginal string.

Parameters:

inStr - Base64 encoded string

Returns:

outStr - The orginal string.

encode(byte[] inBytes)

Syntax:

public static byte[] encode(byte[] inBytes) 

Description:

Returns an array of base64-encoded characters to represent the passed data array.

Parameters:

data - the array of bytes to encode

Returns:

Base64-coded byte array.

decode(byte[] inBytes)

Syntax:

public static byte[] decode(byte[] inBytes)
 

Description:

Decode a base64-encoded sequence bytes. All illegal symbols in the input are ignored (CRLF, Space).

Parameters:

inpBytes - A sequence of base64-encoded bytes

Returns:

The original data from the base64 input.

oracle.ldap.util.Group

Syntax:

public class oracle.ldap.util.Group

Constructors

Group(int inGroupIdType, String inGroupIdName)

Syntax:

public Group(int inGroupIdType, String inGroupIdName) 

Description:

Constructs a group using a group ID along with its type.

Parameters:

inGroupIdType - The type of group ID being used - either Util.IDTYPE_DN or Util.IDTYPE_GUID

inGroupIdName - the group ID

Methods

oracle.ldap.util.PropertySetCollection getProperties(DirContext ctx, String[] attrList)

Syntax:

public oracle.ldap.util.PropertySetCollection getProperties(DirContext ctx, 
String[] attrList)
 

Description:

Retrieves selected attributes associated with this group.

Parameters:

ctx - A valid DirContext

attrList - An array of attributes to be retrieved. Null indicates that all attributes should be retrieved. An empty array indicates that none should be retrieved.

Returns:

A PropertySetCollection of the results.

resolve(DirContext ctx)

Syntax:

public void resolve(DirContext ctx) 

Description:

Validates the group by identifying its DN.

Parameters:

ctx - A valid DirContext

getDn(DirContext ctx)

Syntax:

public java.lang.String getDn(DirContext ctx) 

Description:

Returns the DN of this group.

Returns:

The DN of this group.

boolean isMember(DirContext ctx, User user, boolean nested)

Syntax:

public boolean isMember(DirContext ctx, User user, boolean nested) 

Description:

Checks if a particular user is a member of this group.

Parameters:

ctx - A valid DirContext

group - A valid User object

nested - Set to true if nested memberships are allowed. Otherwise, only direct memberships are considered.

Returns:

True if the given user is a member of this group, false otherwise.

oracle.ldap.util.Guid

Syntax:

public final class oracle.ldap.util.Guid implements java.lang.Cloneable

Description:

This class represents GUIDs (Globally Unique Identifiers), or object IDs. This is an immutable class.

Constructors

Guid()

Syntax:

public Guid()

Description:

Default constructor.

Guid(String guid)

Syntax:

Guid(String guid)

Description:

Constructs a GUID from a string.

Parameters:

guid - a string representation of a Globally Unique Identifier

Guid(byte[] byte_array)

Syntax:

public Guid(byte[] byte_array)

Description:

Constructs a GUID from a btye array.

Parameters:

byte_array - an array of bytes representing a GUID. This constructor will validate the length of the byte array before proceeding.

Methods

newInstance()

Syntax:

public static oracle.ldap.util.Guid newInstance() 

Description:

generates a new GUID.

Returns:

A new instance of the GUID class.

getBytes()

Syntax:

public byte[] getBytes() 

Description:

Return the 'byte' form of the GUID.

Returns:

Return the 'byte' form of the GUID.

toString()

Syntax:

public final java.lang.String toString()

Description:

Retrieves the GUID in a string format.

Returns:

The GUID in a string format.

equals (Object o)

Syntax:

public boolean equals(Object o) 

Description:

Compares the GUID in a string format.

Returns:

True if they are equal, false otherwise.

hashCode()

Syntax:

public int hashCode()

Description:

Returns the hashcode of this object for hashing purposes.

Returns:

The integer hashcode of the GUID.

Object clone()

Syntax:

public java.lang.Object clone()

Description:

Clones a GUID object.

Returns:

A clone of an existing GUID object.

Fields

GUID_BYTE_SIZE

Syntax:

public static final GUID_BYTE_SIZE 

Description:

Number of bytes required for GUID.

GUID_STRING_SIZE

Syntax:

public static final GUID_STRING_SIZE 

Description:

The number of bytes required for the string representation of GUID.

oracle.ldap.util.LDIF

Syntax:

public class oracle.ldap.util.LDIF

Description:

A class that defines most common thing that pertains to LDAP data interchange format.

Fields

RECORD_CHANGE_TYPE_ADD

Syntax:

static final RECORD_CHANGE_TYPE_ADD

Description:

Record change type - Add

RECORD_CHANGE_TYPE_DELETE

Syntax:

static final RECORD_CHANGE_TYPE_DELETE

Description:

Record change type - Delete

RECORD_CHANGE_TYPE_MODIFY

Syntax:

static final RECORD_CHANGE_TYPE_MODIFY

Description:

Record change type - Modify

RECORD_CHANGE_TYPE_MODDN

Syntax:

static final RECORD_CHANGE_TYPE_MODDN

Description:

Record change type - MODDN

ATTRIBUTE_CHANGE_TYPE_ADD

Syntax:

static final ATTRIBUTE_CHANGE_TYPE_ADD

Description:

Attribute change type - Add

ATTRIBUTE_CHANGE_TYPE_DELETE

Syntax:

static final ATTRIBUTE_CHANGE_TYPE_DELETE

Description:

Attribute change type - Delete

ATTRIBUTE_CHANGE_TYPE_REPLACE

Syntax:

static final ATTRIBUTE_CHANGE_TYPE_REPLACE

Description:

Attribute change type - Replace

oracle.ldap.util.LDIFAttribute

Syntax:

public class oracle.ldap.util.LDIFAttribute
Description:

The LDIFAttribute class represents the name and values of an attribute. It is used to specify an attribute to be added to, deleted from, or modified in a directory entry. It is also returned on a search of a directory.

Constructors

LDIFAttribute(String attrName)

Syntax:

public LDIFAttribute(String attrName)

Description:

Constructs an attribute with no values.

Parameters:

attrName - Name of the attribute

LDIFAttribute(LDIFAttribute ldapAttribute)

Syntax:

public LDIFAttribute(LDIFAttribute ldapAttribute) 

Description:

Constructs an attribute with copies of all values of the input LDIFAttribute.

Parameters:

ldapAttribute - An attribute to use as template.

LDIFAttribute(String attrName, byte[] attrBytes)

Syntax:

public LDIFAttribute(String attrName, byte[] attrBytes)
 

Description:

Constructs an attribute with a byte-formatted value.

Parameters:

attrName - Name of the attribute

attrBytes - Value of the attribute as raw bytes

LDIFAttribute(String attrName, String attrString)

Syntax:

public LDIFAttribute(String attrName, String attrString) 

Description:

Constructs an attribute that has a single string value.

Parameters:

attrName - name of the attribute

attrString - value of the attribute in String format

LDIFAttribute(String attrName, String[] attrStrings)

Syntax:

public LDIFAttribute(String attrName, String[] attrStrings)

Description:

Constructs an attribute that has an array of string values.

Parameters:

attrName - name of the attribute

attrStrings - the list of string values for this attribute

Methods

addValue(String attrString)

Syntax:

public void addValue(String attrString) 

Description:

Adds a string value to the attribute.

Parameters:

attrString - Value of the attribute as a string

addValue(byte[] attrBytes)

Syntax:

public synchronized void addValue(byte[] attrBytes) 

Description:

Adds a byte-formatted value to the attribute.

Parameters:

attrBytes - the value of attribute as raw bytes is added to the attribute

addValue(String[] attrValues)

Syntax:

public synchronized void addValue(String[] attrValues)
 

Description:

Adds an array of string values to the attribute.

Parameters:

values - array of string values, add to the attribute

getByteValues()

Syntax:

public java.util.Enumeration getByteValues()
 

Description:

Returns an enumerator for the values of the attribute in byte[] format.

Parameters:

A set of attribute values. Each element in the enumeration is of type byte.

getStringValues()

Syntax:

public java.util.Enumeration getStringValues() 

Description:

Returns an enumerator for the string values of an attribute.

Returns:

An enumerator for the string values.

getByteValueArray()

Syntax:

public byte[][] getByteValueArray()

Description:

Returns the values of the attribute as an array of byte[].

Returns:

Array of attribute values in byte format.

getStringValueArray()

Syntax:

public java.lang.String[] getStringValueArray() 

Description:

Returns the values of the attribute as an array of strings.

Returns:

Array of attribute values as string object.

setValues(String[] attrValues)

Syntax:

public void setValues(String[] attrValues)
 

Description:

Sets the string values as the attribute's values.

Parameters:

attrValues - An array of string values which represent the attribute values.

getLangSubtype()

Syntax:

public java.lang.String getLangSubtype() 

Description:

Returns the language subtype if any. For example, if the attribute name is cn;lang-fr;phonetic, this method returns the string lang-fr.

Returns:

The language subtype, or null (if the name has no language subtype).

getBaseName(String attrName)

Syntax:

public static java.lang.String getBaseName(String attrName) 

Description:

Returns the base name. For example, if the attribute name is cn;lang-fr;phonetic, then this method returns cn.

Parameters:

attrName - Name of the attribute to extract the base name from.

Returns:

Base name (for example, the attribute name without subtypes).

getBaseName()

Syntax:

public java.lang.String getBaseName() 

Description:

Returns the base name of this object. For example, if the attribute name is cn;lang-fr;phonetic, then this method returns cn.

Returns:

Base name (for example, the attribute name without subtypes).

getName()

Syntax:

public java.lang.String getName() 

Parameters:

Returns the name of the attribute.

Returns:

Attribute name.

getSubtypes(String attrName)

Syntax:

public static java.lang.String[] getSubtypes(String attrName)

Description:

Extracts the subtypes from the specified attribute name. For example, if the attribute name is cn;lang-fr;phonetic, then this method returns an array containing lang-fr and phonetic.

Parameters:

attrName - Name of the attribute to extract the subtypes from.

Returns:

Array of subtypes, or null (if no subtypes).

getSubtypes()

Syntax:

public java.lang.String[] getSubtypes() 

Description:

Extracts the subtypes from the attribute name of this object. For example, if the attribute name is cn;lang-fr;phonetic, then this method returns an array containing lang-ja and phonetic.

Returns:

Array of subtypes, or null (if no subtypes).

hasSubtype(String subtype)

Syntax:

public boolean hasSubtype(String subtype)

Description:

Reports whether the attribute name contains the specified subtype. For example, if you check for the subtype lang-fr and the attribute name is cn;lang-fr, then this method returns true.

Parameters:

subtype - The single subtype to check for

Returns:

True if the attribute name contains the specified subtype.

hasSubtypes(String[] subtypes)

Syntax:

public boolean hasSubtypes(String[] subtypes) 

Description:

Reports if the attribute name contains all specified subtypes. For example, if you check for the subtypes lang-fr and phonetic and if the attribute name is cn;lang-fr;phonetic, then this method returns true. If the attribute name is cn;phonetic or cn;lang-fr, then this method returns false.

Parameters:

subtypes - An array of subtypes to check for

Returns:

True if the attribute name contains all subtypes.

removeValue(String attrString)

Syntax:

public synchronized void removeValue(String attrString)

Description:

Removes a string value from the attribute.

Parameters:

attrString - The string value to remove

removeValue(byte[] attrBytes)

Syntax:

public void removeValue(byte[] attrBytes)
 

Description:

Removes a byte-formatted value from the attribute.

Parameters:

attrBytes - A byte formatted value to remove

size()

Syntax:

public int size()

Description:

Returns the number of values of the attribute.

Returns:

Number of values for this attribute.

getChangeType()

Syntax:

public int getChangeType()

Description:

Return this the change type associated with this attribute (if any).

Returns:

A Change Type constant defined in the LDIF class.

setChangeType(int changeType)

Syntax:

public void setChangeType(int changeType)
 

Description:

Sets the change type for this attribute.

Parameters:

changeType - Change type constant defined in the LDIF class.

getValue()

Syntax:

public java.lang.String getValue()

Description:

Returns the value of a single value attribute. In case of a multivalued attribute the first value is returned. If the attribute does not contain any value then null is returned.

Returns:

An attribute value or null if the attribute has no value.

contains(String attrString)

Syntax:

public boolean contains(String attrString)

Description:

Reports whether this object contains the specified attribute value.

Parameters:

attrString - The value as string object that needs to be checked for

Returns:

True if the attribute contains the specified value, else false.

contains(byte[] attrBytes)

Syntax:

public boolean contains(byte[] attrBytes) 

Description:

Reports whether this object contains the specified attribute value.

Parameters:

attrValue - The value as byte-formatted representation that needs to be checked for

Returns:

True if the attribute contains the specified value, else false.

toString()

Syntax:

public java.lang.String toString()
 

Description:

Retrieves the string representation of an attribute in an LDAP entry. For example: LDIFAttribute type='cn', values='Barbara Jensen,Babs Jensen'

Returns:

String representation of the attribute.

equals(Object ldifAttr)

Syntax:

public boolean equals(Object ldifAttr) 

oracle.ldap.util.LDIFMigration

Syntax:

public class oracle.ldap.util.LDIFMigration
Description:

This class provides methods to migrate the user information present in the component specific repositories to OID. The input to this migration process is an intermediate LDIF file which contains the substitution variables that needs to be replaced. The output of this process is an LDIF file which could be used to upload the data using any one of the existing tools.

Constructors

LDIFMigration(String inputFile, Vector subsVect, String outFile)

Syntax:

public LDIFMigration(String inputFile, Vector subsVect, String outFile) 

Description:

This method constructs an object to read the LDIF file, does the substitution, and writes the LDIF entries to a file.

Parameters:

inputFile - Name of the input file

subsVect - The vector containing the substitution variables and the values alternatively

outFile - Name of the output file

Throws:

MigrationException - A migration error could occur due to an I/O error or invalid input parameters. The error code and the the error message of this exception object describes the contexts.

LDIFMigration(File inpF, Vector subsVect, File outF)

Syntax:

public LDIFMigration(File inpF, Vector subsVect, File outF) 

Description:

This method constructs an object to read the LDIF entry from the specified file object, does the substitution, and writes the LDIF entries to the specified file object.

Parameters:

inpF - The input file object

subsVect - The vector containing the substitution variables and the values alternatively

outF - The output file object

Throws:

MigrationException - A migration error could occur due to an I/O error or invalid input parameters. The error code and the the error message of this exception object describes the contexts.

LDIFMigration(InputStream inpS, Vector subsVect, OutputStream outS)

Syntax:

public LDIFMigration(InputStream inpS, Vector subsVect, OutputStream outS) 

Description:

This method constructs an object to read the LDIF entries from the specified input stream, does the substitution, and writes the LDIF entries to the specified output stream.

Parameters:

inpS - The input stream from which provides the LDIF entries

subsVect - The vector containing the substitution variables and the values alternatively

outS - The output stream to which the LDIF entries are written

Throws:

MigrationException - A migration error could occur due to an I/O error or invalid input parameters. The error code and the the error message of this exception object describes the contexts.

Methods

setDirContext(DirContext dirCtx)

Syntax:

public void setDirContext(DirContext dirCtx) 

Description:

Sets the Directory Context.

Parameters:

dirCtx - The directory context object from which the directory attributes are queried to automatically find out the substitution variables.

setUserDN(String dn)

Syntax:

public void setUserDN(String dn) 

Description:

Sets current user dn.

Parameters:

dn - The dn of the user binding

int migrate()

Syntax:

public int migrate()
 

Description:

Call this method to read the intermediate LDIF file, do the substitution, and write a new LDIF output file.

Returns:

int number of entries successfully written

Throws:

MigrationException - If an error occurs while reading from or writing to an LDIF file

int migrate(Subscriber subscriber)

Syntax:

public int migrate(Subscriber subscriber) 

Description:

Call this method to read the intermediate LDIF file, do the substitution, and write a new LDIF output file. The sustitution variables will be automatically figured out by connecting to the directory server. Following is the list of substitution variables which will be determined from a given LDAP host. s_SubscriberDN, s_UserContainerDN, s_GroupContainerDN, s_SubscriberOracleContextDN, s_RootOracleContextDN

Parameters:

subscriber - The subscriber for which the substitution variables needs to be figured out

Returns:

int number of entries successfully written.

Throws:

MigrationException - If an error occurs while reading from or writing to an LDIF file or a NamingException occurs while performing a directory operation.

cleanup()

Syntax:

public void cleanup()
 

Description:

Closes the LDIF reader and writer streams.

Throws:

MigrationException - if an I/O error occurs while closing the reader or writer streams.

oracle.ldap.util.LDIFReader

Syntax:

public class oracle.ldap.util.LDIFReader
Description:

LDAP Data Interchange Format (LDIF) is a file format used to represent the Directory entries. The data from the directory can be exported in this format and could be imported into another directory server. LDIF Data can describe a set of changes that needs to be applied to data in a directory. This format is described in the Internet draft, The LDAP Data Interchange Format (LDIF) - RFC-2849.

This class provides a set of methods to read and manipulate an LDIF file.

Constructors

LDIFReader()

Syntax:

public LDIFReader() 

Description:

Default Constructor, reads the data from standard input. The input data is required to be present in UTF8 format.

Throws:

IOException - If an I/O error occurs

LDIFReader(String file)

Syntax:

public LDIFReader(String file) 

Description:

Constructs an input stream reader to read the LDIF data from the file specified.

Parameters:

file - The name of the LDIF file

Throws:

IOException - If an I/O error occurs

LDIFReader(File fileObj)

Syntax:

public LDIFReader(File fileObj) 

Description:

Constructs an input stream reader to read the LDIF data from the file object specified.

Parameters:

fileObj - The file object of the LDIF file

Throws:

IOException - If an I/O error occurs

LDIFReader(InputStream ds)

Syntax:

public LDIFReader(InputStream ds)
 

Description:

Constructs an input stream reader to read the LDIF data from the specified input stream.

Parameters:

dst - The input stream providing the LDIF data

Throws:

IOException - If an I/O error occurs

Methods

nextEntry()

Syntax:

public java.util.Vector nextEntry() 

Description:

Returns the next entry in the LDIF file. Using this method you can iterate through all the entries in the LDIF file.

Returns:

The next entry as a vector object containing the attributes as name:value pairs, for example, each element in the vector will look like name:value. A null is returned if there are no more entries.

Throws:

IOException - If an I/O error occurs

nextRecord()

Syntax:

public synchronized oracle.ldap.util.LDIFRecord nextRecord() 

Description:

Returns the next record in the LDIF file. Using this method you can iterate through all the entries in the LDIF file.

Returns:

The next entry as a LDIFRecord object. A null is returned if there are no more entries.

Throws:

IOException - If an I/O error occurs

close()

Syntax:

public void close() 

Description:

Closes the stream.

Throws:

IOException - If an error occurs

oracle.ldap.util.LDIFRecord

Syntax:

public class oracle.ldap.util.LDIFRecord implements java.lang.Cloneable
Description:

LDIFRecord represents a single entry in an LDIF file, consisting of a distinguished name (DN) and zero or more attributes.

Parameters:

dn - The distinguished name of the new entry

Constructors

LDIFRecord()

Syntax:

public LDIFRecord()
 

Description:

Constructs an LDIFRecord object without dn and attribute values set.

LDIFRecord(String dn)

Syntax:

public LDIFRecord(String dn)
 

Description:

Constructs a record with the specified dn.

Parameters:

dn - The distinguished name of the new entry

addAttribute(LDIFAttribute atr)

Syntax:

public void addAttribute(LDIFAttribute atr) 

Description:

Adds an attribute to this record.

Parameters:

atr - The LDIFAttribute object which is to be added

getDN()

Syntax:

public java.lang.String getDN()
 

Description:

Returns the distinguished name of the current record.

Returns:

The distinguished name of the current record.

setDN(String dn)

Syntax:

public void setDN(String dn)
 

Description:

Sets the dn of this record.

Parameters:

dn - The distinguished name that will be set in the current record

synchronized oracle.ldap.util.LDIFAttribute getAttribute(String attrName)

Syntax:

public synchronized oracle.ldap.util.LDIFAttribute getAttribute(String attrName) 

Description:

Returns the LDIFAttribute object of the specified attribute name.

Parameters:

attrName - Name of the attribute

java.util.Enumeration getAll()

Syntax:

public java.util.Enumeration getAll()
 

Description:

Returns an enumeration of the attributes in this record.

Returns:

An enumeration containing all the LDIFAttribute objects.

synchronized java.util.Enumeration getIDs()

Syntax:

public synchronized java.util.Enumeration getIDs()
 

Description:

Retrieves an enumeration of the IDs of the attributes in this record as string objects.

Returns:

A non-null enumeration of the attributes' IDs in this record set. If attribute set has zero attributes, then an empty enumeration is returned.

int getChangeType()

Syntax:

public int getChangeType()
 

Description:

Retrieves the change type of this record. Change type constants are defined in the LDIF class.

int size()

Syntax:

public int size()

Description:

Returns the number of attributes in this record. The count does not include the dn.

Returns:

The number of attributes in this record.

Object clone()

Syntax:

public java.lang.Object clone() 

Description:

Creates a replica of this object.

Returns:

A replica of this object.

toString()

Syntax:

public java.lang.String toString() 

Description:

A string representation of this object.

oracle.ldap.util.LDIFSubstitute

Syntax:
public class oracle.ldap.util.LDIFSubstitute
Description:

This class provides some general methods to do the substitution in an LDIF entry. The LDIF entry is represented in a vector object. The substitution variables (Name,Value) pairs can be provided as a vector.

Constructors

LDIFSubstitute()

Syntax:

public LDIFSubstitute()

Methods

Vector substitute

Syntax:

public static java.util.Vector substitute(Vector ldifEntry, String srchStr, 
String repStr)

Description:

Search and replace the substitution variables in an LDIF entry contained in a vector.

Parameters:

ldifEntry - the LDIF entry with elements as the attributes

srchStr - The substitution variable name

repStr - The substitution variable value

Returns:

Vector LDIF Entry after applying the substitution.

Vector substitute

Syntax:

public static java.util.Vector substitute(Vector ldifEntry, Vector sAndRep)

Description:

Search and replace the substitution variables in an LDIF entry contained in a vector.

Parameters:

ldifEntry - the LDIF entry with elements as the attributes

sAndRep - the vector containing substitution variables name-value pairs

Returns:

Vector LDIF Entry after applying the substitution.

oracle.ldap.util.LDIFWriter

Syntax:

public class oracle.ldap.util.LDIFWriter
Description:

LDAP Data Interchange Format (LDIF) is a file format used to represent the directory entries. The data from the directory can be exported in this format and can be imported into another directory server. The import and export of the directory data from an LDAP server can describe a set of changes that can be applied to data in a directory. This format is described in the Internet draft, The LDAP Data Interchange Format (LDIF) - RFC-2849.

This class provides a set of methods to write an LDIF entry to the file.

Constructors

LDIFWriter()

Syntax:

public LDIFWriter() 

Description:

Default Constructor. Creates a writer stream to the standard output. Since the file name is not specified, the LDIF data is redirected to the standard output. The output data is written in UTF8 format. If the attribute value contains more characters than max line len, then it will not be wrapped.

Throws:

IOException - An I/O error has occurred

LDIFWriter(String file)

Syntax:

public LDIFWriter(String file) 

Description:

Creates a writer stream to the specified file for writing the LDIF data. If the attribute value contains more characters than max line length, then it will not be wrapped.

Parameters:

file - The name of the LDIF file

Throws:

IOException - An I/O error has occurred

LDIFWriter(File fileObj)

Syntax:

public LDIFWriter(File fileObj) 

Description:

Creates a writer stream to the specified file for writing the LDIF data. If the attribute value contains more characters than max line length, then it will not be wrapped.

Parameters:

fileObj - The file oject of the LDIF file

Throws:

IOException - An I/O error has occurred

LDIFWriter(OutputStream out)

Syntax:

public LDIFWriter(OutputStream out)
 

Description:

Creates a writer stream using the specified output stream object for writing the LDIF data. If the attribute value contains more characters than max line length, then it will not be wrapped.

Parameters:

out - Stream onto which the LDIF data needs to be written

Throws:

IOException - An I/O error has occurred

LDIFWriter(String file, boolean wrap)

Syntax:

public LDIFWriter(String file, boolean wrap)
 

Description:

Creates a writer stream to the specified file for writing the LDIF data. If the attribute value contains more characters than max line length, then it will be wrapped to next line with a space as the first character.

Parameters:

file - The name of the LDIF file

wrap - If true and the attribute value has more characters than max line length, then the line will be wrapped

Throws:

IOException - An I/O error has occurred

LDIFWriter(File fileObj, boolean wrap)

Syntax:

public LDIFWriter(File fileObj, boolean wrap)
 

Description:

Creates a writer stream to the specified file for writing the LDIF data. If the attribute value contains more characters than max line length, then it will be wrapped to next line with a space as the first character.

Parameters:

fileObj - The file oject of the LDIF file

wrap - If true and the attribute value has more characters than max line length, then the line will be wrapped

Throws:

IOException - An I/O error has occurred

LDIFWriter(OutputStream out, boolean wrap)

Syntax:

public LDIFWriter(OutputStream out, boolean wrap) 

Description:

Creates a writer stream using the specified output stream object for writing the LDIF data. If the attribute value contains more characters than max line length, then it will be wrapped to next line with a space as the first character.

Parameters:

out - stream on to which the LDIF data needs to be written

wrap - if true and the attribute value has more characters than max line length, then the line will be wrapped

Throws:

IOException - An I/O error has occurred

Methods

setMaxLineLen(int maxLineLen)

Syntax:

public void setMaxLineLen(int maxLineLen)
 

Description:

Use this method to set the maximum number of characters that can be written in a line.

Parameters:

maxLineLen - The maximum number of characters in a line

setWrap(boolean wrap)

Syntax:

public void setWrap(boolean wrap) 

Description:

Use this method to specify if the wrapping of the attribute value should be done or not.

Parameters:

wrap - if true and the attribute value has more characters than max line length, then the line will be wrapped

writeEntry(Vector vEntry)

Syntax:

public void writeEntry(Vector vEntry)
 

Description:

Use this method to write an LDIF entry to the file.

Parameters:

vEntry - A vector containing the Attribute Names:Values as elements

Throws:

IOException - If an I/O error occurs

writeComment(String comment)

Syntax:

public void writeComment(String comment) 

Description:

Use this method to add a comment line to the LDIF file.

Parameters:

comment - The comment string which is to be added to the LDIF file

Throws:

IOException - If an I/O error occurs

synchronized void close()

Syntax:

public synchronized void close() 

Description:

Closes the stream.

Throws:

IOException - If an error occurs

oracle.ldap.util.Property

Syntax:
public class oracle.ldap.util.Property
Description:

This class represents a particular property in a PropertySet. In other words, it represents a particular attribute of an entry's attribute set.

Methods

int size()

Syntax:

public final int size()

Description:

Returns the size of this property, the number of values of the returned attribute.

Returns:

An int indicating the number of values belonging to this property. It can return 0.

getName()

Syntax:

public final java.lang.String getName()
 

Description:

Returns the name of this property, the name of the attribute this property represents.

Returns:

A string representing the name of this property.

Object getValue(int i)

Syntax:

public final java.lang.Object getValue(int i)

Description:

Returns the i-th value of this property - the i-th attribute value. An object is returned. The user must type-cast this appropriately.

Parameters:

int - The index of the value to be retrieved.

Returns:

The i-th value of this property.

oracle.ldap.util.PropertySet

Syntax:

public class oracle.ldap.util.PropertySet
Description:

This class represents a particular PropertySet in a PropertySetCollection. In other words, it represents a particular search result entry from a collection of search results.

Methods

isEmpty()

Syntax:

public final boolean isEmpty()
 

Description:

Returns true if the property set does not contain any properties, false otherwise.

Returns:

Boolean indicating whether the property set is empty or not.

size()

Syntax:

public final int size()

Description:

Returns the size of this property set, the number of returned attributes for this particular search result entry.

Returns:

An int indicating the number of properties belonging to this property set. It can return 0.

getAttributeNames()

Syntax:

public final java.lang.String[] getAttributeNames()

Description:

Returns an array of the string containing the name of all the properties. All the attribute names are returned with this particular search entry.

Returns:

A string array containing all the property names.

getProperty(int i)

Syntax:

public final oracle.ldap.util.Property getProperty(int i)

Description:

Returns the i-th property of this property set, the i-th attribute of this search entry.

Parameters:

i - the index of the property to be retrieved.

Returns:

A property representing the i-th property.

getProperty(String attrID)

Syntax:

public final oracle.ldap.util.Property getProperty(String attrID)
 

Description:

Returns the property identified by the attrID. The attrID is the attribute name.

Parameters:

attrID - The attribute name to be retrieved.

Returns:

A property with attribute name attrID.

getDN()

Syntax:

public final java.lang.String getDN()

Description:

Returns the name of this property set, the DN of the search entry represented by this property set.

Returns:

A string representing the DN of the property set.

oracle.ldap.util.PropertySetCollection

Syntax:

public class oracle.ldap.util.PropertySetCollection
Description:

This class represents a collection of PropertySets. In other words, it represents a set of search result entries from a given search.

Methods

isEmpty()

Syntax:

public final boolean isEmpty()
 

Description:

Returns true if the property set collection does not contain any property set, false otherwise.

Returns:

Boolean indicating whether the property set is empty or not.

size()

Syntax:

public final int size()

Description:

Returns the size of the property set collection, that is, the number of search entries in the search result.

Returns:

An int indicating the number of property sets in the collection.

getDns()

Syntax:

public final java.lang.String[] getDns()
 

Description:

Returns a string array containing the name of all the property sets, that is, the DNs of all the search entries in this search result.

Returns:

A string array containing all the property set names.

getPropertySet(int i)

Syntax:

public final oracle.ldap.util.PropertySet getPropertySet(int i)

Description:

Returns the i-th property set of this property set collection, that is, the i-th search entry of this search result.

Parameters:

int - i - The index of the property set to be retrieved.

Returns:

A PropertySet representing the i-th property set.

getPropertySet(String dn)

Syntax:

public final oracle.ldap.util.PropertySet getPropertySet(String dn)

Description:

Returns the property set identified by dn, that is, the search entry with the given DN.

Parameters:

String - dn - The dn of the property set to be retrieved.

Returns:

A PropertySet with the given dn.

oracle.ldap.util.Subscriber

Syntax:

public class oracle.ldap.util.Subscriber

Constructors

Subscriber(DirContext ctx, int inSubIdType, String inSubIdName, boolean validate)

Syntax:

Subscriber(DirContext ctx, int inSubIdType, String inSubIdName, boolean 
validate)

Description:

Constructs a subscriber.

Parameters:

ctx - a valid DirContext

inSubIdType - The type of subscriber ID being used. Use one of Util.IDTYPE_DN, Util.IDTYPE_SIMPLE, or Util.IDTYPE_GUID.

inSubIdName - Subscriber ID. If this value is null and inSubIdType is Util.IDTYPE_DN, then default subscriber will be used. Otherwise, a null will cause an exception.

validate - Set to true to validate the user by the constructor.

Methods

getProperties(DirContext ctx, String[] attrList

Syntax:

public oracle.ldap.util.PropertySetCollection getProperties(DirContext ctx, 
String[] attrList)
 

Description:

Retrieves selected attributes associated with this subscriber.

Parameters:

ctx - A valid DirContext

attrList - An array of attributes to be retrieved

getExtendedProperties

Syntax:

public oracle.ldap.util.PropertySetCollection getExtendedProperties(DirContext 
ctx, int propType, String[] attrList, String filter) 

Description:

Retrieves extended properties under the oracle context of this subscriber. Currently, only "Common" properties and properties are supported.

Parameters:

ctx - A valid DirContext

propType - Use one of EXTPROPTYPE_COMMON, EXTPROPTYPE_RESOURCE_ACCESS_TYPE, or EXTPROPTYPE_DEFAULT_RAD.

attrList - An array of attributes to be retrieved.

filter - A search filter to narrow search criteria. For example, use (orclResourceTypeName=OracleDB) with EXTPROPTYPE_RESOURCE_ACCESS_TYPE to get only those properties of OracleDB.

resolve(DirContext ctx)

Syntax:

public void resolve(DirContext ctx)

Description:

Validates the subscriber by identifying its DN.

Parameters:

ctx - A valid DirContext

getDN(DirContext ctx)

Syntax:

public java.lang.String getDN(DirContext ctx)

Description:

Returns the DN of the subscriber (resolves the name if necessary).

Parameters:

ctx - A valid DirContext

getDn(DirContext ctx)

Syntax:

public java.lang.String getDn(DirContext ctx)

Description:

Returns the DN of this subscriber.

Fields

EXTPROPTYPE_COMMON

Syntax:

public static EXTPROPTYPE_COMMON 

Description:

Extended Preference Type to be used with getExtendedProperties() - Common Subscriber properties.

EXTPROPTYPE_RESOURCE_ACCESS_TYPE

Syntax:

public static EXTPROPTYPE_RESOURCE_ACCESS_TYPE

Description:

Extended Preference Type to be used with getExtendedProperties() - Resource Access Type.

EXTPROPTYPE_DEFAULT_RAD

Syntax:

public static EXTPROPTYPE_DEFAULT_RAD

Description:

Extended Preference Type to be used with getExtendedProperties() - Default User Extended Properties.

oracle.ldap.util.User

Syntax:
public class oracle.ldap.util.User

Constructors

User(DirContext ctx, int inUserIdType, String inUserIdName, subscriber inSubscriber, boolean validate)

Syntax:

public User(DirContext ctx, int inUserIdType, String inUserIdName, int 
inSubIdType, String inSubIdName, boolean validate)

Description:

Constructs a user.

Parameters:

ctx - A valid DirContext

inUserIdType - The type of user ID being used. Use one of Util.IDTYPE_DN, Util.IDTYPE_SIMPLE, or Util.IDTYPE_GUID.

inUserIdName - User ID

inSubscriber - A valid subscriber object

validate - Set to true to validate the user by the constructor

User(DirContext ctx, int inUserIdType, String inUserIdName, int inSubIdType, String inSubIdName, boolean validate)

Syntax:

public User(DirContext ctx, int inUserIdType, String inUserIdName, int 
inSubIdType, String inSubIdName, boolean validate)

Description:

Constructs a user.

Parameters:

ctx - A valid DirContext

inUserIdType - The type of user ID being used. Use one of Util.IDTYPE_DN, Util.IDTYPE_SIMPLE, or UtilIDTYPE_GUID.

inUserIdName - User ID

inSubIdType - The type of subscriber ID being used. Use one of Util.IDTYPE_DN, Util.IDTYPE_SIMPLE, or Util.IDTYPE_GUID.

inSubIdName - Subscriber ID

validate - Set to true to validate the user by the constructor

Methods

getExtendedProperties

Syntax:

public oracle.ldap.util.PropertySetCollection getExtendedProperties(DirContext 
ctx, int propType, String[] attrList, String filter) 

Description:

Returns a property set collection of the extended properties of this user based on the property type specified.

Parameters:

ctx - A valid DirContext

proptype - Currently only supporting EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR

attrList - A string array of attributes to be retrieved. Null indicates that all attributes should be retrieved. An empty array indicates that none should be retrieved.

filter - A search filter to identify any particular applications whose properties are to be retrieved.

Returns:

A PropertySetCollection containing the results.

getExtendedProperties

Syntax:

public oracle.ldap.util.PropertySetCollection getExtendedProperties(DirContext 
ctx,int propType, String[] attrList)

Description:

Returns a property set collection of all the extended properties of this user based on the property type specified.

Parameters:

ctx - A valid DirContext

proptype - Currently only supporting EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR.

attrList - A string array of attributes to be retrieved. Null indicates that all attributes should be retrieved. An empty array indicates that none should be retrieved.

Returns:

A PropertySetCollection containing the results.

getProperties

Syntax:

public oracle.ldap.util.PropertySetCollection getProperties(DirContext ctx, 
String[] attrList)
 

Description:

Retrieves selected attributes associated with this user.

Parameters:

ctx - A valid DirContext

attrList - An array of attributes to be retrieved. Null indicates that all attributes should be retrieved. An empty array indicates that none should be retrieved.

setProperties

Syntax:

public void setProperties(DirContext ctx, ModificationItem[] mods) 
resolve(DirContext ctx)

Syntax:

public void resolve(DirContext ctx)
 

Description:

Validates the user by identifying its DN.

Parameters:

ctx - A valid DirContext

getDn(DirContext ctx)

Syntax:

public java.lang.String getDn(DirContext ctx)
 

Description:

Returns the DN of this user.

locateSubscriber(DirContext ctx)

Syntax:

public java.lang.String locateSubscriber(DirContext ctx)

Description:

Locates the subscriber this user belongs to.

authenticateUser

Syntax:

public void authenticateUser(DirContext ctx, int authType, Object cred)

Description:

Authenticates the user using the appropriate credentials.

Parameters:

ctx - A valid DirContext

authType - User.CREDTYPE_PASSWD is currently supported

cred - The credentials based on the authType

Fields

CREDTYPE_PASSWD

Syntax:

public static CREDTYPE_PASSWD

Description:

Uses user password to authenticate.

EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR

Syntax:

public static EXTPROPTYPE_RESOURCE_ACCESS_DESCRIPTOR

Description:

Extended Preference Type to be used with getExtendedProperties() - Resource Access Descriptor.

oracle.ldap.util.Util

Syntax:
public class oracle.ldap.util.Util

Constructors

Util()

Syntax:

public Util() 

Methods

PropertySetCollection getEntryDetails

Syntax:

public static oracle.ldap.util.PropertySetCollection getEntryDetails(DirContext 
ctx, String base, String filter, int scope, String[] attrList) 
setEntryDetails

Syntax:

public static void setEntryDetails(DirContext ctx, String base, 
ModificationItem[] mods) 
authenticateUser

Syntax:

public static void authenticateUser(DirContext ctx, User curUser, int authType, 
Object cred)

Description:

Authenticates the user using the appropriate credentials.

Parameters:

ctx - A valid DirContext

authType - Util.CREDTYPE_PASSWD is currently supported

cred - The credentials based on the authType

getSubscriberDn

Syntax:

public static java.lang.String getSubscriberDn(DirContext ctx, String subId, int 
subIdType) 

Description:

Returns the DN of the given subscriber. If DN is used as the subscriber ID, then simply look up the DN to validate it.

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.

getUserDn

Syntax:

public static java.lang.String getUserDn(DirContext ctx, String userId, int 
userIdType, String subscriberDN) 

Description:

Returns the DN of the given user. If DN is used as the user ID, then simply look up the DN to validate it. If subscriber DN is null, the default subscriber will be used.

Parameters:

ctx - A valid DirContext

userId - User ID

userIdType - The type of user ID being used. Use one of IDTYPE_DN, IDTYPE_SIMPLE, or Util.IDTYPE_GUID.

oracle.ldap.util.PropertySetCollection getGroupMembership

Syntax:

public static oracle.ldap.util.PropertySetCollection 
getGroupMembership(DirContext ctx, User curUser, String[] attrList, boolean 
nested) 

Description:

Returns a list of groups the user belongs to directly or indirectly.

Parameters:

ctx - A valid DirContext curUser - A valid user object

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.

vector2StrArray(Vector list)

Syntax:

public static.java.lang.String[] vector2StrArray(vector list)
normalizeDN(String inDn)

Syntax:

public static java.lang.String normalizeDN(String inDn)
getDASUrl(DirContext ctx, String urlTypeDN)

Syntax:

public static java.lang.String getDASUrl(DirContext ctx, String urlTypeDN) 

Description:

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.

java.util.Hashtable getAllDASUrl(DirContext ctx)

Syntax:
public static java.util.Hashtable getAllDASUrl(DirContext ctx) 
Description:

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

Methods

printResults(PropertySetCollection resultSet)

Syntax:

public static void printResults(PropertySetCollection resultSet)
 

Description:

Prints the entries represented by the PropertySetCollection in LDIF format.

Parameters:

resultSet - A valid PropertySetCollection

getDefaultSubscriber

Syntax:

public static java.lang.String[] getDefaultSubscriber()
createDefaultSubscriber

Syntax:

public static void createDefaultSubscriber(DirContext ctx, String ohome, String 
domain, String subscriber)
subAndLoadLdif

Syntax:

public static void subAndLoadLdif(DirContext ctx, String filename, Vector 
subVector)
checkInterfaceVersion(String intVersion)

Syntax:

public static boolean checkInterfaceVersion(String intVersion)

Description:

This method checks if the interface version given is supported with the version of the current API.

Parameters:

String - Interface version

Fields

API_VERSION

Syntax:

public static API_VERSION
 

Description:

The API version number.

INTERFACE_VERSION

Syntax:

public static INTERFACE_VERSION 

Description:

The interface version number.

IDTYPE_DN

Syntax:

public static IDTYPE_DN 

Description:

The ID is used as a DN.

IDTYPE_SIMPLE

Syntax:

public static IDTYPE_SIMPLE 

Description:

The ID used is a simple ID.

IDTYPE_GUID

Syntax:

public static IDTYPE_GUID 

Description:

The ID used is a GUID.

IDTYPE_DEFAULT

Syntax:

public static IDTYPE_DEFAULT
 

Description:

Use default value.

PROPERTIES_ENTRY

Syntax:

public static PROPERTIES_ENTRY 

Description:

User entry properties.

PROPERTIES_DETACHED

Syntax:

public static PROPERTIES_DETACHED
 

Description:

User detached properties.

CREDTYPE_PASSWD

Syntax:

public static CREDTYPE_PASSWD 

Description:

Using user password to authenticate.

DASURL_BASE

Syntax:

public static DASURL_BASE 

Description:

DAS URL type - Base URL

DASURL_CREATE_USER

Syntax:

public static DASURL_CREATE_USER 

Description:

DAS URL type - Create User

DASURL_EDIT_GROUP

Syntax:

public static DASURL_EDIT_GROUP 

Description:

DAS URL type - Edit Group

DASURL_EDIT_GROUP_GIVEN_GUID

Syntax:

public static DASURL_EDIT_GROUP_GIVEN_GUID 

Description:

DAS URL type -Edit Group Given GUID

DASURL_GROUP_SEARCH

Syntax:

public static DASURL_GROUP_SEARCH 

Description:

DAS URL type - Group Search

DASURL_EDIT_USER

Syntax:

public static DASURL_EDIT_USER 

Description:

DAS URL type - Edit User

DASURL_GROUP_LOV

Syntax:

public static DDASURL_GROUP_LOV
 

Description:

DAS URL type -Group LOV

DASURL_DELETE_USER

Syntax:

public static DASURL_DELETE_USER
 

Description:

DAS URL type - Delete User

DASURL_USER_PRIVILEGE

Syntax:

public static DASURL_USER_PRIVILEGE
 

Description:

DAS URL type - User Privilege

DASURL_CREATE_GROUP

Syntax:

public static DASURL_CREATE_GROUP 

Description:

DAS URL type - Create Group

DASURL_USER_SEARCH

Syntax:

public static DASURL_USER_SEARCH
 

Description:

DAS URL type - User Search

DASURL_ACCOUNT_INFO

Syntax:

public static DASURL_ACCOUNT_INFO
 

Description:

DAS URL type - Account Info

DASURL_EDIT_USER_GIVEN_GUID

Syntax:

public static DASURL_EDIT_USER_GIVEN_GUID 

Description:

DAS URL type - Edit User Given GUID

DASURL_DELETE_USER_GIVEN_GUID

Syntax:

public static DASURL_DELETE_USER_GIVEN_GUID
 

Description:

DAS URL type - Delete User Given GUID

DASURL_DELETE_GROUP_GIVEN_GUID

Syntax:

public static DASURL_DELETE_GROUP_GIVEN_GUID 

Description:

DAS URL type - Delete Group Given GUID

DASURL_GROUP_PRIVILEGE

Syntax:

public static DASURL_GROUP_PRIVILEGE
 

Description:

DAS URL type - Group Privilege

DASURL_USER_PRIVILEGE_GIVEN_GUID

Syntax:

public static DASURL_USER_PRIVILEGE_GIVEN_GUID 

Description:

DAS URL type - User Privilege Given GUID

DASURL_PASSWORD_CHANGE

Syntax:

public static DASURL_PASSWORD_CHANGE
 

Description:

DAS URL type - Password Change

DASURL_USER_LOV

Syntax:

public static DASURL_USER_LOV
 

Description:

DAS URL type - Password Change

DASURL_GROUP_PRIVILEGE_GIVEN_GUID

Syntax:

public static DASURL_GROUP_PRIVILEGE_GIVEN_GUID
 

Description:

DAS URL type - Group Privilege Given GUID

DASURL_DELETE_GROUP

Syntax:

public static DASURL_DELETE_GROUP 

Description:

DAS URL type - Delete Group

DASURL_CREATE_RESOURCE

Syntax:

public static DASURL_CREATE_RESOURCE
 

Description:

DAS URL type - Create Resource

oracle.ldap.util.jndi.ConnectionUtil

Syntax:
public class oracle.ldap,uil.jndi.ConnectionUtil

Constructors

ConnectionUtil()

Syntax:

public ConnectionUtil()

Methods

discoverSSLPort

Syntax:

public static java.lang.String discoverSSLPort(String host, String port, String 
bindDn, String bindPwd)

Description:

This method will connect to an existing non-SSL OID using the connect information provided and obtain the SSL connect information in the default configset 1. The SSL OID server need not be running at this point.

Parameters:

host - The host name where the non-SSL OID is running

port - The port number on which the non-SSL OID is running

bindDN - The bind DN (for example, cn=orcladmin)

bindPwd - The bind password

getDefaultDirCtx

Syntax:

public static javax.naming.directory.InitialDirContext getDefaultDirCtx(String 
host, String port, String bindDN, String bindPwd)

Description:

Returns an InitialDirContext using the connect information provided. The corresponding non-SSL OID server must be running. For SSL connection, please use getSSLDirCtx instead.

Parameters:

host - The host name where the non-SSL OID is running

port - The port number on which the non-SSL OID is running

bindDN - The bind DN (for example, cn=orcladmin)

bindPwd - the bind password

getSSLDIRCtx

Syntax:

public static javax.naming.directory.InitialDirContext getSSLDirCtx(String host, 
String port, String bindDN, String bindPwd)

Description:

Returns an InitialDirContext using the connect information provided. Use this only if this is an SSL connection. The corresponding SSL OID server must be running.

Parameters:

host - The host name where the non-SSL OID is running

port - The port number on which the non-SSL OID is running

bindDN - The bind DN (for example, cn=orcladmin)

bindPwd - the bind password

Exceptions

This section explains exceptions. It contains these topics:

oracle.ldap.util.AcctIPLockedException

Syntax:
public class oracle.ldap.util.AcctIPLockedException extends 
oracle.ldap.util.UtilException

Constructors

AcctIPLockedException()

Syntax:

public AcctIPLockedException()
AcctIPLockedException(String s)

Syntax:

public AcctIPLockedException(String s)

oracle.ldap.util.AcctTotallyLockedException

Syntax:
public class oracle.ldap.util.AcctTotallyLockedException extends 
oracle.ldap.util.UtilException

Constructors

AcctTotallyLockedException()

Syntax:

public AcctTotallyLockedException()
AcctTotallyLockedException(String s)

Syntax:

public AcctTotallyLockedException(String s)

oracle.ldap.util.AuthFailureException

Syntax:

public class oracle.ldap.util.AuthFailureException extends 
oracle.ldap.util.UtilException

oracle.ldap.util.AuthPasswdChangeWarningException

Syntax:
public class oracle.ldap.util.AuthPasswdChangeWarningException extends 
oracle.ldap.util.UtilException

Constructors

AuthPasswdChangeWarningException()

Syntax:

public AuthPasswdChangeWarningException()
AuthPasswdChangeWarningException(String s)

Syntax:

public AuthPasswdChangeWarningException(String s)

oracle.ldap.util.AuthPasswdExpiredException

public class oracle.ldap.util.AuthPasswdExpiredException extends 
oracle.ldap.util.UtilException

Constructors

AuthPasswdExpiredException()

Syntax:

AuthPasswdExpiredException() 
AuthPasswdExpiredException(String s)

Syntax:

AuthPasswdExpiredException(String s) 

oracle.ldap.util.GeneralErrorException

Syntax:

public class oracle.ldap.util.GeneralErrorException extends 
oracle.ldap.util.UtilException

Description:

This exception is thrown when a general error is encountered.

Constructors

GeneralErrorException()

Syntax:

public GeneralErrorException()
 

Description:

Constructs a GeneralErrorException with no detail message.

GeneralErrorException(String s)

Syntax:

public GeneralErrorException(String s)

Description:

Constructs a GeneralErrorException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.InvalidLDIFRecordException

Syntax:

public class oracle.ldap.util.InvalidLDIFRecordException extends 
java.lang.RuntimeException

Description:

An object of this class will be thrown when an error occurs during LDIF record parsing.

Constructors

InvalidLDIFRecordException()

Syntax:

public InvalidLDIFRecordException() 

Description:

Constructs an InvalidLDIFRecordException with no detail message.

InvalidLDIFRecordException(int lineNo, String s)

Syntax:

public InvalidLDIFRecordException(int lineNo, String s)
 

Description:

Constructs an InvalidLDIFRecordException with the specified detail message.

Parameters:

s - the detail messagee

Methods

printStackTrace()

Syntax:

void printStackTrace()
printStackTrace(PrintStream pout)

Syntax:

void printStackTrace(PrintStream pout)
printStackTrace(PrintWriter wout)

Syntax:

void printStackTrace(PrintWriter wout)

oracle.ldap.util.InvalidParameterException

Syntax:

public class oracle.ldap.util.InvalidParameterException extends 
java.lang.Exception

Description:

An object of this class will be thrown when an error occurs during input parameter parsing.

Constructors

InvalidParameterException()

Syntax:

public InvalidParameterException()

Description:

Constructs an InvalidParameterException with no detail message.

InvalidParameterException(String s)

Syntax:

public InvalidParameterException(String s)

Description:

Constructs an InvalidParameterException with the specified detail message.

Parameters

s - the detail message

oracle.ldap.util.InvalidRootOrclctxException

Syntax:

public class oracle.ldap.util.InvalidRootOrclctxException extends 
oracle.ldap.util.UtilException

Description:

This exception will be thrown when an invalid root oracle context is encountered while searching within the root oracle context.

Constructors

InvalidRootOrclctxException()

Syntax:

public InvalidRootOrclctxException()

Description:

Constructs an InvalidRootOrclctxException with no detail message.

InvalidRootOrclctxException(String s)

Syntax:

public InvalidRootOrclctxException(String s)

Description:

Constructs an InvalidRootOrclctxException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.InvalidSubscriberOrclctxException

Syntax:

public class oracle.ldap.util.InvalidSubscriberOrclctxException extends 
oracle.ldap.util.UtilException

Description:

This exception will be thrown when an invalid oracle context within the subscriber is encountered.

Constructors

InvalidSubscriberOrclctxException()

Syntax:

public InvalidSubscriberOrclctxException()

Description:

Constructs an InvalidSubscriberOrclctxException with no detail message.

InvalidSubscriberOrclctxException(String s)

Syntax:

public InvalidSubscriberOrclctxException(String s)

Description:

Constructs an InvalidSubscriberOrclctxException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.LoginPolicyFailureException

Syntax:
public class oracle.ldap.util.LoginPolicyFailureException extends 
oracle.ldap.util.UtilException

Constructors

LoginPolicyFailureException()

Syntax:

public LoginPolicyFailureException()
LoginPolicyFailureException(String s)

Syntax:

public LoginPolicyFailureException(String s)

oracle.ldap.util.MigrationException

Syntax:

public class oracle.ldap.util.MigrationException extends java.lang.Exception

Description:

An object of this class will be thrown when a migration exception occurs.

Constructors

MigrationException()

Syntax:

public MigrationException()

Description:

Constructs a MigrationException with no detail message.

MigrationException(String s)

Syntax:

public MigrationException(String s)

Description:

Constructs a MigrationException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.MultipleSubscriberException

Syntax:

public class oracle.ldap.util.MultipleSubscriberException extends 
oracle.ldap.util.UtilException

Description:

This exception is thrown when multiple subscribers of the same ID are encountered under the subscriber search base.

Constructors

MultipleSubscriberException()

Syntax:

public MultipleSubscriberException()

Description:

Constructs a MultipleSubscriberException with no detail message.

MultipleSubscriberException(String s)

Syntax:

public MultipleSubscriberException(String s)

Description:

Constructs a MultipleSubscriberException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.MultipleUserException

Syntax:
public class oracle.ldap.util.MultipleUserException extends 
oracle.ldap.util.UtilException
Description:

This exception is thrown when multiple users of the same ID are encountered under the subscriber user search base.

Constructors

MultipleUserException()

Syntax:

public MultipleUserException() 

Description:

Constructs a MultipleUserException with no detail message.

MultipleUserException(String s)

Syntax:

public MultipleUserException(String s)
 

Description:

Constructs a MultipleUserException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.NoGroupMembersException

Syntax:

public class oracle.ldap.util.NoGroupMembersException extends 
oracle.ldap.util.UtilException

Description:

This exception is thrown if the user looks for their group membership but is not a unique member of any particular group.

Constructors

NoGroupMembersException()

Syntax:

public NoGroupMembersException()
 

Description:

Constructs a NoGroupMemberException with no detail message.

NoGroupMembersException(String s)

Syntax:

public NoGroupMembersException(String s)
 

Description:

Constructs a NoGroupMemberException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.NoRootOrclctxException

Syntax:
public class oracle.ldap.util.NoRootOrclctxException extends 
oracle.ldap.util.UtilException
Description:

This exception is thrown if the root oracle context does not exist.

Constructors

NoRootOrclctxException()

Syntax:

public NoRootOrclctxException()

Description:

Constructs a NoRootOrclctxException with no detail message.

NoRootOrclctxException(String s)

Syntax:

public NoRootOrclctxException(String s)

Description:

Constructs a NoRootOrclctxException with the specified detail message.

Parameters:

s- the detail message.

oracle.ldap.util.NoSubscriberOrclctxException

Syntax:

public class oracle.ldap.util.NoSubscriberOrclctxException extends 
oracle.ldap.util.UtilException

Description:

This exception is thrown when the search is unable to locate the oracle context within the subscriber.

Constructors

NoSubscriberOrclctxException()

Syntax:

public NoSubscriberOrclctxException()
 

Description:

Constructs a NoSubscriberOrclctxException with no detail message.

NoSubscriberOrclctxException(String s)

Syntax:

public NoSubscriberOrclctxException(String s)
 

Description:

Constructs a NoSubscriberOrclctxException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.NoSuchGroupException

Syntax:

public class oracle.ldap.util.NoSuchGroupException extends 
oracle.ldap.util.UtilException

Description:

This exception is thrown when the group object cannot be resolved because the group does not exist in the directory.

Constructors

NoSuchGroupException()

Syntax:

public NoSuchGroupException() 

Description:

Constructs a NoSuchGroupException with no detail message.

NoSuchGroupException(String s)

Syntax:

public NoSuchGroupException(String s)
 

Description:

Constructs a NoSuchGroupException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.NoSuchSubscriberException

Syntax:
public class oracle.ldap.util.NoSuchSubscriberException extends 
oracle.ldap.util.UtilException
Description:

This exception is thrown when the subscriber object cannot be resolved because the subscriber does not exist under the subscriber search base.

Constructors

NoSuchSubscriberException()

Syntax:

public NoSuchSubscriberException()

Description:

Constructs a NoSuchSubscriberException with no detail message.

NoSuchSubscriberException(String s)

Syntax:

public NoSuchSubscriberException(String s)

Description:

Constructs a NoSuchSubscriberException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.NoSuchUserException

Syntax:
public class oracle.ldap.util.NoSuchUserException extends 
oracle.ldap.util.UtilException
Description:

This exception is thrown when the user object cannot be resolved because the user does not exist under the user search base of the specified subscriber.

Constructors

NoSuchUserException()

Syntax:

public NoSuchUserException()
 

Description:

Constructs a NoSuchUserException with no detail message.

NoSuchUserException(String s)

Syntax:

public NoSuchUserException(String s)
 

Description:

Constructs a NoSuchUserException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.ParameterException

Syntax:
public class oracle.ldap.util.ParameterException extends 
oracle.ldap.util.UtilException
Description:

This exception is thrown when an error occurs during input parameter parsing.

Constructors

ParameterException()

Syntax:

public ParameterException()

Description:

Constructs a ParameterException with no detail message.

ParameterException(String s)

Syntax:

public ParameterException(String s)

Description:

Constructs a ParameterException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.PasswdExpiredException

Syntax:
public class oracle.ldap.util.PasswdExpiredException extends 
oracle.ldap.util.UtilException

Constructors

PasswdExpiredException()

Syntax:

public PasswdExpiredException() 
PasswdExpiredException(String s)

Syntax:

public PasswdExpiredException(String s) 

oracle.ldap.util.SetPropertiesException

Syntax:
public class oracle.ldap.util.SetPropertiesException extends 
oracle.ldap.util.UtilException
Description:

This exception is thrown when modification cannot be carried out while using the setProperties() method.

Constructors

SetPropertiesException()

Syntax:

public SetPropertiesException()

Description:

Constructs a SetPropertiesException with no detail message.

SetPropertiesException(String s)

Syntax:

public SetPropertiesException(String s)

Description:

Constructs a SetPropertiesException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.SubscriberNotFoundException

Syntax:
public class oracle.ldap.util.SubscriberNotFoundException extends 
oracle.ldap.util.UtilException
Description:

This exception is thrown when the subscriber cannot be located under the subscriber search base.

Constructors

SubscriberNotFoundException()

Syntax:

public SubscriberNotFoundException()
 

Description:

Constructs a SubscriberNotFoundException with no detail message.

SubscriberNotFoundException(String s)

Syntax:

public SubscriberNotFoundException(String s)
 

Description:

Constructs a SubscriberNotFoundException with the specified detail message.

Parameters:

s - the detail message

oracle.ldap.util.UtilException

Syntax:
public class oracle.ldap.util.UtilException extends java.lang.Exception

Constructors

UtilException()

Syntax:

public UtilException() 
UtilException(String s)

Syntax:

public UtilException(String s)

Go to previous page Go to next page
Oracle
Copyright © 1999, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback