diff --git a/config/alfresco/usage-services-context.xml b/config/alfresco/usage-services-context.xml
index 95ec47f51a..0a49f83089 100644
--- a/config/alfresco/usage-services-context.xml
+++ b/config/alfresco/usage-services-context.xml
@@ -34,6 +34,11 @@
workspace://SpacesStore
+
+
+ {http://www.alfresco.org/model/download/1.0}download
+
+
diff --git a/source/java/org/alfresco/repo/usage/ContentUsageImpl.java b/source/java/org/alfresco/repo/usage/ContentUsageImpl.java
index 5b3af785f4..f00e0991fc 100644
--- a/source/java/org/alfresco/repo/usage/ContentUsageImpl.java
+++ b/source/java/org/alfresco/repo/usage/ContentUsageImpl.java
@@ -77,6 +77,8 @@ public class ContentUsageImpl implements ContentUsageService,
private List stores;
+ private Set excludedTypes = new HashSet();
+
public void setNodeService(NodeService nodeService)
{
this.nodeService = nodeService;
@@ -122,6 +124,14 @@ public class ContentUsageImpl implements ContentUsageService,
return this.stores;
}
+ public void setExcludedTypes(List excludedTypes)
+ {
+ for (String exType : excludedTypes)
+ {
+ this.excludedTypes.add(QName.createQName(exType));
+ }
+ }
+
/**
* The initialise method
*/
@@ -431,7 +441,7 @@ public class ContentUsageImpl implements ContentUsageService,
private void incrementUserUsage(String userName, long contentSize, NodeRef contentNodeRef)
{
- if (! authenticationContext.isSystemUserName(userName))
+ if (!authenticationContext.isSystemUserName(userName) && !excludedTypes.contains(nodeService.getType(contentNodeRef)))
{
// increment usage - add positive delta
if (logger.isDebugEnabled()) logger.debug("incrementUserUsage: username="+userName+", contentSize="+contentSize+", contentNodeRef="+contentNodeRef);