org.netbeans.lib.cvsclient.command.tag
Class RtagCommand

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.RepositoryCommand
              extended by org.netbeans.lib.cvsclient.command.tag.RtagCommand
All Implemented Interfaces:
java.lang.Cloneable, CVSListener

public class RtagCommand
extends RepositoryCommand

The rtag command adds or deletes a tag to the specified files/directories in the repository.


Field Summary
 
Fields inherited from class org.netbeans.lib.cvsclient.command.RepositoryCommand
clientServices, expandedModules, modules, 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
RtagCommand()
          Construct a new tag command.
 
Method Summary
 void commandTerminated(TerminationEvent e)
          Called when server responses with "ok" or "error", (when the command finishes).
 Builder createBuilder(EventManager eventManager)
          Creates the TagBuilder.
 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.
 java.lang.String getOptString()
          String returned by this method defines which options are available for this command.
 java.lang.String getTag()
          Returns the tag that should be added or deleted.
 java.lang.String getTagByDate()
          Returns the latest date of a revision to be tagged.
 java.lang.String getTagByRevision()
          Sets the latest date of a revision to be tagged.
 boolean isClearFromRemoved()
          Returns true if the tag from removed files is cleared.
 boolean isDeleteTag()
          Returns true if the tag should be deleted (otherwise added).
 boolean isMakeBranchTag()
          Returns true if the tag should be a branch tag.
 boolean isMatchHeadIfRevisionNotFound()
           
 boolean isNoExecTagProgram()
           
 boolean isOverrideExistingTag()
          Returns true to indicate that existing tag will be overridden.
protected  void postExpansionExecute(ClientServices client, EventManager eventManager)
          Execute the command.
 void resetCVSCommand()
          Resets all switches in the command.
 void setClearFromRemoved(boolean clearFromRemoved)
          Clear tag from removed files
 boolean setCVSCommand(char opt, java.lang.String optArg)
          Takes the arguments and sets the command.
 void setDeleteTag(boolean deleteTag)
          Sets whether the tag should be deleted (true) or added (false).
 void setMakeBranchTag(boolean makeBranchTag)
          Sets whether the tag should be a branch tag.
 void setMatchHeadIfRevisionNotFound(boolean matchHeadIfRevisionNotFound)
           
 void setNoExecTagProgram(boolean noExecTagProgram)
           
 void setOverrideExistingTag(boolean overrideExistingTag)
          Sets whether existing tags should be overridden.
 void setTag(java.lang.String tag)
          Sets the tag that should be added or deleted.
 void setTagByDate(java.lang.String tagDate)
          Sets the latest date of a revision to be tagged.
 void setTagByRevision(java.lang.String tagRevision)
          Sets the latest date of a revision to be tagged.
 
Methods inherited from class org.netbeans.lib.cvsclient.command.RepositoryCommand
addArgumentRequest, addArgumentRequests, addModule, addRequest, addRequestForWorkingDirectory, appendModuleArguments, clearModules, execute, getModules, isRecursive, moduleExpanded, setModules, 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, setDisplayName, setLocalDirectory
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RtagCommand

public RtagCommand()
Construct a new tag command.

Method Detail

createBuilder

public Builder createBuilder(EventManager eventManager)
Creates the TagBuilder.

Overrides:
createBuilder in class BuildableCommand
Parameters:
eventManager - the event manager used to received cvs events

isClearFromRemoved

public boolean isClearFromRemoved()
Returns true if the tag from removed files is cleared.


setClearFromRemoved

public void setClearFromRemoved(boolean clearFromRemoved)
Clear tag from removed files


isDeleteTag

public boolean isDeleteTag()
Returns true if the tag should be deleted (otherwise added).


setDeleteTag

public void setDeleteTag(boolean deleteTag)
Sets whether the tag should be deleted (true) or added (false).


isMakeBranchTag

public boolean isMakeBranchTag()
Returns true if the tag should be a branch tag.


setMakeBranchTag

public void setMakeBranchTag(boolean makeBranchTag)
Sets whether the tag should be a branch tag.


isOverrideExistingTag

public boolean isOverrideExistingTag()
Returns true to indicate that existing tag will be overridden.


setOverrideExistingTag

public void setOverrideExistingTag(boolean overrideExistingTag)
Sets whether existing tags should be overridden.


isMatchHeadIfRevisionNotFound

public boolean isMatchHeadIfRevisionNotFound()

setMatchHeadIfRevisionNotFound

public void setMatchHeadIfRevisionNotFound(boolean matchHeadIfRevisionNotFound)

isNoExecTagProgram

public boolean isNoExecTagProgram()

setNoExecTagProgram

public void setNoExecTagProgram(boolean noExecTagProgram)

getTag

public java.lang.String getTag()
Returns the tag that should be added or deleted.


setTag

public void setTag(java.lang.String tag)
Sets the tag that should be added or deleted.


getTagByDate

public java.lang.String getTagByDate()
Returns the latest date of a revision to be tagged.

Returns:
date value. the latest Revision not later ten date is tagged.

setTagByDate

public void setTagByDate(java.lang.String tagDate)
Sets the latest date of a revision to be tagged.

Parameters:
tagDate - New value of property tagDate.

getTagByRevision

public java.lang.String getTagByRevision()
Sets the latest date of a revision to be tagged. Can be both a number and a tag.

Returns:
Value of property tagRevision.

setTagByRevision

public void setTagByRevision(java.lang.String tagRevision)
Sets the latest date of a revision to be tagged. Can be both a number and a tag.

Parameters:
tagRevision - New value of property tagRevision.

postExpansionExecute

protected void postExpansionExecute(ClientServices client,
                                    EventManager eventManager)
                             throws CommandException,
                                    AuthenticationException
Execute the command.

Specified by:
postExpansionExecute in class RepositoryCommand
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
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

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

 

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