Merged DEV\EXTENSIONS to HEAD

svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4868 svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4869 .
   svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4904 svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4938 .
   Module management support
   Modularization of Records Management


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4956 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-01-29 14:43:37 +00:00
parent 0e3da160a2
commit f047c6baaf
42 changed files with 3324 additions and 664 deletions

View File

@@ -30,6 +30,13 @@
<import resource="classpath*:alfresco/patch/*-context.xml" />
<import resource="classpath*:alfresco/domain/*-context.xml" />
<!--
Import all modules and related components.
Extensions are explicitly imported after this so that the default
mechanism can still be used to override module-specific beans.
-->
<import resource="classpath*:alfresco/module-context.xml" />
<!--
Import of general extensions and bean overrides.
@@ -44,8 +51,4 @@
<import resource="classpath*:alfresco/extension/*-context.xml"/>
<import resource="classpath*:alfresco/extension/dev-context.xml" />
<!-- Import of installed modules -->
<import resource="classpath*:alfresco/module/*/module-context.xml"/>
<import resource="classpath*:alfresco/module/*/module-uninstall-context.xml"/>
</beans>

View File

@@ -270,6 +270,14 @@
</property>
</bean>
<!-- Start module components -->
<bean id="moduleStarter" class="org.alfresco.repo.module.ModuleStarter">
<property name="moduleService">
<ref bean="ModuleService" />
</property>
</bean>
<!-- CIFS Server -->
<bean id="fileServerConfiguration" class="org.alfresco.filesys.server.config.ServerConfiguration" parent="fileServerConfigurationBase">

View File

@@ -213,6 +213,7 @@
<property name="resourceBundles">
<list>
<value>alfresco.messages.system-messages</value>
<value>alfresco.messages.module-messages</value>
<value>alfresco.messages.dictionary-messages</value>
<value>alfresco.messages.version-service</value>
<value>alfresco.messages.permissions-service</value>

View File

@@ -0,0 +1,12 @@
# Module messages
module.msg.found_modules=Found {0} module(s).
module.msg.starting= Starting module ''{0}'' version {1}.
module.msg.installing= Installing module ''{0}'' version {1}.
module.msg.upgrading= Upgrading module ''{0}'' version {1} (was {2}).
module.err.downgrading_not_supported=\nDowngrading of modules is not supported.\nModule ''{0}'' version {1} is currently installed and must be uninstalled before version {2} can be installed.
module.err.already_executed=The module component has already been executed: {0}.{1}
module.err.execution_failed=A module component ''{0}'' failed to execute: {1}
module.err.component_already_registered=A component named ''{0}'' has already been registered for module ''{1}''.
module.err.unable_to_open_module_properties=The module properties file ''{0}'' could not be read.

View File

@@ -0,0 +1,27 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<!--
Core and helper beans for the module-loading components.
-->
<beans >
<!-- The ModuleService implementation -->
<bean id="moduleService" class="org.alfresco.repo.module.ModuleServiceImpl">
<property name="serviceRegistry" ref="ServiceRegistry" />
<property name="authenticationComponent" ref="AuthenticationComponent" />
<property name="registryService" ref="RegistryService" />
</bean>
<!-- Parent bean for beans derived from AbstractModuleComponent -->
<bean id="module.baseComponent" abstract="true" init-method="init">
<property name="serviceRegistry" ref="ServiceRegistry" />
<property name="authenticationComponent" ref="AuthenticationComponent" />
<property name="moduleService" ref="ModuleService" />
</bean>
<!-- Import of installed modules -->
<import resource="classpath*:alfresco/module/*/module-context.xml"/>
<import resource="classpath*:alfresco/module/*/module-uninstall-context.xml"/>
</beans>

View File

@@ -0,0 +1,24 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans >
<bean id="module.test.xyz.A" class="org.alfresco.repo.module.ModuleComponentHelperTest$NoopModuleComponent" parent="module.baseComponent">
<property name="moduleId" value="test.xyz" />
<property name="name" value="A" />
<property name="description" value="Component that does nothing A" />
<property name="sinceVersion" value="2.0" />
<property name="appliesFromVersion" value="1.0" />
<property name="appliesToVersion" value="1.5" />
</bean>
<bean id="module.test.xyz.B" class="org.alfresco.repo.module.ModuleComponentHelperTest$NoopModuleComponent" parent="module.baseComponent">
<property name="moduleId" value="test.xyz" />
<property name="name" value="B" />
<property name="description" value="Component that does nothing B" />
<property name="sinceVersion" value="2.0" />
<property name="appliesFromVersion" value="1.0" />
<!-- <property name="appliesToVersion" value="2.0" /> --> <!-- This should default to uncapped -->
</bean>
</beans>

View File

@@ -0,0 +1,5 @@
# A test module
module.id=test.xyz
module.title=Test XYZ
module.description=A module for unit testing
module.version=3.0

View File

@@ -1320,4 +1320,32 @@
</property>
</bean>
<!-- ModuleService -->
<bean id="ModuleService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.module.ModuleService</value>
</property>
<property name="target">
<ref bean="moduleService"/>
</property>
<property name="interceptorNames">
<list>
<idref local="ModuleService_transaction"/>
</list>
</property>
</bean>
<bean id="ModuleService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager">
<ref bean="transactionManager"/>
</property>
<property name="transactionAttributes">
<props>
<prop key="get*">${server.transaction.mode.readOnly}</prop>
<prop key="*">${server.transaction.mode.default}</prop>
</props>
</property>
</bean>
</beans>