public class UpdateCommand extends BasicCommand implements TemporaryFileCreator
clientServices, files, requests
builder
localDirectory
Constructor and Description |
---|
UpdateCommand()
Construct a new update command.
|
Modifier and Type | Method and Description |
---|---|
Builder |
createBuilder(EventManager eventManager)
Method that is called while the command is being executed.
|
File |
createTempFile(String filename)
Method that creates a temporary file.
|
void |
execute(ClientServices client,
EventManager eventManager)
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.
|
KeywordSubstitutionOptions |
getKeywordSubst()
Getter for property keywordSubst.
|
String |
getMergeRevision1()
Getter for property mergeRevision1.
|
String |
getMergeRevision2()
Getter for property mergeRevision2.
|
String |
getOptString()
String returned by this method defines which options are available for
this particular command
|
String |
getUpdateByDate()
Getter for property updateByDate.
|
String |
getUpdateByRevision()
Getter for property updateByRevision.
|
boolean |
isBuildDirectories()
Returns whether to build directories.
|
boolean |
isCleanCopy()
Returns whether to get a clean copy from the server.
|
boolean |
isPipeToOutput()
Getter for property pipeToOutput.
|
boolean |
isPruneDirectories()
Returns whether to prune directories.
|
boolean |
isResetStickyOnes()
Getter for property resetStickyOnes.
|
boolean |
isUseHeadIfNotFound()
Getter for property useHeadIfNotFound.
|
void |
messageSent(MessageEvent e)
Called when the server wants to send a message to be displayed to the
user.
|
void |
resetCVSCommand()
Resets all switches in the command.
|
protected void |
sendEntryAndModifiedRequests(Entry entry,
File file)
If
getCleanCopy() returns true, the files will be treated as
not existing. |
void |
setBuildDirectories(boolean buildDirectories)
Set whether to build directories.
|
void |
setCleanCopy(boolean cleanCopy)
Sets whether to get a clean copy from the server.
|
boolean |
setCVSCommand(char opt,
String optArg)
Takes the arguments and by parsing them, sets the command.
|
void |
setKeywordSubst(KeywordSubstitutionOptions keywordSubst)
Setter for property keywordSubst.
|
void |
setMergeRevision1(String mergeRevision1)
Setter for property mergeRevision1.
|
void |
setMergeRevision2(String mergeRevision2)
Setter for property mergeRevision2.
|
void |
setPipeToOutput(boolean pipeToOutput)
Setter for property pipeToOutput.
|
void |
setPruneDirectories(boolean pruneDirectories)
Set whether to prune directories.
|
void |
setResetStickyOnes(boolean resetStickyOnes)
Setter for property resetStickyOnes.
|
void |
setUpdateByDate(String updateByDate)
Setter for property updateByDate.
|
void |
setUpdateByRevision(String updateByRevision)
Setter for property updateByRevision.
|
void |
setUseHeadIfNotFound(boolean useHeadIfNotFound)
Setter for property useHeadIfNotFound.
|
addArgumentRequest, addArgumentRequests, addDirectoryRequest, addRequest, addRequestForFile, addRequestForWorkingDirectory, addRequestsForDirectory, addRequestsForFile, appendFileArguments, assumeLocalPathWhenUnspecified, doesCheckFileTime, getFileEndingWith, getFiles, getRecursive, getXthFile, isRecursive, setFiles, setRecursive
commandTerminated, isBuilderSet, messageSent, setBuilder
clone, fileAdded, fileInfoGenerated, fileRemoved, fileToRemove, fileUpdated, getDisplayName, getGlobalOptions, getLocalDirectory, getLocalPath, getRelativeToLocalPathInUnixStyle, getTrimmedString, hasFailed, moduleExpanded, setDisplayName, setLocalDirectory
public Builder createBuilder(EventManager eventManager)
createBuilder
in class BuildableCommand
protected void sendEntryAndModifiedRequests(Entry entry, File file)
getCleanCopy()
returns true, the files will be treated as
not existing.sendEntryAndModifiedRequests
in class BasicCommand
entry
- the entry for the filefile
- the file in questionpublic void setBuildDirectories(boolean buildDirectories)
public boolean isBuildDirectories()
public void setCleanCopy(boolean cleanCopy)
public boolean isCleanCopy()
public void setPruneDirectories(boolean pruneDirectories)
public boolean isPruneDirectories()
public void execute(ClientServices client, EventManager eventManager) 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
public boolean isPipeToOutput()
public void setPipeToOutput(boolean pipeToOutput)
pipeToOutput
- New value of property pipeToOutput.public boolean isResetStickyOnes()
public void setResetStickyOnes(boolean resetStickyOnes)
resetStickyOnes
- New value of property resetStickyOnes.public boolean isUseHeadIfNotFound()
public void setUseHeadIfNotFound(boolean useHeadIfNotFound)
useHeadIfNotFound
- New value of property useHeadIfNotFound.public String getUpdateByDate()
public void setUpdateByDate(String updateByDate)
updateByDate
- New value of property updateByDate.public String getUpdateByRevision()
public void setUpdateByRevision(String updateByRevision)
updateByRevision
- New value of property updateByRevision.public KeywordSubstitutionOptions getKeywordSubst()
public void setKeywordSubst(KeywordSubstitutionOptions keywordSubst)
keywordSubst
- New value of property keywordSubst.public File createTempFile(String filename) throws IOException
createTempFile
in interface TemporaryFileCreator
IOException
public String getCVSCommand()
getCVSCommand
in class Command
public String getCVSArguments()
getCVSArguments
in class Command
public boolean setCVSCommand(char opt, String optArg)
setCVSCommand
in class Command
public void resetCVSCommand()
resetCVSCommand
in class Command
public void messageSent(MessageEvent e)
messageSent
in interface CVSListener
messageSent
in class BuildableCommand
e
- the eventpublic String getOptString()
getOptString
in class Command
public String getMergeRevision1()
public void setMergeRevision1(String mergeRevision1)
mergeRevision1
- New value of property mergeRevision1.public String getMergeRevision2()
public void setMergeRevision2(String mergeRevision2)
mergeRevision2
- New value of property mergeRevision2.Copyright © 2016. All rights reserved.