|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sharpster.daemon.filemanagement.FileManager
Class responsible for the overall management of files, both local files
and files stored in the local CVS.
Most of its work is delegated to the classes of the
CVSManager
, the LocalFileManager
or the
FileKeyManager.
Constructor Summary | |
FileManager()
Constructs an instance of the FileManager object. |
Method Summary | |
sharpster.common.ResponseCollection |
checkFilesExistance(sharpster.common.FileCollection files)
Verifies that the given files exist. |
void |
clearTemporaryFiles()
|
net.jxta.id.ID |
getFileID(java.lang.String filePath)
Returns a unique key value for a given filename and CVS path. |
java.lang.String |
getFilePath(net.jxta.id.ID id)
Returns a filename, including the CVS path of the file, for a given key. |
sharpster.common.FileCollection |
getRemovedFiles(java.lang.String command)
If the command specifies a file remove, it returns the files which have been removed, otherwise null is returned. |
void |
initialize(sharpster.daemon.daemonplugin.DaemonPluginManager pm)
Perform eventual initializations. |
boolean |
loadFromFile(java.lang.String file)
Load the file database from a configuration file. |
sharpster.common.ResponseCollection |
localDoCVS(java.lang.String command,
java.lang.String workingDirectory)
Executes a CVS command requested by the user of the local client. |
sharpster.common.ResponseCollection |
localLoadFiles(sharpster.common.FileCollection files,
java.lang.String workingDirectory)
|
sharpster.common.ResponseCollection |
localSaveFiles(sharpster.common.FileCollection files,
java.lang.String workingDirectory)
Saves the specified files in the given working directory. |
sharpster.common.ResponseCollection |
remoteAddFiles(sharpster.common.FileCollection files)
Adds the specified files to the CVS. |
sharpster.common.ResponseCollection |
remoteCheckoutFiles(sharpster.common.FileCollection files,
java.lang.String role)
Update the files argument by adding the specified
files and information about their versions.
|
sharpster.common.ResponseCollection |
remoteCommitFiles(sharpster.common.FileCollection files,
java.lang.String role)
Commits the specified files to the CVS. |
sharpster.common.ResponseCollection |
remoteRemoveFiles(sharpster.common.FileCollection files)
Removes the specified files to the CVS. |
sharpster.common.ResponseCollection |
remoteUpdateFiles(sharpster.common.FileCollection files)
Updates the given files with possible changes from the
CVS. |
boolean |
saveToFile(java.lang.String file)
Save the file database to a configuration file. |
sharpster.common.ResponseCollection |
synchronizeCVS(java.lang.String workingDirectory)
Synchronizes the file database with the specified directory. |
sharpster.common.ResponseCollection |
translateLocalPaths(sharpster.common.FileCollection files,
java.lang.String workingDirectory,
boolean cvs)
Updates the files object. |
sharpster.common.ResponseCollection |
translateRemotePaths(sharpster.common.FileCollection files,
boolean recursive)
Updates the files object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FileManager()
FileKeyManager
, a CVSManager
,
and a LocalFileManager
, and initializes the
member attributes.
Method Detail |
public void initialize(sharpster.daemon.daemonplugin.DaemonPluginManager pm)
public net.jxta.id.ID getFileID(java.lang.String filePath)
public java.lang.String getFilePath(net.jxta.id.ID id)
public sharpster.common.FileCollection getRemovedFiles(java.lang.String command)
public sharpster.common.ResponseCollection localDoCVS(java.lang.String command, java.lang.String workingDirectory)
public sharpster.common.ResponseCollection localSaveFiles(sharpster.common.FileCollection files, java.lang.String workingDirectory)
public sharpster.common.ResponseCollection localLoadFiles(sharpster.common.FileCollection files, java.lang.String workingDirectory)
public sharpster.common.ResponseCollection translateLocalPaths(sharpster.common.FileCollection files, java.lang.String workingDirectory, boolean cvs)
files
object. For each file which is
specified, it insert a File
object, containing the name
and the path in the local CVS of the file. This method is used
for commands which operate on the local CVS.
Uses the cvsm.
public sharpster.common.ResponseCollection translateRemotePaths(sharpster.common.FileCollection files, boolean recursive)
files
object. For each file which is
specified, it insert a File
object, containing the name,
the remote owning user and the path to the remote CVS of the file.
This method is used for commands which operate on the remote CVS.
Uses the cvsm.
public sharpster.common.ResponseCollection checkFilesExistance(sharpster.common.FileCollection files)
files
exist.
public sharpster.common.ResponseCollection synchronizeCVS(java.lang.String workingDirectory)
public void clearTemporaryFiles()
public sharpster.common.ResponseCollection remoteCheckoutFiles(sharpster.common.FileCollection files, java.lang.String role)
files
argument by adding the specified
files and information about their versions.
The updated collection is then returned by a ResponseCollection.
Uses the fkm
.
public sharpster.common.ResponseCollection remoteUpdateFiles(sharpster.common.FileCollection files)
files
with possible changes from the
CVS. The changes are specified in conflict files, files created to
provide information about conflicting changes. Information
about the result of the operation is returned.
Uses the fkm
.
public sharpster.common.ResponseCollection remoteCommitFiles(sharpster.common.FileCollection files, java.lang.String role)
files
to the CVS. Returns
information about the result of the operation.
Uses the fkm
.
public sharpster.common.ResponseCollection remoteAddFiles(sharpster.common.FileCollection files)
files
to the CVS. Returns
information about the result of the operation.
Uses the fkm
.
public sharpster.common.ResponseCollection remoteRemoveFiles(sharpster.common.FileCollection files)
files
to the CVS. Returns
information about the result of the operation.
Uses the fkm
.
public boolean saveToFile(java.lang.String file)
public boolean loadFromFile(java.lang.String file)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |