|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.cruisecontrol.util.Commandline
net.sourceforge.cruisecontrol.util.EnvCommandline
net.sourceforge.cruisecontrol.sourcecontrols.accurev.AccurevCommandline
Allows to build and execute a valid accurev command line.
Nested Class Summary |
Nested classes inherited from class net.sourceforge.cruisecontrol.util.Commandline |
Commandline.Argument, Commandline.Marker |
Constructor Summary | |
AccurevCommandline(AccurevCommand command)
Creates a new AccurevCommandline. |
Method Summary | |
void |
addArgument(java.lang.String argument)
Adds an argument to the command line |
void |
addOption(java.lang.String option,
java.lang.String optionArgument)
Adds an option with an argument (eg. |
void |
assertSuccess()
Throws a CruiseControlException if the last command was not executed successfully. |
protected java.lang.String[] |
buildCommandLine()
|
boolean |
execute(AccurevInputParser inputParser)
Runs accurev and parses the output |
AccurevCommand |
getCommand()
Returns the accurev subcommand to be run by this command line object (eg. keep, synctime, update). |
int |
getReturnCode()
Gets the last "accurev" exec's return code. |
boolean |
isSuccess()
Returns the run status |
boolean |
isVerbose()
Returns the verbose flag |
boolean |
parseStream(java.io.InputStream iStream)
Default stream parser. |
void |
run()
Runs accurev and returns a reference to this. |
void |
selectModified()
Selects all modified files in keep (as in -m) |
void |
setComment(java.lang.String comment)
Sets the transaction comment (-c comment) |
void |
setDepot(java.lang.String depot)
Sets the Accurev depot to work in (-d depot) |
void |
setFileList(java.lang.String filelistName)
Selects the files to use reading them from the filelist (as in -l filelistName) |
void |
setFormatExpanded(char format)
Selects a format for hist as in (-f) |
void |
setInfoOnly()
Switches the -i option on |
void |
setInputParser(AccurevInputParser inputParser)
Sets the input parser, which is the object that handles Accurev's output as its input. |
void |
setRunner(Runner runner)
Sets the runner |
void |
setStream(java.lang.String stream)
Sets the Accurev stream to work in (-s stream) |
void |
setTransactionRange(Timespec time)
Selects a transaction range for hist as in (-t), single timespec |
void |
setTransactionRange(Timespec begin,
Timespec end)
Selects a transaction range for hist as in (-t), timespec span (a-b, a-, -b) |
void |
setVerbose(boolean verbose)
Enables/disables verbose logging |
void |
setWorkspaceLocalPath(java.io.File workspace)
Selects the workspace to use, specifying its path in the local filesystem. |
void |
setWorkspaceLocalPath(java.lang.String workspace)
Selects the workspace to use, specifying its path in the local filesystem. |
Methods inherited from class net.sourceforge.cruisecontrol.util.EnvCommandline |
execute, getVariable, setVariable |
Methods inherited from class net.sourceforge.cruisecontrol.util.Commandline |
addArguments, clear, clearArgs, clone, createArgument, createArgument, createArgument, createArguments, createMarker, executeAndWait, getArguments, getCommandline, getExecutable, getWorkingDir, getWorkingDirectory, quoteArgument, setExecutable, setWorkingDir, setWorkingDirectory, size, toString, toString, toString, toStringNoQuoting, translateCommandline, useSafeQuoting |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AccurevCommandline(AccurevCommand command)
command
- Method Detail |
public void setStream(java.lang.String stream)
stream
- the stream namepublic void setDepot(java.lang.String depot)
depot
- the depot namepublic void setComment(java.lang.String comment)
comment
- the comment text. Quotes and escapes are not required.public void setInfoOnly()
public void setTransactionRange(Timespec time)
time
- a timespec (can be a DateTimespec, a KeywordTimespecpublic void setTransactionRange(Timespec begin, Timespec end)
public void setFormatExpanded(char format) throws CruiseControlException
CruiseControlException
public void addArgument(java.lang.String argument)
argument
- the argument to add (eg "-i"). Quotes and escape codes are not required.public void setInputParser(AccurevInputParser inputParser)
public void addOption(java.lang.String option, java.lang.String optionArgument)
option
- the option flag (eg. "-s")optionArgument
- the option argument ("eg. my_stream"). No need for quotes or escape characters.public void selectModified()
public void setFileList(java.lang.String filelistName)
filelistName
- the path of the file containing the list of files to processpublic void setWorkspaceLocalPath(java.io.File workspace) throws CruiseControlException
workspace
- the workspace path
CruiseControlException
- if the path does not existpublic void setWorkspaceLocalPath(java.lang.String workspace) throws CruiseControlException
workspace
- the workspace path
CruiseControlException
- if the path does not existpublic void run()
public boolean execute(AccurevInputParser inputParser)
execute
in interface Runner
inputParser
-
protected java.lang.String[] buildCommandLine()
public boolean parseStream(java.io.InputStream iStream) throws CruiseControlException
parseStream
in interface AccurevInputParser
iStream
- accurev's STDOUT
CruiseControlException
- if fatal errors are foundpublic int getReturnCode()
getReturnCode
in interface Runner
public AccurevCommand getCommand()
AccurevCommandline(AccurevCommand command)
constructor.
public void setVerbose(boolean verbose)
verbose
- if true, verbose logging is enabled.public boolean isVerbose()
public boolean isSuccess()
public void assertSuccess() throws CruiseControlException
CruiseControlException
- if the command was not executed successfullypublic void setRunner(Runner runner)
runner
- the object that is in charge for provide some input to the parser
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |