mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
First-cut RepoAdmin Service for managing models & messages in the repo (not yet enabled)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6682 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,9 @@
|
||||
<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/workflow-context.xml" />
|
||||
<import resource="classpath:alfresco/jcr-api-context.xml" />
|
||||
<import resource="classpath:alfresco/avm-services-context.xml" />
|
||||
|
1
config/alfresco/messages/repoadmin-interpreter-help.properties
Executable file
1
config/alfresco/messages/repoadmin-interpreter-help.properties
Executable file
@@ -0,0 +1 @@
|
||||
repoadmin_console.help=alfresco/messages/repoadmin-interpreter-help.txt
|
97
config/alfresco/messages/repoadmin-interpreter-help.txt
Executable file
97
config/alfresco/messages/repoadmin-interpreter-help.txt
Executable file
@@ -0,0 +1,97 @@
|
||||
##
|
||||
## Meta commands
|
||||
##
|
||||
|
||||
ok> help
|
||||
|
||||
List this help.
|
||||
|
||||
ok> r
|
||||
|
||||
Repeat last command.
|
||||
|
||||
|
||||
ok> quit | exit
|
||||
|
||||
Quit this console.
|
||||
|
||||
##
|
||||
## General Repo Admin Commands
|
||||
##
|
||||
|
||||
ok> show file <fileClassPath>
|
||||
|
||||
Output the contents of the file located at <fileClassPath>.
|
||||
|
||||
<fileClassPath> class path to a file
|
||||
|
||||
e.g. show file alfresco/extension/xxxModel.xml
|
||||
e.g. show file alfresco/extension/yyy-messages.properties
|
||||
|
||||
ok> show file-list <filesClassPath>
|
||||
|
||||
Show list of files located at <filesClassPath> with first match being listed for each filename.
|
||||
|
||||
<filesClassPath> class path to a list of files. Wildcard * is allowed. For example, to see
|
||||
a list of message resource bundles that would be loaded, use: /path1/path2/bundlename*.properties
|
||||
|
||||
e.g. show file-list alfresco/extension/*
|
||||
e.g. show file-list alfresco/extension/*Model.xml
|
||||
e.g. show file-list alfresco/extension/zzz-messages*.properties
|
||||
|
||||
##
|
||||
## Model Admin Commands
|
||||
##
|
||||
|
||||
ok> show models
|
||||
|
||||
Show deployed models - that are stored in the repository data dictionary.
|
||||
|
||||
ok> deploy model <fileClassPath>
|
||||
|
||||
Upload model to repository and into runtime data dictionary. This will also
|
||||
set the model as active.
|
||||
|
||||
e.g. deploy model alfresco/extension/exampleModel.xml
|
||||
|
||||
ok> undeploy model <modelFileName>
|
||||
|
||||
Permanently delete model from repository (all versions) and from runtime data dictionary.
|
||||
|
||||
e.g. undeploy model exampleModel.xml
|
||||
|
||||
ok> reload model <modelFileName>
|
||||
|
||||
Reload (or load for first time) from repository into runtime data dictionary.
|
||||
|
||||
e.g. reload model exampleModel.xml
|
||||
|
||||
##
|
||||
## Message Admin Commands
|
||||
##
|
||||
|
||||
ok> show messages
|
||||
|
||||
Show deployed message resource bundles - that are stored in the repository data dictionary.
|
||||
|
||||
ok> deploy messages <resourceBundleClassPath>
|
||||
|
||||
Upload message resource bundle to repository and runtime message service.
|
||||
|
||||
e.g. deploy messages alfresco/extension/lifecycle-messages
|
||||
|
||||
ok> undeploy messages <resourceBundleBaseName>
|
||||
|
||||
Remove message resource bundle from repository and from runtime message service.
|
||||
|
||||
e.g. undeploy messages lifecycle-messages
|
||||
|
||||
ok> reload messages <resourceBundleBaseName>
|
||||
|
||||
Reload message resource bundle from repository into runtime message service.
|
||||
|
||||
e.g. undeploy messages lifecycle-messages
|
||||
|
||||
##
|
||||
## end
|
||||
##
|
@@ -1419,4 +1419,36 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<!-- Repository Admin Service -->
|
||||
|
||||
<bean id="RepoAdminService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||
<property name="proxyInterfaces">
|
||||
<value>org.alfresco.service.cmr.admin.RepoAdminService</value>
|
||||
</property>
|
||||
<property name="target">
|
||||
<ref bean="repoAdminService"/>
|
||||
</property>
|
||||
<property name="interceptorNames">
|
||||
<list>
|
||||
<idref local="RepoAdminService_transaction"/>
|
||||
<idref local="AuditMethodInterceptor"/>
|
||||
<idref local="exceptionTranslator"/>
|
||||
<idref bean="RepoAdminService_security"/>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="RepoAdminService_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>
|
||||
|
@@ -795,4 +795,12 @@
|
||||
|
||||
<bean id="AuditService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
|
||||
|
||||
<!-- ======================== -->
|
||||
<!-- Repository Admin Service -->
|
||||
<!-- ======================== -->
|
||||
|
||||
<!-- TODO: Add repository admin security -->
|
||||
|
||||
<bean id="RepoAdminService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
|
||||
|
||||
</beans>
|
92
config/alfresco/repo-admin-context.xml
Executable file
92
config/alfresco/repo-admin-context.xml
Executable file
@@ -0,0 +1,92 @@
|
||||
<?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="repoAdminService" class="org.alfresco.repo.admin.RepoAdminServiceImpl">
|
||||
|
||||
<property name="dictionaryDAO" ref="dictionaryDAO"/>
|
||||
<property name="searchService" ref="SearchService"/>
|
||||
<property name="nodeService" ref="NodeService"/>
|
||||
<property name="contentService" ref="ContentService"/>
|
||||
<property name="namespaceService" ref="namespaceService"/>
|
||||
<property name="messageService" ref="messageService"/>
|
||||
|
||||
<property name="repositoryModelsLocation" ref="customModelsRepositoryLocation"/>
|
||||
<property name="repositoryMessagesLocation" ref="customMessagesRepositoryLocation"/>
|
||||
|
||||
</bean>
|
||||
|
||||
<bean id="repoAdminInterpreter" class="org.alfresco.repo.admin.RepoAdminInterpreter">
|
||||
|
||||
<property name="transactionService" ref="transactionComponent"/>
|
||||
<property name="repoAdminService" ref="RepoAdminService"/>
|
||||
<property name="tenantService" ref="tenantService"/>
|
||||
|
||||
</bean>
|
||||
|
||||
<bean id="repoAdminInterpreterHelp" class="org.alfresco.i18n.ResourceBundleBootstrapComponent">
|
||||
|
||||
<property name="resourceBundles">
|
||||
<list>
|
||||
<value>alfresco.messages.repoadmin-interpreter-help</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
</bean>
|
||||
|
||||
|
||||
<!-- Load any additional models/messages from repo into data dictionary -->
|
||||
<!-- note: needs to match import-export-context.xml locations -->
|
||||
|
||||
<bean id="customModelsRepositoryLocation" class="org.alfresco.repo.dictionary.RepositoryLocation">
|
||||
<!-- other properties will be defaulted, but can be overriden here -->
|
||||
<property name="path">
|
||||
<value>/app:company_home/app:dictionary/app:models</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="customMessagesRepositoryLocation" class="org.alfresco.repo.dictionary.RepositoryLocation">
|
||||
<!-- other properties will be defaulted, but can be overriden here -->
|
||||
<property name="path">
|
||||
<value>/app:company_home/app:dictionary/app:messages</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dictionaryRepositoryBootstrap" class="org.alfresco.repo.dictionary.DictionaryRepositoryBootstrap">
|
||||
|
||||
<property name="dictionaryDAO">
|
||||
<ref bean="dictionaryDAO"/>
|
||||
</property>
|
||||
<property name="contentService">
|
||||
<ref bean="contentService"/>
|
||||
</property>
|
||||
<property name="searchService">
|
||||
<ref bean="searchService"/>
|
||||
</property>
|
||||
<property name="transactionService">
|
||||
<ref bean="transactionComponent"/>
|
||||
</property>
|
||||
|
||||
<property name="namespaceService"><ref bean="namespaceService"/></property>
|
||||
<property name="nodeService"><ref bean="NodeService"/></property>
|
||||
<property name="messageService"><ref bean="messageService"/></property>
|
||||
|
||||
<property name="tenantService"><ref bean="tenantService"/></property>
|
||||
<property name="tenantDeployerService" ref="tenantAdminService"/>
|
||||
|
||||
<property name="repositoryModelsLocations">
|
||||
<list>
|
||||
<ref bean="customModelsRepositoryLocation" />
|
||||
</list>
|
||||
</property>
|
||||
|
||||
<property name="repositoryMessagesLocations">
|
||||
<list>
|
||||
<ref bean="customMessagesRepositoryLocation" />
|
||||
</list>
|
||||
</property>
|
||||
|
||||
</bean>
|
||||
|
||||
</beans>
|
Reference in New Issue
Block a user