|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.omg.CORBA.portable.ObjectImpl | +--vc.corba.common.intf._ProjectDBManagerImplBase | +--vc.corba.server.ProjectDBManagerImpl
ProjectDBManagerImpl is the CORBA implementation for the IDL interface ProjectDBManager. This is the facade(pattern) for the subsystem which deals with the management of the project database. This provides the project management functionality for VersionControl/CORBA sesrver. This delegeates most of the processing to ProjectDB and other objects.
Field Summary | |
static java.util.Vector |
connections
A collection of connections made to VersionControl/CORBA sesrver. |
ProjectDB |
projectDB
reference to ProjectDB which has most of the version related functionality encapsulated into it |
Constructor Summary | |
ProjectDBManagerImpl(ProjectDB projectDB)
Constructs ProjectDBManagerImpl object out of the parameters passed to it. |
Method Summary | |
void |
clearConnection(java.lang.String connectionID)
Clears the connection of VersionControl client to the VersionControl server, by sending the connection infirmation |
File |
createFile(java.lang.String connectionID,
File newFile,
java.lang.String directoryID,
boolean unitOperation)
Creates the file as a child of an existing directory in the Project database . |
Directory |
createRootDirectory(java.lang.String connectionID,
Directory newDirectory,
boolean unitOperation)
Creates the directory in the Project database . |
Directory |
createSubDirectory(java.lang.String connectionID,
Directory newDirectory,
java.lang.String parentID,
boolean unitOperation)
Creates the sub directory in the Project database . |
void |
deleteDirectory(java.lang.String connectionID,
java.lang.String directoryID,
boolean unitOperation)
Deletes an existing directory in the Project database . |
void |
deleteFile(java.lang.String connectionID,
java.lang.String fileID,
java.lang.String directoryID,
boolean unitOperation)
Delets the existing file in the Project database . |
ClientConnection |
getConnection(java.lang.String connectionID)
Method for the internal processing to fetch the connection object based on the connectionID |
java.lang.String |
getDatabaseName(java.lang.String connectionID)
Gets the name of the database with which this VersionControl server is dealing with. |
DirDiskMap |
getDirDiskMap(java.lang.String connectionID,
java.lang.String directoryID,
boolean returnEmptyDiskMapIfEmpty)
Gets the DirDiskMap set to the combination of user and directory identified by it's ID |
DirDiskMap |
getFileDiskMap(java.lang.String connectionID,
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 connectionID,
java.lang.String directoryID)
Gets all the files of a particular directory identified by the parameters |
File[] |
getFilesRecursively(java.lang.String connectionID,
java.lang.String directoryID)
Gets all the files of a particular directory recursively identified by the parameters |
Directory[] |
getRootDirectories(java.lang.String connectionID)
Gets all the root directories |
Directory[] |
getSubDirectories(java.lang.String connectionID,
java.lang.String directoryID)
Gets all the sub directories of a particular directory identified by the parameter |
static java.lang.String |
getUserIDForConnectionID(java.lang.String connectionID)
Static Method to fetch the UserID based on the connectionID |
java.lang.String |
makeConnection(java.lang.String user,
java.lang.String password,
java.lang.String clientIP,
ProjectDBManagerCB projectDBManagerCallBack)
Makes a new connection to the VersionControl server, by sending the authentication infirmation |
void |
run()
A method for futuristic usage to trigger a task in a different thread |
void |
saveChanges()
Saves the changes mede to the project database |
void |
setDirDiskMap(java.lang.String connectionID,
java.lang.String osDirectory,
java.lang.String directoryID,
boolean unitOperation)
Sets the DirDiskMap to the directory identified by it's ID |
void |
setFileDiskMap(java.lang.String connectionID,
java.lang.String osDirectory,
java.lang.String fileID,
boolean unitOperation)
Sets the DirDiskMap to the file identified by it's ID |
void |
updateDirectory(java.lang.String connectionID,
Directory newDirectory,
boolean unitOperation)
Updates an existing directory in the Project database . |
void |
updateFile(java.lang.String connectionID,
File newFile,
boolean unitOperation)
Updates the existing file in the Project database . |
Methods inherited from class vc.corba.common.intf._ProjectDBManagerImplBase |
_ids, _invoke |
Methods inherited from class org.omg.CORBA.portable.ObjectImpl |
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, hashCode, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.omg.CORBA.Object |
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override |
Field Detail |
public ProjectDB projectDB
public static java.util.Vector connections
Constructor Detail |
public ProjectDBManagerImpl(ProjectDB projectDB)
projectDB
- to initialize the field projectDBMethod Detail |
public java.lang.String getDatabaseName(java.lang.String connectionID) throws VCException
connectionID
- to identify the client who made this requestThrows
- VCException which is a CORBA enabled exceptionpublic java.lang.String makeConnection(java.lang.String user, java.lang.String password, java.lang.String clientIP, ProjectDBManagerCB projectDBManagerCallBack) throws VCException
user
- ID of the user who requested the connectionpassword
- password of the user who requested the connectionclientIP
- IP address of the machine from which the user has requested the connectionprojectDBManagerCallBack
- Callback interface to subscribe the events of
interest happening with the other clients,
so that to synchronize the state of clientsThrows
- VCException which is a CORBA enabled exceptionpublic void clearConnection(java.lang.String connectionID) throws VCException
connectionID
- connectionID of the client whose connection is to be clearedThrows
- VCException which is a CORBA enabled exceptionpublic void saveChanges()
public Directory createRootDirectory(java.lang.String connectionID, Directory newDirectory, boolean unitOperation) throws VCException
connectionID
- to identify the client who made this requestnewDirectory
- information of the new directory that is being createdunitOperation
- if this is true then the changes to PorjectDB will
be saved immediatly. Helpfull for reducing the number of times
PoojectDB is saved. If this is false client will make an
explicit request to sace ProjectDBThrows
- VCException which is a CORBA enabled exceptionpublic Directory createSubDirectory(java.lang.String connectionID, Directory newDirectory, java.lang.String parentID, boolean unitOperation) throws VCException
connectionID
- to identify the client who made this requestnewDirectory
- information of the new directory that is being createdparentID
- ID of the parent under which the new directory is being createdunitOperation
- if this is true then the changes to PorjectDB will
be saved immediatly. Helpfull for reducing the number of times
PoojectDB is saved. If this is false client will make an
explicit request to sace ProjectDBThrows
- VCException which is a CORBA enabled exceptionpublic Directory[] getRootDirectories(java.lang.String connectionID) throws VCException
connectionID
- to identify the client who made this requestThrows
- VCException which is a CORBA enabled exceptionpublic Directory[] getSubDirectories(java.lang.String connectionID, java.lang.String directoryID) throws VCException
connectionID
- to identify the client who made this requestdirectoryID
- ID of the directory whose subdirectories are to be returned.Throws
- VCException which is a CORBA enabled exceptionpublic void updateDirectory(java.lang.String connectionID, Directory newDirectory, boolean unitOperation) throws VCException
connectionID
- to identify the client who made this requestnewDirectory
- information of the directory that is being updatedunitOperation
- if this is true then the changes to PorjectDB will
be saved immediatly. Helpfull for reducing the number of times
PoojectDB is saved. If this is false client will make an
explicit request to sace ProjectDBThrows
- VCException which is a CORBA enabled exceptionpublic void deleteDirectory(java.lang.String connectionID, java.lang.String directoryID, boolean unitOperation) throws VCException
connectionID
- to identify the client who made this requestdirectoryID
- ID of the directory that is being deletedunitOperation
- if this is true then the changes to PorjectDB will
be saved immediatly. Helpfull for reducing the number of times
PoojectDB is saved. If this is false client will make an
explicit request to sace ProjectDBThrows
- VCException which is a CORBA enabled exceptionpublic File createFile(java.lang.String connectionID, File newFile, java.lang.String directoryID, boolean unitOperation) throws VCException
connectionID
- to identify the client who made this requestnewFile
- information of the new file that is being createddirectoryID
- ID of the parent directory under which the new file is being createdunitOperation
- if this is true then the changes to PorjectDB will
be saved immediatly. Helpfull for reducing the number of times
PoojectDB is saved. If this is false client will make an
explicit request to sace ProjectDBThrows
- VCException which is a CORBA enabled exceptionpublic File[] getFiles(java.lang.String connectionID, java.lang.String directoryID) throws VCException
connectionID
- to identify the client who made this requestdirectoryID
- ID of the directory whose files are to be returned.Throws
- VCException which is a CORBA enabled exceptionpublic File[] getFilesRecursively(java.lang.String connectionID, java.lang.String directoryID) throws VCException
connectionID
- to identify the client who made this requestdirectoryID
- ID of the directory whose files are to be returned recursively.Throws
- VCException which is a CORBA enabled exceptionpublic void updateFile(java.lang.String connectionID, File newFile, boolean unitOperation) throws VCException
connectionID
- to identify the client who made this requestnewFile
- information of the new file that is being updatedunitOperation
- if this is true then the changes to PorjectDB will
be saved immediatly. Helpfull for reducing the number of times
PoojectDB is saved. If this is false client will make an
explicit request to sace ProjectDBThrows
- VCException which is a CORBA enabled exceptionpublic void deleteFile(java.lang.String connectionID, java.lang.String fileID, java.lang.String directoryID, boolean unitOperation) throws VCException
connectionID
- to identify the client who made this requestfileID
- ID of the new file that is being deleteddirectoryID
- ID of the new directory that is having the file to be deletedunitOperation
- if this is true then the changes to PorjectDB will
be saved immediatly. Helpfull for reducing the number of times
PoojectDB is saved. If this is false client will make an
explicit request to sace ProjectDBThrows
- VCException which is a CORBA enabled exceptionpublic void setDirDiskMap(java.lang.String connectionID, java.lang.String osDirectory, java.lang.String directoryID, boolean unitOperation) throws VCException
connectionID
- to identify the client who made this requestosDirectory
- File system directory to which the mapping is to be madedirectoryID
- ID of the new directory which is to be mapped to the file system directoryunitOperation
- if this is true then the changes to PorjectDB will
be saved immediatly. Helpfull for reducing the number of times
PoojectDB is saved. If this is false client will make an
explicit request to sace ProjectDBThrows
- VCException which is a CORBA enabled exceptionpublic DirDiskMap getDirDiskMap(java.lang.String connectionID, java.lang.String directoryID, boolean returnEmptyDiskMapIfEmpty) throws VCException
connectionID
- to identify the client who made this requestdirectoryID
- 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(java.lang.String connectionID, java.lang.String osDirectory, java.lang.String fileID, boolean unitOperation) throws VCException
connectionID
- to identify the client who made this requestosDirectory
- File system directory to which the mapping is to be madefileID
- ID of the file which is to be mapped to the file system directoryunitOperation
- if this is true then the changes to PorjectDB will
be saved immediatly. Helpfull for reducing the number of times
PoojectDB is saved. If this is false client will make an
explicit request to sace ProjectDBThrows
- VCException which is a CORBA enabled exceptionpublic DirDiskMap getFileDiskMap(java.lang.String connectionID, java.lang.String fileID, boolean returnParentsDiskMapIfNoneFound) throws VCException
connectionID
- to identify the client who made this requestfileID
- ID of the file 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 run()
run
in interface java.lang.Runnable
public ClientConnection getConnection(java.lang.String connectionID)
connectionID
- to identify the connection object uniquelypublic static java.lang.String getUserIDForConnectionID(java.lang.String connectionID)
connectionID
- to identify the connection object and inturn the
user ID associated with it
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |