|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--vc.corba.server.ProjectDB
ProjectDB is the mediator(pattern) class for VersionControl sesrver. It encapsulates all the functionality to integrate different kind of classs like CORBA, XML, Project management, Version management, JNI etc.
Field Summary | |
static java.util.Hashtable |
allDirectories
Holds all the directories/projects |
static java.util.Hashtable |
allFiles
Holds all files |
java.lang.String |
dbName
Holds the project Database name |
static DirectoryContainer |
grandRootDirectory
Holds all the grand root directories/projects |
static java.util.Vector |
rootDirectories
Holds all the root directories/projects |
Constructor Summary | |
ProjectDB(java.lang.String dbName)
Constructs th ProjectDb object and the actual database of the projects. |
Method Summary | |
DirectoryContainer |
addDirectory(Directory currentDirectory,
java.lang.String parentID)
Creates and Adds a directory as a sub directory to another directory. |
File |
addFile(File currentFile,
java.lang.String parentID)
Cretaes and Adds a file as a child to the specified directory. |
void |
addLabelForDirectories(java.lang.String creatorName,
java.lang.String labelName,
boolean recursive,
java.lang.String[] directoryIDs)
Create a new label for the directories identifiesd the IDs in the parameters |
void |
addLabelForFiles(java.lang.String creatorName,
java.lang.String labelName,
java.lang.String[] fileIDs)
Create a new label for the files identifiesd the IDs in the parameters |
void |
addVersionForFiles(java.lang.String creatorName,
java.lang.String versionName,
java.lang.String[] fileIDs)
Create a new version for the files identifiesd the IDs in the parameters |
void |
deleteDirectory(java.lang.String directoryID)
Deletes an existing directory identified by the information in parameters |
void |
deleteFile(java.lang.String fileID,
java.lang.String parentID)
Deletes an existing file identified by the information in parameters |
DirDiskMap |
getDirDiskMap(java.lang.String diskMapUser,
java.lang.String directoryID,
boolean returnEmptyDiskMapIfEmpty)
Gets the DirDiskMap set to the combination of user and directory identified by it's ID |
DirDiskMap[] |
getDirDiskMaps(java.lang.String directoryID)
Gets the DirDiskMap under a particular directory identified by it's ID |
Directory |
getDirectory(java.lang.String directoryID)
Gets the directory object by taking it's ID as the input |
DirectoryContainer |
getDirectoryContainer(java.lang.String directoryID)
Gets the directory container object by taking taking the directory's ID as the input |
File |
getFile(java.lang.String fileID)
Gets the file object by taking it's ID as the input |
FileContainer |
getFileContainer(java.lang.String fileID)
Gets the file container object by taking taking the file's ID as the input |
DirDiskMap |
getFileDiskMap(java.lang.String diskMapUser,
java.lang.String fileID,
boolean returnParentsDiskMapIfNoneFound)
Gets the DirDiskMap set to the combination of user and file identified by it's ID |
File[] |
getFiles(java.lang.String directoryID,
java.lang.String userID)
Gets all the files under a particular directory identified by the parameters |
File[] |
getFilesRecursively(java.lang.String directoryID,
java.lang.String userID)
Gets all the files recursively under a particular directory identified by the parameters |
HistoryElement[] |
getLabelsForFiles(java.lang.String[] fileIDs,
java.lang.String user,
java.lang.String startTime,
java.lang.String endTime,
boolean getLabels,
boolean getVersions)
This methos is to query and get all the labels and versions on the files that meet the criteria specified by the parameters. |
HistoryElement[] |
getLabelsOfDirectories(java.lang.String[] directoryIDs,
java.lang.String user,
java.lang.String startTime,
java.lang.String endTime,
boolean getLabels,
boolean getVersions,
boolean recursive,
boolean getFiles,
boolean getSubDirectories)
This methos is to query and get all the labels and versions on the directories and files that meet the criteria specified by the parameters. |
Directory[] |
getSubDirectories(java.lang.String directoryID,
java.lang.String userID)
Gets all the sub directories of a particular directory identified by the parameters |
void |
removeLabelOfDirectories(java.lang.String creatorName,
java.lang.String labelName,
java.lang.String versionName,
boolean recursive,
java.lang.String[] directoryIDs)
Removes an existing label of the directories(and inturn files) . |
void |
removeLabelOfFiles(java.lang.String creatorName,
java.lang.String labelName,
java.lang.String versionName,
java.lang.String[] fileIDs)
Removes an existing label of the files . |
void |
revertToLabelOfDirectories(java.lang.String creatorName,
java.lang.String labelName,
java.lang.String versionName,
boolean recursive,
boolean removeLatest,
java.lang.String[] directoryIDs)
Makes an existing label of the directories(and inturn files) as the latest version. |
void |
revertToLabelOfFiles(java.lang.String creatorName,
java.lang.String labelName,
java.lang.String versionName,
boolean removeLatest,
java.lang.String[] fileIDs)
Makes an existing label of the files as the latest version. |
void |
saveChanges()
Save the changes to the database for every XmlConstants.numOperationsToSaveXML number of changes made to theproject database |
void |
setDirDiskMap(DirDiskMap dirDiskMap,
java.lang.String directoryID)
Sets the DirDiskMap to the directory identified by it's ID |
void |
setFileDiskMap(DirDiskMap dirDiskMap,
java.lang.String fileID)
Sets the DirDiskMap to the file identified by it's ID |
void |
updateDirectory(Directory currentDirectory)
Updates an existing directory with the new information. |
void |
updateFile(java.lang.String user,
File currentFile)
Updates an existing file with the new information. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.util.Vector rootDirectories
public static java.util.Hashtable allDirectories
public static java.util.Hashtable allFiles
public static DirectoryContainer grandRootDirectory
public java.lang.String dbName
Constructor Detail |
public ProjectDB(java.lang.String dbName)
dbName
- Name of the database to which this VersionControl server is attachedMethod Detail |
public DirectoryContainer addDirectory(Directory currentDirectory, java.lang.String parentID)
currentDirectory
- information of the directory that is to be createdparentID
- ID of the directory to whom the new directory is added as sub directorypublic File addFile(File currentFile, java.lang.String parentID)
currentFile
- information of the file that is to be createdparentID
- ID of the directory to whom the file is to be added as a childpublic void updateDirectory(Directory currentDirectory)
currentDirectory
- information of the directory that is to be updatedpublic void updateFile(java.lang.String user, File currentFile)
user
- to track the changes and creator of this new informationcurrentFile
- information of the file that is to be updatedpublic void deleteFile(java.lang.String fileID, java.lang.String parentID)
fileID
- ID of the file that is to be deletedparentID
- ID of the directory having the file that is to be deletedpublic void deleteDirectory(java.lang.String directoryID)
directoryID
- ID of the directory that is to be deletedpublic Directory[] getSubDirectories(java.lang.String directoryID, java.lang.String userID)
directoryID
- ID of the directory whose subdirectories are to be returned.userID
- to send the directory information specific to the userpublic File[] getFiles(java.lang.String directoryID, java.lang.String userID)
directoryID
- ID of the directory whose files are to be returned.userID
- to send the file information specific to the userpublic File[] getFilesRecursively(java.lang.String directoryID, java.lang.String userID)
directoryID
- ID of the directory whose files are to be returned recursively.userID
- to send the file information specific to the userpublic DirDiskMap[] getDirDiskMaps(java.lang.String directoryID) throws VCException
directoryID
- ID of the directory whose disk map is to be returnedThrows
- VCException which is a CORBA enabled exceptionpublic void setDirDiskMap(DirDiskMap dirDiskMap, java.lang.String directoryID)
dirDiskMap
- Diskmap which is to be set for the particular directorydirectoryID
- ID of the new directory which is to be mapped to the file system directorypublic DirDiskMap getDirDiskMap(java.lang.String diskMapUser, java.lang.String directoryID, boolean returnEmptyDiskMapIfEmpty) throws VCException
diskMapUser
- the user whose disk maps are to be fetcheddirectoryID
- ID of the directory whose disk map is to be returnedreturnEmptyDiskMapIfEmpty
- if this is true and no disk map is found
then it returns an empty DirDiskMap objectThrows
- VCException which is a CORBA enabled exceptionpublic void setFileDiskMap(DirDiskMap dirDiskMap, java.lang.String fileID)
dirDiskMap
- disk map that is to be set for the FilefileID
- ID of the file which is to be mapped to the file system directorypublic DirDiskMap getFileDiskMap(java.lang.String diskMapUser, java.lang.String fileID, boolean returnParentsDiskMapIfNoneFound) throws VCException
diskMapUser
- the user whose disk maps are to be fetchedfileID
- ID of the file whose disk map is to be returnedreturnParentsDiskMapIfNoneFound
- if this is true and no disk map is found
then it returns the parent's DirDiskMap objectsThrows
- VCException which is a CORBA enabled exceptionpublic File getFile(java.lang.String fileID)
fileID
- ID of the file which is to be returnedpublic Directory getDirectory(java.lang.String directoryID)
directoryID
- ID of the directory which is to be returnedpublic FileContainer getFileContainer(java.lang.String fileID)
fileID
- ID of the file which is to be returnedpublic DirectoryContainer getDirectoryContainer(java.lang.String directoryID)
directoryID
- ID of the directory which is to be returnedpublic void addLabelForDirectories(java.lang.String creatorName, java.lang.String labelName, boolean recursive, java.lang.String[] directoryIDs) throws java.lang.Throwable
creatorName
- Name of the user creating this labellabelName
- Name of the label being added to the directoryrecursive
- if true then the label wil be added to the subdirectories recursivelydirectoryIDs
- IDs of the directories to which the label is to be addedpublic void addLabelForFiles(java.lang.String creatorName, java.lang.String labelName, java.lang.String[] fileIDs) throws java.lang.Throwable
creatorName
- Name of the user creating this labellabelName
- Name of the label being added to the filesfileIDs
- IDs of the files to which the label is to be addedpublic void addVersionForFiles(java.lang.String creatorName, java.lang.String versionName, java.lang.String[] fileIDs) throws java.lang.Throwable
creatorName
- Name of the user creating this versionversionName
- Name of the version being added to the filesfileIDs
- IDs of the files to which the version is to be addedpublic HistoryElement[] getLabelsOfDirectories(java.lang.String[] directoryIDs, java.lang.String user, java.lang.String startTime, java.lang.String endTime, boolean getLabels, boolean getVersions, boolean recursive, boolean getFiles, boolean getSubDirectories) throws java.lang.Throwable
directoryIDs
- IDs of the directories whose labels are to be extracteduser
- Is to select the labels created by user same as this parameterstartTime
- if this is a non empty string then the labels created
on or after this will be selectedendTime
- if this is a non empty string then the labels created
on or before this will be selectedgetLabels
- if this is true then the labels meeting the criteria will be selectedgetVersions
- if this is true then the versions meeting the criteria will be selectedrecursive
- if this is true then labels and versions will be selected
recursively from sub directories alsogetFiles
- if this is true then labels and versions will be selected for files alsogetSubDirectories
- if this is true then labels and versions will be selected for getSubDirectories alsopublic HistoryElement[] getLabelsForFiles(java.lang.String[] fileIDs, java.lang.String user, java.lang.String startTime, java.lang.String endTime, boolean getLabels, boolean getVersions) throws java.lang.Throwable
fileIDs
- IDs of the files whose labels/versions are to be extracteduser
- Is to select the labels created by user same as this parameterstartTime
- if this is a non empty string then the labels created
on or after this will be selectedendTime
- if this is a non empty string then the labels created
on or before this will be selectedgetLabels
- if this is true then the labels meeting the criteria will be selectedgetVersions
- if this is true then the versions meeting the criteria will be selectedpublic void revertToLabelOfDirectories(java.lang.String creatorName, java.lang.String labelName, java.lang.String versionName, boolean recursive, boolean removeLatest, java.lang.String[] directoryIDs) throws java.lang.Throwable
creatorName
- Name of the user who is reverting the labellabelName
- Name of the label being reverted to for the directoriesversionName
- Name of the version being reverted to for the directoriesrecursive
- if this is true then the label is reverted recursively to the
subdirectories and files of each directoryremoveLatest
- Remove the labels that are old labelsdirectoryIDs
- IDs of the directories whose old label is being made the latestpublic void revertToLabelOfFiles(java.lang.String creatorName, java.lang.String labelName, java.lang.String versionName, boolean removeLatest, java.lang.String[] fileIDs) throws java.lang.Throwable
creatorName
- Name of the user who is reverting the labellabelName
- Name of the label being reverted for the filesversionName
- Name of the version being reverted for the filesremoveLatest
- Remove the labels that are old labelsfileIDs
- IDs of the files whose old label is being made the latestpublic void removeLabelOfDirectories(java.lang.String creatorName, java.lang.String labelName, java.lang.String versionName, boolean recursive, java.lang.String[] directoryIDs) throws java.lang.Throwable
creatorName
- name of the user removing tha labellabelName
- Name of the label being deleted for the directoriesrecursive
- if this is true then the label is deleted recursively to the
subdirectories and files of each directorydirectoryIDs
- IDs of the directories whose label is deletedpublic void removeLabelOfFiles(java.lang.String creatorName, java.lang.String labelName, java.lang.String versionName, java.lang.String[] fileIDs) throws java.lang.Throwable
creatorName
- name of the user removing tha labellabelName
- Name of the label being removed for the filesversionName
- Name of the version being removed for the filesfileIDs
- IDs of the files whose old label is being made the latestpublic void saveChanges()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |