Add live usage quota manager implementation to the file server. ALF-1068.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19840 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gary Spencer
2010-04-13 14:31:13 +00:00
parent 8652b3c8df
commit ef8e049195
6 changed files with 855 additions and 8 deletions

View File

@@ -273,7 +273,7 @@ public class ContentNetworkFile extends NodeRefNetworkFile
* @see NetworkFile#WRITEONLY
* @see NetworkFile#READWRITE
*/
private void openContent(boolean write, boolean trunc)
protected void openContent(boolean write, boolean trunc)
throws AccessDeniedException, AlfrescoRuntimeException
{
// Check if the file is a directory
@@ -359,6 +359,17 @@ public class ContentNetworkFile extends NodeRefNetworkFile
channel = ((ContentReader) content).getFileChannel();
}
// Update the current file size
if ( channel != null) {
try {
setFileSize(channel.size());
}
catch (IOException ex) {
logger.error( ex);
}
}
}
/**