Full Repository Export / Import Support - first checkpoint

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2591 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2006-03-30 18:38:03 +00:00
parent 69039bc6c9
commit 701657f2f1
28 changed files with 1179 additions and 443 deletions

View File

@@ -321,6 +321,15 @@
<property name="contentService">
<ref bean="ContentService" />
</property>
</bean>
</bean>
<bean id="repository-export" class="org.alfresco.repo.action.executer.RepositoryExporterActionExecuter" parent="action-executer">
<property name="publicAction">
<value>false</value>
</property>
<property name="repositoryExporterService">
<ref bean="repositoryExporterComponent"/>
</property>
</bean>
</beans>

View File

@@ -19,6 +19,7 @@
<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/import-export-context.xml" />
<import resource="classpath:alfresco/bootstrap-context.xml" />
<import resource="classpath*:alfresco/patch/*-context.xml" />

View File

@@ -53,6 +53,17 @@
</property>
</bean>
<bean id="versionBootstrap" parent="versionStoreImporter">
<property name="bootstrapViews">
<list>
<props>
<prop key="path">/</prop>
<prop key="location">alfresco/bootstrap/lightWeightVersionStore.xml</prop>
</props>
</list>
</property>
</bean>
<bean id="spacesBootstrap" parent="spacesStoreImporter">
<property name="bootstrapViews">
<list>
@@ -91,11 +102,6 @@
</property>
</bean>
<!--
<bean id="versionBootstrap" parent="versionStoreImporter">
</bean>
-->
<!-- Descriptor Service -->
<bean id="descriptorComponent" class="org.alfresco.repo.descriptor.DescriptorServiceImpl">

View File

@@ -324,21 +324,6 @@
</property>
</bean>
<bean id="versionBootstrap" class="org.alfresco.repo.version.VersionBootstrap" init-method="bootstrap">
<property name="transactionService">
<ref bean="transactionComponent"/>
</property>
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponent" />
</property>
<property name="permissionService">
<ref bean="permissionService" />
</property>
</bean>
<bean id="versionableAspect" class="org.alfresco.repo.version.VersionableAspect" init-method="init">
<property name="policyComponent">
<ref bean="policyComponent" />
@@ -618,171 +603,6 @@
<!-- Importers -->
<bean id="viewParser" class="org.alfresco.repo.importer.view.ViewParser">
<property name="namespaceService">
<ref bean="namespaceService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
</bean>
<bean id="importerComponent" class="org.alfresco.repo.importer.ImporterComponent">
<!-- For now, hard-wire the view parser -->
<property name="namespaceService">
<ref bean="NamespaceService" />
</property>
<property name="dictionaryService">
<ref bean="DictionaryService" />
</property>
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="searchService">
<ref bean="SearchService" />
</property>
<property name="contentService">
<ref bean="ContentService" />
</property>
<property name="ruleService">
<ref bean="RuleService" />
</property>
<property name="permissionService">
<ref bean="PermissionService" />
</property>
<property name="authorityService">
<ref bean="AuthorityService" />
</property>
<property name="authenticationService">
<ref bean="AuthenticationService" />
</property>
<property name="viewParser">
<ref bean="viewParser" />
</property>
<property name="behaviourFilter">
<ref bean="policyBehaviourFilter" />
</property>
<property name="ownableService">
<ref bean="ownableService" />
</property>
</bean>
<bean id="storeImporter" class="org.alfresco.repo.importer.ImporterBootstrap" abstract="true">
<property name="transactionService">
<ref bean="transactionComponent"/>
</property>
<property name="nodeService">
<ref bean="nodeService"/>
</property>
<property name="importerService">
<ref bean="importerComponent"/>
</property>
<property name="namespaceService">
<ref bean="namespaceService"/>
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponent" />
</property>
<property name="allowWrite">
<value>${server.transaction.allow-writes}</value>
</property>
<!-- To specify a locale other than the system default, uncomment the following
<property name="locale">
<value>en_GB</value>
</property>
-->
</bean>
<bean id="userStoreImporter" parent="storeImporter" abstract="true">
<property name="storeUrl">
<value>${alfresco_user_store.store}</value>
</property>
<property name="configuration">
<props>
<prop key="alfresco_user_store.system_container.childname">${alfresco_user_store.system_container.childname}</prop>
<prop key="alfresco_user_store.user_container.childname">${alfresco_user_store.user_container.childname}</prop>
<prop key="alfresco_user_store.authorities_container.childname">${alfresco_user_store.authorities_container.childname}</prop>
</props>
</property>
</bean>
<bean id="systemStoreImporter" parent="storeImporter" abstract="true">
<property name="storeUrl">
<value>${system.store}</value>
</property>
<property name="mustNotExistStoreUrls">
<list>
<value>${spaces.store}</value>
</list>
</property>
<property name="configuration">
<props>
<prop key="version.major">${version.major}</prop>
<prop key="version.minor">${version.minor}</prop>
<prop key="version.revision">${version.revision}</prop>
<prop key="version.label">${version.label}</prop>
<prop key="version.schema">${version.schema}</prop>
<prop key="system.descriptor.childname">${system.descriptor.childname}</prop>
<prop key="system.descriptor.current.childname">${system.descriptor.current.childname}</prop>
</props>
</property>
</bean>
<bean id="spacesStoreImporter" parent="storeImporter" abstract="true">
<property name="storeUrl">
<value>${spaces.store}</value>
</property>
<property name="configuration">
<props>
<prop key="spaces.company_home.childname">${spaces.company_home.childname}</prop>
<prop key="spaces.guest_home.childname">${spaces.guest_home.childname}</prop>
<prop key="system.system_container.childname">${system.system_container.childname}</prop>
<prop key="system.people_container.childname">${system.people_container.childname}</prop>
<prop key="spaces.dictionary.childname">${spaces.dictionary.childname}</prop>
<prop key="spaces.templates.childname">${spaces.templates.childname}</prop>
<prop key="spaces.templates.content.childname">${spaces.templates.content.childname}</prop>
<prop key="spaces.templates.email.childname">${spaces.templates.email.childname}</prop>
<prop key="spaces.savedsearches.childname">${spaces.savedsearches.childname}</prop>
</props>
</property>
</bean>
<bean id="versionStoreImporter" parent="storeImporter" abstract="true">
<property name="storeUrl">
<value>workspace://lightWeightVersionStore</value>
</property>
</bean>
<!-- Exporters -->
<bean id="exporterComponent" class="org.alfresco.repo.exporter.ExporterComponent">
<property name="namespaceService">
<ref bean="NamespaceService" />
</property>
<property name="dictionaryService">
<ref bean="DictionaryService" />
</property>
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="searchService">
<ref bean="SearchService" />
</property>
<property name="contentService">
<ref bean="ContentService" />
</property>
<property name="descriptorService">
<ref bean="DescriptorService" />
</property>
<property name="authenticationService">
<ref bean="AuthenticationService" />
</property>
<property name="permissionService">
<ref bean="PermissionService" />
</property>
</bean>
<!-- Audit -->
<bean id="auditableAspect" class="org.alfresco.repo.audit.AuditableAspect" init-method="init">
<property name="nodeService">

View File

@@ -0,0 +1,54 @@
<?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="userBootstrap" parent="userStoreImporter">
<property name="bootstrapViews">
<list>
<props>
<prop key="path">/</prop>
<prop key="location">alfresco/extension/restore/export_users.acp</prop>
</props>
</list>
</property>
<property name="log"><value>true</value></property>
</bean>
<bean id="systemBootstrap" parent="systemStoreImporter">
<property name="bootstrapViews">
<list>
<props>
<prop key="path">/</prop>
<prop key="location">alfresco/extension/restore/export_system.acp</prop>
</props>
</list>
</property>
<property name="log"><value>true</value></property>
</bean>
<bean id="versionBootstrap" parent="versionStoreImporter">
<property name="bootstrapViews">
<list>
<props>
<prop key="path">/</prop>
<prop key="location">alfresco/extension/restore/export_versions.acp</prop>
</props>
</list>
</property>
<property name="log"><value>true</value></property>
</bean>
<bean id="spacesBootstrap" parent="spacesStoreImporter">
<property name="bootstrapViews">
<list>
<props>
<prop key="path">/</prop>
<prop key="location">alfresco/extension/restore/export_spaces.acp</prop>
</props>
</list>
</property>
<property name="log"><value>true</value></property>
</bean>
</beans>

View File

@@ -0,0 +1,213 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- Importer and Exporter Components -->
<bean id="viewParser" class="org.alfresco.repo.importer.view.ViewParser">
<property name="namespaceService">
<ref bean="namespaceService" />
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
</bean>
<bean id="importerComponent" class="org.alfresco.repo.importer.ImporterComponent">
<!-- For now, hard-wire the view parser -->
<property name="namespaceService">
<ref bean="NamespaceService" />
</property>
<property name="dictionaryService">
<ref bean="DictionaryService" />
</property>
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="contentService">
<ref bean="ContentService" />
</property>
<property name="ruleService">
<ref bean="RuleService" />
</property>
<property name="permissionService">
<ref bean="PermissionService" />
</property>
<property name="authorityService">
<ref bean="AuthorityService" />
</property>
<property name="authenticationService">
<ref bean="AuthenticationService" />
</property>
<property name="viewParser">
<ref bean="viewParser" />
</property>
<property name="behaviourFilter">
<ref bean="policyBehaviourFilter" />
</property>
<property name="searchService">
<ref bean="searchService" />
</property>
<property name="ownableService">
<ref bean="ownableService" />
</property>
</bean>
<bean id="exporterComponent" class="org.alfresco.repo.exporter.ExporterComponent">
<property name="namespaceService">
<ref bean="NamespaceService" />
</property>
<property name="dictionaryService">
<ref bean="DictionaryService" />
</property>
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="searchService">
<ref bean="SearchService" />
</property>
<property name="contentService">
<ref bean="ContentService" />
</property>
<property name="descriptorService">
<ref bean="DescriptorService" />
</property>
<property name="authenticationService">
<ref bean="AuthenticationService" />
</property>
<property name="permissionService">
<ref bean="PermissionService" />
</property>
</bean>
<bean id="repositoryExporterComponent" class="org.alfresco.repo.exporter.RepositoryExporterComponent">
<property name="exporterService">
<ref bean="ExporterService" />
</property>
<property name="mimetypeService">
<ref bean="mimetypeService" />
</property>
<property name="fileFolderService">
<ref bean="FileFolderService" />
</property>
<property name="nodeService">
<ref bean="NodeService" />
</property>
<property name="stores">
<list>
<props>
<prop key="storeRef">system://system</prop>
<prop key="packageName">system</prop>
</props>
<props>
<prop key="storeRef">${alfresco_user_store.store}</prop>
<prop key="packageName">users</prop>
</props>
<props>
<prop key="storeRef">${spaces.store}</prop>
<prop key="packageName">spaces</prop>
</props>
<props>
<prop key="storeRef">workspace://lightWeightVersionStore</prop>
<prop key="packageName">versions</prop>
</props>
</list>
</property>
</bean>
<!-- General Repository Store Importer -->
<bean id="storeImporter" class="org.alfresco.repo.importer.ImporterBootstrap" abstract="true">
<property name="transactionService">
<ref bean="transactionComponent"/>
</property>
<property name="nodeService">
<ref bean="nodeService"/>
</property>
<property name="importerService">
<ref bean="importerComponent"/>
</property>
<property name="namespaceService">
<ref bean="namespaceService"/>
</property>
<property name="authenticationComponent">
<ref bean="authenticationComponent" />
</property>
<property name="allowWrite">
<value>${server.transaction.allow-writes}</value>
</property>
<!-- To specify a locale other than the system default, uncomment the following
<property name="locale">
<value>en_GB</value>
</property>
-->
</bean>
<!-- -->
<!-- Store specific Importers -->
<!-- -->
<bean id="userStoreImporter" parent="storeImporter" abstract="true">
<property name="storeUrl">
<value>${alfresco_user_store.store}</value>
</property>
<property name="configuration">
<props>
<prop key="alfresco_user_store.system_container.childname">${alfresco_user_store.system_container.childname}</prop>
<prop key="alfresco_user_store.user_container.childname">${alfresco_user_store.user_container.childname}</prop>
<prop key="alfresco_user_store.authorities_container.childname">${alfresco_user_store.authorities_container.childname}</prop>
</props>
</property>
</bean>
<bean id="systemStoreImporter" parent="storeImporter" abstract="true">
<property name="storeUrl">
<value>${system.store}</value>
</property>
<property name="mustNotExistStoreUrls">
<list>
<value>${spaces.store}</value>
</list>
</property>
<property name="configuration">
<props>
<prop key="version.major">${version.major}</prop>
<prop key="version.minor">${version.minor}</prop>
<prop key="version.revision">${version.revision}</prop>
<prop key="version.label">${version.label}</prop>
<prop key="version.schema">${version.schema}</prop>
<prop key="system.descriptor.childname">${system.descriptor.childname}</prop>
<prop key="system.descriptor.current.childname">${system.descriptor.current.childname}</prop>
</props>
</property>
</bean>
<bean id="spacesStoreImporter" parent="storeImporter" abstract="true">
<property name="storeUrl">
<value>${spaces.store}</value>
</property>
<property name="configuration">
<props>
<prop key="spaces.company_home.childname">${spaces.company_home.childname}</prop>
<prop key="spaces.guest_home.childname">${spaces.guest_home.childname}</prop>
<prop key="system.system_container.childname">${system.system_container.childname}</prop>
<prop key="system.people_container.childname">${system.people_container.childname}</prop>
<prop key="spaces.dictionary.childname">${spaces.dictionary.childname}</prop>
<prop key="spaces.templates.childname">${spaces.templates.childname}</prop>
<prop key="spaces.templates.content.childname">${spaces.templates.content.childname}</prop>
<prop key="spaces.templates.email.childname">${spaces.templates.email.childname}</prop>
<prop key="spaces.savedsearches.childname">${spaces.savedsearches.childname}</prop>
</props>
</property>
</bean>
<bean id="versionStoreImporter" parent="storeImporter" abstract="true">
<property name="storeUrl">
<value>workspace://lightWeightVersionStore</value>
</property>
</bean>
</beans>

View File

@@ -69,5 +69,6 @@ export.title=Export a Space
export.description=Exports a Space and optionally it's children to an Alfresco export package.
export.package.description=Alfresco content package for Space ''{0}''.
export.root.package.description=Alfresco content package for complete Repository.
export.store.package.description=Alfresco export of store ''{0}''.
export.package.error=Failed to find temporary file for export