|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jpl.mipl.mdms.FileService.komodo.fileMgmt.FileTransMgr
File Management class, used to manage and register file transfer events with a database on behalf of a client. Uses the FileTypeInfo class (one per server) to manage filetypes and schedule vft references.
Constructor Summary | |
FileTransMgr(BufferedStreamIO io)
Constructor |
|
FileTransMgr(BufferedStreamIO io,
FileSystem fileSystem,
boolean debug)
Constructor |
Method Summary | |
void |
addFile()
Method to add file. |
void |
addFileType(String fileType,
String dir,
String comment,
String reserved,
String threshold,
String qaInterval,
String checksum,
String xml)
Method to create a new file type Used to create a file type. |
void |
addFileTypeToRole(String fileType,
String role)
Method to associate a file type to a defined role. |
void |
addReference(String vft,
String reference,
String link,
String comment)
Method to make a reference within the current VFT. |
void |
addRole(String role,
String capabilities)
Method to create a new role |
void |
addUser(String name,
String passwd,
String privilege,
boolean vft)
Method to add new user to the file system |
void |
addUserToRole(String name,
String role)
Method to associate a user to an existing role |
void |
addVFT(String vft,
String title,
boolean notify)
Method to add a vft |
void |
addVFTReader(String vft,
String userName)
Method to add user to an existing vft |
void |
archiveFile(String name,
String archive)
Method to add archive to an existing file |
void |
cancelReference(String vft,
String ref)
Method to schedule a file reference to be canceled |
void |
changePassword(String name,
String passwd,
String oldPasswd)
Method to change user password |
void |
commentFile(String name,
String comment)
Method to add comment to an existing file. |
void |
delFile(String name)
Method to delete a file from the device associated with the file type, and remove the files record in the DBMS. |
void |
delFileRef(String vft,
String ref)
Method to schedule the removal of a file reference. |
void |
delFileType(String fileType)
Method delete a file type |
void |
delFileTypeFromRole(String fileType,
String role)
Method to delete file type from existing role |
void |
delRef(String vft,
String reference)
Method to delete a reference from the current VFT. |
void |
delRole(String role)
Method to delete a user role |
void |
delUser(String name)
Method to delete a user |
void |
delUserFromRole(String name,
String role)
Method to delete a user from an existing role |
void |
delVFT(String vft)
Method to delete a vft |
void |
delVFTReader(String vft,
String user)
Method to delete a vft reader |
void |
dSync(String fileType,
String datetime)
Synchronize file system with database |
void |
fSync(String fileType,
String datetime)
Method to synchronize database with file system |
void |
getCapabilities()
Method to send string version of user capabilities to client. |
void |
getFile(String name,
boolean checksumRequest,
boolean registerRequest,
boolean accessByVFT,
long offset)
Method to get a file from the device associated with the file type, and ship the file to the client. |
void |
getFileFromPath(String filePath,
boolean checksumRequest)
Method to get a file from a full path specification. |
void |
getFileNames(String regexp,
char modifier)
Get file names that match regexp |
void |
getFileNames(String datetime1,
String datetime2)
Method to query list of file name for the specified time range. |
void |
getRefFileInfo(String vft,
String ref)
Method to get the necessary information to get a referenced file. |
void |
getRefFileInfoAt(String vft,
String datetime,
String ref)
Get the necessary information to get a referenced file at a point in history. |
void |
hotboot()
Method to hotboot the server |
boolean |
isAdmin()
Accessor method to return true if the user has admin role |
void |
lockCurrentFileType(char mode)
Method to prevent write access to a file type. |
void |
login(String username,
String password)
Method to check user access against DBMS entry. |
void |
makeDomainFile()
Method to make a new domain file with info stored in DB |
void |
renameFile(String oldName,
String newName)
Method to rename a file of given file type as a transaction. |
void |
setFileType(String fileType)
Method to set connection file type and sent file ID to remote client |
void |
setReference(String vft,
String reference,
String fileType,
String fileName)
Method to schedule a reference to be set. |
void |
show(String start,
String end)
Method to send all file names of given file type. |
void |
showFileTypes(String fileType)
Method to get list of file types for this server |
void |
showRefs(String vft,
String datetime)
Method to get reference information for the current vft. |
void |
showRegExp(String regexp,
char modifier)
Send a list of files filtered by the input regular expression to the client. |
void |
showRoles(String role)
Method to show existing roles |
void |
showRolesForFileType(String fileType,
String role)
Methe to show roles for the current file type |
void |
showRolesForUser(String name)
Methodt o show user roles |
void |
showServerParameters(String name)
Method to how server parameters. |
void |
showServers()
Method to show the list of servers |
void |
showUsers(String name)
Method to show user info |
void |
showUserVFTs(String userName,
String vft)
Method to list user vfts |
boolean |
showVFT(String vft,
String datetime,
boolean checkPerms)
Method to show vft info |
void |
showVFTReaders(String vft,
String userName)
Method to list vft readers |
void |
shutDown()
Method to shutdown server |
void |
startAddAndRefFile(Result profile,
boolean checksumRequest,
boolean doReceipt,
String vft,
String linkDir)
Method to determine whether the add file with reference will be allowed, link directory available, etc. |
void |
startAddFile(Result profile,
boolean checksumRequest,
boolean doReceipt)
Method to start add file transaction Notes: Pass file type string instead of TypeInfo. |
void |
startReplaceFile(Result profile,
boolean checksumRequest,
boolean doReceipt)
Method to start replace file transaction Notes: Pass file type string instead of TypeInfo. |
void |
unlockCurrentFileType(char mode)
Method to prevent write access to a file type. |
void |
updateVFT(String vft,
String comment)
Sync-up the file system links for a VFT. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FileTransMgr(BufferedStreamIO io)
io
- the buffered stream iopublic FileTransMgr(BufferedStreamIO io, FileSystem fileSystem, boolean debug)
io
- the buffered stream iodebug
- flag to enable/disable debugMethod Detail |
public void login(String username, String password) throws IOException, IllegalArgumentException, Exception
username
- the user login namepassword
- the user password (plaintext). It will be encrypted
by the server
IOException
- when connection failure
IllegalArgumentException
- when invalid connectiont args
Exception
- general operation failurepublic void getCapabilities() throws IOException
IOException
- when network I/O failurepublic boolean isAdmin()
public void setFileType(String fileType) throws IOException
fileType
- the file type to select.
IOException
- when network failurepublic void startReplaceFile(Result profile, boolean checksumRequest, boolean doReceipt) throws IOException
profile
- the information about the file to be added.checksumRequest
- flag to enable checksum requestdoReceipt
- flag to enable receipt request flag
IOException
- when network I/O failurepublic void startAddAndRefFile(Result profile, boolean checksumRequest, boolean doReceipt, String vft, String linkDir) throws IOException
profile
- the information about the file to be added.checksumRequest
- to enable checksum request flagdoReceipt
- to enable receipt request flagvft
- the vft namelinkDir
- the directory for reference.
IOException
- when network I/O failurepublic void startAddFile(Result profile, boolean checksumRequest, boolean doReceipt) throws IOException
profile
- Information about the file to be added.checksumRequest
- to enable checksum request flagdoReceipt
- to enable receipt request flag
IOException
- when network I/O failurepublic void addFile() throws IOException
IOException
- when network I/O failurepublic void showRegExp(String regexp, char modifier) throws IOException
regexp
- the regular expression. Handles * and _ meta characters only.modifier
- the command modifier, 'l' means get latest
IOException
- when network I/O failurepublic void show(String start, String end) throws IOException
start
- optional start timeend
- optional end time
IOException
- when network I/O failurepublic void getFileNames(String datetime1, String datetime2) throws IOException
datetime1
- the start datetimedatetime2
- the end datetime
IOException
- when network I/O failurepublic void getFileNames(String regexp, char modifier) throws IOException
regexp
- the regular expressionmodifier
- command modifier, 'l' means get latest
IOException
- when network I/O failurepublic void getFile(String name, boolean checksumRequest, boolean registerRequest, boolean accessByVFT, long offset) throws IOException
name
- the file namechecksumRequest
- flag for client checksum requestregisterRequest
- flag for client register requestaccessByVFT
- flag to get read access from current vft.
IOException
- when network I/O failurepublic void getFileFromPath(String filePath, boolean checksumRequest) throws IOException
filePath
- the full path to the file.checksumRequest
- flag for client checksum request
IOException
- when network I/O failurespublic void delFile(String name) throws IOException
name
- Name of file to be deleted.
IOException
- when network I/O failurepublic void commentFile(String name, String comment) throws IOException
name
- the name of file to be deleted.comment
- the comment
IOException
- when network I/O failurepublic void archiveFile(String name, String archive) throws IOException
name
- the name of file to be deleted.archive
- the archive
IOException
- when network I/O failurepublic void renameFile(String oldName, String newName) throws IOException
oldName
- the old name of filenewName
- the new name of file
IOException
- when network I/O failurepublic void lockCurrentFileType(char mode) throws IOException
mode
- 'g' for group, 'o' for owner
IOException
- when network I/O failurepublic void unlockCurrentFileType(char mode) throws IOException
mode
- 'g' for group, 'o' for owner
IOException
- when network I/O failurepublic void delRef(String vft, String reference) throws IOException
vft
- the vft namereference
- the reference name
IOException
- when network I/O failurepublic void updateVFT(String vft, String comment) throws IOException
vft
- the vft namecomment
- optional comment
IOException
- when network I/O failurepublic void delVFT(String vft) throws IOException
vft
- the virtual file type.
IOException
- when network I/O failurepublic void getRefFileInfo(String vft, String ref) throws IOException
vft
- the virtual file type containing the reference.ref
- the reference name or null
IOException
- when network I/O failurepublic void getRefFileInfoAt(String vft, String datetime, String ref) throws IOException
vft
- the virtual file type containing the reference.datetime
- the datetime valueref
- the reference name or null
IOException
- when network I/O failurepublic void addReference(String vft, String reference, String link, String comment) throws IOException
vft
- the vft namereference
- the reference to target file's file typelink
- the name of the linkcomment
- optional comment, may be null
IOException
- when network I/O failurepublic void addVFT(String vft, String title, boolean notify) throws IOException
vft
- the virutal file type containing the reference.title
- the title for vft.notify
- if true, send email on update vft.
IOException
- when network I/O failurepublic void setReference(String vft, String reference, String fileType, String fileName) throws IOException
vft
- the vft namereference
- the reference namefileType
- the file typefileName
- the file name
IOException
- when network I/O failurepublic void delFileRef(String vft, String ref) throws IOException
vft
- the vft nameref
- the reference
IOException
- whe network I/O failurepublic void cancelReference(String vft, String ref) throws IOException
vft
- the virtual file type containing the reference.ref
- the reference.
IOException
- when network I/O failurepublic boolean showVFT(String vft, String datetime, boolean checkPerms) throws IOException
vft
- the virtual file type.datetime
- the time string in DBMS format.checkPerms
- if set, don't show the vft if user has no read access.
IOException
- when network I/O failurepublic void showRefs(String vft, String datetime) throws IOException
vft
- the vft namedatetime
- the time filter
IOException
- when network I/O failurepublic void addFileTypeToRole(String fileType, String role) throws IOException
fileType
- the file typerole
- the role name
IOException
- when network I/O failurepublic void addVFTReader(String vft, String userName) throws IOException
vft
- the vft nameuserName
- the user name
IOException
- when network I/O failurepublic void showVFTReaders(String vft, String userName) throws IOException
vft
- the vft nameuserName
- the user name
IOException
- when network I/O failurepublic void addUserToRole(String name, String role) throws IOException
name
- the user namerole
- the role name
IOException
- when network I/O failurepublic void dSync(String fileType, String datetime) throws IOException
fileType
- the file typedatetime
- the cutoff date
IOException
- when network I/O failurepublic void fSync(String fileType, String datetime) throws IOException
fileType
- the file typedatetime
- the cutoff date
IOException
- when network I/O failurepublic void hotboot() throws IOException
IOException
- when network I/O failurepublic void makeDomainFile() throws IOException
IOException
- when network I/O failurepublic void addFileType(String fileType, String dir, String comment, String reserved, String threshold, String qaInterval, String checksum, String xml) throws IOException
fileType
- the file type namedir
- the physical directory namecomment
- the optional commentreserved
- the space reserved for this file typethreshold
- the threshold for the file typeqaInterval
- the QA release intervalchecksum
- the checksum flagxml
- if there is an associated xml schema
IOException
- when network I/O failurepublic void addRole(String role, String capabilities) throws IOException
role
- the new role namecapabilities
- the capabilities list
IOException
- the network I/O failurepublic void addUser(String name, String passwd, String privilege, boolean vft) throws IOException
name
- the user namepasswd
- the passwordprivilege
- the user privilegevft
- the vft flag
IOException
- the network I/O failuepublic void changePassword(String name, String passwd, String oldPasswd) throws IOException
name
- the user namepasswd
- the new passwordoldPasswd
- the old password
IOException
- when network I/O failurepublic void delRole(String role) throws IOException
role
- the role name
IOException
- when network I/O failurepublic void delFileType(String fileType) throws IOException
fileType
- the file type
IOException
- when network I/O failurepublic void delUser(String name) throws IOException
name
- the user name
IOException
- when network I/O failurepublic void delVFTReader(String vft, String user) throws IOException
vft
- the vft nameuser
- the user name
IOException
- when network I/O failurepublic void delFileTypeFromRole(String fileType, String role) throws IOException
fileType
- the file typerole
- the role name
IOException
- when network I/O failurepublic void delUserFromRole(String name, String role) throws IOException
name
- the user namerole
- the role name
IOException
- when network I/O failurepublic void showFileTypes(String fileType) throws IOException
fileType
- the file type name
IOException
- when network I/O failurepublic void showRoles(String role) throws IOException
role
- the role name
IOException
- when network I/O failurepublic void showRolesForFileType(String fileType, String role) throws IOException
fileType
- the file type namerole
- the role name
IOException
- when network I/O failurepublic void showUserVFTs(String userName, String vft) throws IOException
userName
- the user namevft
- the vft name
IOException
- when network I/O failurepublic void showRolesForUser(String name) throws IOException
name
- the user name
IOException
- when network I/O failurepublic void showUsers(String name) throws IOException
name
- the user name
IOException
- when network I/O failurepublic void showServerParameters(String name) throws IOException
name
- the server name
IOException
- when network I/O failurepublic void showServers() throws IOException
IOException
- when network I/O failurepublic void shutDown() throws IOException
IOException
- when network I/O failure
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |