|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sourcejammer.client.filesys.SourceVersionChecker
Title: $FileName: SourceVersionChecker.java$
Field Summary | |
static java.lang.String |
LOCAL_FILE_INFO_FILE_NAME
|
private java.io.File |
mflTargetDirectory
|
private java.util.Hashtable |
mhshSourceInfo
|
private java.lang.String |
msArchiveName
|
private java.lang.String |
msServerURL
|
static java.lang.String |
OLD_FILE_INFO_FILE_NAME
|
Constructor Summary | |
SourceVersionChecker(java.io.File flTargetDirectory,
java.lang.String serverURL,
java.lang.String archiveName)
|
Method Summary | |
private StoredFileInfoBean |
buildStoredInfoBeanForCurrentFile(java.lang.String sFileName)
Builds a new StoredFileInfoBean (except for the Version #) from the current file in the directory. |
private java.io.File |
getSourceFile()
|
private java.util.Hashtable |
getSourceJamHasttable()
|
StoredFileInfoBean |
getStoredFileInfo(java.lang.String sFileName)
Returns the StoredFileInfoBean for the specified file in the directory served by this SourceVersionChecker. |
boolean |
isFileCurrent(java.lang.String sFileName,
long lSourceVersionUniqueID)
Returns true if the specified version of the specified file is the version of that file currently stored in the directory for this SourceVersionChecker. |
boolean |
isStoredFileInfoAccurate(java.lang.String sFileName)
Returns true if the file info in the source.jam file matches the actual file in the directory. |
private void |
makeNewSourceJamIfNull()
|
private void |
reloadSourceJamHashtable()
|
boolean |
saveFile(java.lang.String sName,
long lSourceVersionUniqueID,
byte[] byFile,
boolean setToReadOnly,
org.sourcejammer.util.RepeatingResponse repeating)
Save the file (byte array) to the target directory for this SourceVersionChecker, using the name specified. |
boolean |
saveFile(java.lang.String sName,
long lSourceVersionUniqueID,
long lTempFileId,
boolean setToReadOnly,
org.sourcejammer.util.RepeatingResponse repeating)
Save the file (byte array) to the target directory for this SourceVersionChecker, using the name specified. |
private void |
saveSourceJamFile()
|
private void |
updateFileInfo(StoredFileInfoBean bn)
Save the info about the particular file to the source.jam file. |
void |
updateLocalInfo(java.lang.String sFileName,
long lSourceVersionID)
Updates the source.jam file for the target directory for this SourceVersionChecker. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String OLD_FILE_INFO_FILE_NAME
public static final java.lang.String LOCAL_FILE_INFO_FILE_NAME
private java.io.File mflTargetDirectory
private java.util.Hashtable mhshSourceInfo
private java.lang.String msServerURL
private java.lang.String msArchiveName
Constructor Detail |
public SourceVersionChecker(java.io.File flTargetDirectory, java.lang.String serverURL, java.lang.String archiveName) throws java.io.IOException
flTargetDirectory
- -- the directory that this SourceVersionChecker
is responsible for.serverURL
- -- URL for the SJ server that the client is connected to.archiveName
- -- name of the SJ archive the client is connected to.Method Detail |
public boolean saveFile(java.lang.String sName, long lSourceVersionUniqueID, byte[] byFile, boolean setToReadOnly, org.sourcejammer.util.RepeatingResponse repeating) throws java.io.IOException
sName
- -- name to use in saving the file.lSourceVersionUniqueID
- -- unique ID of the VERSION of the file
being saved.byFile
- -- the file as a byte array.setToReadOnly
- -- if true, the file will be set to read-only after
it is saved.
java.io.IOException
public boolean saveFile(java.lang.String sName, long lSourceVersionUniqueID, long lTempFileId, boolean setToReadOnly, org.sourcejammer.util.RepeatingResponse repeating) throws java.io.IOException
sName
- -- name to use in saving the file.lSourceVersionUniqueID
- -- unique ID of the VERSION of the file
being saved.lTempFileId
- -- id of temp file to be saved to parent directory.setToReadOnly
- -- if true, the file will be set to read-only after
it is saved.
java.io.IOException
public StoredFileInfoBean getStoredFileInfo(java.lang.String sFileName) throws java.io.IOException
java.io.IOException
public void updateLocalInfo(java.lang.String sFileName, long lSourceVersionID) throws java.io.IOException
sFileName
- -- name of the file whose version id is to be updated.lSourceVersionID
- -- version id of the specified file.
java.io.IOException
public boolean isStoredFileInfoAccurate(java.lang.String sFileName) throws java.io.IOException
java.io.IOException
public boolean isFileCurrent(java.lang.String sFileName, long lSourceVersionUniqueID) throws java.io.IOException
java.io.IOException
private StoredFileInfoBean buildStoredInfoBeanForCurrentFile(java.lang.String sFileName) throws java.io.IOException
java.io.IOException
private void updateFileInfo(StoredFileInfoBean bn) throws java.io.IOException
java.io.IOException
private void saveSourceJamFile() throws java.io.IOException
java.io.IOException
private java.util.Hashtable getSourceJamHasttable()
private void makeNewSourceJamIfNull()
private void reloadSourceJamHashtable() throws java.io.IOException
java.io.IOException
private java.io.File getSourceFile()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |