mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
MT extension
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6785 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -5,12 +5,8 @@
|
||||
<beans >
|
||||
|
||||
<import resource="classpath:alfresco/cache-context.xml" />
|
||||
|
||||
<import resource="classpath:alfresco/tenant-single-context.xml"/>
|
||||
|
||||
<!-- if available, will enable multi-tenancy -->
|
||||
<import resource="classpath*:alfresco/tenant-multi-context.xml"/>
|
||||
|
||||
<import resource="classpath:alfresco/st-context.xml"/>
|
||||
<import resource="classpath*:alfresco/extension/mt/mt-context.xml"/>
|
||||
<import resource="classpath:alfresco/core-services-context.xml" />
|
||||
<import resource="classpath:alfresco/public-services-context.xml" />
|
||||
<import resource="classpath:alfresco/model-specific-services-context.xml" />
|
||||
@@ -21,6 +17,7 @@
|
||||
<import resource="classpath:alfresco/network-protocol-context.xml" />
|
||||
<import resource="classpath:alfresco/email-service-context.xml" />
|
||||
<import resource="classpath:alfresco/content-services-context.xml" />
|
||||
<import resource="classpath*:alfresco/extension/mt/mt-contentstore-context.xml"/>
|
||||
<import resource="classpath:alfresco/hibernate-context.xml" />
|
||||
<import resource="classpath:alfresco/ownable-services-context.xml" />
|
||||
<import resource="classpath:alfresco/template-services-context.xml" />
|
||||
@@ -30,10 +27,8 @@
|
||||
<import resource="classpath:alfresco/authentication-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" />
|
||||
|
||||
<import resource="classpath:alfresco/repo-admin-context.xml"/>
|
||||
|
||||
<import resource="classpath:alfresco/bootstrap-context.xml" />
|
||||
<import resource="classpath:alfresco/repo-admin-context.xml"/>
|
||||
<import resource="classpath:alfresco/workflow-context.xml" />
|
||||
<import resource="classpath:alfresco/jcr-api-context.xml" />
|
||||
<import resource="classpath:alfresco/avm-services-context.xml" />
|
||||
|
@@ -226,12 +226,8 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Bootstrap Single-Tenant Admin Context -->
|
||||
<import resource="classpath:alfresco/bootstrap/tenant-single-admin-context.xml"/>
|
||||
|
||||
<!-- Bootstrap Multi-Tenant Admin Context (if available) -->
|
||||
<!-- note: must be after schema bootstrap and before repo-admin and workflow -->
|
||||
<import resource="classpath*:alfresco/bootstrap/tenant-multi-admin-context.xml"/>
|
||||
<import resource="classpath:alfresco/bootstrap/st-admin-context.xml"/>
|
||||
<import resource="classpath*:alfresco/extension/mt/mt-admin-context.xml"/>
|
||||
|
||||
<bean id="workflowBootstrap" parent="workflowDeployer">
|
||||
<property name="workflowDefinitions">
|
||||
|
0
config/alfresco/bootstrap/tenant-single-admin-context.xml → config/alfresco/bootstrap/st-admin-context.xml
Normal file → Executable file
0
config/alfresco/bootstrap/tenant-single-admin-context.xml → config/alfresco/bootstrap/st-admin-context.xml
Normal file → Executable file
@@ -21,8 +21,10 @@
|
||||
<ref bean="deletedContentStore" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Abstract bean definition defining base definition for content store cleaner -->
|
||||
<!-- Performs the content cleanup -->
|
||||
<bean id="contentStoreCleaner" class="org.alfresco.repo.content.cleanup.ContentStoreCleaner" >
|
||||
<bean id="baseContentStoreCleaner" class="org.alfresco.repo.content.cleanup.ContentStoreCleaner" abstract="true">
|
||||
<property name="dictionaryService">
|
||||
<ref bean="dictionaryService" />
|
||||
</property>
|
||||
@@ -38,11 +40,6 @@
|
||||
<property name="protectDays" >
|
||||
<value>14</value>
|
||||
</property>
|
||||
<property name="stores" >
|
||||
<list>
|
||||
<ref bean="fileContentStore" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="listeners" >
|
||||
<list>
|
||||
<ref bean="deletedContentBackupListener" />
|
||||
@@ -50,7 +47,16 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="contentService" class="org.alfresco.repo.content.RoutingContentService" init-method="init">
|
||||
<bean id="contentStoreCleaner" parent="baseContentStoreCleaner">
|
||||
<property name="stores" >
|
||||
<list>
|
||||
<ref bean="fileContentStore" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Abstract bean definition defining base definition for content service -->
|
||||
<bean id="baseContentService" class="org.alfresco.repo.content.RoutingContentService" abstract="true" init-method="init">
|
||||
<property name="transactionService">
|
||||
<ref bean="transactionService" />
|
||||
</property>
|
||||
@@ -66,9 +72,6 @@
|
||||
<property name="transformerRegistry">
|
||||
<ref bean="contentTransformerRegistry" />
|
||||
</property>
|
||||
<property name="store">
|
||||
<ref bean="fileContentStore" />
|
||||
</property>
|
||||
<property name="policyComponent">
|
||||
<ref bean="policyComponent" />
|
||||
</property>
|
||||
@@ -79,6 +82,12 @@
|
||||
<ref bean="transformer.ImageMagick" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="contentService" parent="baseContentService">
|
||||
<property name="store">
|
||||
<ref bean="fileContentStore" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="mimetypeConfigService" class="org.alfresco.config.xml.XMLConfigService" init-method="init">
|
||||
<constructor-arg>
|
||||
|
@@ -403,4 +403,22 @@
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
|
||||
<!-- Tenants Cache -->
|
||||
|
||||
<cache
|
||||
name="org.alfresco.cache.tenantsCache"
|
||||
maxElementsInMemory="100"
|
||||
eternal="true"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
|
||||
<!-- Tenant-based Routing File Content Store -->
|
||||
|
||||
<cache
|
||||
name="org.alfresco.cache.tenantFileStoresCache"
|
||||
maxElementsInMemory="10000"
|
||||
eternal="true"
|
||||
overflowToDisk="false"
|
||||
/>
|
||||
|
||||
</ehcache>
|
@@ -708,5 +708,42 @@
|
||||
replicateAsynchronously = false"/>
|
||||
|
||||
</cache>
|
||||
|
||||
|
||||
|
||||
<!-- Tenants Cache -->
|
||||
|
||||
<cache
|
||||
name="org.alfresco.cache.tenantsCache"
|
||||
maxElementsInMemory="100"
|
||||
eternal="true"
|
||||
overflowToDisk="false">
|
||||
|
||||
<cacheEventListenerFactory
|
||||
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
|
||||
properties="replicatePuts = false,
|
||||
replicateUpdates = true,
|
||||
replicateRemovals = true,
|
||||
replicateUpdatesViaCopy = false,
|
||||
replicateAsynchronously = false"/>
|
||||
|
||||
</cache>
|
||||
|
||||
<!-- Tenant-based Routing File Content Store -->
|
||||
|
||||
<cache
|
||||
name="org.alfresco.cache.tenantFileStoresCache"
|
||||
maxElementsInMemory="10000"
|
||||
eternal="true"
|
||||
overflowToDisk="false">
|
||||
|
||||
<cacheEventListenerFactory
|
||||
class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
|
||||
properties="replicatePuts = false,
|
||||
replicateUpdates = true,
|
||||
replicateRemovals = true,
|
||||
replicateUpdatesViaCopy = false,
|
||||
replicateAsynchronously = false"/>
|
||||
|
||||
</cache>
|
||||
|
||||
</ehcache>
|
||||
|
43
config/alfresco/extension/mt/mt-admin-context.xml.sample
Normal file
43
config/alfresco/extension/mt/mt-admin-context.xml.sample
Normal file
@@ -0,0 +1,43 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||
|
||||
<beans>
|
||||
|
||||
<!-- -->
|
||||
<!-- MT Admin Service Implementation -->
|
||||
<!-- -->
|
||||
|
||||
<bean id="tenantAdminService" class="org.alfresco.repo.tenant.MultiTAdminServiceImpl">
|
||||
|
||||
<!--
|
||||
<property name="nodeService" ref="NodeService"/>
|
||||
-->
|
||||
<property name="nodeService" ref="dbNodeServiceImpl"/> <!-- TODO - go direct, until we expose deleteStore via public NodeService API -->
|
||||
<property name="dictionaryComponent" ref="dictionaryService"/>
|
||||
<property name="authenticationComponent" ref="authenticationComponent"/>
|
||||
<property name="repoAdminService" ref="RepoAdminService"/>
|
||||
<property name="tenantService" ref="tenantService"/>
|
||||
<property name="transactionService" ref="transactionComponent"/>
|
||||
<property name="attributeService" ref="AttributeService"/>
|
||||
<property name="passwordEncoder" ref="passwordEncoder"/>
|
||||
<property name="tenantFileContentStore" ref="tenantFileContentStore"/>
|
||||
<property name="workflowService" ref="WorkflowService"/>
|
||||
|
||||
</bean>
|
||||
|
||||
<bean id="tenantInterpreter" class="org.alfresco.repo.tenant.TenantInterpreter">
|
||||
<property name="transactionService" ref="transactionComponent"/>
|
||||
<property name="tenantAdminService" ref="tenantAdminService"/>
|
||||
<property name="tenantService" ref="tenantService"/>
|
||||
<property name="authenticationService" ref="AuthenticationService"/>
|
||||
</bean>
|
||||
|
||||
<bean id="tenantInterpreterHelp" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
|
||||
<property name="resourceBundles">
|
||||
<list>
|
||||
<value>alfresco.messages.tenant-interpreter-help</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
@@ -0,0 +1,76 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||
|
||||
<beans>
|
||||
|
||||
<!-- ======================================= -->
|
||||
<!-- Tenant Routing File Content Store Cache -->
|
||||
<!-- ======================================= -->
|
||||
|
||||
<bean name="tenantFileStoresCache" class="org.alfresco.repo.cache.EhCacheAdapter">
|
||||
<property name="cache">
|
||||
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
|
||||
<property name="cacheManager">
|
||||
<ref bean="internalEHCacheManager" />
|
||||
</property>
|
||||
<property name="cacheName">
|
||||
<value>org.alfresco.cache.tenantFileStoresCache</value>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- -->
|
||||
<!-- Tenant Routing File Content Store -->
|
||||
<!-- -->
|
||||
|
||||
<bean id="tenantFileContentStore" class="org.alfresco.repo.content.TenantRoutingFileContentStore" init-method="init">
|
||||
<property name="defaultRootDir">
|
||||
<value>${dir.contentstore}</value>
|
||||
</property>
|
||||
<property name="tenantService">
|
||||
<ref bean="tenantService" />
|
||||
</property>
|
||||
<property name="storesCache">
|
||||
<ref bean="tenantFileStoresCache" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- override content store cleaner to use tenant routing file content store -->
|
||||
<!-- Performs the content cleanup -->
|
||||
<bean id="contentStoreCleaner" class="org.alfresco.repo.content.cleanup.ContentStoreCleaner" >
|
||||
<property name="dictionaryService">
|
||||
<ref bean="dictionaryService" />
|
||||
</property>
|
||||
<property name="nodeDaoService" >
|
||||
<ref bean="nodeDaoService" />
|
||||
</property>
|
||||
<property name="avmNodeDAO">
|
||||
<ref bean="avmNodeDAO"/>
|
||||
</property>
|
||||
<property name="transactionService" >
|
||||
<ref bean="transactionService" />
|
||||
</property>
|
||||
<property name="protectDays" >
|
||||
<value>14</value>
|
||||
</property>
|
||||
<property name="stores" >
|
||||
<list>
|
||||
<ref bean="tenantFileContentStore" />
|
||||
</list>
|
||||
</property>
|
||||
<property name="listeners" >
|
||||
<list>
|
||||
<ref bean="deletedContentBackupListener" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- override content service to use tenant routing file content store -->
|
||||
<bean id="contentService" parent="baseContentService">
|
||||
<property name="store">
|
||||
<ref bean="tenantFileContentStore" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
55
config/alfresco/extension/mt/mt-context.xml.sample
Normal file
55
config/alfresco/extension/mt/mt-context.xml.sample
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||
|
||||
<beans>
|
||||
|
||||
<!-- ===================================== -->
|
||||
<!-- Tenants Cache -->
|
||||
<!-- ===================================== -->
|
||||
|
||||
<!-- The cross-transaction shared cache for in-memory Tenants -->
|
||||
|
||||
<bean name="tenantsSharedCache" class="org.alfresco.repo.cache.EhCacheAdapter">
|
||||
<property name="cache">
|
||||
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean" >
|
||||
<property name="cacheManager">
|
||||
<ref bean="internalEHCacheManager" />
|
||||
</property>
|
||||
<property name="cacheName">
|
||||
<value>org.alfresco.cache.tenantsCache</value>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- The transactional cache for in-memory Tenants -->
|
||||
|
||||
<bean name="tenantsCache" class="org.alfresco.repo.cache.TransactionalCache">
|
||||
<property name="sharedCache">
|
||||
<ref bean="tenantsSharedCache" />
|
||||
</property>
|
||||
<property name="cacheManager" >
|
||||
<ref bean="transactionalEHCacheManager" />
|
||||
</property>
|
||||
<property name="name">
|
||||
<value>org.alfresco.tenantsTransactionalCache</value>
|
||||
</property>
|
||||
<property name="maxCacheSize">
|
||||
<value>10</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<!-- -->
|
||||
<!-- MT Service Implementation -->
|
||||
<!-- -->
|
||||
|
||||
<bean id="tenantService" class="org.alfresco.repo.tenant.MultiTServiceImpl">
|
||||
|
||||
<property name="tenantsCache">
|
||||
<ref bean="tenantsCache"/>
|
||||
</property>
|
||||
|
||||
</bean>
|
||||
|
||||
</beans>
|
1
config/alfresco/messages/tenant-interpreter-help.properties
Executable file
1
config/alfresco/messages/tenant-interpreter-help.properties
Executable file
@@ -0,0 +1 @@
|
||||
tenant_console.help=alfresco/messages/tenant-interpreter-help.txt
|
74
config/alfresco/messages/tenant-interpreter-help.txt
Executable file
74
config/alfresco/messages/tenant-interpreter-help.txt
Executable file
@@ -0,0 +1,74 @@
|
||||
##
|
||||
## Meta commands
|
||||
##
|
||||
|
||||
ok> help
|
||||
|
||||
List this help.
|
||||
|
||||
ok> r
|
||||
|
||||
Repeat last command.
|
||||
|
||||
ok> quit | exit
|
||||
|
||||
Quit this console.
|
||||
|
||||
|
||||
##
|
||||
## Tenant Commands - for administering tenants
|
||||
##
|
||||
|
||||
|
||||
ok> show tenants
|
||||
|
||||
List all tenants and show their details.
|
||||
|
||||
ok> show tenant <tenant domain>
|
||||
|
||||
Show tenant details - status (ie. whether enabled or disabled) and root contentstore directory.
|
||||
|
||||
Example: show tenant yyy.zzz.com
|
||||
|
||||
ok> create <tenant domain> <tenant admin password> [<root contentstore dir>]
|
||||
|
||||
Create tenant. By default the tenant will be enabled. It will have an admin
|
||||
user called "admin@<tenant domain>" with supplied admin password. The root
|
||||
of the contentstore directory can be optionally specified, otherwise it
|
||||
will default to the repository default root contentstore (as specified by
|
||||
the dir.contentstore property). The default workflows will also be bootstrapped.
|
||||
|
||||
Examples: create xxx.com h3ll0
|
||||
create yyy.zzz.com g00dby3 C:/tenantstores/yyy.zzz
|
||||
|
||||
ok> createWithoutWorkflows <tenant domain> <tenant admin password> [<root contentstore dir>]
|
||||
|
||||
Same as create, except the default workflows will not be bootstrapped.
|
||||
|
||||
ok> bootstrapWorkflows <tenant domain>
|
||||
|
||||
Bootstrap the default workflows.
|
||||
|
||||
Examples: bootstrapWorkflows yyy.zzz.com
|
||||
|
||||
ok> changeAdminPassword <tenant domain> <tenant admin password>
|
||||
|
||||
Useful if the tenant's admin (admin@<tenant domain) has forgotten their password.
|
||||
|
||||
Example: changeAdminPassword yyy.zzz.com n3wpassw0rd
|
||||
|
||||
ok> enable <tenant domain>
|
||||
|
||||
Enable tenant so that is active and available for new logins
|
||||
|
||||
Example: enable yyy.zzz.com
|
||||
|
||||
ok> disable <tenant domain>
|
||||
|
||||
Disable tenant so that is inactive. Existing logins will fail on next usage.
|
||||
|
||||
Example: enable yyy.zzz.com
|
||||
|
||||
##
|
||||
## end
|
||||
##
|
@@ -37,7 +37,7 @@
|
||||
|
||||
|
||||
<!-- Load any additional models/messages from repo into data dictionary -->
|
||||
<!-- note: needs to match import-export-context.xml locations -->
|
||||
<!-- note: needs to match boostrap-context.xml locations (customModelsSpace.acp and customMessagesSpace.xml) -->
|
||||
|
||||
<bean id="customModelsRepositoryLocation" class="org.alfresco.repo.dictionary.RepositoryLocation">
|
||||
<!-- other properties will be defaulted, but can be overriden here -->
|
||||
|
0
config/alfresco/tenant-single-context.xml → config/alfresco/st-context.xml
Normal file → Executable file
0
config/alfresco/tenant-single-context.xml → config/alfresco/st-context.xml
Normal file → Executable file
Reference in New Issue
Block a user