public class CheckoutCommand extends BasicCommand implements TemporaryFileCreator
clientServices, files, requests
builder
localDirectory
Constructor and Description |
---|
CheckoutCommand()
Construct a checkout command, with default values for options.
|
CheckoutCommand(boolean recursive,
String module)
Construct a new checkout command.
|
CheckoutCommand(boolean recursive,
String[] modules)
Construct a new checkout command.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
assumeLocalPathWhenUnspecified()
The result from this command is used only when the getFiles() returns
null or empty array.
|
void |
clearModules()
clears the list of modules for checkout.
|
Builder |
createBuilder(EventManager eventMan)
Method that is called while the command is being executed.
|
File |
createTempFile(String filename) |
void |
execute(ClientServices client,
EventManager em)
Execute this command.
|
String |
getCheckoutByDate()
Getter for property checkoutByDate.
|
String |
getCheckoutByRevision()
Getter for property checkoutByRevision.
|
String |
getCheckoutDirectory()
Getter for property checkoutDirectory.
|
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[] |
getModules() |
String |
getOptString()
String returned by this method defines which options are available for
this particular command
|
boolean |
getPruneDirectories()
Get whether to prune directories.
|
boolean |
isNotRunModuleProgram()
Getter for property notRunModuleProgram.
|
boolean |
isNotShortenPaths()
Getter for property notShortenPaths.
|
boolean |
isPipeToOutput()
Getter for property pipeToOutput.
|
boolean |
isResetStickyOnes()
Getter for property resetStickyOnes.
|
boolean |
isShowModules()
Getter for property showModules.
|
boolean |
isShowModulesWithStatus()
Getter for property showModulesWithStatus.
|
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 |
moduleExpanded(ModuleExpansionEvent e)
This is called when the server has responded to an expand-modules
request.
|
void |
resetCVSCommand()
Resets all switches in the command.
|
void |
setCheckoutByDate(String checkoutByDate)
Setter for property checkoutByDate.
|
void |
setCheckoutByRevision(String checkoutByRevision)
Setter for property checkoutByRevision.
|
void |
setCheckoutDirectory(String checkoutDirectory)
Setter for property checkoutDirectory.
|
boolean |
setCVSCommand(char opt,
String optArg)
Takes the arguments and sets the command.
|
void |
setKeywordSubst(KeywordSubstitutionOptions keywordSubst)
Setter for property keywordSubst.
|
void |
setModule(String module)
Set the modules to checkout.
|
void |
setModules(String[] modules)
Set the modules to checkout.
|
void |
setNotRunModuleProgram(boolean notRunModuleProgram)
Setter for property notRunModuleProgram.
|
void |
setNotShortenPaths(boolean notShortenPaths)
Setter for property notShortenPaths.
|
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 |
setShowModules(boolean showModules)
Setter for property showModules.
|
void |
setShowModulesWithStatus(boolean showModulesWithStatus)
Setter for property showModulesWithStatus.
|
void |
setUseHeadIfNotFound(boolean useHeadIfNotFound)
Setter for property useHeadIfNotFound.
|
addArgumentRequest, addArgumentRequests, addDirectoryRequest, addRequest, addRequestForFile, addRequestForWorkingDirectory, addRequestsForDirectory, addRequestsForFile, appendFileArguments, doesCheckFileTime, getFileEndingWith, getFiles, getRecursive, getXthFile, isRecursive, sendEntryAndModifiedRequests, setFiles, setRecursive
commandTerminated, isBuilderSet, messageSent, setBuilder
clone, fileAdded, fileInfoGenerated, fileRemoved, fileToRemove, fileUpdated, getDisplayName, getGlobalOptions, getLocalDirectory, getLocalPath, getRelativeToLocalPathInUnixStyle, getTrimmedString, hasFailed, setDisplayName, setLocalDirectory
public CheckoutCommand(boolean recursive, String[] modules)
recursive
- whether to do a recursive checkoutmodules
- an array of modules names to checkoutpublic CheckoutCommand(boolean recursive, String module)
recursive
- whether to do a recursive checkoutmodule
- the module to checkoutpublic CheckoutCommand()
public void setModule(String module)
theModules
- the names (it's like relative path) of the modules to checkoutpublic void clearModules()
public void setModules(String[] modules)
theModules
- the names of the modules to checkoutpublic String[] getModules()
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 boolean assumeLocalPathWhenUnspecified()
assumeLocalPathWhenUnspecified
in class BasicCommand
public void moduleExpanded(ModuleExpansionEvent e)
moduleExpanded
in interface CVSListener
moduleExpanded
in class Command
public boolean isShowModules()
public void setShowModules(boolean showModules)
showModules
- New value of property showModules.public boolean isShowModulesWithStatus()
public void setShowModulesWithStatus(boolean showModulesWithStatus)
showModulesWithStatus
- New value of property showModulesWithStatus.public void setPruneDirectories(boolean pruneDirectories)
public boolean getPruneDirectories()
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 boolean isNotShortenPaths()
public void setNotShortenPaths(boolean notShortenPaths)
notShortenPaths
- New value of property notShortenPaths.public boolean isNotRunModuleProgram()
public void setNotRunModuleProgram(boolean notRunModuleProgram)
notRunModuleProgram
- New value of property notRunModuleProgram.public String getCheckoutByDate()
public void setCheckoutByDate(String checkoutByDate)
checkoutByDate
- New value of property checkoutByDate.public String getCheckoutByRevision()
public void setCheckoutByRevision(String checkoutByRevision)
checkoutByRevision
- New value of property checkoutByRevision.public String getCheckoutDirectory()
public void setCheckoutDirectory(String checkoutDirectory)
checkoutDirectory
- New value of property checkoutDirectory.public KeywordSubstitutionOptions getKeywordSubst()
public void setKeywordSubst(KeywordSubstitutionOptions keywordSubst)
keywordSubst
- New value of property keywordSubst.public Builder createBuilder(EventManager eventMan)
BuildableCommand
createBuilder
in class BuildableCommand
public File createTempFile(String filename) throws IOException
createTempFile
in interface TemporaryFileCreator
IOException
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 void resetCVSCommand()
resetCVSCommand
in class Command
public String getCVSArguments()
getCVSArguments
in class Command
public void messageSent(MessageEvent e)
messageSent
in interface CVSListener
messageSent
in class BuildableCommand
e
- the eventCopyright © 2016. All rights reserved.