|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--vc.corba.server.ProjectElementContainer | +--vc.corba.server.FileContainer
FileContainer holds the file object and it maintains the relations/references with other objects on the behalf of the file object. It also has the methods to deal with the operations related to the file object. It is like an association between the file information and the related classes.
Field Summary | |
File |
currentFile
Actual file object that represents the information about the file |
java.util.Vector |
diskMaps
Holds the apping between this and the file system directory for all the users |
static FileSystemHandler |
fileSystemHandler
Gives the access to the native filesystem operations like changing file settings etc. |
java.lang.String |
latestVersion
Represents the name of the latest version for this file |
protected DirectoryContainer |
parentDirectory
Maintains the back reference to the Parent container |
java.util.Vector |
versionHistory
Maintains the details of each version/label for the project elements |
Constructor Summary | |
FileContainer(File currentFile,
DirectoryContainer parentDirectory)
Constructs the FileContainer object from the File and the Parent objects |
Method Summary | |
void |
addNewLabelVersion(LabelVersionMap labelVersionMap)
Adds a new LabelVersionMap object to the history of labels/versions of this file |
void |
destroyCurrentFile()
Destroys the current file and the dependent objects after disassociating itself from the objects it has depended upon. |
DirDiskMap |
getDiskMap(java.lang.String user)
Gets a diskmap set for a particular user |
DirDiskMap |
getDiskMap(java.lang.String user,
boolean returnEmptyDiskMap)
Gets an actual diskmap set for a particular user or an empty diskmap if the intended diskmap is not found |
DirDiskMap[] |
getDiskMaps()
Gets all the diskmaps set for a particular project element |
File |
getFile()
Returns the file that is associated with this container |
HistoryElement |
getHistoryElement(LabelVersionMap currentLabelVersionMap)
Gets the history element for the current file along with the label/version info taken from the parameter. |
java.util.Vector |
getLabelVersions(java.lang.String user,
boolean getLabel,
boolean getVersion,
java.lang.String startTime,
java.lang.String endTime)
Gets the LabelVersionMap of this container with the matching criteria specified with the help of parameters |
DirectoryContainer |
getParentDirectory()
Returns the referenec to its parent container |
java.lang.String |
getVersionForLabel(java.lang.String labelName)
Gets the Version name for a particular label mapped to. |
void |
removeVersion(java.lang.String labelName,
java.lang.String versionName)
Removes a LabelVersionMap with the matching Label and Version names |
void |
setDiskMap(DirDiskMap diskMap)
Adds one more diskmap object to the collection of diskmaps set to it |
void |
setLabelVersionAsLatest(LabelVersionMap labelVersionMap,
boolean removeLatest)
Sets a aprticular LabelVersionMap as the latest |
void |
setParentDirectory(DirectoryContainer parentDirectory)
Sets the refernvece to a DirectoryContainer as its parent container |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public File currentFile
public java.lang.String latestVersion
public static FileSystemHandler fileSystemHandler
protected DirectoryContainer parentDirectory
public java.util.Vector diskMaps
public java.util.Vector versionHistory
Constructor Detail |
public FileContainer(File currentFile, DirectoryContainer parentDirectory)
currentFile
- to initialize the field currentFileparentDirectory
- to initialize the field parentDirectory in the super classMethod Detail |
public void addNewLabelVersion(LabelVersionMap labelVersionMap)
addNewLabelVersion
in class vc.corba.server.ProjectElementContainer
labelVersionMap
- new LabelVersionMap being added to the history
of labels/versions of this filepublic void destroyCurrentFile()
public File getFile()
public HistoryElement getHistoryElement(LabelVersionMap currentLabelVersionMap)
currentLabelVersionMap
- Gives the information about the version/label to
construct the HistoryElement based on itpublic void setParentDirectory(DirectoryContainer parentDirectory)
parentDirectory
- to inirialize the field parentDirectorypublic DirectoryContainer getParentDirectory()
public void setDiskMap(DirDiskMap diskMap)
diskMap
- the new diskmap added to the collection of diskmaps set to itpublic DirDiskMap getDiskMap(java.lang.String user)
user
- user for whom the matching diskmap is to be foundpublic DirDiskMap getDiskMap(java.lang.String user, boolean returnEmptyDiskMap)
user
- user for whom the matching diskmap is to be foundreturnEmptyDiskMap
- retrns an empty diakmap if this is true and a
matching diskmap is not foundpublic DirDiskMap[] getDiskMaps()
public java.util.Vector getLabelVersions(java.lang.String user, boolean getLabel, boolean getVersion, java.lang.String startTime, java.lang.String endTime) throws java.lang.Throwable
user
- user for whom the matching LabelVersionMaps are to be foundgetLabel
- if true then the LabelVersionMaps related to labels will be returnedgetVersion
- if true then the LabelVersionMaps related to versions will be returnedstartTime
- LabelVersionMaps created on or after this time will only be returnedendTime
- LabelVersionMaps created on or before this time will only be returnedpublic void setLabelVersionAsLatest(LabelVersionMap labelVersionMap, boolean removeLatest)
labelVersionMap
- LabelVersionMap instance that is to be set as the latest one.removeLatest
- if true then the existing latest LabelVersionMap will be deletedpublic java.lang.String getVersionForLabel(java.lang.String labelName)
labelName
- LabelName for which the matching version name is to be returnedpublic void removeVersion(java.lang.String labelName, java.lang.String versionName)
labelName
- label whose matching LabelVersionMap is to be deletedversionName
- version whose matching LabelVersionMap is to be deleted
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |