Skip navigation links

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

E10664-01


oracle.ldap.util
Class TemplateFileInstantiator

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


public class TemplateFileInstantiator
extends java.lang.Object

Utility class to create instantiated file based on template file by replacing the macro string pattern in the template file with replacement strings.


Field Summary
protected  java.lang.String m_fileTemplate
           
protected  java.lang.String m_fileToCreate
           
protected  java.util.Hashtable m_replaceMapping
           

 

Constructor Summary
TemplateFileInstantiator(java.lang.String directoryRootPath, java.lang.String templatefileRelativePath, java.lang.String templateMapfileName, java.lang.String fileToCreateRelativePath, java.lang.String fileNameToCreate, java.util.Hashtable replaceMapping)
          Creates a file in the $ORACLE_HOME/ldap/log directory by replacing the Macro String(s) in the template file, fileTemplate, located in $ORACLE_HOME/ldap/odi/conf.
TemplateFileInstantiator(java.lang.String directoryRootPath, java.lang.String templatefileRelativePath, java.lang.String templateMapfileName, java.lang.String fileToCreateRelativePath, java.lang.String fileNameToCreate, java.util.Hashtable replaceMapping, java.util.logging.Logger lgr)
           

 

Method Summary
 void CreateInstantiatedfileBasedOnTemplate()
          Creates the map file based on a master template file.
 java.lang.String getInstantiatedfileCreated()
          Returns the full path of the map file created by a given TemplateFileInstantiator instance.

 

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

 

Field Detail

m_fileTemplate

protected java.lang.String m_fileTemplate

m_fileToCreate

protected java.lang.String m_fileToCreate

m_replaceMapping

protected java.util.Hashtable m_replaceMapping

Constructor Detail

TemplateFileInstantiator

public TemplateFileInstantiator(java.lang.String directoryRootPath,
                                java.lang.String templatefileRelativePath,
                                java.lang.String templateMapfileName,
                                java.lang.String fileToCreateRelativePath,
                                java.lang.String fileNameToCreate,
                                java.util.Hashtable replaceMapping)
Creates a file in the $ORACLE_HOME/ldap/log directory by replacing the Macro String(s) in the template file, fileTemplate, located in $ORACLE_HOME/ldap/odi/conf. The caller can specify multiple mappings.
Parameters:
oracle_home: - The orlace_home path that's usually set in environment variable The caller can use it for any home directory.
templatefileRelativePath: - Where the template file is located. Must end with '/'.
templatefileName: - The master map file, such as activeexp.map.master
fileToCreateRelativePath: - where map file is created. Must end with '/'.
fileNameToCreate: - The map file to be created, for example, activeexp.map
replaceMapping: - hashtable with the key being the Macro String in the master map file, for instance, %OIDBASE%, %USERBASE%. The corresponding value is the replacement value.

TemplateFileInstantiator

public TemplateFileInstantiator(java.lang.String directoryRootPath,
                                java.lang.String templatefileRelativePath,
                                java.lang.String templateMapfileName,
                                java.lang.String fileToCreateRelativePath,
                                java.lang.String fileNameToCreate,
                                java.util.Hashtable replaceMapping,
                                java.util.logging.Logger lgr)

Method Detail

getInstantiatedfileCreated

public java.lang.String getInstantiatedfileCreated()
Returns the full path of the map file created by a given TemplateFileInstantiator instance. If CreateMapfileBasedOnTemplate() has not been called, return null.

CreateInstantiatedfileBasedOnTemplate

public void CreateInstantiatedfileBasedOnTemplate()
                                           throws java.io.IOException,
                                                  java.io.FileNotFoundException,
                                                  ParameterException
Creates the map file based on a master template file. Returns FileNotFoundException if master file is missing Returns IOException for all other file errors.
Throws:
java.io.IOException
java.io.FileNotFoundException
ParameterException

Skip navigation links

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

E10664-01


Copyright © 1999, 2009 Oracle. All Rights Reserved.