Websphere MQ Everyplace

examples.install
Class ConfigUtils

java.lang.Object
  |
  +--examples.install.ConfigUtils

public class ConfigUtils
extends java.lang.Object


Field Summary
static short[] version
           
 
Constructor Summary
ConfigUtils()
          ConfigUtils constructor.
 
Method Summary
 java.lang.String checkPortNumber(java.lang.String port)
          Check for a valid port number.
 java.util.ResourceBundle getResourceBundle()
          Get the ResourceBundle for NLS.
 boolean makeDirectory(java.lang.String dirName)
          Ensure that a directory exists - create it if necessary.
 MQeFields verifyIniFile(java.lang.String filename)
          Verify that a file is a valid MQe configuration file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static short[] version
Constructor Detail

ConfigUtils

public ConfigUtils()
ConfigUtils constructor.

Method Detail

checkPortNumber

public java.lang.String checkPortNumber(java.lang.String port)
Check for a valid port number.

Parameters:
port - The String value to check
Returns:
An error message if the port number is invalid, or null if the port number is valid.

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
Get the ResourceBundle for NLS. This method is provided so that we don't have to load the bundle twice (once for ConfigUtils and again for the class which uses ConfigUtils). The bundle will always be loaded (by the constructor) before this method can be called.

Returns:
ResourceBundle

makeDirectory

public boolean makeDirectory(java.lang.String dirName)
                      throws java.lang.Exception
Ensure that a directory exists - create it if necessary.

Parameters:
dirName - The name of the directory.
Returns:
'true' if the directory had to be created 'false' if it already exists
Throws:
java.lang.Exception - If the directory cannot be created

verifyIniFile

public MQeFields verifyIniFile(java.lang.String filename)
Verify that a file is a valid MQe configuration file.

Parameters:
filename - The name of the file.
Returns:
If it is a valid MQe configuration file, this returns a MQeFields object containing the configuration parameters. If it is not valid, this returns null;

Websphere MQ Everyplace