public interface ClientServices extends Serializable
Modifier and Type | Method and Description |
---|---|
void |
ensureConnection()
Ensures, that the connection is open.
|
boolean |
exists(File file)
Tests for existence of the given file.
|
Set<File> |
getAllFiles(File directory)
Get all the files contained within a given directory that are known to
CVS.
|
Iterator<Entry> |
getEntries(File directory)
Get the entries for a specified directory.
|
Entry |
getEntry(File file)
Get the Entry for the specified file, if one exists.
|
GlobalOptions |
getGlobalOptions()
Get the global options that are set to this client.
|
IgnoreFileFilter |
getIgnoreFileFilter()
Returns the IgnoreFileFilter used to ignore non-cvs files.
|
String |
getLocalPath()
Get the local path that the command is executing in.
|
String |
getRepository()
Get the repository used for this connection.
|
String |
getRepositoryForDirectory(File directory)
Semantically equivalent to
getRepositoryForDirectory(String) but
does not try to recover from missing CVS/Repository file. |
String |
getRepositoryForDirectory(String directory)
Get the repository path for a given directory, for example in the
directory /home/project/foo/bar, the repository directory might be
/usr/cvs/foo/bar.
|
String |
getStickyTagForDirectory(File directory)
Checks for presence of CVS/Tag file and returns it's value.
|
Map<StringPattern,KeywordSubstitutionOptions> |
getWrappersMap()
Returns the wrappers map associated with the CVS server The map is valid
only after the connection is established
|
boolean |
isAborted()
Tests whether command execution should be aborted.
|
boolean |
isFirstCommand()
Returns true if no command was sent before.
|
void |
processRequests(List<Request> requests)
Process all the requests.
|
void |
removeEntry(File file)
Removes the Entry for the specified file.
|
void |
setGzipFileHandler(FileHandler handler)
Set the handler for Gzip data.
|
void |
setIgnoreFileFilter(IgnoreFileFilter filter)
Sets the specified IgnoreFileFilter to use to ignore non-cvs files.
|
void |
setIsFirstCommand(boolean first)
Set whether this is the first command.
|
void |
setUncompressedFileHandler(FileHandler handler)
Set the uncompressed file handler.
|
boolean |
shouldBeIgnored(File directory,
String nonCvsFile)
Returnes true to indicate, that the file specified by directory and
nonCvsFile should be ignored.
|
void |
updateAdminData(String localDirectory,
String repositoryPath,
Entry entry)
Create or update the administration files for a particular file This will
create the CVS directory if necessary, and the Root and Repository files
if necessary.
|
void processRequests(List<Request> requests) throws IOException, UnconfiguredRequestException, ResponseException, CommandAbortedException
requests
- the requets to processIOException
UnconfiguredRequestException
ResponseException
CommandAbortedException
String getRepository()
String getRepositoryForDirectory(String directory) throws IOException
Repositoryin the CVS directory on the client. (This is the case in the standard CVS command-line tool)
directory
- the directoryIOException
String getRepositoryForDirectory(File directory) throws IOException
getRepositoryForDirectory(String)
but
does not try to recover from missing CVS/Repository file.directory
- the directory to get repository forIOException
- if the repository cannot be determined by reading
CVS/Repository fileString getLocalPath()
Entry getEntry(File file) throws IOException
file
- the fileIOException
- if the Entries file cannot be readIterator<Entry> getEntries(File directory) throws IOException
directory
- the directory for which to get the entriesIOException
void updateAdminData(String localDirectory, String repositoryPath, Entry entry) throws IOException
localDirectory
- the local directory, relative to the directory in which the
command was given, where the file in question livesentry
- the entry object for that fileIOException
- if there is an error writing the filesSet<File> getAllFiles(File directory) throws IOException
directory
- the directory to look inIOException
boolean isFirstCommand()
void setIsFirstCommand(boolean first)
void removeEntry(File file) throws IOException
IOException
void setIgnoreFileFilter(IgnoreFileFilter filter)
IgnoreFileFilter getIgnoreFileFilter()
boolean shouldBeIgnored(File directory, String nonCvsFile)
void setUncompressedFileHandler(FileHandler handler)
void setGzipFileHandler(FileHandler handler)
String getStickyTagForDirectory(File directory)
void ensureConnection() throws AuthenticationException
AuthenticationException
- if it wasn't possible to connectMap<StringPattern,KeywordSubstitutionOptions> getWrappersMap() throws CommandException
CommandException
GlobalOptions getGlobalOptions()
boolean exists(File file)
file
- file to test for existenceboolean isAborted()
Copyright © 2016. All rights reserved.