org.netbeans.lib.cvsclient.command.edit
Class EditCommand

java.lang.Object
  extended by org.netbeans.lib.cvsclient.command.Command
      extended by org.netbeans.lib.cvsclient.command.BuildableCommand
          extended by org.netbeans.lib.cvsclient.command.BasicCommand
              extended by org.netbeans.lib.cvsclient.command.edit.EditCommand
All Implemented Interfaces:
java.lang.Cloneable, CVSListener

public class EditCommand
extends BasicCommand


Field Summary
 
Fields inherited from class org.netbeans.lib.cvsclient.command.BasicCommand
files, requests
 
Fields inherited from class org.netbeans.lib.cvsclient.command.BuildableCommand
builder
 
Fields inherited from class org.netbeans.lib.cvsclient.command.Command
localDirectory
 
Constructor Summary
EditCommand()
          Construct a new editors command.
 
Method Summary
protected  void addRequestForFile(java.io.File file, Entry entry)
          This method is called for each explicit file and for files within a directory.
 void commandTerminated(TerminationEvent e)
          Called when server responses with "ok" or "error", (when the command finishes).
 void execute(ClientServices clientServices, EventManager eventManager)
          Executes this command.
 java.lang.String getCVSArguments()
          Returns the arguments of the command in the command-line style.
 java.lang.String getCVSCommand()
          This method returns how the tag command would looklike when typed on the command line.
static java.io.File getEditBackupFile(java.io.File file)
          Returns the file used for backup the specified file in the edit command.
 java.lang.String getOptString()
          String returned by this method defines which options are available for this command.
 Watch getTemporaryWatch()
          Returns the temporary watch.
 boolean isCheckThatUnedited()
          Returns whether to check for unedited files.
 boolean isForceEvenIfEdited()
          Returns whether the edit is forces even if the files are edited.
 void resetCVSCommand()
          Resets all switches in the command.
 void setCheckThatUnedited(boolean checkThatUnedited)
          Sets whether to check for unedited files.
 boolean setCVSCommand(char opt, java.lang.String optArg)
          Takes the arguments and sets the command.
 void setForceEvenIfEdited(boolean forceEvenIfEdited)
          Sets whether the edit is forces even if the files are edited.
 void setTemporaryWatch(Watch temporaryWatch)
          Sets the temporary watch.
 
Methods inherited from class org.netbeans.lib.cvsclient.command.BasicCommand
addArgumentRequest, addArgumentRequests, addDirectoryRequest, addRequest, addRequestForWorkingDirectory, addRequestsForDirectory, addRequestsForFile, appendFileArguments, assumeLocalPathWhenUnspecified, doesCheckFileTime, getFileEndingWith, getFiles, getRecursive, getXthFile, isRecursive, sendEntryAndModifiedRequests, setFiles, setRecursive
 
Methods inherited from class org.netbeans.lib.cvsclient.command.BuildableCommand
createBuilder, isBuilderSet, messageSent, messageSent, setBuilder
 
Methods inherited from class org.netbeans.lib.cvsclient.command.Command
clone, fileAdded, fileInfoGenerated, fileRemoved, fileToRemove, fileUpdated, getDisplayName, getGlobalOptions, getLocalDirectory, getLocalPath, getRelativeToLocalPathInUnixStyle, getTrimmedString, hasFailed, moduleExpanded, setDisplayName, setLocalDirectory
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditCommand

public EditCommand()
Construct a new editors command.

Method Detail

getEditBackupFile

public static java.io.File getEditBackupFile(java.io.File file)
Returns the file used for backup the specified file in the edit command.


execute

public void execute(ClientServices clientServices,
                    EventManager eventManager)
             throws CommandException
Executes this command.

Overrides:
execute in class BasicCommand
Parameters:
client - the client services object that provides any necessary services to this command, including the ability to actually process all the requests.
Throws:
CommandException - if an error occurs executing the command

addRequestForFile

protected void addRequestForFile(java.io.File file,
                                 Entry entry)
Description copied from class: BasicCommand
This method is called for each explicit file and for files within a directory.

Overrides:
addRequestForFile in class BasicCommand

commandTerminated

public void commandTerminated(TerminationEvent e)
Called when server responses with "ok" or "error", (when the command finishes).

Specified by:
commandTerminated in interface CVSListener
Overrides:
commandTerminated in class BuildableCommand

getCVSCommand

public java.lang.String getCVSCommand()
This method returns how the tag command would looklike when typed on the command line.

Specified by:
getCVSCommand in class Command

setCVSCommand

public boolean setCVSCommand(char opt,
                             java.lang.String optArg)
Takes the arguments and sets the command. To be mainly used for automatic settings (like parsing the .cvsrc file)

Specified by:
setCVSCommand in class Command
Returns:
true if the option (switch) was recognized and set

getOptString

public java.lang.String getOptString()
String returned by this method defines which options are available for this command.

Specified by:
getOptString in class Command

resetCVSCommand

public void resetCVSCommand()
Resets all switches in the command. After calling this method, the command should have no switches defined and should behave defaultly.

Specified by:
resetCVSCommand in class Command

getCVSArguments

public java.lang.String getCVSArguments()
Returns the arguments of the command in the command-line style. Similar to getCVSCommand() however without the files and command's name

Specified by:
getCVSArguments in class Command

isCheckThatUnedited

public boolean isCheckThatUnedited()
Returns whether to check for unedited files.


setCheckThatUnedited

public void setCheckThatUnedited(boolean checkThatUnedited)
Sets whether to check for unedited files. This is cvs' -c option.


isForceEvenIfEdited

public boolean isForceEvenIfEdited()
Returns whether the edit is forces even if the files are edited.


setForceEvenIfEdited

public void setForceEvenIfEdited(boolean forceEvenIfEdited)
Sets whether the edit is forces even if the files are edited. This is cvs' -f option.


getTemporaryWatch

public Watch getTemporaryWatch()
Returns the temporary watch.


setTemporaryWatch

public void setTemporaryWatch(Watch temporaryWatch)
Sets the temporary watch. This is cvs' -a option.


 

Built on October 26 2010.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.