|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Clients that provide the ability to execute commands must implement this interface. All commands use this interface to get details about the environment in which it is being run, and to perform administrative functions such as obtaining Entry lines for specified files.
Method Summary | |
void |
ensureConnection()
Ensures, that the connection is open. |
java.util.Set |
getAllFiles(java.io.File directory)
Get all the files contained within a given directory that are known to CVS. |
java.util.Iterator |
getEntries(java.io.File directory)
Get the entries for a specified directory. |
Entry |
getEntry(java.io.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. |
java.lang.String |
getLocalPath()
Get the local path that the command is executing in. |
java.lang.String |
getRepository()
Get the repository used for this connection. |
java.lang.String |
getRepositoryForDirectory(java.lang.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. |
java.lang.String |
getStickyTagForDirectory(java.io.File directory)
Checks for presence of CVS/Tag file and returns it's value. |
java.util.Map |
getWrappersMap()
Returns the wrappers map associated with the CVS server The map is valid only after the connection is established |
boolean |
isFirstCommand()
Returns true if no command was sent before. |
void |
processRequests(java.util.List requests)
Process all the requests. |
void |
removeEntry(java.io.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(java.io.File directory,
java.lang.String nonCvsFile)
Returnes true to indicate, that the file specified by directory and nonCvsFile should be ignored. |
void |
updateAdminData(java.lang.String localDirectory,
java.lang.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. |
Method Detail |
public void processRequests(java.util.List requests) throws java.io.IOException, UnconfiguredRequestException, ResponseException, CommandAbortedException
requests
- the requets to process
java.io.IOException
UnconfiguredRequestException
ResponseException
CommandAbortedException
public java.lang.String getRepository()
public java.lang.String getRepositoryForDirectory(java.lang.String directory) throws java.io.IOException
Repositoryin the CVS directory on the client. (This is the case in the standard CVS command-line tool)
directory
- the directory
java.io.IOException
public java.lang.String getLocalPath()
public Entry getEntry(java.io.File file) throws java.io.IOException
file
- the file
java.io.IOException
- if the Entries file cannot be readpublic java.util.Iterator getEntries(java.io.File directory) throws java.io.IOException
directory
- the directory for which to get the entries
java.io.IOException
public void updateAdminData(java.lang.String localDirectory, java.lang.String repositoryPath, Entry entry) throws java.io.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 file
java.io.IOException
- if there is an error writing the filespublic java.util.Set getAllFiles(java.io.File directory) throws java.io.IOException
directory
- the directory to look in
java.io.IOException
public boolean isFirstCommand()
public void setIsFirstCommand(boolean first)
public void removeEntry(java.io.File file) throws java.io.IOException
java.io.IOException
public void setIgnoreFileFilter(IgnoreFileFilter filter)
public IgnoreFileFilter getIgnoreFileFilter()
public boolean shouldBeIgnored(java.io.File directory, java.lang.String nonCvsFile)
public void setUncompressedFileHandler(FileHandler handler)
public void setGzipFileHandler(FileHandler handler)
public java.lang.String getStickyTagForDirectory(java.io.File directory)
public void ensureConnection() throws AuthenticationException
AuthenticationException
- if it wasn't possible to connectpublic java.util.Map getWrappersMap() throws CommandException
CommandException
public GlobalOptions getGlobalOptions()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |