org.netbeans.lib.cvsclient.command
Class GlobalOptions

java.lang.Object
  extended by org.netbeans.lib.cvsclient.command.GlobalOptions
All Implemented Interfaces:
java.lang.Cloneable

public class GlobalOptions
extends java.lang.Object
implements java.lang.Cloneable

Provides access to global options for a specific command. These are options traditionally set in the command line CVS tool before the command name, for example in the command:

cvs -n update -dP
-n is a global options but -dP are options specific to the update command.
Note that you can have different global options for each command you execute (just like command-line CVS).


Constructor Summary
GlobalOptions()
           
 
Method Summary
 void clearCvsVariables()
          Clears the list of cvs internal enviroment variables.
 java.lang.Object clone()
          This method just calls the Object.clone() and makes it public.
 java.util.List createRequestList()
          Creates a list of requests.
 int getCompressionLevel()
          Getter for property compressionLevel.
 java.lang.String getCVSCommand()
          Equals to the Command.getCVSCommand() functionality.
 java.lang.String getCVSRoot()
          Get the CVS root
 java.lang.String[] getCvsVariables()
           
 java.lang.String getEditor()
          Getter for property editor.
 java.io.File[] getExclusions()
          Returns list of non-modifiable files/folders.
 java.lang.String getOptString()
          Returns a String that defines which options are available for global options.
 java.io.File getTempDir()
          Getter for property tempDir.
 boolean isCheckedOutFilesReadOnly()
          Are checked out files read only.
 boolean isDoNoChanges()
          Returns whether no changes should be done to the files.
 boolean isExcluded(java.io.File file)
          Tests whether the file is not modifiable as set by setExclusions(java.io.File[]).
 boolean isIgnoreCvsrc()
          Getter for property ignoreCvsrc.
 boolean isModeratelyQuiet()
          Getter for property moderatelyQuiet.
 boolean isNoHistoryLogging()
          Getter for property noHistoryLogging.
 boolean isShowHelp()
          Getter for property showHelp.
 boolean isShowVersion()
          Getter for property showVersion.
 boolean isTraceExecution()
          Getter for property traceExecution.
 boolean isUseGzip()
          Get whether to use Gzip
 boolean isVeryQuiet()
          Getter for property veryQuiet.
 void resetCVSCommand()
          Resets all switches in the command to the default behaviour.
 void setCheckedOutFilesReadOnly(boolean readOnly)
          Set whether checked out files are read only.
 void setCompressionLevel(int compressionLevel)
          Setter for property compressionLevel.
 boolean setCVSCommand(char opt, java.lang.String optArg)
          EQUALS to Command.setCVSCommand()
 void setCVSRoot(java.lang.String cvsRoot)
          Set the CVS root
 void setCvsVariable(java.lang.String variable)
          Adds one cvs internal enviroment variable.
 void setCvsVariables(java.lang.String[] variables)
          Sets the cvs internal enviroment variables.
 void setDoNoChanges(boolean doNoChanges)
          Sets whether no changes should be done to the files.
 void setEditor(java.lang.String editor)
          Setter for property editor.
 void setExclusions(java.io.File[] exclusions)
          Sets list of non-modifiable files/folders.
 void setIgnoreCvsrc(boolean ignoreCvsrc)
          Setter for property ignoreCvsrc.
 void setModeratelyQuiet(boolean moderatelyQuiet)
          Setter for property moderatelyQuiet.
 void setNoHistoryLogging(boolean noHistoryLogging)
          Setter for property noHistoryLogging.
 void setShowHelp(boolean showHelp)
          Setter for property showHelp.
 void setShowVersion(boolean showVersion)
          Setter for property showVersion.
 void setTempDir(java.io.File tempDir)
          Setter for property tempDir.
 void setTraceExecution(boolean traceExecution)
          Setter for property traceExecution.
 void setUseGzip(boolean useGzip)
          Set whether to use Gzip for file transmission/reception
 void setVeryQuiet(boolean veryQuiet)
          Setter for property veryQuiet.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalOptions

public GlobalOptions()
Method Detail

setExclusions

public void setExclusions(java.io.File[] exclusions)
Sets list of non-modifiable files/folders. The client will effectively ignore all server responses that concern these files/folders or files beneath them.

Parameters:
exclusions - array of non-modifiable files/folders

getExclusions

public java.io.File[] getExclusions()
Returns list of non-modifiable files/folders. The client effectively ignores all server responses that concern these files/folders or files beneath them.

Returns:
File [] list of files/folders that must be left intact by the command.

isExcluded

public boolean isExcluded(java.io.File file)
Tests whether the file is not modifiable as set by setExclusions(java.io.File[]).

Parameters:
file - file to test
Returns:
true if the file must not be modified on disk, false otherwise

createRequestList

public java.util.List createRequestList()
Creates a list of requests. Only those global options are included that can be sent to server (-q, -Q, -l, -t, -r, -n). To be added to the request list sent to the server.


getOptString

public java.lang.String getOptString()
Returns a String that defines which options are available for global options.


setCVSCommand

public boolean setCVSCommand(char opt,
                             java.lang.String optArg)
EQUALS to Command.setCVSCommand()


resetCVSCommand

public void resetCVSCommand()
Resets all switches in the command to the default behaviour. After calling this method, the command should behave defaultly. EQUALS to Command.resetCVSCommand()


getCVSCommand

public java.lang.String getCVSCommand()
Equals to the Command.getCVSCommand() functionality. Returns all the current switches in the command-line cvs style.


setCvsVariable

public void setCvsVariable(java.lang.String variable)
Adds one cvs internal enviroment variable.

Parameters:
variable - The format is NAME=VALUE.

clearCvsVariables

public void clearCvsVariables()
Clears the list of cvs internal enviroment variables.


setCvsVariables

public void setCvsVariables(java.lang.String[] variables)
Sets the cvs internal enviroment variables. It will clear any vrisables previously set.

Parameters:
variables - array of strings in format "KEY=VALUE".

getCvsVariables

public java.lang.String[] getCvsVariables()

setDoNoChanges

public void setDoNoChanges(boolean doNoChanges)
Sets whether no changes should be done to the files.


isDoNoChanges

public boolean isDoNoChanges()
Returns whether no changes should be done to the files.


isCheckedOutFilesReadOnly

public boolean isCheckedOutFilesReadOnly()
Are checked out files read only.

Returns:
the answer

setCheckedOutFilesReadOnly

public void setCheckedOutFilesReadOnly(boolean readOnly)
Set whether checked out files are read only. False is the default.

Parameters:
readOnly - true for readonly, false for read/write (default)

getCVSRoot

public java.lang.String getCVSRoot()
Get the CVS root

Returns:
the CVS root value, e.g. :pserver:user@host@/usr/local/cvs

setCVSRoot

public void setCVSRoot(java.lang.String cvsRoot)
Set the CVS root

Parameters:
cvsRoot - CVS root to use

setUseGzip

public void setUseGzip(boolean useGzip)
Set whether to use Gzip for file transmission/reception

Parameters:
useGzip - true if gzip should be used, false otherwise

isUseGzip

public boolean isUseGzip()
Get whether to use Gzip

Returns:
true if Gzip should be used, false otherwise

getCompressionLevel

public int getCompressionLevel()
Getter for property compressionLevel.

Returns:
Value of property compressionLevel.

setCompressionLevel

public void setCompressionLevel(int compressionLevel)
Setter for property compressionLevel.

Parameters:
compressionLevel - New value of property compressionLevel.

isNoHistoryLogging

public boolean isNoHistoryLogging()
Getter for property noHistoryLogging.

Returns:
Value of property noHistoryLogging.

setNoHistoryLogging

public void setNoHistoryLogging(boolean noHistoryLogging)
Setter for property noHistoryLogging.

Parameters:
noHistoryLogging - New value of property noHistoryLogging.

isModeratelyQuiet

public boolean isModeratelyQuiet()
Getter for property moderatelyQuiet.

Returns:
Value of property moderatelyQuiet.

setModeratelyQuiet

public void setModeratelyQuiet(boolean moderatelyQuiet)
Setter for property moderatelyQuiet.

Parameters:
moderatelyQuiet - New value of property moderatelyQuiet.

isVeryQuiet

public boolean isVeryQuiet()
Getter for property veryQuiet.

Returns:
Value of property veryQuiet.

setVeryQuiet

public void setVeryQuiet(boolean veryQuiet)
Setter for property veryQuiet.

Parameters:
veryQuiet - New value of property veryQuiet.

isTraceExecution

public boolean isTraceExecution()
Getter for property traceExecution.

Returns:
Value of property traceExecution.

setTraceExecution

public void setTraceExecution(boolean traceExecution)
Setter for property traceExecution.

Parameters:
traceExecution - New value of property traceExecution.

isShowHelp

public boolean isShowHelp()
Getter for property showHelp.

Returns:
Value of property showHelp.

setShowHelp

public void setShowHelp(boolean showHelp)
Setter for property showHelp.

Parameters:
showHelp - New value of property showHelp.

isShowVersion

public boolean isShowVersion()
Getter for property showVersion.

Returns:
Value of property showVersion.

setShowVersion

public void setShowVersion(boolean showVersion)
Setter for property showVersion.

Parameters:
showVersion - New value of property showVersion.

isIgnoreCvsrc

public boolean isIgnoreCvsrc()
Getter for property ignoreCvsrc.

Returns:
Value of property ignoreCvsrc.

setIgnoreCvsrc

public void setIgnoreCvsrc(boolean ignoreCvsrc)
Setter for property ignoreCvsrc.

Parameters:
ignoreCvsrc - New value of property ignoreCvsrc.

getTempDir

public java.io.File getTempDir()
Getter for property tempDir.

Returns:
Value of property tempDir.

setTempDir

public void setTempDir(java.io.File tempDir)
Setter for property tempDir.

Parameters:
tempDir - New value of property tempDir.

getEditor

public java.lang.String getEditor()
Getter for property editor.

Returns:
Value of property editor.

setEditor

public void setEditor(java.lang.String editor)
Setter for property editor.

Parameters:
editor - New value of property editor.

clone

public java.lang.Object clone()
This method just calls the Object.clone() and makes it public.

Overrides:
clone in class java.lang.Object

 

Built on August 7 2008.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.