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

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

public class CCLProcessor
extends CLProcessor

BaseClient side command line interpreter

Version:
$Id: CCLProcessor.java,v 1.65 2009/07/13 21:48:58 ntt Exp $
Author:
G. Turek, T. Huang {Thomas.Huang@jpl.nasa.gov}

Nested Class Summary
 
Nested classes/interfaces inherited from class jpl.mipl.mdms.FileService.komodo.client.CLProcessor
CLProcessor.ScheduledBatch, CLProcessor.ShutDownHandler
 
Field Summary
 
Fields inherited from class jpl.mipl.mdms.FileService.komodo.client.CLProcessor
_abort, _admin, _autocommit, _autoDel, _batch, _batchFileName, _batchFileReaders, _batchTimer, _checksum, _cmdCharCount, _cmdHistory, _cmdHistoryMax, _commandsFile, _connections, _currentBatchFile, _currentDir, _dateFormatter, _diff, _domainFile, _done, _echo, _eightArgWithQuotedString, _endTcpPort, _exitAfterBatch, _fiveArg, _fourArg, _fourArgWithQuotedString, _init, _interpreter, _log, _logFile, _loginFileType, _newConn, _nineArgWithQuotedString, _noArg, _noArgWithInvoke, _noArgWithQuotedString, _oneArg, _oneArgWithDate, _oneArgWithInvoke, _oneArgWithQuotedString, _oneDate, _oneDateWithInvoke, _preserve, _prompt, _pw, _receipt, _repeatFlag, _replaceFile, _replicate, _restart, _safeRead, _secure, _securityType, _session, _signed, _silent, _startTcpPort, _startTime, _supportOS, _tenArgWithQuotedString, _test, _threeArg, _threeArgWithQuotedString, _timer, _toBatch, _tokenCount, _tokenizer, _ttyInput, _twoArg, _twoArgWithQuotedString, _twoDate, _twoDateWithInvoke, _verbose, _version, _versionFile, _veryverbose
 
Constructor Summary
CCLProcessor(boolean ssl, String batchFileName, boolean silent, boolean exitAfterBatch)
          Constructor
 
Method Summary
 void add()
          Process add command
 void addAndRef()
          Add a file.
 void addReference()
          Create a reference in the current vft.
 void addVFT()
          Command to add a virtual file type.
 void addVFTReader()
          Add a read-only user to the current VFT.
 void archive()
          Process archive command
 void cancelReference()
          Cancel scheduled file reference add or delete.
 void changePassword()
          Change the current user's password.
 void changeType()
          Deprecated. Use method 'useType' instead.
 void checksum()
          Process checksum calculation.
 void comment()
          Process comment command
 void delete()
          Process delete file command
 void delReference()
          Delete the file system reference, and all history.
 void delVFT()
          Delete a vft.
 void delVFTReader()
          Delete a reader from a vft.
 void exit()
          Method to override super class's exit method to clear VFT.
 void get()
          Process get file command
 void getAfter()
          Process get file after a given time
 void getBetween()
          Process get files between a given time range
 void getLatest()
          Process get the latest files
 void getReference()
          Get file by reference.
 void getSince()
          Process get files since a given time.
 void getVFT()
          Get all the files a VFT references.
 void lockFileType()
          Process lock file type.
 void login()
          Method to perform client login.
 void loginUsingCache()
          Method to load user login information from the cached login file
 void makeDomainFile()
          Processes "makeDomainFile" command.
 void rename()
          Process rename command
 void replace()
          Process replace command
 void setDefaultGroup()
          Process setDefaultGroup command.
 void setReference()
          Add file reference information to a vft reference.
 void show()
          Process show command
 void showAfter()
          Process show after command
 void showBetween()
          Process show between command
 void showCapabilities()
          Process show capabilities command.
 void showLatest()
          Process show latest command
 void showReference()
          Show references for a vft.
 void showSince()
          Process show since command
 void showTypes()
          Method to show file types
 void showVFT()
          Show current vft list.
 void showVFTReaders()
          Show the file system users allowed to read a vft.
 void unlockFileType()
          Process unlock file type.
 void updateVFT()
          Update VFT to reflect all changes to file references.
 void useType()
          Process ct command to use a file type connection
 
Methods inherited from class jpl.mipl.mdms.FileService.komodo.client.CLProcessor
_checkFile, _getDate, _getResults, _getResults, _handleError, _handlePrompt, _mapCommands, _readInput, _readTTYLine, _setVersion, _startBatch, _writeTTYLine, addToCommandHistory, batch, changeDir, dateFormat, help, history, logCmds, logFile, ls, notImplemented, pause, processInput, processTtyInput, pwd, set, showDomainFile, version
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CCLProcessor

public CCLProcessor(boolean ssl,
                    String batchFileName,
                    boolean silent,
                    boolean exitAfterBatch)
             throws Exception
Constructor

Parameters:
ssl - if true, then SSL is enabled
batchFileName - the batch file name
silent - if true then client operates in silent mode.
Throws:
Exception - general client command processing failure
Method Detail

showTypes

public void showTypes()
Method to show file types


login

public final void login()
Method to perform client login.

Overrides:
login in class CLProcessor

loginUsingCache

public final void loginUsingCache()
Method to load user login information from the cached login file

Overrides:
loginUsingCache in class CLProcessor

exit

public void exit()
Method to override super class's exit method to clear VFT.

Overrides:
exit in class CLProcessor

checksum

public void checksum()
Process checksum calculation.


changeType

public void changeType()
                throws SessionException
Deprecated. Use method 'useType' instead.

Process ct command to change file type connection

Throws:
SessionException - when connection session fail

useType

public void useType()
             throws SessionException
Process ct command to use a file type connection

Throws:
SessionException - when connection session fail

comment

public void comment()
             throws Exception
Process comment command

Throws:
Exception - general operation exception

rename

public void rename()
            throws Exception
Process rename command

Throws:
Exception - general operational exception

changePassword

public void changePassword()
                    throws SessionException
Change the current user's password. If a user login is correct, the the user may change password. Password size limitations are enforced by the Komodo.

Throws:
SessionException - when session connection/operation fail

showCapabilities

public void showCapabilities()
Process show capabilities command.


archive

public void archive()
             throws Exception
Process archive command

Throws:
Exception - general operation failure

replace

public void replace()
             throws Exception
Process replace command

Throws:
Exception - general operation failure

add

public void add()
         throws Exception
Process add command

Throws:
Exception - general operational failure

addAndRef

public void addAndRef()
               throws Exception
Add a file. Have the server rename it and set a reference to it. Optionally, specifiy a link directory. Links will have the form / /

Throws:
Exception - general operationl failure

show

public void show()
          throws Exception
Process show command

Throws:
Exception - general operation failure

showAfter

public void showAfter()
               throws Exception
Process show after command

Throws:
Exception - general operation failure

showSince

public void showSince()
               throws Exception
Process show since command

Throws:
Exception - general operation failure

showBetween

public void showBetween()
                 throws Exception
Process show between command

Throws:
Exception - general operation failure

showLatest

public void showLatest()
                throws Exception
Process show latest command

Throws:
Exception - general operation failure

makeDomainFile

public final void makeDomainFile()
                          throws SessionException
Processes "makeDomainFile" command. Reads argument of filepath for new domain file. Also retrieves server group from filetype if set, otherwise the default group is used.

Throws:
SessionException - when network or result processing failure

get

public void get()
         throws Exception
Process get file command

Throws:
Exception - general operation failure

getSince

public void getSince()
              throws Exception
Process get files since a given time.

Throws:
Exception - general operation failure

getAfter

public void getAfter()
              throws Exception
Process get file after a given time

Throws:
Exception - general operation failure

getBetween

public void getBetween()
                throws Exception
Process get files between a given time range

Throws:
Exception - general operation failure

getLatest

public void getLatest()
               throws Exception
Process get the latest files

Throws:
Exception - general operation failure

delete

public void delete()
            throws Exception
Process delete file command

Throws:
Exception - general operation failure

lockFileType

public void lockFileType()
                  throws Exception
Process lock file type. Takes optional argument, group or owner, used to change file system permissions on the server host. If "group", then remove write access from all but owner. If "owner", remove write access from all.

Throws:
Exception - general operation failure

setDefaultGroup

public void setDefaultGroup()
                     throws Exception
Process setDefaultGroup command. Takes one argument for the server group name.

Throws:
Exception - general operation failure

unlockFileType

public void unlockFileType()
                    throws Exception
Process unlock file type.

Throws:
Exception - general operation failure

getReference

public void getReference()
                  throws Exception
Get file by reference.

Throws:
Exception - general operation failure

getVFT

public void getVFT()
            throws Exception
Get all the files a VFT references.

Throws:
Exception - general operation failure

setReference

public void setReference()
                  throws Exception
Add file reference information to a vft reference. This new references takes place at the next VFT update.

Throws:
Exception - general operation failure

cancelReference

public void cancelReference()
                     throws Exception
Cancel scheduled file reference add or delete.

Throws:
Exception - general operation failure

showReference

public void showReference()
                   throws Exception
Show references for a vft. Optional arguments are ref, and date.

Throws:
Exception - general operation failure

addVFT

public void addVFT()
            throws Exception
Command to add a virtual file type.

Throws:
Exception - general operation failure

addReference

public void addReference()
                  throws Exception
Create a reference in the current vft.

Throws:
Exception - general operation failure

updateVFT

public void updateVFT()
               throws Exception
Update VFT to reflect all changes to file references.

Throws:
Exception - general operation exception

addVFTReader

public final void addVFTReader()
                        throws SessionException
Add a read-only user to the current VFT.

Throws:
SessionException - when network or operation failed

showVFT

public void showVFT()
             throws Exception
Show current vft list.

Throws:
Exception - when network or operation failures

delVFT

public void delVFT()
            throws Exception
Delete a vft.

Throws:
Exception - general operation failure

delReference

public void delReference()
                  throws Exception
Delete the file system reference, and all history.

Throws:
Exception - general operation failure

showVFTReaders

public final void showVFTReaders()
                          throws SessionException
Show the file system users allowed to read a vft.

Throws:
SessionException - when network or operation failure

delVFTReader

public final void delVFTReader()
                        throws SessionException
Delete a reader from a vft.

Throws:
SessionException - when network or operation failure