Skip navigation links

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

E10664-01


oracle.ldap.util
Class OracleContext

java.lang.Object
  extended by oracle.ldap.util.LDAPEntry
      extended by oracle.ldap.util.OracleContext

All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RootOracleContext

public class OracleContext
extends LDAPEntry
implements java.io.Serializable

This class represents an Oracle Context in the directory

See Also:
Serialized Form

Field Summary
protected  PropertySetCollection commonPsc
           
protected  java.lang.String fileSeparator
           
protected static java.lang.String listFileExt
          File extention for the files that list .sbs LDIF files
protected  java.lang.String ohome
           
static java.lang.String oracleContextCN
          the common name (CN) of an Oracle Context
static java.lang.String oracleContextObjClass
          the ldap objectClass for the oracle context
static java.lang.String oracleContextRDN
          the relative distinguished name (RDN) of an Oracle Context
protected  java.lang.String orclCtxFilePrefix
           
protected  java.lang.String orclCtxVersion
           
protected  PropertySetCollection productPsc
           
protected  java.io.PrintStream pStream
           
protected  java.lang.String[] resolveAttrs
           
protected  java.util.Vector subVector
           

 

Fields inherited from class oracle.ldap.util.LDAPEntry
entryDN, entryIdType, entryPsc, inEntryId, resBundle, validated

 

Constructor Summary
OracleContext()
           
OracleContext(javax.naming.directory.DirContext inCtx, java.util.logging.Logger lgr, java.lang.String inOrclCtxDN)
          Constructs an OracleContext specified by the input DN
OracleContext(javax.naming.directory.DirContext inCtx, java.util.logging.Logger lgr, java.lang.String inOhome, java.lang.String inOrclCtxDN)
          Constructs an OracleContext specified by the input DN.
OracleContext(javax.naming.directory.DirContext inCtx, java.util.logging.Logger lgr, java.lang.String inOhome, java.lang.String inOrclCtxDN, java.io.PrintStream pStream)
          Constructs an OracleContext specified by the input DN.
OracleContext(javax.naming.directory.DirContext inCtx, java.lang.String inOrclCtxDN)
           
OracleContext(javax.naming.directory.DirContext inCtx, java.lang.String inOhome, java.lang.String inOrclCtxDN)
           
OracleContext(javax.naming.directory.DirContext inCtx, java.lang.String inOhome, java.lang.String inOrclCtxDN, java.io.PrintStream pStream)
           
OracleContext(java.util.logging.Logger lgr)
           

 

Method Summary
 void create(javax.naming.directory.DirContext ctx)
          Creates an OracleContext with the given DN
 void create(javax.naming.directory.DirContext ctx, java.lang.String product, java.lang.String schemaLoc)
          Create product specific oraclecontext entries
 boolean exists(javax.naming.directory.DirContext ctx)
          Returns true if the Oracle Context exists
 PropertySetCollection getCommonProperties(javax.naming.directory.DirContext ctx, java.lang.String[] attrList)
          Returns the common properties of the Oracle Context.
 java.lang.String getDBCompatibilityVersion(javax.naming.directory.DirContext ctx)
          Returns the oldest database Version that is compatible with this version of the Oracle Context
static java.lang.String[] getOracleContext(javax.naming.directory.DirContext ctx)
          Returns a String[] of DNs of all the Oracle Contexts in the directory.
static java.lang.String[] getOracleContext(javax.naming.directory.DirContext ctx, java.lang.String baseDN)
          Returns a String[] of DNs of all the Oracle Contexts in the directory under the specified base DN.
protected  java.io.PrintStream getPrintStream()
           
protected  void getSubstitutionVector(javax.naming.directory.DirContext ctx)
          Returns the substitution vector needed to create the oracle context The following variables are needed: %s_CurrentUserDN% %s_OracleContextParentDN% %s_OracleContextDN%
 java.lang.String getVersion(javax.naming.directory.DirContext ctx)
          /** Returns the version of this Oracle Context
 java.lang.String getVersion(javax.naming.directory.DirContext ctx, java.lang.String product)
          getVersion
 boolean isUpToDate(javax.naming.directory.DirContext ctx)
          Returns true if this Oracle Context is up to date with the current client version.
 boolean isUpToDate(javax.naming.directory.DirContext ctx, java.lang.String product, java.lang.String schemaLoc)
          Checks whether context entries are uptodate
 void refresh(javax.naming.directory.DirContext ctx)
          Refreshes cached elements in the OracleContext object.
 void resolve(javax.naming.directory.DirContext ctx)
          Resolves the OracleContext object by validating the DN.
 void resolve(javax.naming.directory.DirContext ctx, java.lang.String product)
          Resolve various property sets including product specific ones
 void upgrade(javax.naming.directory.DirContext ctx)
          Upgrade
 void upgrade(javax.naming.directory.DirContext ctx, java.lang.String product, java.lang.String schemaLoc)
          Upgrade

 

Methods inherited from class oracle.ldap.util.LDAPEntry
getDN, getProperties, setProperties

 

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

 

Field Detail

oracleContextCN

public static final java.lang.String oracleContextCN
the common name (CN) of an Oracle Context
See Also:
Constant Field Values

oracleContextRDN

public static final java.lang.String oracleContextRDN
the relative distinguished name (RDN) of an Oracle Context
See Also:
Constant Field Values

oracleContextObjClass

public static final java.lang.String oracleContextObjClass
the ldap objectClass for the oracle context
See Also:
Constant Field Values

listFileExt

protected static final java.lang.String listFileExt
File extention for the files that list .sbs LDIF files
See Also:
Constant Field Values

ohome

protected java.lang.String ohome

orclCtxVersion

protected java.lang.String orclCtxVersion

orclCtxFilePrefix

protected java.lang.String orclCtxFilePrefix

subVector

protected java.util.Vector subVector

commonPsc

protected PropertySetCollection commonPsc

productPsc

protected PropertySetCollection productPsc

resolveAttrs

protected java.lang.String[] resolveAttrs

fileSeparator

protected java.lang.String fileSeparator

pStream

protected transient java.io.PrintStream pStream

Constructor Detail

OracleContext

public OracleContext(java.util.logging.Logger lgr)

OracleContext

public OracleContext()

OracleContext

public OracleContext(javax.naming.directory.DirContext inCtx,
                     java.util.logging.Logger lgr,
                     java.lang.String inOhome,
                     java.lang.String inOrclCtxDN)
Constructs an OracleContext specified by the input DN. Used internally by
Parameters:
inCtx - a valid DirContext
inOhome - the absolute path of ORACLE_HOME
inOrclctxDN - the DN of the OracleContext

OracleContext

public OracleContext(javax.naming.directory.DirContext inCtx,
                     java.lang.String inOhome,
                     java.lang.String inOrclCtxDN)

OracleContext

public OracleContext(javax.naming.directory.DirContext inCtx,
                     java.util.logging.Logger lgr,
                     java.lang.String inOhome,
                     java.lang.String inOrclCtxDN,
                     java.io.PrintStream pStream)
Constructs an OracleContext specified by the input DN. Used internally by
Parameters:
inCtx - a valid DirContext
inOhome - the absolute path of ORACLE_HOME
inOrclctxDN - the DN of the OracleContext

OracleContext

public OracleContext(javax.naming.directory.DirContext inCtx,
                     java.lang.String inOhome,
                     java.lang.String inOrclCtxDN,
                     java.io.PrintStream pStream)

OracleContext

public OracleContext(javax.naming.directory.DirContext inCtx,
                     java.util.logging.Logger lgr,
                     java.lang.String inOrclCtxDN)
Constructs an OracleContext specified by the input DN
Parameters:
inCtx - a valid DirContext
inOrclCtxDN - the DN of the OracleContext

OracleContext

public OracleContext(javax.naming.directory.DirContext inCtx,
                     java.lang.String inOrclCtxDN)

Method Detail

exists

public boolean exists(javax.naming.directory.DirContext ctx)
Returns true if the Oracle Context exists
Returns:
true if the Oracle Context exists

refresh

public void refresh(javax.naming.directory.DirContext ctx)
             throws UtilException
Refreshes cached elements in the OracleContext object.
Parameters:
ctx - a valid DirContext
Throws:
UtilException

resolve

public void resolve(javax.naming.directory.DirContext ctx)
             throws UtilException
Resolves the OracleContext object by validating the DN. Certain properties are cached by the OracleContext object.
Specified by:
resolve in class LDAPEntry
Throws:
UtilException

resolve

public void resolve(javax.naming.directory.DirContext ctx,
                    java.lang.String product)
             throws UtilException
Resolve various property sets including product specific ones
Throws:
UtilException

create

public void create(javax.naming.directory.DirContext ctx)
            throws UtilException
Creates an OracleContext with the given DN
Throws:
UtilException

create

public void create(javax.naming.directory.DirContext ctx,
                   java.lang.String product,
                   java.lang.String schemaLoc)
            throws UtilException
Create product specific oraclecontext entries
Throws:
UtilException

getVersion

public java.lang.String getVersion(javax.naming.directory.DirContext ctx)
                            throws UtilException
/** Returns the version of this Oracle Context
Parameters:
ctx - - Directory Context
Throws:
UtilException
CommunicationErrorException - - an error occurrs while contacting LDAP server

getVersion

public java.lang.String getVersion(javax.naming.directory.DirContext ctx,
                                   java.lang.String product)
                            throws UtilException
getVersion
Parameters:
ctx - - Directory Context product - Product for which version is being returned
Throws:
UtilException
CommunicationErrorException - - an error occurrs while contacting LDAP server

getDBCompatibilityVersion

public java.lang.String getDBCompatibilityVersion(javax.naming.directory.DirContext ctx)
                                           throws UtilException
Returns the oldest database Version that is compatible with this version of the Oracle Context
Parameters:
ctx - - Directory Context
Throws:
UtilException
CommunicationErrorException - - an error occurrs while contacting LDAP server

getOracleContext

public static java.lang.String[] getOracleContext(javax.naming.directory.DirContext ctx)
                                           throws UtilException
Returns a String[] of DNs of all the Oracle Contexts in the directory. ctx - Directory Context
Throws:
UtilException
CommunicationErrorException - - an error occurrs while contacting LDAP server

getOracleContext

public static java.lang.String[] getOracleContext(javax.naming.directory.DirContext ctx,
                                                  java.lang.String baseDN)
                                           throws UtilException
Returns a String[] of DNs of all the Oracle Contexts in the directory under the specified base DN.
Parameters:
ctx - - Directory Context baseDN - DN where OracleContext is located
Throws:
UtilException
CommunicationErrorException - - an error occurrs while contacting LDAP server

upgrade

public void upgrade(javax.naming.directory.DirContext ctx)
             throws java.lang.Exception
Upgrade
Throws:
java.lang.Exception
CommunicationErrorException - for OID broken connection
UtilException - for general LDAP Modification failure.

upgrade

public void upgrade(javax.naming.directory.DirContext ctx,
                    java.lang.String product,
                    java.lang.String schemaLoc)
             throws java.lang.Exception
Upgrade
Parameters:
ctx - - Directory Context product - Product for which context is being upgraded schemaLoc - Location of schema files
Throws:
java.lang.Exception

getSubstitutionVector

protected void getSubstitutionVector(javax.naming.directory.DirContext ctx)
Returns the substitution vector needed to create the oracle context The following variables are needed: %s_CurrentUserDN% %s_OracleContextParentDN% %s_OracleContextDN%

getCommonProperties

public PropertySetCollection getCommonProperties(javax.naming.directory.DirContext ctx,
                                                 java.lang.String[] attrList)
                                          throws UtilException
Returns the common properties of the Oracle Context.
Parameters:
ctx - a valid DirContext
attrList - the list of attributes to be returned
Throws:
UtilException
CommunicationErrorException - - an error occurrs while contacting LDAP server

isUpToDate

public boolean isUpToDate(javax.naming.directory.DirContext ctx)
                   throws UtilException
Returns true if this Oracle Context is up to date with the current client version.
Throws:
UtilException

isUpToDate

public boolean isUpToDate(javax.naming.directory.DirContext ctx,
                          java.lang.String product,
                          java.lang.String schemaLoc)
                   throws UtilException
Checks whether context entries are uptodate
Parameters:
ctx - - Directory Context product - Product for which context is being upgraded schemaLoc - Location of schema files
Throws:
UtilException

getPrintStream

protected java.io.PrintStream getPrintStream()

Skip navigation links

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

E10664-01


Copyright © 1999, 2009 Oracle. All Rights Reserved.