DM Usages/Quotas fixes - protect system/admin-maintained properties, make store(s) configurable

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7500 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2007-12-03 11:34:20 +00:00
parent 9a2a27ebc0
commit ffb980ec5f
7 changed files with 266 additions and 102 deletions

View File

@@ -24,7 +24,8 @@
<import resource="classpath:alfresco/script-services-context.xml" />
<import resource="classpath:alfresco/index-recovery-context.xml" />
<import resource="classpath:alfresco/authority-services-context.xml" />
<import resource="classpath:alfresco/authentication-services-context.xml" />
<import resource="classpath:alfresco/authentication-services-context.xml" />
<import resource="classpath:alfresco/usage-services-context.xml" />
<import resource="classpath:alfresco/policy-context.xml" />
<import resource="classpath:alfresco/import-export-context.xml" />
<import resource="classpath:alfresco/bootstrap-context.xml" />

View File

@@ -201,9 +201,11 @@
<!-- system maintained values -->
<property name="cm:sizeCurrent">
<type>d:long</type>
<protected>true</protected>
</property>
<property name="cm:sizeQuota">
<type>d:long</type>
<type>d:long</type>
<protected>true</protected>
</property>
</properties>

View File

@@ -195,28 +195,6 @@
<property name="threshold">
<value>5000</value>
</property>
</bean>
<bean id="usageService" class="org.alfresco.repo.usage.UsageServiceImpl">
<property name="usageDeltaDao">
<ref bean="usageDeltaDao"/>
</property>
<property name="nodeDaoService">
<ref bean="nodeDaoService" />
</property>
<property name="tenantService">
<ref bean="tenantService"/>
</property>
</bean>
<bean id="contentUsageImpl" class="org.alfresco.repo.usage.ContentUsageImpl" init-method="init">
<property name="personService" ref="personService"/>
<property name="nodeService" ref="nodeService"/>
<property name="policyComponent" ref="policyComponent"/>
<property name="usageService" ref="usageService"/>
<property name="enabled">
<value>${system.usages.enabled}</value>
</property>
</bean>
</beans>

View File

@@ -0,0 +1,41 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!-- Beans pertinent to content usage / quota service -->
<beans>
<bean id="usageService" class="org.alfresco.repo.usage.UsageServiceImpl">
<property name="usageDeltaDao">
<ref bean="usageDeltaDao"/>
</property>
<property name="nodeDaoService">
<ref bean="nodeDaoService" />
</property>
<property name="tenantService">
<ref bean="tenantService"/>
</property>
</bean>
<bean id="contentUsageImpl" class="org.alfresco.repo.usage.ContentUsageImpl" init-method="init">
<property name="personService" ref="personService"/>
<property name="nodeService" ref="nodeService"/>
<property name="policyComponent" ref="policyComponent"/>
<property name="usageService" ref="usageService"/>
<property name="enabled">
<value>${system.usages.enabled}</value>
</property>
<property name="stores">
<list>
<value>workspace://SpacesStore</value>
</list>
</property>
</bean>
<bean id="usageQuotaProtector" class="org.alfresco.repo.usage.UsageQuotaProtector" init-method="init">
<property name="authorityService" ref="authorityService"/>
<property name="authenticationService" ref="authenticationService"/>
<property name="policyComponent" ref="policyComponent"/>
<property name="contentUsageService" ref="ContentUsageService"/>
</bean>
</beans>