sharpster.daemon.filemanagement
Class LocalFileManager

java.lang.Object
  |
  +--sharpster.daemon.filemanagement.LocalFileManager

public class LocalFileManager
extends java.lang.Object

Class responsible for the management of local files not stored in the CVS.


Constructor Summary
LocalFileManager(sharpster.daemon.filemanagement.CVSManager cvsm)
          Creates an instance of the object.
 
Method Summary
 sharpster.common.ResponseCollection checkFilesExistence(sharpster.common.FileCollection files)
          Verifies that the given files exists.
 boolean localClearDirectory(java.lang.String workingDirectory)
           
 sharpster.common.ResponseCollection localLoadFiles(sharpster.common.FileCollection files, java.lang.String workingDirectory, boolean cvs)
           
 sharpster.common.ResponseCollection localSaveFiles(sharpster.common.FileCollection files, java.lang.String workingDirectory)
          Saves the specified files in the given working directory.
 sharpster.common.ResponseCollection translateLocalPaths(sharpster.common.FileCollection files, java.lang.String workingDirectory, boolean cvs)
          Update the files object and inserts a file object with its filename and path in the local CVS for each file that is specified in the files object.
 sharpster.common.ResponseCollection translateRemotePaths(sharpster.common.FileCollection files, sharpster.daemon.filemanagement.FileMap fileMap, boolean recursive)
          Updates the files object and inserts a file object with its filename, remote owning user and path to the remote CVS for each file which is specified in the files object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalFileManager

public LocalFileManager(sharpster.daemon.filemanagement.CVSManager cvsm)
Creates an instance of the object.

Method Detail

localClearDirectory

public boolean localClearDirectory(java.lang.String workingDirectory)

localLoadFiles

public sharpster.common.ResponseCollection localLoadFiles(sharpster.common.FileCollection files,
                                                          java.lang.String workingDirectory,
                                                          boolean cvs)

localSaveFiles

public sharpster.common.ResponseCollection localSaveFiles(sharpster.common.FileCollection files,
                                                          java.lang.String workingDirectory)
Saves the specified files in the given working directory. This method stores additional information, like user and path in CVS, which exists in the files file collection, in a configuration file in each directory where files are saved.


translateLocalPaths

public sharpster.common.ResponseCollection translateLocalPaths(sharpster.common.FileCollection files,
                                                               java.lang.String workingDirectory,
                                                               boolean cvs)
Update the files object and inserts a file object with its filename and path in the local CVS for each file that is specified in the files object. This is done by reading the CVS configuration files that CVS stores in each checked out directory. The updated files object is returned by a ResponseCollection


translateRemotePaths

public sharpster.common.ResponseCollection translateRemotePaths(sharpster.common.FileCollection files,
                                                                sharpster.daemon.filemanagement.FileMap fileMap,
                                                                boolean recursive)
Updates the files object and inserts a file object with its filename, remote owning user and path to the remote CVS for each file which is specified in the files object. This is done by reading the Sharpster configuration files which are stored in each directory where remote files are saved. These configuration files are saved by the localSaveFiles method.


checkFilesExistence

public sharpster.common.ResponseCollection checkFilesExistence(sharpster.common.FileCollection files)
Verifies that the given files exists.