allensoft.javacvs.client
Class MultiFileCVSRequest
java.lang.Object
|
+--allensoft.javacvs.client.CVSCommunicationsObject
|
+--allensoft.javacvs.client.CVSRequest
|
+--allensoft.javacvs.client.MultiFileCVSRequest
- Direct Known Subclasses:
- AddRequest, CommitRequest, DiffRequest, LogRequest, RemoveRequest, StatusRequest, TagRequest, UpdateRequest
- public abstract class MultiFileCVSRequest
- extends CVSRequest
The base class for requests that operate on one or more client files that
exist in a working directory.
Method Summary |
void |
addFile(java.io.File file)
Adds the supplied file/directory to the list of files this request operates on. |
java.io.File |
getCurrentDirectory()
Gets the directory that all file paths are specified relative to when executing
this request. |
java.io.File |
getFile(int i)
|
int |
getFileCount()
|
RepositoryLocation |
getRepositoryLocation()
Gets the repository location that the client must connect to in order to
perform this request. |
protected java.io.File |
getWorkingDirectoryForFile(java.io.File file)
Gets the directory that corresponds to the working directory for files added to this request. |
protected void |
validateFile(java.io.File file)
|
Methods inherited from class allensoft.javacvs.client.CVSRequest |
canSendIsModified, createResponse, fireStatusUpdate, getClient, getDescription, getException, getRequest, getResourceString, getResponse, getSendQuestionableCommands, hasCompletedSuccessfully, performRequest, sendRequest, validateRequest, waitForSuccessfulCompletion |
Methods inherited from class allensoft.javacvs.client.CVSCommunicationsObject |
expandModules, flush, getFileFromRelativePath, getRelativePath, getRelativePath, getRelativePath, getWrapperRCSOptions, performSubRequest, receiveFile, receiveFile, receiveLine, sendArgument, sendArgument, sendArgument, sendArgument, sendCheckinProg, sendCurrentDirectory, sendDateOption, sendDirectory, sendDirectory, sendEntry, sendFileDetails, sendFileDetails, sendFileDetails, sendGlobalOption, sendKopt, sendLine, sendModified, sendOptions, sendStaticDirectory, sendSticky, sendText, sendUnchanged, sendUpdateProg, sendWorkingDirectoryDetails, sendWorkingDirectoryDetails, sendWorkingDirectoryDetails, validRequests |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiFileCVSRequest
protected MultiFileCVSRequest()
MultiFileCVSRequest
protected MultiFileCVSRequest(java.io.File[] files)
throws CVSException,
java.io.IOException
MultiFileCVSRequest
protected MultiFileCVSRequest(java.io.File file)
throws CVSException,
java.io.IOException
getCurrentDirectory
public java.io.File getCurrentDirectory()
- Description copied from class:
CVSRequest
- Gets the directory that all file paths are specified relative to when executing
this request.
- Overrides:
getCurrentDirectory
in class CVSRequest
getRepositoryLocation
public RepositoryLocation getRepositoryLocation()
- Description copied from class:
CVSRequest
- Gets the repository location that the client must connect to in order to
perform this request.
- Overrides:
getRepositoryLocation
in class CVSRequest
getFileCount
public int getFileCount()
getFile
public java.io.File getFile(int i)
addFile
public void addFile(java.io.File file)
throws CVSException,
java.io.IOException
- Adds the supplied file/directory to the list of files this request operates on.
The repository location to connect to is taken from the working directory
for the file.
- Throws:
CannotAddFileException
- if the file is incompatiable with the files already added to this request.
For example, has a different repository location or does not share a common parent with the existing files.CVSException
- if something goes wrong.java.io.IOException
- if something goes wrong.
validateFile
protected void validateFile(java.io.File file)
throws java.io.IOException,
CVSException
getWorkingDirectoryForFile
protected java.io.File getWorkingDirectoryForFile(java.io.File file)
throws java.io.IOException,
CVSException
- Gets the directory that corresponds to the working directory for files added to this request.
By default, this method assumes that directories added to the request are working directories
and so returns the directory supplied. If a file is supplied, then this method will assume
the parent directory of the file is a working directory.