The CVSRequest class is used to encapsulate a complete
description of a CVS server request. Capable of parsing
a simple string to define a request, CVSRequests are
often built by configuration properties. Once a CVRequest
is built and filled in, it is handed to a CVSClient for
processing. Once the processing is completed, the CVSClient
will return a CVSResponse containing the results of the
request.
version: $Revision: 2.9 $ author: Timothy Gerard Endres,
allowGzipFileMode If true, allow gzip-file-contents mode, otherwise suppress it.
public boolean
allowOverWrites If true, reponses that try to overwrite existing updated
files will be allowed to overwrite if the file is in the
list of files sent to the server.
public boolean
displayReponse Determines if this request should display the reponse.
public boolean
execInCurDir This determines where cvs commands are executed.
If true, reponses that try to overwrite existing updated
files will be allowed to overwrite if the file is in the
list of files sent to the server. If false, normal processing
occurs (no overwrites allowed).
This determines where cvs commands are executed.
If true, the command is run in the 'current directory'.
If false, the command is run at the 'top level'.
Determines if this request will guarantee a '-m message' argument.
Actually getting the message from the user is the responsibility
of the code that uses the request, since CVSRequests have no clue
about how to get messages.
If true, the reponse's status will be ignored and assumed
to be 'ok'. If false, the reponse's status will be set to
reflect the status returned by the server.
The 'Notification' vector. If this vector is not null
then it contains a vector if notification strings of the
format: 'File\tType\tTime\tHost\tWorkingDir\tWatches'.
Determines whether or not the server's reponse is queued.
If true, all responses will be queued and handed back in
the CVSResponse. If false, responses will be handed to the
'responseHandler' for processing as they come from the server.
Determines if the output of the reponse (stderr & stdout) will
be redirected to a user specified file. It is the responsbility
of the code using the request to setup the output file.
The response handler. If this request does not use the
'queue response' option, then this field must be set to
the CVSResponseHandler that will handle the responses
to this request.
Determines if this request will send the special empty 'Modified'
requests when a file is to be uploaded. If true, all 'Modified'
requests send a file size of zero to optimize the protocol when
the file's contents are not needed.
Determines if this request will send 'Modified' requests
for files that are modified locally. If true, modified
files are uploaded via 'Modified'. If false, modified
files are treated as if they were unchanged.
Returns the request's ROOT repository. This is the
full repository path to the root entry's directory.
This should match rootEntry.getRepository().
The request's ROOT repository.
public void parseArgumentString(String argStr)(Code)
Process a user provided, or command spec based, argument string.
The syntax is '[global options] command options'.
Parameters: argStr - The argument string to be parsed.
parseControlString
public boolean parseControlString(String specification)(Code)
Attempts to parse a CVS request specification string. If
the parse succeeds, this request object will be updated
to reflect the request specification, making it ready to
be handed to a CVSClient for processing.
The string is of the format:
:command:select:request:response:arguments
Where:
command - is a valid cvs command name (e.g., 'update', 'co', 'diff')
select - specifies which entries to apply command to
request - is a valid cvs request specification
reponse - is a valid cvs reponse handling specification
arguments - is the remainder of the string taken as command arguments
Refer to the CVSRequest Specification for details.
Parameters: specification - The CVSRequest Specification string to parse. True if the parse succeeded, false if it failed.
parseEntriesSelector
public static int parseEntriesSelector(char selectCh)(Code)
Sets the request's argument list.
Parameters: arguments - The new list of argument for this request.
setCheckInProgram
public void setCheckInProgram(String program)(Code)
Sets the request's 'Checkin-prog' setting.
This does not create or delete the 'Checkin.prog'
administration file. This must be done by the request user.
Parameters: program - The new checkin-program name.
Sets the request's server hostname. The hostname
is used to establish the connection with the CVS server.
Parameters: hostName - The new hostname for the request's CVS Server.
setLocalDirectory
public void setLocalDirectory(String localDirectory)(Code)
Sets the request's local directory.
Parameters: localDirectory - The new local directory for the request.
Sets the request's server port number. The port number
is used to establish the connection with the CVS server.
Parameters: port - The new port number for the request's CVS server.
Sets the request's 'Sticky' settings.
Parameters: stickys - The new Hashtable of this request's 'Sticky' settings.
setUpdateProgram
public void setUpdateProgram(String program)(Code)
Sets the request's 'Update-prog' setting.
This does not create or delete the 'Update.prog'
administration file. This must be done by the request user.
Parameters: program - The new update-program name.
Verify the current request. This determines if the request
has enough information to be handed to a CVSClient for
processing. It also makes some sanity checks.
True of the request is valid, false if not. See Also:CVSRequest.verifyRequest See Also:CVSRequest.getVerifyFailReason