jpl.mipl.mdms.FileService.komodo.transaction
Class FileTypeManager

java.lang.Object
  extended byjpl.mipl.mdms.FileService.komodo.transaction.FileTypeManager

public class FileTypeManager
extends Object

Class to manage file types handled by the server

Version:
$Id: FileTypeManager.java,v 1.4 2003/10/06 22:35:20 rap Exp $
Author:
Jeff Jacobson

Constructor Summary
FileTypeManager()
           
 
Method Summary
static FileTypeInfo get(String fileType)
          Access method to retrieve a file type information class reference.
static Enumeration getFileTypeInfo()
          Accessor method to obtain the iterator to the list of file type objects
static String getFileTypeInfo(String fileType)
          Method to return a file type info in output string format
static Registry getRegistry()
          Accessor method to get reference to the dbms access object
static String getServerName()
          Accessor method to return the server name
static void initialize(String dataSource, String registry, String role, String serverName, boolean debug)
          Constructor
static void put(String fileType, FileTypeInfo info)
          Method to add a file type to hashtable
static void reloadFileTypes(FileTypeInfoHandler handler)
          Method to reload file type info from the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileTypeManager

public FileTypeManager()
Method Detail

initialize

public static void initialize(String dataSource,
                              String registry,
                              String role,
                              String serverName,
                              boolean debug)
                       throws Exception
Constructor

Parameters:
dataSource - data source for sig events, e.g., FileMgrDB.
registry - registry containing data source bindings.
role - database role, allowing client to register events to database.
serverName - the name of our server.
Throws:
Exception - the general inital failure

getRegistry

public static final Registry getRegistry()
Accessor method to get reference to the dbms access object

Returns:
the database access object reference

get

public static final FileTypeInfo get(String fileType)
Access method to retrieve a file type information class reference.

Parameters:
fileType - the file type name
Returns:
the file type info object reference

put

public static final void put(String fileType,
                             FileTypeInfo info)
Method to add a file type to hashtable

Parameters:
fileType - the file type name
info - the associated FileTypeInfo

getFileTypeInfo

public static Enumeration getFileTypeInfo()
Accessor method to obtain the iterator to the list of file type objects

Returns:
an enumeration, for iterating though fileTypeInfo.

getFileTypeInfo

public static String getFileTypeInfo(String fileType)
Method to return a file type info in output string format

Parameters:
fileType - the file name
Returns:
a string with file type parameters

getServerName

public static String getServerName()
Accessor method to return the server name

Returns:
the server name

reloadFileTypes

public static void reloadFileTypes(FileTypeInfoHandler handler)
Method to reload file type info from the server. This method is being called during server hotboot.

Throws:
SQLException - when failed to load file type info from the database.