org.netbeans.lib.cvsclient.command.diff
Class DiffCommand

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

public class DiffCommand
extends BasicCommand

The status command looks up the status of files in the repository


Field Summary
protected  EventManager eventManager
          The event manager to use
 
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
DiffCommand()
          Construct a new diff command
 
Method Summary
 void commandTerminated(TerminationEvent e)
          called when server responses with "ok" or "error", (when the command finishes)
 Builder createBuilder(EventManager eventMan)
          Create a builder for this command.
 void execute(ClientServices client, EventManager em)
          Execute a command
 java.lang.String getBeforeDate1()
          Getter for property beforeDate.
 java.lang.String getBeforeDate2()
          Getter for property beforeDate2.
 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 looklike when typed on the command line.
 java.lang.String getKeywordSubst()
          Getter for property keywordSubst.
 java.lang.String getOptString()
          String returned by this method defines which options are available for this particular command
 java.lang.String getRevision1()
          Getter for property firstRevision.
 java.lang.String getRevision2()
          Getter for property secondRevision.
 boolean isContextDiff()
          equals to the -c switch of cvs Getter for property contextDiff.
 boolean isIgnoreAllWhitespace()
          true if all the whitespace differences should be ignored.
 boolean isIgnoreBlankLines()
          Getter for property ignoreBlankLines.
 boolean isIgnoreCase()
          Getter for property ignoreCase.
 boolean isIgnoreSpaceChange()
          Getter for property ignoreSpaceChange.
 boolean isUnifiedDiff()
          equals to the -u switch of cvs Getter for property unifiedDiff.
 void resetCVSCommand()
          resets all switches in the command.
 void setBeforeDate1(java.lang.String beforeDate)
          Setter for property beforeDate.
 void setBeforeDate2(java.lang.String beforeDate2)
          Setter for property beforeDate2.
 void setContextDiff(boolean contextDiff)
          equals to the -c switch of cvs Setter for property contextDiff.
 boolean setCVSCommand(char opt, java.lang.String optArg)
          takes the arguments and sets the command.
 void setIgnoreAllWhitespace(boolean ignoreAllWhitespace)
          Setter for property ignoreAllWhitespace.
 void setIgnoreBlankLines(boolean ignoreBlankLines)
          Setter for property ignoreBlankLines.
 void setIgnoreCase(boolean ignoreCase)
          Setter for property ignoreCase.
 void setIgnoreSpaceChange(boolean ignoreSpaceChange)
          Setter for property ignoreSpaceChange.
 void setKeywordSubst(java.lang.String keywordSubst)
          Setter for property keywordSubst.
 void setRevision1(java.lang.String firstRevision)
          Setter for property firstRevision.
 void setRevision2(java.lang.String secondRevision)
          Setter for property secondRevision.
 void setUnifiedDiff(boolean unifiedDiff)
          equals to the -u switch of cvs.
 
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, sendEntryAndModifiedRequests, setFiles, setRecursive
 
Methods inherited from class org.netbeans.lib.cvsclient.command.BuildableCommand
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
 

Field Detail

eventManager

protected EventManager eventManager
The event manager to use

Constructor Detail

DiffCommand

public DiffCommand()
Construct a new diff command

Method Detail

createBuilder

public Builder createBuilder(EventManager eventMan)
Create a builder for this command.

Overrides:
createBuilder in class BuildableCommand
Parameters:
eventMan - the event manager used to receive events.

execute

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

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

getBeforeDate1

public java.lang.String getBeforeDate1()
Getter for property beforeDate.

Returns:
Value of property beforeDate.

setBeforeDate1

public void setBeforeDate1(java.lang.String beforeDate)
Setter for property beforeDate.

Parameters:
beforeDate - New value of property beforeDate.

getRevision1

public java.lang.String getRevision1()
Getter for property firstRevision.

Returns:
Value of property firstRevision.

setRevision1

public void setRevision1(java.lang.String firstRevision)
Setter for property firstRevision.

Parameters:
firstRevision - New value of property firstRevision.

getRevision2

public java.lang.String getRevision2()
Getter for property secondRevision.

Returns:
Value of property secondRevision.

setRevision2

public void setRevision2(java.lang.String secondRevision)
Setter for property secondRevision.

Parameters:
secondRevision - New value of property secondRevision.

getBeforeDate2

public java.lang.String getBeforeDate2()
Getter for property beforeDate2.

Returns:
Value of property beforeDate2.

setBeforeDate2

public void setBeforeDate2(java.lang.String beforeDate2)
Setter for property beforeDate2.

Parameters:
beforeDate2 - New value of property beforeDate2.

getKeywordSubst

public java.lang.String getKeywordSubst()
Getter for property keywordSubst.

Returns:
Value of property keywordSubst.

setKeywordSubst

public void setKeywordSubst(java.lang.String keywordSubst)
Setter for property keywordSubst.

Parameters:
keywordSubst - New value of property keywordSubst.

getCVSCommand

public java.lang.String getCVSCommand()
This method returns how the command would looklike 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

isIgnoreAllWhitespace

public boolean isIgnoreAllWhitespace()
true if all the whitespace differences should be ignored. (-w)

Returns:
Value of property ignoreAllWhitespace.

setIgnoreAllWhitespace

public void setIgnoreAllWhitespace(boolean ignoreAllWhitespace)
Setter for property ignoreAllWhitespace. true if all the whitespace differences should be ignored. (-w)

Parameters:
ignoreAllWhitespace - New value of property ignoreAllWhitespace.

isIgnoreBlankLines

public boolean isIgnoreBlankLines()
Getter for property ignoreBlankLines.

Returns:
Value of property ignoreBlankLines.

setIgnoreBlankLines

public void setIgnoreBlankLines(boolean ignoreBlankLines)
Setter for property ignoreBlankLines.

Parameters:
ignoreBlankLines - New value of property ignoreBlankLines.

isIgnoreCase

public boolean isIgnoreCase()
Getter for property ignoreCase.

Returns:
Value of property ignoreCase.

setIgnoreCase

public void setIgnoreCase(boolean ignoreCase)
Setter for property ignoreCase.

Parameters:
ignoreCase - New value of property ignoreCase.

isIgnoreSpaceChange

public boolean isIgnoreSpaceChange()
Getter for property ignoreSpaceChange.

Returns:
Value of property ignoreSpaceChange.

setIgnoreSpaceChange

public void setIgnoreSpaceChange(boolean ignoreSpaceChange)
Setter for property ignoreSpaceChange.

Parameters:
ignoreSpaceChange - New value of property ignoreSpaceChange.

isContextDiff

public boolean isContextDiff()
equals to the -c switch of cvs Getter for property contextDiff.

Returns:
Value of property contextDiff.

setContextDiff

public void setContextDiff(boolean contextDiff)
equals to the -c switch of cvs Setter for property contextDiff.

Parameters:
contextDiff - New value of property contextDiff.

isUnifiedDiff

public boolean isUnifiedDiff()
equals to the -u switch of cvs Getter for property unifiedDiff.

Returns:
Value of property unifiedDiff.

setUnifiedDiff

public void setUnifiedDiff(boolean unifiedDiff)
equals to the -u switch of cvs. Setter for property unifiedDiff.

Parameters:
unifiedDiff - New value of property unifiedDiff.

 

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