org.netbeans.lib.cvsclient.response
Interface ResponseServices

All Known Implementing Classes:
Client

public interface ResponseServices

Services that are provided to response handlers.


Method Summary
 void addWrapper(StringPattern pattern, KeywordSubstitutionOptions option)
          This method is called by WrapperSendResponse for each wrapper setting sent back by the CVS server
 java.lang.String convertPathname(java.lang.String localDirectory, java.lang.String repository)
          Convert a pathname in the CVS sense (see 5.10 in the protocol document) into a local pathname for the file
 void dontUseGzipFileHandler()
          ReSet the filehandler for Gzip compressed data.
 EventManager getEventManager()
          Get the CVS event manager.
 GlobalOptions getGlobalOptions()
          Get the global options that are set to this client.
 FileHandler getGzipFileHandler()
          Obtain the file handler for Gzip compressed data.
 java.util.Date getNextFileDate()
          Get the modified date of the next file to be written.
 FileHandler getUncompressedFileHandler()
          Obtain from the underlying implementation the file handler for handling uncompressed data.
 void removeEntry(java.io.File f)
          Remove the Entry for the specified file
 void removeLocalFile(java.lang.String pathname)
          Remove the specified file from the local disk If the file does not exist, the operation does nothing.
 void removeLocalFile(java.lang.String localPath, java.lang.String repositoryFileName)
          Remove the specified file from the local disk.
 void renameLocalFile(java.lang.String pathname, java.lang.String newName)
          Rename the local file
 void setEntry(java.io.File f, Entry e)
          Set the Entry for the specified file
 void setNextFileDate(java.util.Date modifiedDate)
          Set the modified date of the next file to be written.
 void setValidRequests(java.lang.String requests)
          This method is called when a response for the ValidRequests request is received.
 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

setNextFileDate

void setNextFileDate(java.util.Date modifiedDate)
Set the modified date of the next file to be written. The next call to writeFile will use this date.

Parameters:
modifiedDate - the date the file should be marked as modified

getNextFileDate

java.util.Date getNextFileDate()
Get the modified date of the next file to be written. This will also null any stored date so that future calls will not retrieve a date that was meant for a previous file.

Returns:
the date the next file should be marked as having been modified on.

convertPathname

java.lang.String convertPathname(java.lang.String localDirectory,
                                 java.lang.String repository)
Convert a pathname in the CVS sense (see 5.10 in the protocol document) into a local pathname for the file

Parameters:
localDirectory - the name of the local directory, relative to the directory in which the command was given
repository - the full repository name for the file

updateAdminData

void updateAdminData(java.lang.String localDirectory,
                     java.lang.String repositoryPath,
                     Entry entry)
                     throws java.io.IOException
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. It will also update the Entries file with the new entry

Parameters:
localDirectory - the local directory, relative to the directory in which the command was given, where the file in question lives
entry - the entry object for that file
Throws:
java.io.IOException - if there is an error writing the files

setEntry

void setEntry(java.io.File f,
              Entry e)
              throws java.io.IOException
Set the Entry for the specified file

Parameters:
f - the file
e - the new entry
Throws:
java.io.IOException - if an error occurs writing the details

removeEntry

void removeEntry(java.io.File f)
                 throws java.io.IOException
Remove the Entry for the specified file

Parameters:
f - the file whose entry is to be removed
Throws:
java.io.IOException - if an error occurs writing the Entries file

removeLocalFile

void removeLocalFile(java.lang.String pathname)
                     throws java.io.IOException
Remove the specified file from the local disk If the file does not exist, the operation does nothing.

Parameters:
pathname - the full path to the file to remove
Throws:
java.io.IOException - if an IO error occurs while removing the file

removeLocalFile

void removeLocalFile(java.lang.String localPath,
                     java.lang.String repositoryFileName)
                     throws java.io.IOException
Remove the specified file from the local disk.

Throws:
java.io.IOException - if an IO error occurs while removing the file

renameLocalFile

void renameLocalFile(java.lang.String pathname,
                     java.lang.String newName)
                     throws java.io.IOException
Rename the local file

Parameters:
pathname - the full path to the file to rename
newName - the new name of the file (not the full path)
Throws:
java.io.IOException - if an IO error occurs while renaming the file

getEventManager

EventManager getEventManager()
Get the CVS event manager. This is generally called by response handlers that want to fire events.

Returns:
the eventManager

getUncompressedFileHandler

FileHandler getUncompressedFileHandler()
Obtain from the underlying implementation the file handler for handling uncompressed data.

Returns:
file handler for uncompressed data.

getGzipFileHandler

FileHandler getGzipFileHandler()
Obtain the file handler for Gzip compressed data.

Returns:
file handler for Gzip compressed data.

dontUseGzipFileHandler

void dontUseGzipFileHandler()
ReSet the filehandler for Gzip compressed data. Makes sure the requests for sending gzipped data are not sent..


setValidRequests

void setValidRequests(java.lang.String requests)
This method is called when a response for the ValidRequests request is received.

Parameters:
requests - A List of requests that is valid for this CVS server separated by spaces.

addWrapper

void addWrapper(StringPattern pattern,
                KeywordSubstitutionOptions option)
This method is called by WrapperSendResponse for each wrapper setting sent back by the CVS server

Parameters:
pattern - A StringPattern indicating the pattern for which the wrapper applies
option - A KeywordSubstituionOption corresponding to the setting

getGlobalOptions

GlobalOptions getGlobalOptions()
Get the global options that are set to this client. Individual commands can get the global options via this method.


 

Built on August 7 2008.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.