org.netbeans.lib.cvsclient.command.remove
Class RemoveCommand

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.remove.RemoveCommand
All Implemented Interfaces:
java.lang.Cloneable, CVSListener

public class RemoveCommand
extends BasicCommand

The remove command is used to remove files and directories from the repository.


Field Summary
 
Fields inherited from class org.netbeans.lib.cvsclient.command.BasicCommand
clientServices, 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
RemoveCommand()
           
 
Method Summary
 Builder createBuilder(EventManager eventMan)
          Method that is called while the command is being executed.
 boolean doesIgnoreLocallyExistingFiles()
          Deprecated.  
 void execute(ClientServices client, EventManager em)
          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 command would looks like when typed on the command line.
 java.lang.String getOptString()
          String returned by this method defines which options are available for this particular command
 boolean isDeleteBeforeRemove()
          Returns true if the local files will be deleted automatically.
 boolean isIgnoreLocallyExistingFiles()
          Returns true to indicate that locally existing files are treated as they would not exist.
 void resetCVSCommand()
          resets all switches in the command.
protected  void sendEntryAndModifiedRequests(Entry entry, java.io.File file)
          Send an Entry followed by a Modified or Unchanged request based on whether the file has been untouched on the local machine.
 boolean setCVSCommand(char opt, java.lang.String optArg)
          Takes the arguments and sets the command.
 void setDeleteBeforeRemove(boolean deleteBeforeRemove)
          Sets whether the local files will be deleted before.
 void setIgnoreLocallyExistingFiles(boolean ignoreLocallyExistingFiles)
          Sets whether locally existing files will be treated as they were deleted before.
 
Methods inherited from class org.netbeans.lib.cvsclient.command.BasicCommand
addArgumentRequest, addArgumentRequests, addDirectoryRequest, addRequest, addRequestForFile, addRequestForWorkingDirectory, addRequestsForDirectory, addRequestsForFile, appendFileArguments, assumeLocalPathWhenUnspecified, doesCheckFileTime, getFileEndingWith, getFiles, getRecursive, getXthFile, isRecursive, setFiles, setRecursive
 
Methods inherited from class org.netbeans.lib.cvsclient.command.BuildableCommand
commandTerminated, 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

RemoveCommand

public RemoveCommand()
Method Detail

isDeleteBeforeRemove

public boolean isDeleteBeforeRemove()
Returns true if the local files will be deleted automatically.


setDeleteBeforeRemove

public void setDeleteBeforeRemove(boolean deleteBeforeRemove)
Sets whether the local files will be deleted before.


doesIgnoreLocallyExistingFiles

public boolean doesIgnoreLocallyExistingFiles()
Deprecated. 

Returns true to indicate that locally existing files are treated as they would not exist. This is a extension to the standard cvs-behaviour!


isIgnoreLocallyExistingFiles

public boolean isIgnoreLocallyExistingFiles()
Returns true to indicate that locally existing files are treated as they would not exist. This is a extension to the standard cvs-behaviour!


setIgnoreLocallyExistingFiles

public void setIgnoreLocallyExistingFiles(boolean ignoreLocallyExistingFiles)
Sets whether locally existing files will be treated as they were deleted before. This is a extension to the standard cvs-behaviour!


createBuilder

public Builder createBuilder(EventManager eventMan)
Method that is called while the command is being executed. Descendants can override this method to return a Builder instance that will parse the server's output and create data structures.

Overrides:
createBuilder in class BuildableCommand

execute

public void execute(ClientServices client,
                    EventManager em)
             throws CommandException,
                    AuthenticationException
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
AuthenticationException

sendEntryAndModifiedRequests

protected void sendEntryAndModifiedRequests(Entry entry,
                                            java.io.File file)
Description copied from class: BasicCommand
Send an Entry followed by a Modified or Unchanged request based on whether the file has been untouched on the local machine.

Overrides:
sendEntryAndModifiedRequests in class BasicCommand
Parameters:
entry - the entry for the file
file - the file in question

getCVSCommand

public java.lang.String getCVSCommand()
This method returns how the command would looks like when typed on the command line. Each command is responsible for constructing this information.

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 particular 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

 

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