public class CommitCommand extends BasicCommand
clientServices, files, requests
builder
localDirectory
Constructor and Description |
---|
CommitCommand()
Construct a CommitCommand.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addArgumentRequests()
Add the argument requests.
|
protected void |
addRequestsForDirectory(File directory)
Adds the appropriate requests for a given directory.
|
protected void |
addRequestsForFile(File file)
Add the appropriate requests for a single file.
|
Builder |
createBuilder(EventManager eventMan)
Method that is called while the command is being executed.
|
protected boolean |
doesCheckFileTime()
Should return true if unchanged files should not be sent to server.
|
void |
execute(ClientServices client,
EventManager em)
Execute the command.
|
String |
getCVSArguments()
Returns the arguments of the command in the command-line style.
|
String |
getCVSCommand()
This method returns how the command would looklike when typed on the
command line.
|
String |
getLogMessageFromFile()
Returns the filename for the file that defines the message.
|
String |
getMessage()
Returns the commit message.
|
String |
getOptString()
Returns a String defining which options are available for this command.
|
String |
getToRevisionOrBranch()
Getter for property toRevisionOrBranch.
|
boolean |
isForceCommit()
Indicates whether the commit should be forced even if there are no
changes.
|
boolean |
isNoModuleProgram()
Returns whether no module program should be executed on the server.
|
void |
resetCVSCommand()
Resets all switches in the command.
|
boolean |
setCVSCommand(char opt,
String optArg)
Takes the arguments and sets the command.
|
void |
setForceCommit(boolean forceCommit)
Sets whether the commit should be forced even if there are no changes.
|
void |
setLogMessageFromFile(String logMessageFromFile)
Sets the filename for the file that defines the message.
|
void |
setMessage(String message)
Sets the commit message.
|
void |
setNoModuleProgram(boolean noModuleProgram)
Sets whether no module program should run on the server
|
void |
setToRevisionOrBranch(String toRevBranch)
Setter for property toRevisionOrBranch.
|
addArgumentRequest, addDirectoryRequest, addRequest, addRequestForFile, addRequestForWorkingDirectory, appendFileArguments, assumeLocalPathWhenUnspecified, getFileEndingWith, getFiles, getRecursive, getXthFile, isRecursive, sendEntryAndModifiedRequests, setFiles, setRecursive
commandTerminated, isBuilderSet, messageSent, messageSent, setBuilder
clone, fileAdded, fileInfoGenerated, fileRemoved, fileToRemove, fileUpdated, getDisplayName, getGlobalOptions, getLocalDirectory, getLocalPath, getRelativeToLocalPathInUnixStyle, getTrimmedString, hasFailed, moduleExpanded, setDisplayName, setLocalDirectory
public String getMessage()
public void setMessage(String message)
public boolean isForceCommit()
public void setForceCommit(boolean forceCommit)
protected void addRequestsForDirectory(File directory) throws IOException
addRequestsForDirectory
in class BasicCommand
directory
- the directory to send requests forIOException
- if an error occurs constructing the requestsprotected void addRequestsForFile(File file) throws IOException
addRequestsForFile
in class BasicCommand
file
- the file to send requests forIOException
- if an error occurs constructing the requestsprotected boolean doesCheckFileTime()
sendEntryAndModifiedRequests
.doesCheckFileTime
in class BasicCommand
public void execute(ClientServices client, EventManager em) throws CommandException, AuthenticationException
execute
in class BasicCommand
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
protected void addArgumentRequests()
BasicCommand
addArgumentRequests
in class BasicCommand
public String getCVSCommand()
getCVSCommand
in class Command
public boolean setCVSCommand(char opt, String optArg)
setCVSCommand
in class Command
public String getOptString()
getOptString
in class Command
public Builder createBuilder(EventManager eventMan)
createBuilder
in class BuildableCommand
public String getLogMessageFromFile()
public void setLogMessageFromFile(String logMessageFromFile)
public boolean isNoModuleProgram()
public void setNoModuleProgram(boolean noModuleProgram)
public String getToRevisionOrBranch()
public void setToRevisionOrBranch(String toRevBranch)
toRevisionOrBranch
- New value of property toRevisionOrBranch.public void resetCVSCommand()
resetCVSCommand
in class Command
public String getCVSArguments()
getCVSArguments
in class Command
Copyright © 2016. All rights reserved.