|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjpl.mipl.mdms.FileService.komodo.api.Client
public class Client
A simplified wrapper class for all general user operations defined in the APIs.
| Field Summary | |
|---|---|
static String |
OPTION_ABORT
Abort option |
static String |
OPTION_AUTODELETE
Auto delete option |
static String |
OPTION_COMPUTECHECKSUM
Compute checksum option |
static String |
OPTION_DIFF
Diff option |
static String |
OPTION_RECEIPT
Receipt option |
static String |
OPTION_REPLACEFILE
Replace file option |
static String |
OPTION_REPLICATE
Replicate option |
static String |
OPTION_RESTART
Restart option |
static String |
OPTION_RESUME
Resume option |
static String |
OPTION_SAFEREAD
Safe read option |
static String |
OPTION_VERSIONFILE
Version file option |
| Constructor Summary | |
|---|---|
Client(String domainFile,
String trustStore)
Constructor to initialize to the komodo server connection properties. |
|
Client(URL domainFile)
Another constructor to initialize to the komodo server connection properties. |
|
Client(URL domainFile,
String trustStore)
Constructor to initialize to the komodo server connection properties. |
|
| Method Summary | |
|---|---|
int |
add(String file)
Method to add a single file to the server. |
int |
add(String[] files)
Method to add a list of files to the server. |
int |
add(String[] files,
String comment)
Method to add a list of files to the server with an associated comment |
int |
add(String file,
String comment)
Method to add a single file to the server with comment. |
int |
addReference(String vftName,
String refName,
String linkName)
Create a reference in a VFT. |
int |
addReference(String vftName,
String refName,
String linkName,
String comment)
Create a reference in the current vft with comment. |
int |
addVFT(String name,
String comment)
Command to add a virtual file type. |
void |
changeDir(String dir)
Change the directory used by the client. |
int |
changePassword(String oldPassword,
String newPassword)
Method to change user password for a server group. |
void |
changeType(String fileType)
Deprecated. |
void |
clearResults()
Method to clear previous results from queue |
int |
comment(String fileName,
String comment)
Method to add a comment to a file |
int |
delete(String fileExpr)
Deletes a file from a file type. |
int |
delReference(String vftName,
String refName)
Delete the file system reference, and all history. |
int |
delVFT(String name)
Delete a virtual file type. |
int |
get(String fileExpr)
Method to get files from a server filtered by a file expression. |
int |
get(String[] files)
Method to get a list of files from the server. |
int |
get(String file,
OutputStream out)
Method to get a single file from the server and return contents on the outputstream object. |
int |
getAfter(Date date)
Method to get a list of files from the server after a given date. |
int |
getAfter(Date date,
String fileExpr)
Method to get a list of files from the server after a given date filtered by a file name expression. |
int |
getBefore(Date before)
Method to get a list of files from the server before a given date. |
int |
getBefore(Date before,
String fileExpr)
Method to get a list of files from the server before a given date filtered by a file name expression. |
int |
getBetween(Date begin,
Date end)
Method to get a list of files from the server between two given dates. |
int |
getBetween(Date begin,
Date end,
String fileExpr)
Method to get a list of files from the server between two given dates filtered by a file name expression. |
String |
getDefaultGroup()
Get the default server group. |
String |
getDir()
Method to return the client's current directory. |
LinkedList |
getFileTypeList(String groupName)
Get a sorted list of file types in a server group |
LinkedList |
getGroupList()
Get a sorted list of server groups in the domain. |
int |
getLatest(String fileExpr)
Method to get the latest file added to the fileType. |
Result |
getResult()
Get a result object |
Result |
getResult(int timeDelay)
Get a result object after time delay |
Vector |
getResultCodes()
Method to retrieved error codes from operation results |
Vector |
getResultMsgs()
Method to retrieved result messages from operation results |
Vector |
getResultNames()
Method to retrieved result filenames from operation results |
Vector |
getResults()
Method to retrieved queued results |
int |
getTransactionCount()
Get current transaction count for the session |
String |
getType()
Returns currently connected file type name with server group, returns null if not connected to a file type. |
boolean |
isGroupDefined(String groupName)
Returns true if servergroup passed in as parameter is defined |
boolean |
isLoggedOn()
Utiity method to check if currently logged on. |
boolean |
isSet(String command)
Method to return session settings. |
int |
lockType(String lockMode)
Method to lock filetype, with optional mode parameter. |
void |
login(String username,
String password)
Method to establish connection to the set login information for FEI server, but not connect to a file type. |
void |
login(String username,
String password,
String fileType)
Deprecated. Please use the login(username, password, groupName, typeName) method. This method does not respect server group namespaces in FEI! |
void |
login(String username,
String password,
String groupName,
String typeName)
Method to establish connection to the komodo server on the specified file type. |
void |
logout()
Method to disconnect from the server. |
void |
logout(String group,
String filetype)
|
void |
logoutImmediate()
Method to disconnect from the server immediately |
int |
register(String[] files,
boolean replace,
boolean force,
String comment)
Method to register a list of files with an associated comment |
int |
rename(String oldName,
String newName)
Method to rename a file in a file type. |
int |
replace(String file)
Method to replace a single file on the server |
int |
replace(String[] files)
Method to replace a list of files on the server |
int |
replace(String[] files,
String comment)
Method to replace a list of files with an associated comment |
int |
replace(String file,
String comment)
Method to replace a single file on the server with comment |
void |
set(String command,
boolean value)
Method to handle change session settings (set command). |
void |
setDefaultGroup(String groupName)
Set the default server group. |
void |
setDomainFile(URL domainFile)
Method to set the domain file reference. |
int |
setReference(String vftName,
String refName,
String fileType,
String fileName)
Set a reference in a virtual file type. |
void |
setReplicationRoot(String rootPath)
Method to set the replication root directory location. |
void |
setTrustStore(String trustStore)
Method to set the SSL trust keystore location. |
void |
setType(String fileType)
Deprecated. Please use the setType(String groupName, String typeName) method. This method does not respace server group namespaces! |
void |
setType(String groupName,
String typeName)
Connects to the file type, closes an old connection if it already exists |
void |
setVerbose(boolean verbose)
Method to enable/disable verbose to output file metadata. |
void |
setVeryVerbose(boolean veryVerbose)
Method to enable/disable very verbose to output detailed file metadata. |
int |
show()
Method to query the komodo server for a list of files on the connected file type. |
int |
show(String regex)
Method to query the komodo server for a list of files on the specified file name filtering regular expression. |
int |
showAfter(Date after)
Method to query the komodo server for a list of files added after a date. |
int |
showAfter(Date after,
String regex)
Method to query the komodo server for a list of files on the specified file name filtering regular expression added after a date. |
int |
showBefore(Date before)
Method to query the komodo server for a list of files added before a date. |
int |
showBefore(Date before,
String regex)
Method to query the komodo server for a list of files on the specified file name filtering regular expression added before a date. |
int |
showBetween(Date begin,
Date end)
Method to query the komodo server for a list of files added between two dates. |
int |
showBetween(Date begin,
Date end,
String regex)
Method to query the komodo server for a list of files on the specified file name filtering regular expression added between two dates. |
Vector |
showNoResults(String regex)
Show files in current file type, returns file names in Vector |
Vector |
showResults(String regex)
Show files in current file type, returns Results objects in Vector |
Vector |
showTypes()
Method to show the file types |
void |
showVFT(String vftName)
Show current vft list. |
int |
stopSubscribe()
Dispatches subscription termination request to filetype. |
int |
subscribe(String operation,
boolean commit)
Dispatches subscription request to filetype. |
int |
unlockType(String lockMode)
Method to unlock filetype, with optional mode parameter. |
int |
unregister(String fileExpr)
Unregisters a file from a file type. |
int |
updateVFT(String vftName)
Method to update an existing virtual file type |
int |
updateVFT(String vftName,
String comment)
Method to update an existing virtual file type with comment. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String OPTION_ABORT
public static final String OPTION_SAFEREAD
public static final String OPTION_COMPUTECHECKSUM
public static final String OPTION_AUTODELETE
public static final String OPTION_RECEIPT
public static final String OPTION_REPLACEFILE
public static final String OPTION_VERSIONFILE
public static final String OPTION_RESTART
public static final String OPTION_RESUME
public static final String OPTION_REPLICATE
public static final String OPTION_DIFF
| Constructor Detail |
|---|
public Client(String domainFile,
String trustStore)
throws SessionException
domainFile - the komodo domain filetrustStore - the SSL keystore location
SessionException - when connection fails
public Client(URL domainFile,
String trustStore)
throws SessionException
domainFile - URL location of komodo domain filetrustStore - String location of SSL keystore
SessionException - when connection fails
public Client(URL domainFile)
throws SessionException
domainFile - URL location of komodo domain file
SessionException - when connection fails| Method Detail |
|---|
public void setDomainFile(URL domainFile)
domainFile - the domain filepublic void setTrustStore(String trustStore)
trustStore - the keystore location.
public void setReplicationRoot(String rootPath)
throws SessionException
rootPath - the root location.
SessionExceptionpublic void setVerbose(boolean verbose)
verbose - the verbose flagpublic void setVeryVerbose(boolean veryVerbose)
veryVerbose - the very verbose flag
public void login(String username,
String password,
String fileType)
throws SessionException
username - the user namepassword - the passwordfileType - the target file type
SessionException - when connection failed.
public void login(String username,
String password,
String groupName,
String typeName)
throws SessionException
username - the user namepassword - the passwordgroupName - the server group for chosen file typetypeName - the target file type
SessionException - when connection failed.
public void login(String username,
String password)
throws SessionException
username - the user namepassword - the password
SessionException - when session object allocation failure.public boolean isLoggedOn()
public void logout()
throws SessionException
SessionException - when disconnect failed
public void logout(String group,
String filetype)
throws SessionException
SessionException
public void logoutImmediate()
throws SessionException
SessionException - when disconnect failedpublic String getDefaultGroup()
public void setDefaultGroup(String groupName)
throws SessionException
groupName - the server group name
SessionException - when groupName not defined in domainpublic LinkedList getGroupList()
public boolean isGroupDefined(String groupName)
servergroup - Name of server group to query
public LinkedList getFileTypeList(String groupName)
throws SessionException
groupName - the name of the server group
SessionException - when operation fails
public int show()
throws SessionException
SessionException - when operation failed
public int show(String regex)
throws SessionException
regex - the file filter regular expression
SessionException - when operation failed.
public Vector showNoResults(String regex)
throws SessionException
regex - string regex to query file names
SessionException - when show operation fails or filetype is null
public Vector showResults(String regex)
throws SessionException
regex - string regex to query file names
SessionException - when show operation fails or filetype is null
public int showBefore(Date before)
throws SessionException
before - the before date
SessionException - when operation fails.
public int showBefore(Date before,
String regex)
throws SessionException
before - the before dateregex - the file filter regular expression
SessionException - when operation fails.
public int showAfter(Date after)
throws SessionException
after - the after date
SessionException - when operation fails.
public int showAfter(Date after,
String regex)
throws SessionException
after - the after dateregex - the file filter regular expression
SessionException - when operation fails.
public int showBetween(Date begin,
Date end)
throws SessionException
begin - the begin dateend - the end date
SessionException - when operation fails.
public int showBetween(Date begin,
Date end,
String regex)
throws SessionException
begin - the begin dateend - the end dateregex - the file filter regular expression
SessionException - when operation fails.
public int comment(String fileName,
String comment)
throws SessionException
fileName - the name of the filecomment - the comment text
SessionException - when operation fails.
public Vector showTypes()
throws SessionException
SessionException - when operation fails
public void changeType(String fileType)
throws SessionException
fileType - the file type to be connected
SessionException - when connection session failspublic String getType()
public void setType(String fileType)
throws SessionException
fileType - file type to connect to
SessionException - when file type connection fails
public void setType(String groupName,
String typeName)
throws SessionException
groupName - the server group for the chosen file typetypeName - file type to connect to
SessionException - when file type connection fails
public int add(String[] files)
throws SessionException
files - the file list array
SessionException - when operation fails.
public int add(String file)
throws SessionException
file - the file name
SessionException - when operation fails
public int add(String file,
String comment)
throws SessionException
file - the file namecomment - The comment for the file
SessionException - when operation fails
public int add(String[] files,
String comment)
throws SessionException
files - the file namescomment - the comment for the files
SessionException - when operation fails.
public int replace(String[] files)
throws SessionException
files - the file array list
SessionException - when operation fails
public int replace(String file)
throws SessionException
file - the file name
SessionException - when operation fails
public int replace(String file,
String comment)
throws SessionException
file - the file namecomment - The comment for the file
SessionException - when operation fails
public int replace(String[] files,
String comment)
throws SessionException
files - the file name array listcomment - the associated comment
SessionException - when operation fails
public int register(String[] files,
boolean replace,
boolean force,
String comment)
throws SessionException
files - the file name array listreplace - flag indicating that file metadata should be re-registeredforce - flag indicating that all file metadata should be re-registered,
including locationcomment - the associated comment
SessionException - when operation fails
public int unregister(String fileExpr)
throws SessionException
fileExpr - name expression to unregister in file type
SessionException - when general operation failure
public int rename(String oldName,
String newName)
throws SessionException
oldName - the old name of the filenewName - the new name of the file
SessionException - when operation fails
public int get(String fileExpr)
throws SessionException
fileExpr - the file expression to filter (i.e. *)
SessionException - when operation fails.
public int get(String file,
OutputStream out)
throws SessionException
file - the file nameout - the outputstream object, not closed on return
SessionException - when operation fails.
public int get(String[] files)
throws SessionException
files - the file name array list
SessionException - when operation fails.
public int getAfter(Date date)
throws SessionException
date - Date (and optional time) to get files after.
SessionException - when operation fails
public int getAfter(Date date,
String fileExpr)
throws SessionException
date - Date (and optional time) to get files after.String - fileExpr file expression to filter results
SessionException - when operation fails.
public int getBetween(Date begin,
Date end)
throws SessionException
begin - Beginning dateend - Ending date
SessionException - when operation fails
public int getBetween(Date begin,
Date end,
String fileExpr)
throws SessionException
begin - Beginning dateend - Ending datefileExpr - file Expression to filter results
SessionException - when operation fails.
public int getBefore(Date before)
throws SessionException
before - Files to get BEFORE this date.
SessionException - when operation fails.
public int getBefore(Date before,
String fileExpr)
throws SessionException
before - Files to get BEFORE this date.fileExpr - file name expression for filtering
SessionException - when operation fails.
public int getLatest(String fileExpr)
throws SessionException
fileExpr - The regular expression file selector
SessionException - when operation fail.
public int delete(String fileExpr)
throws SessionException
fileExpr - name expression to delete in file type
SessionException - when general operation failure
public int addVFT(String name,
String comment)
throws SessionException
name - the VFT namecomment - the associated comment
SessionException - when general operation failure
public int delVFT(String name)
throws SessionException
name - the VFT name to be removed
SessionException - when general operation failure
public int setReference(String vftName,
String refName,
String fileType,
String fileName)
throws SessionException
vftName - The VFT in which the reference belongsrefName - The name of the referencefileType - The file type name in which filename belongsfileName - The name of the file
SessionException - when general operation failure
public int addReference(String vftName,
String refName,
String linkName)
throws SessionException
vftName - the VFT namerefName - the reference namelinkName - the server-side link
SessionException - when general operation failure
public int addReference(String vftName,
String refName,
String linkName,
String comment)
throws SessionException
vftName - the VFT namerefName - the reference namelinkName - the server-side linkcomment - the associated comment
SessionException - general operation failure
public int delReference(String vftName,
String refName)
throws SessionException
vftName - the name of the virtual file typerefName - the name of the reference in VFT server
SessionException - when general operation failure
public int updateVFT(String vftName)
throws SessionException
vftName - the VFT name
SessionException - when operation fails
public int updateVFT(String vftName,
String comment)
throws SessionException
vftName - the VFT namecomment - the associated comment
SessionException - when operation fails
public void showVFT(String vftName)
throws SessionException
vftName - the VFT name
SessionException - when network or operation failures
public int getTransactionCount()
throws SessionException
SessionException - when operation fails
public Result getResult()
throws SessionException
SessionException - when operation fails
public Result getResult(int timeDelay)
throws SessionException
timeDelay - the number of milliseconds to wait to get result
SessionException - when operation fails
public Vector getResults()
throws SessionException
SessionException - when operation fail
public void clearResults()
throws SessionException
SessionException - when operation fails
public Vector getResultCodes()
throws SessionException
SessionException - when operation fails
public Vector getResultMsgs()
throws SessionException
SessionException - when operation fails
public Vector getResultNames()
throws SessionException
SessionException - when operation fails
public final void changeDir(String dir)
throws SessionException
dir - The directory to change to
SessionException - when operation failspublic String getDir()
public void set(String command,
boolean value)
throws SessionException
command - the command to setvalue - the value of the command
SessionException - when operation fails
public boolean isSet(String command)
throws SessionException
command - the command to set
SessionException - when operation fails
public int subscribe(String operation,
boolean commit)
throws SessionException
operation - Operation constant. AUTOGETFILES or AUTOSHOWFILES
from Constants, for example.commit - Flag indicating whether result information will be persisted
to restart cache
SessionException - if filetype not selected or other session
error occurs.
public int stopSubscribe()
throws SessionException
SessionException - if filetype not selected or other session
error occurs.
public int lockType(String lockMode)
throws SessionException
lockMode - Option parameter, legal values are 'group'
and 'owner'
SessionException - when operation fails.
public int unlockType(String lockMode)
throws SessionException
lockMode - Option parameter, legal values are 'group'
and 'owner'
SessionException - when operation fails.
public int changePassword(String oldPassword,
String newPassword)
throws SessionException
oldPassword - Old passwordnewPassword - New password
SessionException - when operation fails.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||