Various fixes for MS Office problems (two versions on edit/save, version generated when file opened and not changed (ACT 3691).

Added file access/change/modification timestamp tracking for open files via the file state cache.
Added set file information support for setting creation and modification timestamps, used by MS Office to transfer original timestamp to new document.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10007 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gary Spencer
2008-07-24 14:26:09 +00:00
parent 18164f15cc
commit 4935889656
10 changed files with 618 additions and 61 deletions

View File

@@ -127,7 +127,12 @@ public class FileStateTable
*/
public final synchronized FileState findFileState(String path)
{
return m_stateTable.get(FileState.normalizePath(path));
FileState fstate = m_stateTable.get(FileState.normalizePath(path));
if ( fstate != null)
fstate.updateAccessDateTime();
return fstate;
}
/**
@@ -168,6 +173,11 @@ public class FileStateTable
}
}
// Update the access date/time if valid
if ( state != null)
state.updateAccessDateTime();
// Return the file state
return state;
@@ -182,7 +192,6 @@ public class FileStateTable
*/
public final synchronized FileState updateFileState(String oldName, String newName)
{
// Find the current file state
FileState state = m_stateTable.remove(FileState.normalizePath(oldName));
@@ -193,6 +202,10 @@ public class FileStateTable
{
state.setPath(newName);
addFileState(state);
// Update the access date/time
state.updateAccessDateTime();
}
// Return the updated file state
@@ -246,6 +259,10 @@ public class FileStateTable
state.setPath(FileState.normalizePath(newPath));
m_stateTable.put(state.getPath(), state);
// Updaet the access date/time
state.updateAccessDateTime();
}
/**