DbtuTools project
Java Library

org.dbtutools.DbtuTools.core
Class OptDbtuToolsTree

java.lang.Object
  |
  +--org.dbtutools.DbtuTools.core.OptDbtuToolsTree

public class OptDbtuToolsTree
extends java.lang.Object

Wrapper class, implementing the /opt/dbtutools tree related stuff.

Author:
Daniel Scheibli <daniel.scheibli at edelbyte.org>

Field Summary
protected  java.lang.String oDb2Instance
          Field holding the given DB2 Instance name.
protected  java.lang.String oTreeRoot
          Field holding the machine wide /opt/dbtutools tree root.
 
Constructor Summary
OptDbtuToolsTree()
          Creates a new instance of this class and addresses the /opt/dbtutools tree for the current DB2 Instance.
OptDbtuToolsTree(Instance oDb2Instance)
          Creates a new instance of this class and addresses the /opt/dbtutools tree for the given DB2 Instance.
OptDbtuToolsTree(java.lang.String oDb2InstanceName)
          Creates a new instance of this class and addresses the /opt/dbtutools tree for the given DB2 Instance name.
 
Method Summary
static OptDbtuToolsTree getInstance()
          Creates and returns an instance of this class which addresses the /opt/dbtutools tree for the current DB2 Instance.
 java.util.HashMap getPathNames()
          Returns the /opt/dbtutools tree path names (based on the oTreeRoot field).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oTreeRoot

protected java.lang.String oTreeRoot
Field holding the machine wide /opt/dbtutools tree root.

oDb2Instance

protected java.lang.String oDb2Instance
Field holding the given DB2 Instance name.
Constructor Detail

OptDbtuToolsTree

public OptDbtuToolsTree()
                 throws UnknownValueException
Creates a new instance of this class and addresses the /opt/dbtutools tree for the current DB2 Instance.
Throws:
UnknownValueException - For the case, that the name of the current DB2 Instance could not be detected.

OptDbtuToolsTree

public OptDbtuToolsTree(java.lang.String oDb2InstanceName)
                 throws UnknownValueException
Creates a new instance of this class and addresses the /opt/dbtutools tree for the given DB2 Instance name.
Parameters:
oDb2InstanceName - The name of the DB2 Instance to be addressed.
Throws:
UnknownValueException - For the case, that the name of the current DB2 Instance could not be detected.

OptDbtuToolsTree

public OptDbtuToolsTree(Instance oDb2Instance)
                 throws UnknownValueException
Creates a new instance of this class and addresses the /opt/dbtutools tree for the given DB2 Instance.
Parameters:
oDb2InstanceName - The DB2 Instance to be addressed.
Throws:
UnknownValueException - For the case, that the name of the current DB2 Instance could not be detected.
Method Detail

getInstance

public static OptDbtuToolsTree getInstance()
                                    throws UnknownValueException
Creates and returns an instance of this class which addresses the /opt/dbtutools tree for the current DB2 Instance.
Returns:
The object addressing the /opt/dbtutools tree for the current DB2 Instance.
Throws:
UnknownValueException - For the case, that the name of the current DB2 Instance could not be detected.

getPathNames

public java.util.HashMap getPathNames()
Returns the /opt/dbtutools tree path names (based on the oTreeRoot field).
Returns:
A new HashMap, containing the different paths. In the following you will find a list of the defined hash key:
  • "Tree.Root" = Root path of the entire /opt/dbtutools tree (spanning all DB2 Instances).
  • "Tree.Instance.Root" = Root path of the /opt/dbtutools tree (for the specified DB2 Instance).
  • "Tree.Instance.Bin" = Path of the binary directory within the /opt/dbtutools tree.
  • "Tree.Instance.Cfg" = Path holding the configuration files within the /opt/dbtutools tree.
  • "Tree.Instance.Lib" = Path holding the libraries (JAR files etc) within the /opt/dbtutools tree (currently the same director as for the binaries)
  • "Tree.Instance.Log" = Path holding the log files within the /opt/dbtutools tree.
  • "Tree.Instance.Temp" = Path holding the temporary files within the /opt/dbtutools tree.

DbtuTools project
Java Library