Skip navigation links

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

E10664-01


oracle.ldap.util.discovery
Class DiscoveryUtil

java.lang.Object
  extended by oracle.ldap.util.discovery.DiscoveryUtil


public class DiscoveryUtil
extends java.lang.Object
Since:
release specific (what release of product did this appear in)

Field Summary
static int ERR_VERIFICATION_FAILED
           
static int SUCCESS
           

 

Constructor Summary
DiscoveryUtil()
           

 

Method Summary
static java.lang.String getConfigFilePath()
          Discovers ldap.ora file path.
static CfgflProp getConfigFileProperties(CfgflProp properties)
          Determines all ldap.ora properties using CfgflProp object passed as input.
static int persistToConfigFile(CfgflProp cfgprop, java.lang.String path, boolean verify, boolean forcedCreate)
          Creates ldap.ora file with CfgflProp object containing all the properties.

 

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

 

Field Detail

SUCCESS

public static int SUCCESS

ERR_VERIFICATION_FAILED

public static int ERR_VERIFICATION_FAILED

Constructor Detail

DiscoveryUtil

public DiscoveryUtil()

Method Detail

getConfigFilePath

public static java.lang.String getConfigFilePath()
                                          throws DiscoveryFailureException
Discovers ldap.ora file path. If case discovery results in error then it throws DiscoveryFailureException
Throws:
DiscoveryFailureException

getConfigFileProperties

public static CfgflProp getConfigFileProperties(CfgflProp properties)
                                         throws DiscoveryFailureException,
                                                MandatoryPropsMissingException
Determines all ldap.ora properties using CfgflProp object passed as input. DIRECTORY_SERVERS and DIRECTORY_SERVER_TYPE are mandatory to be set in input CfgflProp object. If any other ldap.ora property is missing it is discovered using OID_DISCOVER. If DIRECTORY_SERVERS property in input CfgflProp is single valued and either ssl or non-ssl port is missing then this function will try to discover the missing port also. A new CfgflProp instance is created with all these properties and returned. It throws MandatoryPropsMissingException if mandatory properties are not provided in input CfgflProp object. It throws DiscoveryFailureException if error occurs while discovering the missing properties.
Throws:
DiscoveryFailureException
MandatoryPropsMissingException

persistToConfigFile

public static int persistToConfigFile(CfgflProp cfgprop,
                                      java.lang.String path,
                                      boolean verify,
                                      boolean forcedCreate)
                               throws FileExistsException,
                                      DiscoveryFailureException,
                                      java.io.IOException
Creates ldap.ora file with CfgflProp object containing all the properties. The absolute file path is passed as an argument. If verify is true then these properties are verified before writing to ldap.ora. If verify is false then properties are directly written to ldap.ora without verification. Verification will be done by comparing with values obtained by OID_DISCOVER. If verification fails then error is returned. If forcedCreate is false and ldap.ora already exists then FileExistsException is thrown. If forcedCreate is true then existing ldap.ora file will be overwritten. It throws DiscoveryFailureException if error occurs while performing discovery.
Throws:
FileExistsException
DiscoveryFailureException
java.io.IOException

Skip navigation links

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

E10664-01


Copyright © 1999, 2009 Oracle. All Rights Reserved.