vc.corba.client
Class CheckingUtility

java.lang.Object
  |
  +--vc.corba.client.CheckingUtility

public class CheckingUtility
extends java.lang.Object

CheckingUtility is the class that encapsulates the client side functionality for the checking related activities like CheckIn, CheckOut etc. for the files and directories/projects. It is also a mediator between the CORBA server throught the IDL interfaces and the client side GUI classes.


Constructor Summary
CheckingUtility(ProjectDBManager projectDBManager, FileVersionManager fileVersionManager, FileSystemHandler fileSystemHandler)
          Constructs the CheckingUtility object
 
Method Summary
 void checkInFiles(File[] currentFileList, boolean removeLocalCopy, boolean keepCheckedOut, java.lang.String versionName, java.lang.String comment)
          Checks In the files in the following manner.
 void checkInProject(Directory currentDirectory, boolean ifPopupNode, boolean recursive, boolean overrideWorkingCopy, boolean removeLocalCopy, boolean keepCheckedOut, java.lang.String versionName, java.lang.String comment)
          Checks In the project recursively (if needed) in the following manner.
 void checkOutFiles(File[] currentFileList, java.lang.String checkOutDir, boolean dontGetLocalCopy, java.lang.String replaceWritable, java.lang.String setFileTime)
          Checks Out the files in the following manner.
 void checkOutProject(Directory currentDirectory, java.lang.String checkOutDir, boolean ifPopupNode, boolean recursive, boolean overrideWorkingCopy, boolean dontGetLocalCopy, java.lang.String replaceWritable, java.lang.String setFileTime)
          Checks Out the project recursively (if needed) in the following manner.
 void getLatestFiles(File[] currentFileList, java.lang.String checkOutDir, boolean dontGetLocalCopy, boolean makeWritable, java.lang.String replaceWritable, java.lang.String setFileTime)
          Gets latest version of the files in the following manner.
 void getLatestProject(Directory currentDirectory, java.lang.String checkOutDir, boolean ifPopupNode, boolean recursive, boolean overrideWorkingCopy, boolean dontGetLocalCopy, boolean makeWritable, java.lang.String replaceWritable, java.lang.String setFileTime)
          Gets the latest versions of the files in the project recursively (if needed) in the following manner.
 void undoCheckOutFiles(File[] currentFileList, java.lang.String localCopyOption)
          Undos Check In the files in the following manner.
 void undoCheckOutProject(Directory currentDirectory, boolean ifPopupNode, boolean recursive, boolean overrideWorkingCopy, java.lang.String localCopyOption)
          Undo the previous Check Out operation on the project recursively (if needed) in the following manner.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckingUtility

public CheckingUtility(ProjectDBManager projectDBManager,
                       FileVersionManager fileVersionManager,
                       FileSystemHandler fileSystemHandler)
Constructs the CheckingUtility object
Parameters:
projectDBManager - To initialize the object's memeber projectDBManager
fileVersionManager - To initialize the object's memeber fileVersionManager
fileSystemHandler - To initialize the object's memeber fileSystemHandler
Method Detail

checkInProject

public void checkInProject(Directory currentDirectory,
                           boolean ifPopupNode,
                           boolean recursive,
                           boolean overrideWorkingCopy,
                           boolean removeLocalCopy,
                           boolean keepCheckedOut,
                           java.lang.String versionName,
                           java.lang.String comment)
                    throws java.lang.Throwable
Checks In the project recursively (if needed) in the following manner. 1. Gets the directory mapped to and the files for the directory/project it is working for. 2. Checks in the each file by requesting the VersionControl server and updates the GUI data accordingly. 3. If this method is called in recursive mode, calls itself to operate on child projects/directories
Parameters:
currentDirectory - the directory that is to be checked In
ifPopupNode - it will be true if the project is being showed on GUI, if it is true then GUI classes will be updated with latest project status.
recursive - if true then the same method will be called for all the child projects/directories
overrideWorkingCopy - if true then Checkin the source files from a location different from where they are checked in.
removeLocalCopy - if true then remove the checked in files where ever they are
keepCheckedOut - if true then keep the files checkeout even after the checkin
versionName - name of the version to be set for the source files that are checked in
comment - comments that are to be set for the version added for the source files

undoCheckOutProject

public void undoCheckOutProject(Directory currentDirectory,
                                boolean ifPopupNode,
                                boolean recursive,
                                boolean overrideWorkingCopy,
                                java.lang.String localCopyOption)
                         throws java.lang.Throwable
Undo the previous Check Out operation on the project recursively (if needed) in the following manner. 1. Gets the directory mapped to and the files for the directory/project it is working for. 2. Undoes the Check in of the each file by requesting the VersionControl server and updates the GUI data accordingly. 3. If this method is called in recursive mode, calls itself to operate on child projects/directories
Parameters:
currentDirectory - the directory check out operation is to be cancelled
ifPopupNode - it will be true if the project is being showed on GUI, if it is true then GUI classes will be updated with latest project status.
recursive - if true then the same method will be called for all the child projects/directories
overrideWorkingCopy - if true then undo checkout the source files from a location different from where they are checked out.
localCopyOption - this is to decide if the files are to be removed, or repaced or ignored once the undo operation is done.

checkOutProject

public void checkOutProject(Directory currentDirectory,
                            java.lang.String checkOutDir,
                            boolean ifPopupNode,
                            boolean recursive,
                            boolean overrideWorkingCopy,
                            boolean dontGetLocalCopy,
                            java.lang.String replaceWritable,
                            java.lang.String setFileTime)
                     throws java.lang.Throwable
Checks Out the project recursively (if needed) in the following manner. 1. Gets the directory mapped to and the files for the directory/project it is working for. 2. Checks out the each file by requesting the VersionControl server and updates the GUI data accordingly. 3. If this method is called in recursive mode, calls itself to operate on child projects/directories
Parameters:
currentDirectory - the directory that is to be checked Out
checkOutDir - the directory to where the files are to be checked out
ifPopupNode - it will be true if the project is being showed on GUI, if it is true then GUI classes will be updated with latest project status.
recursive - if true then the same method will be called for all the child projects/directories
overrideWorkingCopy - if true then Checksout the source files to a location different from where they are mapped to.
dontGetLocalCopy - if true then the project files will be checked out but those files wont be created in the intended directory.
replaceWritable - if this is true and if the source files already exist then the source files will be overwritten with the new copies of checkedout files.
setFileTime - this is to choose the timestamp to be set for the newly created files. Options include current time, checked in time of the file etc.

getLatestProject

public void getLatestProject(Directory currentDirectory,
                             java.lang.String checkOutDir,
                             boolean ifPopupNode,
                             boolean recursive,
                             boolean overrideWorkingCopy,
                             boolean dontGetLocalCopy,
                             boolean makeWritable,
                             java.lang.String replaceWritable,
                             java.lang.String setFileTime)
                      throws java.lang.Throwable
Gets the latest versions of the files in the project recursively (if needed) in the following manner. 1. Gets the directory mapped to and the files for the directory/project it is working for. 2. Gets latest version for each file by requesting the VersionControl server and updates the GUI data accordingly. 3. If this method is called in recursive mode, calls itself to operate on child projects/directories
Parameters:
currentDirectory - the directory whose latest version is to be obtained
checkOutDir - the directory to where the files are to be copied
ifPopupNode - it will be true if the project is being showed on GUI, if it is true then GUI classes will be updated with latest project status.
recursive - if true then the same method will be called for all the child projects/directories
overrideWorkingCopy - if true then gets the source files to a location different from where they are mapped to.
dontGetLocalCopy - if true then the latest version of the project files will obtained but those files wont be created in the intended directory.
makeWritable - if this is true then the copied files will be made writable or read-write.
replaceWritable - if this is true and if the source files already exist then the source files will be overwritten with the new copies of files.
setFileTime - this is to choose the timestamp to be set for the newly created files. Options include current time, checked in time of the file etc.

checkInFiles

public void checkInFiles(File[] currentFileList,
                         boolean removeLocalCopy,
                         boolean keepCheckedOut,
                         java.lang.String versionName,
                         java.lang.String comment)
                  throws java.lang.Throwable
Checks In the files in the following manner. 1. For each file gets the directory mapped to . 2. Checks in the each file by requesting the VersionControl server and updates the GUI data accordingly.
Parameters:
currentFileList - array of the file objects that are to be checked in
removeLocalCopy - if true then remove the checked in files where ever they are
keepCheckedOut - if true then keep the files checkeout even after the checkin
versionName - name of the version to be set for the source files that are checked in
comment - comments that are to be set for the version added for the source files

undoCheckOutFiles

public void undoCheckOutFiles(File[] currentFileList,
                              java.lang.String localCopyOption)
                       throws java.lang.Throwable
Undos Check In the files in the following manner. 1. For each file gets the directory mapped to . 2. Undoes Check in for each file by requesting the VersionControl server and updates the GUI data accordingly.
Parameters:
currentFileList - array of the file objects for whom the check in operation is to be cancelled.
localCopyOption - this is to decide if the files are to be removed, or repaced or ignored once the undo operation is done.

checkOutFiles

public void checkOutFiles(File[] currentFileList,
                          java.lang.String checkOutDir,
                          boolean dontGetLocalCopy,
                          java.lang.String replaceWritable,
                          java.lang.String setFileTime)
                   throws java.lang.Throwable
Checks Out the files in the following manner. 1. For each file gets the directory mapped to . 2. Checks out the each file by requesting the VersionControl server and updates the GUI data accordingly.
Parameters:
currentFileList - array of the file objects that are to be checked out
checkOutDir - the directory to where the files are to be checked out
dontGetLocalCopy - if true then the project files will be checked out but those files wont be created in the intended directory.
replaceWritable - if this is true and if the source files already exist then the source files will be overwritten with the new copies of checkedout files.
setFileTime - this is to choose the timestamp to be set for the newly created files. Options include current time, checked in time of the file etc.

getLatestFiles

public void getLatestFiles(File[] currentFileList,
                           java.lang.String checkOutDir,
                           boolean dontGetLocalCopy,
                           boolean makeWritable,
                           java.lang.String replaceWritable,
                           java.lang.String setFileTime)
                    throws java.lang.Throwable
Gets latest version of the files in the following manner. 1. For each file gets the directory mapped to . 2. Gets the latest version for each file by requesting the VersionControl server and updates the GUI data accordingly.
Parameters:
currentFileList - array of the file objects that are to be checked out
checkOutDir - the directory to where the files are to be copied
dontGetLocalCopy - if true then the latest version of the project files will be obtained but those files wont be created in the intended directory.
makeWritable - if this is true then the copied files will be made writable or read-write.
replaceWritable - if this is true and if the source files already exist then the source files will be overwritten with the new copies of files.
setFileTime - this is to choose the timestamp to be set for the newly created files. Options include current time, checked in time of the file etc.