public class AddCommand extends BuildableCommand
builder
localDirectory
Constructor and Description |
---|
AddCommand()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addRequests(File file)
Add requests for a particular file or directory to be added.
|
protected void |
addRequestsForFile(File file)
Add requests for a particular file.
|
Builder |
createBuilder(EventManager eventManager)
Method that is called while the command is being executed.
|
void |
execute(ClientServices client,
EventManager em)
Execute a command.
|
String |
getCVSArguments()
Returns the arguments of the command in the command-line style.
|
String |
getCVSCommand()
This method returns how the command would look like when typed on the
command line.
|
File |
getFileEndingWith(String ending) |
File[] |
getFiles()
Get the files and/or directories specified for this command to operate
on.
|
KeywordSubstitutionOptions |
getKeywordSubst()
Getter for property keywordSubst.
|
String |
getMessage()
Getter for property message.
|
String |
getOptString()
Returns a string indicating the available options.
|
void |
messageSent(MessageEvent e)
Listens for output of the command.
|
void |
resetCVSCommand()
resets all switches in the command.
|
boolean |
setCVSCommand(char opt,
String optArg)
Takes the arguments and sets the command.
|
void |
setFiles(File[] files)
Set the files and/or directories on which to execute the command.
|
void |
setKeywordSubst(KeywordSubstitutionOptions keywordSubst)
Setter for property keywordSubst.
|
void |
setMessage(String message)
Setter for property message.
|
commandTerminated, isBuilderSet, messageSent, setBuilder
clone, fileAdded, fileInfoGenerated, fileRemoved, fileToRemove, fileUpdated, getDisplayName, getGlobalOptions, getLocalDirectory, getLocalPath, getRelativeToLocalPathInUnixStyle, getTrimmedString, hasFailed, moduleExpanded, setDisplayName, setLocalDirectory
public void setFiles(File[] files)
public File[] getFiles()
public File getFileEndingWith(String ending)
ending
- - the ending part of the file's pathname.. path separator is
cvs's default '/'public String getMessage()
public void setMessage(String message)
message
- New value of property message.public KeywordSubstitutionOptions getKeywordSubst()
public void setKeywordSubst(KeywordSubstitutionOptions keywordSubst)
keywordSubst
- New value of property keywordSubst.protected void addRequests(File file) throws IOException, CommandException
IOException
CommandException
protected void addRequestsForFile(File file) throws IOException, CommandException
IOException
CommandException
public void execute(ClientServices client, EventManager em) throws CommandException, AuthenticationException
execute
in class BuildableCommand
client
- the client services object that provides any necessary
services to this command, including the ability to actually
process all the requestsCommandException
- if an error occurs executing the commandAuthenticationException
public String getCVSCommand()
getCVSCommand
in class Command
public Builder createBuilder(EventManager eventManager)
createBuilder
in class BuildableCommand
public boolean setCVSCommand(char opt, String optArg)
setCVSCommand
in class Command
public String getOptString()
getOptString
in class Command
public void messageSent(MessageEvent e)
messageSent
in interface CVSListener
messageSent
in class BuildableCommand
e
- the eventpublic void resetCVSCommand()
resetCVSCommand
in class Command
public String getCVSArguments()
getCVSArguments
in class Command
Copyright © 2016. All rights reserved.