org.netbeans.lib.cvsclient.command.log
Class LogCommand

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

public class LogCommand
extends BasicCommand

The log command looks up the log(history) of file(s) 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
LogCommand()
          Construct a new status 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 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 getDateFilter()
          Getter for property dateFilter, equals the command-line CVS switch "-d".
 java.lang.String getOptString()
          String returned by this method defines which options are available for this particular command
 java.lang.String getRevisionFilter()
          Getter for property revisionFilter, equals the command-line CVS switch "-r".
 java.lang.String getStateFilter()
          Getter for property stateFilter, equals the command-line CVS switch "-s".
 java.lang.String getUserFilter()
          Getter for property userFilter, equals the command-line CVS switch "-w".
 boolean isDefaultBranch()
          Getter for property defaultBranch, equals the command-line CVS switch "-b".
 boolean isHeaderAndDescOnly()
          Getter for property headerAndDescOnly, equals the command-line CVS switch "-t".
 boolean isHeaderOnly()
          Getter for property headerOnly, equals the command-line CVS switch "-h".
 boolean isNoTags()
          Getter for property noTags, equals the command-line CVS switch "-N".
 void resetCVSCommand()
          Resets all switches in the command to the default behaviour.
 boolean setCVSCommand(char opt, java.lang.String optArg)
          takes the arguments and sets the command.
 void setDateFilter(java.lang.String dateFilter)
          Setter for property dateFilter, equals the command-line CVS switch "-d".
 void setDefaultBranch(boolean defaultBranch)
          Setter for property defaultBranch, equals the command-line CVS switch "-b".
 void setHeaderAndDescOnly(boolean headerAndDescOnly)
          Setter for property headerAndDescOnly, equals the command-line CVS switch "-t".
 void setHeaderOnly(boolean headerOnly)
          Setter for property headerOnly, equals the command-line CVS switch "-h".
 void setNoTags(boolean noTags)
          Setter for property noTags, equals the command-line CVS switch "-N".
 void setRevisionFilter(java.lang.String revisionFilter)
          Setter for property revisionFilter, equals the command-line CVS switch "-r".
 void setStateFilter(java.lang.String stateFilter)
          Setter for property stateFilter, equals the command-line CVS switch "-s".
 void setUserFilter(java.lang.String userFilter)
          Setter for property userFilter, equals the command-line CVS switch "-w".
 
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

LogCommand

public LogCommand()
Construct a new status 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

isDefaultBranch

public boolean isDefaultBranch()
Getter for property defaultBranch, equals the command-line CVS switch "-b".

Returns:
Value of property defaultBranch.

setDefaultBranch

public void setDefaultBranch(boolean defaultBranch)
Setter for property defaultBranch, equals the command-line CVS switch "-b".

Parameters:
defaultBranch - New value of property defaultBranch.

getDateFilter

public java.lang.String getDateFilter()
Getter for property dateFilter, equals the command-line CVS switch "-d".

Returns:
Value of property dateFilter.

setDateFilter

public void setDateFilter(java.lang.String dateFilter)
Setter for property dateFilter, equals the command-line CVS switch "-d".

Parameters:
dateFilter - New value of property dateFilter.

isHeaderOnly

public boolean isHeaderOnly()
Getter for property headerOnly, equals the command-line CVS switch "-h".

Returns:
Value of property headerOnly.

setHeaderOnly

public void setHeaderOnly(boolean headerOnly)
Setter for property headerOnly, equals the command-line CVS switch "-h".

Parameters:
headerOnly - New value of property headerOnly.

isNoTags

public boolean isNoTags()
Getter for property noTags, equals the command-line CVS switch "-N".

Returns:
Value of property noTags.

setNoTags

public void setNoTags(boolean noTags)
Setter for property noTags, equals the command-line CVS switch "-N".

Parameters:
noTags - New value of property noTags.

getRevisionFilter

public java.lang.String getRevisionFilter()
Getter for property revisionFilter, equals the command-line CVS switch "-r".

Returns:
Value of property revisionFilter.

setRevisionFilter

public void setRevisionFilter(java.lang.String revisionFilter)
Setter for property revisionFilter, equals the command-line CVS switch "-r".

Parameters:
revisionFilter - New value of property revisionFilter. empty string means latest revision of default branch.

getStateFilter

public java.lang.String getStateFilter()
Getter for property stateFilter, equals the command-line CVS switch "-s".

Returns:
Value of property stateFilter.

setStateFilter

public void setStateFilter(java.lang.String stateFilter)
Setter for property stateFilter, equals the command-line CVS switch "-s".

Parameters:
stateFilter - New value of property stateFilter.

getUserFilter

public java.lang.String getUserFilter()
Getter for property userFilter, equals the command-line CVS switch "-w".

Returns:
Value of property userFilter, empty string means the current user.

setUserFilter

public void setUserFilter(java.lang.String userFilter)
Setter for property userFilter, equals the command-line CVS switch "-w".

Parameters:
userFilter - New value of property userFilter.

isHeaderAndDescOnly

public boolean isHeaderAndDescOnly()
Getter for property headerAndDescOnly, equals the command-line CVS switch "-t".

Returns:
Value of property headerAndDescOnly.

setHeaderAndDescOnly

public void setHeaderAndDescOnly(boolean headerAndDescOnly)
Setter for property headerAndDescOnly, equals the command-line CVS switch "-t".

Parameters:
headerAndDescOnly - New value of property headerAndDescOnly.

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

resetCVSCommand

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

Specified by:
resetCVSCommand in class Command

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

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.