jpl.mipl.mdms.FileService.komodo.registry.dbms
Class SybaseRegistry

java.lang.Object
  extended byjpl.mipl.mdms.FileService.komodo.registry.dbms.SybaseRegistry
All Implemented Interfaces:
Registry

public class SybaseRegistry
extends Object
implements Registry

DBMS Access class, used for all File Management and User access DBMS access to a database. The constructor uses the information passed to establish connections with the DBMS ... TBD Note: There are try/catch blocks inside loops (jtest), but, the loops are all for handling unexpected disconnects from the DBMS.

Version:
$Id: SybaseRegistry.java,v 1.6 2003/11/19 03:27:58 txh Exp $
Author:
T. Huang {Thomas.Huang@jpl.nasa.gov}

Constructor Summary
SybaseRegistry(String dataSource, String registry, String role, boolean debug)
          Constructor
 
Method Summary
 void addAndSetFileRef(String vftName, String reference, String fileType, String fileName, String link, String comment, RegistryHandler handler)
          Set a VFT reference.
 void addFileComplete(int fileId, byte[] checksum, RegistryHandler handler)
          Signal that an add operation has completed.
 int addFileType(String serverGroup, String type, String dir, String comment, String reserved, String threshold, String qaInterval, String checksum, String xml, RegistryHandler handler)
          Method to make a new file type
 void addFileTypeToRole(String type, String role, RegistryHandler handler)
          Method to add file type to role
 void addReference(String vftName, String reference, String link, String comment, RegistryHandler handler)
          Create a vft reference.
 void addRole(String role, String capabilities, RegistryHandler handler)
          Method to add a new access role in the database
 void addUser(String name, String passwd, String privilege, boolean addVFT, RegistryHandler handler)
          Method to add a new user to the database
 void addUserToRole(String name, String role, RegistryHandler handler)
          Add user to a role
 void addVFT(String name, String userName, String title, boolean notify, RegistryHandler handler)
          Method to create a vft.
 void addVFTReader(String userName, String vft, RegistryHandler handler)
          Method to add vft reader.
 void archiveFile(int ftId, String fileName, String archive, RegistryHandler handler)
          Method to add an archive msg to the file record.
 void cancelReference(String vft, String reference, RegistryHandler handler)
          Method to remove a file reference
 void changePassword(String name, String passwd, RegistryHandler handler)
          Change a user's password.
 void commentFile(int ftId, String fileName, String comment, RegistryHandler handler)
          Method to add a comment to the file record.
 void deleteFile(int fileId, RegistryHandler handler)
          Method to delete file from the dbms
 String delFileRef(String vft, String reference, RegistryHandler handler)
          Remove the assocation between a reference and a file.
 void delFileType(String type, RegistryHandler handler)
          Delete a file type
 void delFileTypeFromRole(String type, String role, RegistryHandler handler)
          Method to delete a file type from role
 int delRef(String vft, String reference, RegistryHandler handler)
          Method to delete a vft reference.
 void delRole(String role, RegistryHandler handler)
          Method to delete an access role
 void delUser(String name, RegistryHandler handler)
          Method to delete a user record
 void delUserFromRole(String name, String role, RegistryHandler handler)
          Method to delete a user from role
 void delVFT(String vft, RegistryHandler handler)
          Method to delete a vft.
 void delVFTReader(String user, String vft, RegistryHandler handler)
          Method to delete a vft reader from a vft
 int getFileList(int ftId, String fileglob, char modifier, RegistryHandler handler)
          Return a string containing a short description of each file in a file type.
 int getFileList(int ftId, String start, String end, RegistryHandler handler)
          Return a string containing a description of each file in a file type where the files' times are greater than or equal to start, and less then end.
 int getFileList(String fileType, RegistryHandler handler)
          Method to return a list containing a description of each file in a file type.
 int getFileServerConfig(String serverName, RegistryHandler handler)
          Get file server information.
 int getFileTypeInfoTable(RegistryHandler handler)
          Extracts all file types in the registry that are associated with the current server group.
 int getFileTypeNames(String serverName, RegistryHandler handler)
          Method to get file type names list from db
 int getRefFileInfo(String vft, String reference, RegistryHandler handler)
          Method to return a string containing a description of a referenced file.
 int getRefFileInfoAt(String vft, String date, String reference, RegistryHandler handler)
          Return a string containing a description of a referenced file.
 int getRefs(String vft, String date, RegistryHandler handler)
          Method to return a string report of vft references, with comments.
 int getUserFTCapabilities(String userName, RegistryHandler handler)
          Retrieve user's capabilities for all file types that are available.
 void getUserInfo(String userName, Authenticator auth, RegistryHandler handler)
          Check to see if a file management user exists.
 int getUserVFTCapabilities(String userName, RegistryHandler handler)
          Create a lookup table for each VFT for which a user has a capability.
 int getUserVFTCapabilities(String vft, String userName, RegistryHandler handler)
          Method to retrieve user vft capabilities
 int getVFT(String vft, String dateTime, RegistryHandler handler)
          Method to get vft info.
 int getVFTReaders(String vft, String userName, RegistryHandler handler)
          Method to retrieve VFT readers info
 boolean isFileTypeLocked(int ftId, RegistryHandler handler)
          Method to find out if a file type is already locked.
 int loadFileServerParams(String name, RegistryHandler handler)
          Load file server parameters into Configuration object
 int lockFile(String fileName, int ftId, int lockType, RegistryHandler handler)
          Method to lock a file in the file service.
 String lockFileType(int ftId, RegistryHandler handler)
          Method to update a record in the fileTypes table to lock it.
 void makeDomainFile(String servername, RegistryHandler handler)
          Make a new domain file froim information stored in the DB
 void releaseFileLock(int fileId, RegistryHandler handler)
          Method to release file lock
 void renameFile(int fileId, String newName, RegistryHandler handler)
          Method to add an archive msg to the file record.
 void replaceFile(int fileId, String contributor, String contributeServer, long filesize, byte[] checksum, String comment, RegistryHandler handler)
          Update a record in the files table with new information (size, contributor, modified date, etc.
 void resetFileLock(int fileId, RegistryHandler handler)
          Method to reset file lock
 void setReference(String vft, String reference, String fileType, String fileName, RegistryHandler handler)
          Schedule a file reference to take effect at the next vft update
 int showRoles(String role, RegistryHandler handler)
          Get access role information from db
 int showRolesForFileType(String fileType, String role, RegistryHandler handler)
          Get roles associated with a file type
 int showRolesForUser(String name, RegistryHandler handler)
          Get roles associated with a user
 int showServers(RegistryHandler handler)
          Get list of servers from db
 int showUsers(String name, RegistryHandler handler)
          Get user information from db
 int showUserVFTs(String userName, String vft, RegistryHandler handler)
          Show the vfts a user can read.
 int showVFTReaders(String vft, String userName, RegistryHandler handler)
          Method to show the file system users who can read a vft.
 int startAddFile(int ftId, String filename, String contributor, String contributeServer, long size, String comment, RegistryHandler handler)
          Insert a record into the files table to signal the start of a file add.
 int startDelVFT(String vft, RegistryHandler handler)
          Mark a vft for delete, and return a linked list of locations (links) to delete.
 int startGetFile(String filename, int fileTypeId, RegistryHandler handler)
          Get a read lock on the file.
 int startRenameTrans(int ftId, String oldName, String newName, RegistryHandler handler)
          Start a rename file transaction by, in a single DBMS transaction, lock the file for rename, and record the new file name in the file record to persist the intended new name of the file, to be used for recovery from an unexpected termination of the File management process.
 void startServer(RegistryHandler handler)
          Record server start time in database.
 int startUpdateVFT(String vft, boolean lockIt, RegistryHandler handler)
          Lock a VFT so that the VFTs references can be synched with the file system links.
 void stopServer(RegistryHandler handler)
          Record server stop time in database.
 int transferReceipt(int userId, int fileId, int ftId, char command, String checksum, RegistryHandler handler)
          Method to record a file transfer, get a receipt.
 void unlockFileType(int ftId, RegistryHandler handler)
          Update a record in the fileTypes table to lock it.
 void unlockVFT(String vft, RegistryHandler handler)
          Method to unlock an VFT record.
 void updateVFT(String vft, String userName, String comment, RegistryHandler handler)
          Method to update the VFT
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SybaseRegistry

public SybaseRegistry(String dataSource,
                      String registry,
                      String role,
                      boolean debug)
               throws NamingException,
                      IOException,
                      SAXException,
                      ParseException
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.
debug - the debug flag
Throws:
NamingException - when DS lookup fail
IOException - when registory/network I/O fail
SAXException - when parser fails
ParseException - when parsing fails
Method Detail

getFileServerConfig

public int getFileServerConfig(String serverName,
                               RegistryHandler handler)
Get file server information. Update Configuration object with server information.

Specified by:
getFileServerConfig in interface Registry
Parameters:
serverName - the server name
handler - the registry handler
Returns:
number of items in result set
See Also:
jpl.mipl.mdms.FileService.util.Configuration

loadFileServerParams

public int loadFileServerParams(String name,
                                RegistryHandler handler)
Load file server parameters into Configuration object

Specified by:
loadFileServerParams in interface Registry
Parameters:
name - parameters name space
handler - the registry handler
Returns:
the number of record found
See Also:
jpl.mipl.mdms.FileService.util.Configuration

startServer

public void startServer(RegistryHandler handler)
Record server start time in database. Assumes fsId is set.

Specified by:
startServer in interface Registry
Parameters:
handler - the error handler

stopServer

public void stopServer(RegistryHandler handler)
Record server stop time in database. Assumes fsId_ is set.

Specified by:
stopServer in interface Registry
Parameters:
handler - the error handler

getFileTypeInfoTable

public int getFileTypeInfoTable(RegistryHandler handler)
Extracts all file types in the registry that are associated with the current server group.

Specified by:
getFileTypeInfoTable in interface Registry
Parameters:
handler - The registry handler to handles the return results.
Returns:
the total number of record count.

getUserFTCapabilities

public int getUserFTCapabilities(String userName,
                                 RegistryHandler handler)
Retrieve user's capabilities for all file types that are available.

Specified by:
getUserFTCapabilities in interface Registry
Parameters:
userName - the file system user name.
handler - the handler for retrieved values.
Returns:
the total number of records retrieved.

getUserVFTCapabilities

public int getUserVFTCapabilities(String userName,
                                  RegistryHandler handler)
Create a lookup table for each VFT for which a user has a capability.

Specified by:
getUserVFTCapabilities in interface Registry
Parameters:
userName - the file system user name
handler - The registry handler reference.
Returns:
the number of records retrieved.

startAddFile

public int startAddFile(int ftId,
                        String filename,
                        String contributor,
                        String contributeServer,
                        long size,
                        String comment,
                        RegistryHandler handler)
Insert a record into the files table to signal the start of a file add. The status associated with the file wil be "adding". After successfully completing the add file operation, use releaseLock to mark the file with a successful completion. Otherwise, delete the record. To mark the file OK, use setrile status

Specified by:
startAddFile in interface Registry
Parameters:
ftId - the file type id
filename - the file name
contributor - the contributor of the file
contributeServer - the server that contributed the file
size - the size of the file
comment - any comment associated with the file
handler - the registry handler reference.
Returns:
the number of records registered.

addFileComplete

public void addFileComplete(int fileId,
                            byte[] checksum,
                            RegistryHandler handler)
Signal that an add operation has completed. Update checksum if required.

Specified by:
addFileComplete in interface Registry
Parameters:
fileId - the handle to the internal file identifier.
checksum - the optional checksum. Could be "".
handler - the error handler

startRenameTrans

public int startRenameTrans(int ftId,
                            String oldName,
                            String newName,
                            RegistryHandler handler)
Start a rename file transaction by, in a single DBMS transaction, lock the file for rename, and record the new file name in the file record to persist the intended new name of the file, to be used for recovery from an unexpected termination of the File management process. The lock associated with the file will be for "rename". After successfully completing the rename file operation, use rename file to clear the lock and update the new file name. If an error occurs, call release lock as part of the transaction rollback.

Specified by:
startRenameTrans in interface Registry
Parameters:
ftId - the internal identifier of the file type.
oldName - Name of the file to rename.
newName - Intended new name of the file.
handler - the data and error handler
Returns:
the record count

replaceFile

public void replaceFile(int fileId,
                        String contributor,
                        String contributeServer,
                        long filesize,
                        byte[] checksum,
                        String comment,
                        RegistryHandler handler)
Update a record in the files table with new information (size, contributor, modified date, etc.

Specified by:
replaceFile in interface Registry
Parameters:
fileId - internal file identifier
contributor - the contributor of the file
contributeServer - the server that contributed the file
filesize - the size of the file
checksum - the message digest values, may be null
comment - any message associated with the file, may be null
handler - the erro handler

startGetFile

public int startGetFile(String filename,
                        int fileTypeId,
                        RegistryHandler handler)
Get a read lock on the file.

Specified by:
startGetFile in interface Registry
Parameters:
filename - The file name
fileTypeId - the file type id
handler - the registry handler to handle the return results.
Returns:
the number of records returned.

getUserInfo

public void getUserInfo(String userName,
                        Authenticator auth,
                        RegistryHandler handler)
Check to see if a file management user exists. The authenticator is an abstraction for the authentication model to be used to verify the user. If the user/authenticator combination is valid, then return the highest level of the user's permission.

Specified by:
getUserInfo in interface Registry
Parameters:
userName - the file system user name
auth - The authenticator object reference
handler - The registry handler to handle return result set

lockFile

public int lockFile(String fileName,
                    int ftId,
                    int lockType,
                    RegistryHandler handler)
Method to lock a file in the file service.

Lock types:

Specified by:
lockFile in interface Registry
Parameters:
fileName - Name of the file to lock.
ftId - the file type ID as internal record reference
lockType - Type of lock.
handler - the registry handler
Returns:
the total number of records locked. It should be at most one.

releaseFileLock

public void releaseFileLock(int fileId,
                            RegistryHandler handler)
Method to release file lock

Specified by:
releaseFileLock in interface Registry
Parameters:
fileId - DBMS internal file identifier.
handler - the registry handler.

resetFileLock

public void resetFileLock(int fileId,
                          RegistryHandler handler)
Method to reset file lock

Specified by:
resetFileLock in interface Registry
Parameters:
fileId - DBMS internal file identifier
handler - the registry handler

commentFile

public void commentFile(int ftId,
                        String fileName,
                        String comment,
                        RegistryHandler handler)
Method to add a comment to the file record.

Specified by:
commentFile in interface Registry
Parameters:
ftId - DBMS internal file type identifier
fileName - the name of the file
comment - the comment to be inserted
handler - the error handler

archiveFile

public void archiveFile(int ftId,
                        String fileName,
                        String archive,
                        RegistryHandler handler)
Method to add an archive msg to the file record.

Specified by:
archiveFile in interface Registry
Parameters:
ftId - DBMS internal file type identifier.
fileName - the name of the file
archive - note.
handler - the error handler

renameFile

public void renameFile(int fileId,
                       String newName,
                       RegistryHandler handler)
Method to add an archive msg to the file record.

Specified by:
renameFile in interface Registry
Parameters:
fileId - DBMS internal file identifier.
newName - the new file name
handler - the error handler

deleteFile

public void deleteFile(int fileId,
                       RegistryHandler handler)
Method to delete file from the dbms

Specified by:
deleteFile in interface Registry
Parameters:
fileId - DBMS internal file identifier.
handler - the error handler

getFileList

public int getFileList(int ftId,
                       String start,
                       String end,
                       RegistryHandler handler)
Return a string containing a description of each file in a file type where the files' times are greater than or equal to start, and less then end.

Specified by:
getFileList in interface Registry
Parameters:
ftId - the file type internal identifier
start - time for list
end - time for list.
handler - the registry handler
Returns:
the total number of records retrieved.

getFileList

public int getFileList(int ftId,
                       String fileglob,
                       char modifier,
                       RegistryHandler handler)
Return a string containing a short description of each file in a file type.

Specified by:
getFileList in interface Registry
Parameters:
ftId - the file type internal identifier
fileglob - the file globbing expression
modifier - if 'l', means get latest matching fileglob
handler - a registry handler that handles each result set record
Returns:
the number of records found.

lockFileType

public String lockFileType(int ftId,
                           RegistryHandler handler)
Method to update a record in the fileTypes table to lock it.

Specified by:
lockFileType in interface Registry
Parameters:
ftId - the file type internal identifier
handler - the error handler
Returns:
file type's directory location

isFileTypeLocked

public boolean isFileTypeLocked(int ftId,
                                RegistryHandler handler)
Method to find out if a file type is already locked.

Specified by:
isFileTypeLocked in interface Registry
Parameters:
ftId - the file type internal identifier
handler - the error handler
Returns:
true if lock, false if not locked

unlockFileType

public void unlockFileType(int ftId,
                           RegistryHandler handler)
Update a record in the fileTypes table to lock it.

Specified by:
unlockFileType in interface Registry
Parameters:
ftId - the file type internal identifier
handler - the error handler

transferReceipt

public int transferReceipt(int userId,
                           int fileId,
                           int ftId,
                           char command,
                           String checksum,
                           RegistryHandler handler)
Method to record a file transfer, get a receipt.

Specified by:
transferReceipt in interface Registry
Parameters:
userId - the internal identification of a user.
fileId - the internal identification of a file.
ftId - the internal identification of a file type.
command - the command, ('g', 'a', 'r').
checksum - the checksum value
handler - the error handler
Returns:
receipt ID reference to a DB record

getRefFileInfo

public int getRefFileInfo(String vft,
                          String reference,
                          RegistryHandler handler)
Method to return a string containing a description of a referenced file. Note: This function returns reference information whether or no the reference is set to a file.

Specified by:
getRefFileInfo in interface Registry
Parameters:
vft - the virtual file type
reference - the reference name
handler - the result and error handler
Returns:
number of records retrieved

getRefFileInfoAt

public int getRefFileInfoAt(String vft,
                            String date,
                            String reference,
                            RegistryHandler handler)
Return a string containing a description of a referenced file. Note: This function returns reference information whether or not the reference is set to a file. Also includes a list of references that were created after the specified date. Use this information to remove references that did not exist at the time requested for a get VFT.

Specified by:
getRefFileInfoAt in interface Registry
Parameters:
vft - the virtual file type
date - the date string
reference - (optional) reference name
handler - the data and error handler
Returns:
number of records retrieved

addVFT

public void addVFT(String name,
                   String userName,
                   String title,
                   boolean notify,
                   RegistryHandler handler)
Method to create a vft.

Specified by:
addVFT in interface Registry
Parameters:
name - the vft name
userName - the user name
title - the vft title
notify - if true, user will be notified when updates available
handler - the data and error handler

addReference

public void addReference(String vftName,
                         String reference,
                         String link,
                         String comment,
                         RegistryHandler handler)
Create a vft reference.

Specified by:
addReference in interface Registry
Parameters:
vftName - the vft name
reference - the reference name
link - the link name
comment - the optinal comment for the reference
handler - the data and error handler

addAndSetFileRef

public void addAndSetFileRef(String vftName,
                             String reference,
                             String fileType,
                             String fileName,
                             String link,
                             String comment,
                             RegistryHandler handler)
Set a VFT reference. If one does not already exist, create one and set it.

Specified by:
addAndSetFileRef in interface Registry
Parameters:
vftName - the vft name
reference - the reference name
fileType - the file type
fileName - the file name
link - the link value
comment - optinal comment
handler - the data and error handler

delFileRef

public String delFileRef(String vft,
                         String reference,
                         RegistryHandler handler)
Remove the assocation between a reference and a file.

Specified by:
delFileRef in interface Registry
Parameters:
vft - the vft name
reference - the reference name
handler - the data and error handler
Returns:
reference location, so s/w can delete old link.

updateVFT

public void updateVFT(String vft,
                      String userName,
                      String comment,
                      RegistryHandler handler)
Method to update the VFT

Specified by:
updateVFT in interface Registry
Parameters:
vft - the vft name
userName - the Komodo user making the update
comment - the optional comment to associate with the update.
handler - the data and error handler

startUpdateVFT

public int startUpdateVFT(String vft,
                          boolean lockIt,
                          RegistryHandler handler)
Lock a VFT so that the VFTs references can be synched with the file system links. Returns a list of reference information required to delete old links, and create new ones.

Specified by:
startUpdateVFT in interface Registry
Parameters:
vft - the VFT name.
lockIt - if false is passed, then return information w/o locking the VFT.
handler - the registry handler
Returns:
the number of records retrieved

unlockVFT

public void unlockVFT(String vft,
                      RegistryHandler handler)
Method to unlock an VFT record. This method is usually being called during a undate VFT failure.

Specified by:
unlockVFT in interface Registry
Parameters:
vft - The VFT name
handler - the error handler

getVFT

public int getVFT(String vft,
                  String dateTime,
                  RegistryHandler handler)
Method to get vft info.

Specified by:
getVFT in interface Registry
Parameters:
vft - the vft name
dateTime - the optional date. If not specified, use current time.
handler - the data and error handler
Returns:
number of record retrieved

getVFTReaders

public int getVFTReaders(String vft,
                         String userName,
                         RegistryHandler handler)
Method to retrieve VFT readers info

Specified by:
getVFTReaders in interface Registry
Parameters:
vft - the vft name
userName - the user name
handler - the data and error handler
Returns:
number of record retrieved

getUserVFTCapabilities

public int getUserVFTCapabilities(String vft,
                                  String userName,
                                  RegistryHandler handler)
Method to retrieve user vft capabilities

Specified by:
getUserVFTCapabilities in interface Registry
Parameters:
vft - the vft name
userName - the user name
handler - the registry handler
Returns:
the user vft capability value (GET) if record exist

getRefs

public int getRefs(String vft,
                   String date,
                   RegistryHandler handler)
Method to return a string report of vft references, with comments.

Specified by:
getRefs in interface Registry
Parameters:
vft - the vft name
date - optional reference date
handler - the data and error handler
Returns:
number of records retrieved

setReference

public void setReference(String vft,
                         String reference,
                         String fileType,
                         String fileName,
                         RegistryHandler handler)
Schedule a file reference to take effect at the next vft update

Specified by:
setReference in interface Registry
Parameters:
vft - the vft name
reference - the reference name
fileType - the file type
fileName - the file name
handler - the registry handler object

startDelVFT

public int startDelVFT(String vft,
                       RegistryHandler handler)
Mark a vft for delete, and return a linked list of locations (links) to delete.

Specified by:
startDelVFT in interface Registry
Parameters:
vft - the vft name
handler - the data and error handler
Returns:
number of records retrieved

cancelReference

public void cancelReference(String vft,
                            String reference,
                            RegistryHandler handler)
Method to remove a file reference

Specified by:
cancelReference in interface Registry
Parameters:
vft - the vft name
reference - the reference name
handler - the error handler

delVFT

public void delVFT(String vft,
                   RegistryHandler handler)
Method to delete a vft.

Specified by:
delVFT in interface Registry
Parameters:
vft - the vft name
handler - the error handler

delFileType

public void delFileType(String type,
                        RegistryHandler handler)
Delete a file type

Specified by:
delFileType in interface Registry
Parameters:
type - the file type name
handler - the error handler

delRef

public int delRef(String vft,
                  String reference,
                  RegistryHandler handler)
Method to delete a vft reference.

Specified by:
delRef in interface Registry
Parameters:
vft - the vft name
reference - the reference name
handler - the data and error handler
Returns:
number of records retrieved

addFileTypeToRole

public void addFileTypeToRole(String type,
                              String role,
                              RegistryHandler handler)
Method to add file type to role

Specified by:
addFileTypeToRole in interface Registry
Parameters:
type - the file type
role - the role
handler - the error handler

addVFTReader

public void addVFTReader(String userName,
                         String vft,
                         RegistryHandler handler)
Method to add vft reader.

Specified by:
addVFTReader in interface Registry
Parameters:
userName - the user to be added to a list of vft readers.
vft - the vft.
handler - the error handler

addUserToRole

public void addUserToRole(String name,
                          String role,
                          RegistryHandler handler)
Add user to a role

Specified by:
addUserToRole in interface Registry
Parameters:
name - the user's name
role - the role
handler - the error handler

addFileType

public int addFileType(String serverGroup,
                       String type,
                       String dir,
                       String comment,
                       String reserved,
                       String threshold,
                       String qaInterval,
                       String checksum,
                       String xml,
                       RegistryHandler handler)
Method to make a new file type

Specified by:
addFileType in interface Registry
Parameters:
serverGroup - the server group name.
type - file type name
dir - directory associate with file type
comment - file type comment
reserved - disk space reserved to the file type
threshold - the threshold value before sigevent is sent
qaInterval - the QA release interval
checksum - t or f
xml - OPTIONAL xml schema
handler - the registry handler
Returns:
the total number of records retrived.

makeDomainFile

public void makeDomainFile(String servername,
                           RegistryHandler handler)
Make a new domain file froim information stored in the DB

Specified by:
makeDomainFile in interface Registry
Parameters:
servername - the name of the server
handler - the handler for the domain file results

addRole

public void addRole(String role,
                    String capabilities,
                    RegistryHandler handler)
Method to add a new access role in the database

Specified by:
addRole in interface Registry
Parameters:
role - the role name
capabilities - the capabilities for the role (string rep of an int)
handler - the error handler

addUser

public void addUser(String name,
                    String passwd,
                    String privilege,
                    boolean addVFT,
                    RegistryHandler handler)
Method to add a new user to the database

Specified by:
addUser in interface Registry
Parameters:
name - the user name
passwd - the user passwd
privilege - user privileges (r)ead, (w)rite or (a)dmin
addVFT - to allow user to create a VFT (true of false).
handler - the data and error handle

changePassword

public void changePassword(String name,
                           String passwd,
                           RegistryHandler handler)
Change a user's password.

Specified by:
changePassword in interface Registry
Parameters:
name - the user name
passwd - the user passwd
handler - the error handler

delRole

public void delRole(String role,
                    RegistryHandler handler)
Method to delete an access role

Specified by:
delRole in interface Registry
Parameters:
role - the access role name
handler - the error handler

delUser

public void delUser(String name,
                    RegistryHandler handler)
Method to delete a user record

Specified by:
delUser in interface Registry
Parameters:
name - the user name
handler - the error handler

delFileTypeFromRole

public void delFileTypeFromRole(String type,
                                String role,
                                RegistryHandler handler)
Method to delete a file type from role

Specified by:
delFileTypeFromRole in interface Registry
Parameters:
type - the file type
role - the role name
handler - the error handler

delVFTReader

public void delVFTReader(String user,
                         String vft,
                         RegistryHandler handler)
Method to delete a vft reader from a vft

Specified by:
delVFTReader in interface Registry
Parameters:
user - the user name
vft - the vft name
handler - the error handler

delUserFromRole

public void delUserFromRole(String name,
                            String role,
                            RegistryHandler handler)
Method to delete a user from role

Specified by:
delUserFromRole in interface Registry
Parameters:
name - the user name
role - the role name
handler - the error handler

showRoles

public int showRoles(String role,
                     RegistryHandler handler)
Get access role information from db

Specified by:
showRoles in interface Registry
Parameters:
role - the role name
handler - the registry handler
Returns:
the number of records retrieved

showRolesForFileType

public int showRolesForFileType(String fileType,
                                String role,
                                RegistryHandler handler)
Get roles associated with a file type

Specified by:
showRolesForFileType in interface Registry
Parameters:
fileType - the file type
role - the role name
handler - the result handler
Returns:
the number of records retrieved

showVFTReaders

public int showVFTReaders(String vft,
                          String userName,
                          RegistryHandler handler)
Method to show the file system users who can read a vft.

Specified by:
showVFTReaders in interface Registry
Parameters:
vft - the vft name
userName - the user name
handler - the registry handler
Returns:
ths number of record retrieved

showUserVFTs

public int showUserVFTs(String userName,
                        String vft,
                        RegistryHandler handler)
Show the vfts a user can read. If userName is null, show vfts all users can read.

Specified by:
showUserVFTs in interface Registry
Parameters:
userName - the user name
vft - the vft name
handler - the registry handler
Returns:
the number of records retrieved

showRolesForUser

public int showRolesForUser(String name,
                            RegistryHandler handler)
Get roles associated with a user

Specified by:
showRolesForUser in interface Registry
Parameters:
name - the user name
handler - the error handler
Returns:
the list of user roles

showUsers

public int showUsers(String name,
                     RegistryHandler handler)
Get user information from db

Specified by:
showUsers in interface Registry
Parameters:
name - the user name
handler - the registry handler
Returns:
the number of records retrieved

showServers

public int showServers(RegistryHandler handler)
Get list of servers from db

Specified by:
showServers in interface Registry
Parameters:
handler - the erro rhandler
Returns:
the number of records retrieved

getFileList

public int getFileList(String fileType,
                       RegistryHandler handler)
Method to return a list containing a description of each file in a file type.

Specified by:
getFileList in interface Registry
Parameters:
fileType - file type name
handler - the registry handler
Returns:
the number of record retrieved

getFileTypeNames

public int getFileTypeNames(String serverName,
                            RegistryHandler handler)
Method to get file type names list from db

Specified by:
getFileTypeNames in interface Registry
Parameters:
serverName - the name of the file server.
handler - the registry handler
Returns:
the number of record retrieved.