jpl.mipl.mdms.FileService.komodo.client
Class SimpleClient

java.lang.Object
  extended by jpl.mipl.mdms.FileService.komodo.client.SimpleClient

public class SimpleClient
extends Object

Purpose: Ultra simple version of FEI5 client

   Copyright 2006, California Institute of Technology.
   ALL RIGHTS RESERVED.
   U.S. Government Sponsorship acknowledge. 2006.
   
 ============================================================================
 Modification History :
 ----------------------

 Date              Who              What
 ----------------------------------------------------------------------------
 09/14/2006        Nick             Initial Release
 ============================================================================
 

Version:
$Id: SimpleClient.java,v 1.1 2006/09/22 00:34:05 ntt Exp $
Author:
Nicholas Toole (Nicholas.T.Toole@jpl.nasa.gov)

Constructor Summary
SimpleClient(String domainFile)
          Constructor
 
Method Summary
 boolean addFiles(String[] files, String comment)
          Add an array of files to filetype with optional comment
 boolean get(String[] files, String destination, boolean replace, boolean version, boolean crc)
          Get Action.
 void login(String servergroup, String filetype, String user, String password)
          Login to filetype
 void logout()
          Logs out of client
static void main(String[] args)
           
 boolean replace(String[] files, String comment)
          Replace action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleClient

public SimpleClient(String domainFile)
Constructor

Parameters:
domainFile - Path to a domain file
Method Detail

login

public void login(String servergroup,
                  String filetype,
                  String user,
                  String password)
           throws SessionException
Login to filetype

Parameters:
servergroup - Server group name
filetype - Filetype name
user - FEI user name
password - FEI user password
Throws:
SessionException

logout

public void logout()
            throws SessionException
Logs out of client

Throws:
SessionException

addFiles

public boolean addFiles(String[] files,
                        String comment)
                 throws SessionException
Add an array of files to filetype with optional comment

Parameters:
files - Array of files to be added
comment - Comment associated with files, optional
Returns:
boolean true of operation is successful, false otherwise
Throws:
SessionException - when operation fails.

replace

public boolean replace(String[] files,
                       String comment)
                throws SessionException
Replace action

Parameters:
files - Array of files to be replaced in filetype
comment - Optional comment associated with file, can be null
Returns:
boolean true of operation is successful, false otherwise
Throws:
SessionException - when operation fails.

get

public boolean get(String[] files,
                   String destination,
                   boolean replace,
                   boolean version,
                   boolean crc)
            throws SessionException
Get Action. Note: At most one of {replace,version} can be set to true

Parameters:
files - Array of filenames to be retrieved
destination - Output directory path
replace - Replace flag
version - Version flag
crc - Crc flag
Returns:
boolean true when operation is successful, false otherwise
Throws:
SessionException - when operation fails

main

public static void main(String[] args)