mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
User content usages & quotas - initial check-in
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7453 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1482,8 +1482,15 @@ public class NTProtocolHandler extends CoreProtocolHandler
|
||||
m_sess.sendErrorResponseSMB(SMBStatus.DOSInvalidData, SMBStatus.ErrDos);
|
||||
return;
|
||||
}
|
||||
catch (DiskFullException ex)
|
||||
{
|
||||
m_sess.sendErrorResponseSMB(SMBStatus.NTDiskFull, SMBStatus.HRDWriteFault, SMBStatus.ErrHrd);
|
||||
return;
|
||||
}
|
||||
catch (java.io.IOException ex)
|
||||
{
|
||||
if (logger.isDebugEnabled() && m_sess.hasDebug(SMBSrvSession.DBG_FILE))
|
||||
logger.debug("IOException ignore: "+ex);
|
||||
}
|
||||
|
||||
// Remove the file from the connections list of open files
|
||||
|
@@ -35,6 +35,7 @@ import java.nio.charset.Charset;
|
||||
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.filesys.server.filesys.AccessDeniedException;
|
||||
import org.alfresco.filesys.server.filesys.DiskFullException;
|
||||
import org.alfresco.filesys.server.filesys.FileAttribute;
|
||||
import org.alfresco.filesys.server.filesys.FileInfo;
|
||||
import org.alfresco.filesys.server.filesys.FileOpenParams;
|
||||
@@ -52,6 +53,7 @@ import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.service.cmr.repository.MimetypeService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.usage.ContentQuotaException;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
@@ -382,7 +384,14 @@ public class ContentNetworkFile extends NodeRefNetworkFile
|
||||
// Update node properties
|
||||
|
||||
ContentData contentData = content.getContentData();
|
||||
nodeService.setProperty( getNodeRef(), ContentModel.PROP_CONTENT, contentData);
|
||||
try
|
||||
{
|
||||
nodeService.setProperty( getNodeRef(), ContentModel.PROP_CONTENT, contentData);
|
||||
}
|
||||
catch (ContentQuotaException qe)
|
||||
{
|
||||
throw new DiskFullException(qe.getMessage());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user