TPTP 4.4.0 Monitoring Tools Project
Internal API Specification

org.eclipse.hyades.logging.parsers.internal.importer
Class GLAHelper

java.lang.Object
  extended byorg.eclipse.hyades.logging.parsers.internal.importer.GLAHelper
Direct Known Subclasses:
GLAFilterHelper, GLAFilterHelper

public class GLAHelper
extends java.lang.Object

Helper class for finding the GLA adapter configuration file.


Field Summary
protected static short platform
           
 
Constructor Summary
GLAHelper()
           
 
Method Summary
protected static java.net.URL find(java.lang.reflect.Method find, java.lang.Object bundle, java.lang.String config_file)
          Find the URL of the adapter configuration file
static java.lang.String getAbsoluteAdapterPath(java.util.Map table, java.lang.String nameSpace, boolean useOriginalAdapter)
          Get the absolute path of the adapter configuration file.
static java.lang.String getAdapterPath(java.util.Map table, java.lang.String nameSpace, boolean useOriginalAdapter)
          Get the adapter configuration file path.
static java.lang.String getAdapterPathKey(java.util.Map table)
          Get the key that is used to find the adapter configuration file name in the hash table.
protected static java.lang.String getNLAdapterPath(java.util.Map table, java.lang.String configFilePath, java.lang.reflect.Method find, java.lang.Object bundle)
          Get the adapter configuration file path based on locale and encoding.
protected static java.lang.String getPath(java.util.Map table, java.lang.reflect.Method find, java.lang.Object bundle, java.lang.String configFilePath)
          Get the full path of the adapter configuration file
protected static void initialize()
          Initializes the context in which this class is running.
static boolean isWorkbenchMode()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

platform

protected static short platform
Constructor Detail

GLAHelper

public GLAHelper()
Method Detail

getAdapterPath

public static java.lang.String getAdapterPath(java.util.Map table,
                                              java.lang.String nameSpace,
                                              boolean useOriginalAdapter)
                                       throws org.eclipse.hyades.logging.parsers.LogParserException
Get the adapter configuration file path.

Parameters:
table - the parser parameters hash stable
nameSpace - the plugin name if running in the workbench, null otherwise
useOriginalAdapter - boolean to indicate to use the original adapter file specification stored in the hash table with key originalAdapter
Returns:
the adapter file path.
Throws:
org.eclipse.hyades.logging.parsers.LogParserException

initialize

protected static void initialize()
Initializes the context in which this class is running. Determines whether the code runs in a workbench context or outside. Calling this method is required before using the adapter path helper method.


getAbsoluteAdapterPath

public static java.lang.String getAbsoluteAdapterPath(java.util.Map table,
                                                      java.lang.String nameSpace,
                                                      boolean useOriginalAdapter)
                                               throws org.eclipse.hyades.logging.parsers.LogParserException
Get the absolute path of the adapter configuration file.

Parameters:
table - the parser parameters hash stable
nameSpace - the plugin name if running in the workbench, null otherwise
useOriginalAdapter - boolean to indicate to use the original adapter file specification stored in the hash table with key originalAdapter
Returns:
the absolute path of the adapter file.
Throws:
org.eclipse.hyades.logging.parsers.LogParserException

getAdapterPathKey

public static java.lang.String getAdapterPathKey(java.util.Map table)
Get the key that is used to find the adapter configuration file name in the hash table.

Parameters:
table - the parser parameters hash table
Returns:
the hash table key corresponding to the adapter file path, null if no adapter file path found.

isWorkbenchMode

public static boolean isWorkbenchMode()
Returns:
boolean whether object is executing in an Eclipse workbench environment

getNLAdapterPath

protected static java.lang.String getNLAdapterPath(java.util.Map table,
                                                   java.lang.String configFilePath,
                                                   java.lang.reflect.Method find,
                                                   java.lang.Object bundle)
Get the adapter configuration file path based on locale and encoding.

Parameters:
table - Hash table of input parameters
configFilePath - The adapter configuration file to find.
find - The method to find the file
bundle - - plugin bundle
Returns:
the adapter configuration file path

getPath

protected static java.lang.String getPath(java.util.Map table,
                                          java.lang.reflect.Method find,
                                          java.lang.Object bundle,
                                          java.lang.String configFilePath)
Get the full path of the adapter configuration file

Parameters:
table - Hash table of input parameters
find - The method to use to find the URL
bundle - The plugin bundle
configFilePath -
Returns:
the full path of the adapter file

find

protected static java.net.URL find(java.lang.reflect.Method find,
                                   java.lang.Object bundle,
                                   java.lang.String config_file)
Find the URL of the adapter configuration file

Parameters:
find - The method to find the adapter file
bundle - - The plugin bundle
config_file - - the adapter configuration file to find
Returns:
the URL of the adapter configuration file

TPTP 4.4.0 Monitoring Tools Project
Internal API Specification