mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Upgraded to Hibernate 3.2.1
The code changes were pulled from the fix branch and V1.4 (HIBERNATE_UPGRADE 5207 5293) The jars were manually dropped in again due to the new directory structure git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5303 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -4,38 +4,10 @@
|
|||||||
<beans>
|
<beans>
|
||||||
<import resource="classpath:alfresco/public-services-security-context.xml"/>
|
<import resource="classpath:alfresco/public-services-security-context.xml"/>
|
||||||
|
|
||||||
<!-- Base Service Descriptor for Alfresco Services -->
|
|
||||||
<bean id="AlfrescoServiceDescriptor" abstract="true" class="org.alfresco.repo.service.ServiceDescriptorAdvisorFactory">
|
|
||||||
<property name="namespace">
|
|
||||||
<value>http://www.alfresco.org</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Service Registry -->
|
<!-- Service Registry -->
|
||||||
|
|
||||||
<bean id="ServiceRegistry" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="ServiceRegistry" class="org.alfresco.repo.service.ServiceDescriptorRegistry" />
|
||||||
<property name="proxyInterfaces">
|
|
||||||
<value>org.alfresco.service.ServiceRegistry</value>
|
|
||||||
</property>
|
|
||||||
<property name="target">
|
|
||||||
<bean class="org.alfresco.repo.service.ServiceDescriptorRegistry"/>
|
|
||||||
</property>
|
|
||||||
<property name="interceptorNames">
|
|
||||||
<list>
|
|
||||||
<idref local="ServiceRegistry_descriptor"/>
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="ServiceRegistry_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.ServiceRegistry</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Repository service registry</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Exception Translation -->
|
<!-- Exception Translation -->
|
||||||
|
|
||||||
<bean id="exceptionTranslator" class="org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor"/>
|
<bean id="exceptionTranslator" class="org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor"/>
|
||||||
@@ -52,20 +24,10 @@
|
|||||||
<property name="interceptorNames">
|
<property name="interceptorNames">
|
||||||
<list>
|
<list>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref local="DescriptorService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="DescriptorService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.descriptor.DescriptorService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Descriptor service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- AuditMethodInterceptor -->
|
<!-- AuditMethodInterceptor -->
|
||||||
|
|
||||||
<bean id="AuditMethodInterceptor" class="org.alfresco.repo.audit.AuditMethodInterceptor">
|
<bean id="AuditMethodInterceptor" class="org.alfresco.repo.audit.AuditMethodInterceptor">
|
||||||
@@ -81,26 +43,6 @@
|
|||||||
<!-- Namespace Service -->
|
<!-- Namespace Service -->
|
||||||
|
|
||||||
<alias name="namespaceService" alias="NamespaceService"/>
|
<alias name="namespaceService" alias="NamespaceService"/>
|
||||||
|
|
||||||
<bean id="NamespaceService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
|
||||||
<property name="transactionManager">
|
|
||||||
<ref bean="transactionManager"/>
|
|
||||||
</property>
|
|
||||||
<property name="transactionAttributes">
|
|
||||||
<props>
|
|
||||||
<prop key="*">${server.transaction.mode.default}</prop>
|
|
||||||
</props>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="NamespaceService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.namespace.NamespaceService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Namespace service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Transaction Service -->
|
<!-- Transaction Service -->
|
||||||
|
|
||||||
@@ -109,33 +51,12 @@
|
|||||||
<!-- Dictionary Service -->
|
<!-- Dictionary Service -->
|
||||||
|
|
||||||
<alias name="dictionaryService" alias="DictionaryService"/>
|
<alias name="dictionaryService" alias="DictionaryService"/>
|
||||||
|
|
||||||
<bean id="DictionaryService_transaction" class="org.springframework.transaction.interceptor.TransactionInterceptor">
|
|
||||||
<property name="transactionManager">
|
|
||||||
<ref bean="transactionManager"/>
|
|
||||||
</property>
|
|
||||||
<property name="transactionAttributes">
|
|
||||||
<props>
|
|
||||||
<prop key="*">${server.transaction.mode.default}</prop>
|
|
||||||
</props>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="DictionaryService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.dictionary.DictionaryService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Dictionary Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Node Service -->
|
<!-- Node Service -->
|
||||||
|
|
||||||
<bean id="NodeService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="NodeService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
<property name="proxyInterfaces">
|
<property name="proxyInterfaces">
|
||||||
<list>
|
<list>
|
||||||
<value>org.alfresco.service.ServiceDescriptor</value>
|
|
||||||
<value>org.alfresco.service.cmr.repository.NodeService</value>
|
<value>org.alfresco.service.cmr.repository.NodeService</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
@@ -148,7 +69,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="NodeService_security"/>
|
<idref bean="NodeService_security"/>
|
||||||
<idref local="NodeService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -167,15 +87,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="NodeService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.repository.NodeService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Node Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Content Service -->
|
<!-- Content Service -->
|
||||||
|
|
||||||
<bean id="ContentService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="ContentService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -191,7 +102,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="ContentService_security"/>
|
<idref bean="ContentService_security"/>
|
||||||
<idref local="ContentService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -206,29 +116,11 @@
|
|||||||
</props>
|
</props>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="ContentService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.repository.ContentService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Content Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Mime Type Service -->
|
<!-- Mime Type Service -->
|
||||||
|
|
||||||
<alias name="mimetypeService" alias="MimetypeService"/>
|
<alias name="mimetypeService" alias="MimetypeService"/>
|
||||||
|
|
||||||
<bean id="MimetypeService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.repository.MimetypeService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Mime Type Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Search Service -->
|
<!-- Search Service -->
|
||||||
|
|
||||||
<bean id="SearchService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="SearchService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -244,7 +136,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="SearchService_security"/>
|
<idref bean="SearchService_security"/>
|
||||||
<idref local="SearchService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -260,15 +151,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="SearchService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.search.SearchService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Search Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Category Service -->
|
<!-- Category Service -->
|
||||||
|
|
||||||
<bean id="CategoryService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="CategoryService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -284,7 +166,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="CategoryService_security"/>
|
<idref bean="CategoryService_security"/>
|
||||||
<idref local="CategoryService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -300,15 +181,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="CategoryService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.search.CategoryService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Category Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Copy Service -->
|
<!-- Copy Service -->
|
||||||
|
|
||||||
<bean id="CopyService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="CopyService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -324,7 +196,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="CopyService_security"/>
|
<idref bean="CopyService_security"/>
|
||||||
<idref local="CopyService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -340,15 +211,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="CopyService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.repository.CopyService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Copy Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Lock Service -->
|
<!-- Lock Service -->
|
||||||
|
|
||||||
<bean id="LockService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="LockService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -364,7 +226,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="LockService_security"/>
|
<idref bean="LockService_security"/>
|
||||||
<idref local="LockService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -380,15 +241,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="LockService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.lock.LockService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Lock Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Version Service -->
|
<!-- Version Service -->
|
||||||
|
|
||||||
<bean id="VersionService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="VersionService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -404,7 +256,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="VersionService_security"/>
|
<idref bean="VersionService_security"/>
|
||||||
<idref local="VersionService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -420,15 +271,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="VersionService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.version.VersionService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Version Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- COCI Service -->
|
<!-- COCI Service -->
|
||||||
|
|
||||||
<bean id="CheckoutCheckinService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="CheckoutCheckinService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -444,7 +286,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="CheckoutCheckinService_security"/>
|
<idref bean="CheckoutCheckinService_security"/>
|
||||||
<idref local="CheckoutCheckinService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -460,15 +301,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="CheckoutCheckinService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.coci.CheckOutCheckInService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Version Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Rule Service -->
|
<!-- Rule Service -->
|
||||||
|
|
||||||
<bean id="RuleService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="RuleService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -484,7 +316,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="RuleService_security"/>
|
<idref bean="RuleService_security"/>
|
||||||
<idref local="RuleService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -500,15 +331,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="RuleService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.rule.RuleService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Rule Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Importer Service -->
|
<!-- Importer Service -->
|
||||||
|
|
||||||
<bean id="ImporterService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="ImporterService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -524,7 +346,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="ImporterService_security"/>
|
<idref bean="ImporterService_security"/>
|
||||||
<idref local="ImporterService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -539,16 +360,7 @@
|
|||||||
</props>
|
</props>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="ImporterService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.view.ImporterService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Importer Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Exporter Service -->
|
<!-- Exporter Service -->
|
||||||
|
|
||||||
<bean id="ExporterService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="ExporterService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -562,7 +374,6 @@
|
|||||||
<list>
|
<list>
|
||||||
<idref local="ExporterService_transaction"/>
|
<idref local="ExporterService_transaction"/>
|
||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="ExporterService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -578,15 +389,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="ExporterService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.view.ExporterService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Exporter Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Action Service -->
|
<!-- Action Service -->
|
||||||
|
|
||||||
<bean id="ActionService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="ActionService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -602,7 +404,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="ActionService_security"/>
|
<idref bean="ActionService_security"/>
|
||||||
<idref local="ActionService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -618,15 +419,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="ActionService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.action.ActionService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Action Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Permission Service -->
|
<!-- Permission Service -->
|
||||||
|
|
||||||
<bean id="PermissionService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="PermissionService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -642,7 +434,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="PermissionService_security"/>
|
<idref bean="PermissionService_security"/>
|
||||||
<idref local="PermissionService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -658,15 +449,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="PermissionService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.security.PermissionService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Permission Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Authority Service -->
|
<!-- Authority Service -->
|
||||||
|
|
||||||
<bean id="AuthorityService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="AuthorityService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -682,7 +464,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="AuthorityService_security"/>
|
<idref bean="AuthorityService_security"/>
|
||||||
<idref local="AuthorityService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -698,15 +479,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="AuthorityService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.security.AuthorityService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Authority Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Ownable Service -->
|
<!-- Ownable Service -->
|
||||||
|
|
||||||
<bean id="OwnableService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="OwnableService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -722,7 +494,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="OwnableService_security"/>
|
<idref bean="OwnableService_security"/>
|
||||||
<idref local="OwnableService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -738,15 +509,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="OwnableService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.security.OwnableService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>OwnableService Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Person Service -->
|
<!-- Person Service -->
|
||||||
|
|
||||||
<bean id="PersonService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="PersonService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -762,7 +524,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="PersonService_security"/>
|
<idref bean="PersonService_security"/>
|
||||||
<idref local="PersonService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -778,15 +539,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="PersonService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.security.PersonService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>PersonService Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Authentication Service -->
|
<!-- Authentication Service -->
|
||||||
|
|
||||||
<bean id="AuthenticationService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="AuthenticationService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -802,7 +554,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="AuthenticationService_security"/>
|
<idref bean="AuthenticationService_security"/>
|
||||||
<idref local="AuthenticationService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -824,15 +575,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="AuthenticationService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.security.AuthenticationService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>AuthenticationService Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Template Service -->
|
<!-- Template Service -->
|
||||||
|
|
||||||
<bean id="TemplateService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="TemplateService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -848,7 +590,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="TemplateService_security"/>
|
<idref bean="TemplateService_security"/>
|
||||||
<idref local="TemplateService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -864,15 +605,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="TemplateService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.repository.TemplateService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>TemplateService Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Script Service -->
|
<!-- Script Service -->
|
||||||
|
|
||||||
<bean id="ScriptService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="ScriptService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -888,7 +620,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="ScriptService_security"/>
|
<idref bean="ScriptService_security"/>
|
||||||
<idref local="ScriptService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -904,15 +635,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="ScriptService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.repository.ScriptService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>ScriptService Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- File/Folder Service -->
|
<!-- File/Folder Service -->
|
||||||
|
|
||||||
<bean id="FileFolderService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="FileFolderService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -928,7 +650,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="FileFolderService_security"/>
|
<idref bean="FileFolderService_security"/>
|
||||||
<idref bean="FileFolderService_descriptor"/>
|
|
||||||
<idref bean="tempFileMarkerInterceptor"/>
|
<idref bean="tempFileMarkerInterceptor"/>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
@@ -949,15 +670,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="FileFolderService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.model.FileFolderService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>FileFolderService Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- The CrossRepositoryCopyService -->
|
<!-- The CrossRepositoryCopyService -->
|
||||||
|
|
||||||
<bean id="crossRepositoryCopyService" class="org.alfresco.repo.copy.CrossRepositoryCopyServiceImpl">
|
<bean id="crossRepositoryCopyService" class="org.alfresco.repo.copy.CrossRepositoryCopyServiceImpl">
|
||||||
@@ -1208,7 +920,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="WorkflowService_security"/>
|
<idref bean="WorkflowService_security"/>
|
||||||
<idref local="WorkflowService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -1223,17 +934,7 @@
|
|||||||
</props>
|
</props>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="WorkflowService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.workflow.WorkflowService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Workflow Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- Audit Service -->
|
<!-- Audit Service -->
|
||||||
|
|
||||||
<bean id="AuditService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="AuditService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
@@ -1249,7 +950,6 @@
|
|||||||
<idref local="AuditMethodInterceptor"/>
|
<idref local="AuditMethodInterceptor"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref bean="AuditService_security"/>
|
<idref bean="AuditService_security"/>
|
||||||
<idref local="AuditService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -1265,15 +965,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="AuditService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.audit.AuditService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Audit Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- MultilingualContentService -->
|
<!-- MultilingualContentService -->
|
||||||
|
|
||||||
@@ -1288,7 +979,6 @@
|
|||||||
<list>
|
<list>
|
||||||
<idref local="MultilingualContentService_transaction"/>
|
<idref local="MultilingualContentService_transaction"/>
|
||||||
<idref local="exceptionTranslator"/>
|
<idref local="exceptionTranslator"/>
|
||||||
<idref local="MultilingualContentService_descriptor"/>
|
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
@@ -1304,15 +994,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="MultilingualContentService_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.service.cmr.ml.MultilingualContentService</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Multilingual Content Service</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- ConfigurableService -->
|
<!-- ConfigurableService -->
|
||||||
|
|
||||||
<bean id="ConfigurableService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<bean id="ConfigurableService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
||||||
|
@@ -182,6 +182,14 @@ abstract public class AbstractMetadataExtracter implements MetadataExtracter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public final void extract(
|
||||||
|
ContentReader reader,
|
||||||
|
Map<QName, Serializable> destination,
|
||||||
|
Map<String, QName> propertyMapping) throws ContentIOException
|
||||||
|
{
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Override to provide the necessary extraction logic. Implementations must ensure that the reader
|
* Override to provide the necessary extraction logic. Implementations must ensure that the reader
|
||||||
* is closed before the method exits.
|
* is closed before the method exits.
|
||||||
|
@@ -32,8 +32,10 @@ import org.alfresco.service.cmr.repository.ContentReader;
|
|||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Interface for document property extracters.
|
||||||
*
|
*
|
||||||
* @author Jesper Steen Møller
|
* @author Jesper Steen Møller
|
||||||
|
* @author Derek Hulley
|
||||||
*/
|
*/
|
||||||
public interface MetadataExtracter
|
public interface MetadataExtracter
|
||||||
{
|
{
|
||||||
@@ -70,11 +72,32 @@ public interface MetadataExtracter
|
|||||||
* The source mimetype <b>must</b> be available on the
|
* The source mimetype <b>must</b> be available on the
|
||||||
* {@link org.alfresco.service.cmr.repository.ContentAccessor#getMimetype()} method
|
* {@link org.alfresco.service.cmr.repository.ContentAccessor#getMimetype()} method
|
||||||
* of the reader.
|
* of the reader.
|
||||||
|
* <p>
|
||||||
|
* <b>Note:</b> Internally, the extracter may need to perform a mapping of document-specific
|
||||||
|
* properties to <code>QName</code>. This is an implementation detail that is
|
||||||
|
* supported in the default abstract implementations.
|
||||||
*
|
*
|
||||||
* @param reader the source of the content
|
* @param reader the source of the content
|
||||||
* @param destination the destination of the extraction
|
* @param destination the map of properties to populate (essentially a return value)
|
||||||
* @throws ContentIOException if an IO exception occurs
|
* @throws ContentIOException if a detectable error occurs
|
||||||
|
*
|
||||||
|
* @see #extract(ContentReader, Map, Map)
|
||||||
*/
|
*/
|
||||||
public void extract(ContentReader reader, Map<QName, Serializable> destination) throws ContentIOException;
|
public void extract(ContentReader reader, Map<QName, Serializable> destination) throws ContentIOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param reader the source of the content
|
||||||
|
* @param destination the map of properties to populate (essentially a return value)
|
||||||
|
* @param propertyMapping a mapping of internal (document-specific properties) to system
|
||||||
|
* properties.
|
||||||
|
* @throws ContentIOException if a detectable error occurs
|
||||||
|
*
|
||||||
|
* @see #extract(ContentReader, Map)
|
||||||
|
*/
|
||||||
|
public void extract(
|
||||||
|
ContentReader reader,
|
||||||
|
Map<QName, Serializable> destination,
|
||||||
|
Map<String, QName> propertyMapping) throws ContentIOException;
|
||||||
}
|
}
|
||||||
|
@@ -39,6 +39,7 @@ import java.sql.SQLException;
|
|||||||
import java.sql.Statement;
|
import java.sql.Statement;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
import org.alfresco.error.AlfrescoRuntimeException;
|
import org.alfresco.error.AlfrescoRuntimeException;
|
||||||
import org.alfresco.i18n.I18NUtil;
|
import org.alfresco.i18n.I18NUtil;
|
||||||
@@ -53,10 +54,13 @@ import org.alfresco.util.ApplicationContextHelper;
|
|||||||
import org.alfresco.util.TempFileProvider;
|
import org.alfresco.util.TempFileProvider;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.hibernate.HibernateException;
|
||||||
import org.hibernate.Session;
|
import org.hibernate.Session;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.hibernate.Transaction;
|
import org.hibernate.Transaction;
|
||||||
import org.hibernate.cfg.Configuration;
|
import org.hibernate.cfg.Configuration;
|
||||||
|
import org.hibernate.cfg.Environment;
|
||||||
|
import org.hibernate.connection.UserSuppliedConnectionProvider;
|
||||||
import org.hibernate.dialect.Dialect;
|
import org.hibernate.dialect.Dialect;
|
||||||
import org.hibernate.tool.hbm2ddl.DatabaseMetadata;
|
import org.hibernate.tool.hbm2ddl.DatabaseMetadata;
|
||||||
import org.hibernate.tool.hbm2ddl.SchemaExport;
|
import org.hibernate.tool.hbm2ddl.SchemaExport;
|
||||||
@@ -110,7 +114,7 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
|||||||
{
|
{
|
||||||
this.localSessionFactory = localSessionFactory;
|
this.localSessionFactory = localSessionFactory;
|
||||||
}
|
}
|
||||||
|
|
||||||
public LocalSessionFactoryBean getLocalSessionFactory()
|
public LocalSessionFactoryBean getLocalSessionFactory()
|
||||||
{
|
{
|
||||||
return localSessionFactory;
|
return localSessionFactory;
|
||||||
@@ -630,6 +634,11 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
|||||||
connection.setAutoCommit(false);
|
connection.setAutoCommit(false);
|
||||||
|
|
||||||
Configuration cfg = localSessionFactory.getConfiguration();
|
Configuration cfg = localSessionFactory.getConfiguration();
|
||||||
|
// Ensure that our static connection provider is used
|
||||||
|
String defaultConnectionProviderFactoryClass = cfg.getProperty(Environment.CONNECTION_PROVIDER);
|
||||||
|
cfg.setProperty(Environment.CONNECTION_PROVIDER, SchemaBootstrapConnectionProvider.class.getName());
|
||||||
|
SchemaBootstrapConnectionProvider.setBootstrapConnection(connection);
|
||||||
|
|
||||||
// dump the schema, if required
|
// dump the schema, if required
|
||||||
if (schemaOuputFilename != null)
|
if (schemaOuputFilename != null)
|
||||||
{
|
{
|
||||||
@@ -648,6 +657,9 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
|||||||
checkSchemaPatchScripts(cfg, session, connection, preUpdateScriptPatches, false); // check scripts
|
checkSchemaPatchScripts(cfg, session, connection, preUpdateScriptPatches, false); // check scripts
|
||||||
checkSchemaPatchScripts(cfg, session, connection, postUpdateScriptPatches, false); // check scripts
|
checkSchemaPatchScripts(cfg, session, connection, postUpdateScriptPatches, false); // check scripts
|
||||||
|
|
||||||
|
// Reset the configuration
|
||||||
|
cfg.setProperty(Environment.CONNECTION_PROVIDER, defaultConnectionProviderFactoryClass);
|
||||||
|
|
||||||
// all done successfully
|
// all done successfully
|
||||||
transaction.commit();
|
transaction.commit();
|
||||||
}
|
}
|
||||||
@@ -663,6 +675,12 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
|||||||
throw new AlfrescoRuntimeException(ERR_VALIDATION_FAILED, e);
|
throw new AlfrescoRuntimeException(ERR_VALIDATION_FAILED, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
// Remove the connection reference from the threadlocal boostrap
|
||||||
|
SchemaBootstrapConnectionProvider.setBootstrapConnection(null);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -671,6 +689,74 @@ public class SchemaBootstrap extends AbstractLifecycleBean
|
|||||||
// NOOP
|
// NOOP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a workaround for the odd Spring-Hibernate interaction during configuration.
|
||||||
|
* The Hibernate code assumes that schema scripts will be generated during context
|
||||||
|
* initialization. We want to do it afterwards and have a little more control. Hence this class.
|
||||||
|
* <p>
|
||||||
|
* The connection that is used will not be closed or manipulated in any way. This class
|
||||||
|
* merely serves to give the connection to Hibernate.
|
||||||
|
*
|
||||||
|
* @author Derek Hulley
|
||||||
|
*/
|
||||||
|
public static class SchemaBootstrapConnectionProvider extends UserSuppliedConnectionProvider
|
||||||
|
{
|
||||||
|
private static ThreadLocal<Connection> threadLocalConnection = new ThreadLocal<Connection>();
|
||||||
|
|
||||||
|
public SchemaBootstrapConnectionProvider()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the connection for Hibernate to use for schema generation.
|
||||||
|
*/
|
||||||
|
public static void setBootstrapConnection(Connection connection)
|
||||||
|
{
|
||||||
|
threadLocalConnection.set(connection);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unsets the connection.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void close()
|
||||||
|
{
|
||||||
|
// Leave the connection well alone, just remove it
|
||||||
|
threadLocalConnection.set(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does nothing. The connection was given by a 3rd party and they can close it.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void closeConnection(Connection conn)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Does nothing.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void configure(Properties props) throws HibernateException
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see #setBootstrapConnection(Connection)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Connection getConnection()
|
||||||
|
{
|
||||||
|
return threadLocalConnection.get();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean supportsAggressiveRelease()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static final String DIR_SCHEMAS = "schemas";
|
private static final String DIR_SCHEMAS = "schemas";
|
||||||
/**
|
/**
|
||||||
* Dump a set of creation files for all known Hibernate dialects. These will be
|
* Dump a set of creation files for all known Hibernate dialects. These will be
|
||||||
|
@@ -406,7 +406,7 @@ public abstract class BaseNodeServiceTest extends BaseSpringTest
|
|||||||
.setString(1, nodeRef.getStoreRef().getProtocol())
|
.setString(1, nodeRef.getStoreRef().getProtocol())
|
||||||
.setString(2, nodeRef.getStoreRef().getIdentifier())
|
.setString(2, nodeRef.getStoreRef().getIdentifier())
|
||||||
.list();
|
.list();
|
||||||
Integer count = (Integer) results.get(0);
|
Long count = (Long) results.get(0);
|
||||||
return count.intValue();
|
return count.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -668,7 +668,7 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
|
|||||||
Query query = session
|
Query query = session
|
||||||
.getNamedQuery(HibernateNodeDaoServiceImpl.QUERY_GET_PRIMARY_CHILD_NODE_STATUSES)
|
.getNamedQuery(HibernateNodeDaoServiceImpl.QUERY_GET_PRIMARY_CHILD_NODE_STATUSES)
|
||||||
.setLong("parentId", parentNode.getId())
|
.setLong("parentId", parentNode.getId())
|
||||||
.setFlushMode(FlushMode.NEVER);
|
.setFlushMode(FlushMode.MANUAL);
|
||||||
return query.list();
|
return query.list();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -685,7 +685,7 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
|
|||||||
{
|
{
|
||||||
Query query = session
|
Query query = session
|
||||||
.getNamedQuery(HibernateNodeDaoServiceImpl.QUERY_GET_CHILD_ASSOCS)
|
.getNamedQuery(HibernateNodeDaoServiceImpl.QUERY_GET_CHILD_ASSOCS)
|
||||||
.setFlushMode(FlushMode.NEVER)
|
.setFlushMode(FlushMode.MANUAL)
|
||||||
.setLong("parentId", parentNode.getId());
|
.setLong("parentId", parentNode.getId());
|
||||||
return query.list();
|
return query.list();
|
||||||
}
|
}
|
||||||
@@ -703,7 +703,7 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
|
|||||||
{
|
{
|
||||||
Query query = session
|
Query query = session
|
||||||
.getNamedQuery(HibernateNodeDaoServiceImpl.QUERY_GET_CHILD_ASSOC_REFS)
|
.getNamedQuery(HibernateNodeDaoServiceImpl.QUERY_GET_CHILD_ASSOC_REFS)
|
||||||
.setFlushMode(FlushMode.NEVER)
|
.setFlushMode(FlushMode.MANUAL)
|
||||||
.setLong("parentId", parentNode.getId());
|
.setLong("parentId", parentNode.getId());
|
||||||
return query.list();
|
return query.list();
|
||||||
}
|
}
|
||||||
@@ -723,7 +723,7 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
|
|||||||
{
|
{
|
||||||
Query query = session
|
Query query = session
|
||||||
.getNamedQuery(HibernateNodeDaoServiceImpl.QUERY_GET_CHILD_ASSOC_REFS_BY_QNAME)
|
.getNamedQuery(HibernateNodeDaoServiceImpl.QUERY_GET_CHILD_ASSOC_REFS_BY_QNAME)
|
||||||
.setFlushMode(FlushMode.NEVER)
|
.setFlushMode(FlushMode.MANUAL)
|
||||||
.setLong("parentId", parentNode.getId())
|
.setLong("parentId", parentNode.getId())
|
||||||
.setParameter("childAssocQName", assocQName);
|
.setParameter("childAssocQName", assocQName);
|
||||||
return query.list();
|
return query.list();
|
||||||
@@ -1188,9 +1188,9 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
|
|||||||
return query.uniqueResult();
|
return query.uniqueResult();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Integer count = (Integer) getHibernateTemplate().execute(callback);
|
Long count = (Long) getHibernateTemplate().execute(callback);
|
||||||
// done
|
// done
|
||||||
return count;
|
return count.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@@ -1206,9 +1206,9 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
|
|||||||
return query.uniqueResult();
|
return query.uniqueResult();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Integer count = (Integer) getHibernateTemplate().execute(callback);
|
Long count = (Long) getHibernateTemplate().execute(callback);
|
||||||
// done
|
// done
|
||||||
return count;
|
return count.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@@ -1224,7 +1224,7 @@ public class HibernateNodeDaoServiceImpl extends HibernateDaoSupport implements
|
|||||||
return query.uniqueResult();
|
return query.uniqueResult();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Integer count = (Integer) getHibernateTemplate().execute(callback);
|
Long count = (Long) getHibernateTemplate().execute(callback);
|
||||||
// done
|
// done
|
||||||
return count.intValue();
|
return count.intValue();
|
||||||
}
|
}
|
||||||
|
@@ -42,7 +42,6 @@ import org.alfresco.service.namespace.NamespaceService;
|
|||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.alfresco.util.BaseSpringTest;
|
import org.alfresco.util.BaseSpringTest;
|
||||||
import org.alfresco.util.GUID;
|
import org.alfresco.util.GUID;
|
||||||
import org.hibernate.ObjectDeletedException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.repo.domain.hibernate.PermissionsDaoComponentImpl
|
* @see org.alfresco.repo.domain.hibernate.PermissionsDaoComponentImpl
|
||||||
@@ -205,23 +204,9 @@ public class HibernatePermissionTest extends BaseSpringTest
|
|||||||
// Check that deletion of the list cascades
|
// Check that deletion of the list cascades
|
||||||
node.setAccessControlList(null);
|
node.setAccessControlList(null);
|
||||||
getSession().delete(accessControlList);
|
getSession().delete(accessControlList);
|
||||||
try
|
DbAccessControlEntry deletedAcl = (DbAccessControlEntry) getSession().get(DbAccessControlListImpl.class, nodeAclId);
|
||||||
{
|
assertNull("Access control list was not deleted", deletedAcl);
|
||||||
getSession().get(DbAccessControlListImpl.class, nodeAclId);
|
DbAccessControlEntry deletedAclEntry = (DbAccessControlEntry) getSession().get(DbAccessControlEntryImpl.class, aceEntryId);
|
||||||
fail("Access control list was not deleted");
|
assertNull("Access control entries were not cascade deleted", deletedAclEntry);
|
||||||
}
|
|
||||||
catch (ObjectDeletedException e)
|
|
||||||
{
|
|
||||||
// expected
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
getSession().get(DbAccessControlEntryImpl.class, aceEntryId);
|
|
||||||
fail("Access control entries were not cascade deleted");
|
|
||||||
}
|
|
||||||
catch (ObjectDeletedException e)
|
|
||||||
{
|
|
||||||
// expected
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -1,111 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
* As a special exception to the terms and conditions of version 2.0 of
|
|
||||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
|
||||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
|
||||||
* FLOSS exception. You should have recieved a copy of the text describing
|
|
||||||
* the FLOSS exception, and it is also available here:
|
|
||||||
* http://www.alfresco.com/legal/licensing"
|
|
||||||
*/
|
|
||||||
package org.alfresco.repo.service;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import org.alfresco.service.ServiceDescriptor;
|
|
||||||
import org.alfresco.service.cmr.repository.StoreRef;
|
|
||||||
import org.alfresco.service.namespace.QName;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service Descriptor.
|
|
||||||
*
|
|
||||||
* @author David Caruana
|
|
||||||
*/
|
|
||||||
public class BeanServiceDescriptor
|
|
||||||
implements ServiceDescriptor
|
|
||||||
{
|
|
||||||
// Service Name
|
|
||||||
private QName serviceName;
|
|
||||||
|
|
||||||
// Service Description
|
|
||||||
private String description;
|
|
||||||
|
|
||||||
// Service interface class
|
|
||||||
private Class interfaceClass;
|
|
||||||
|
|
||||||
// Supported Store Protocols
|
|
||||||
Collection<String> protocols = null;
|
|
||||||
|
|
||||||
// Supported Stores
|
|
||||||
Collection<StoreRef> stores = null;
|
|
||||||
|
|
||||||
|
|
||||||
/*package*/ BeanServiceDescriptor(QName serviceName, ServiceDescriptorMetaData metaData, StoreRedirector redirector)
|
|
||||||
{
|
|
||||||
this.serviceName = serviceName;
|
|
||||||
this.interfaceClass = metaData.getInterface();
|
|
||||||
this.description = metaData.getDescription();
|
|
||||||
|
|
||||||
if (redirector != null)
|
|
||||||
{
|
|
||||||
protocols = redirector.getSupportedStoreProtocols();
|
|
||||||
stores = redirector.getSupportedStores();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.alfresco.service.ServiceDescriptor#getQualifiedName()
|
|
||||||
*/
|
|
||||||
public QName getQualifiedName()
|
|
||||||
{
|
|
||||||
return serviceName;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.alfresco.service.ServiceDescriptor#getDescription()
|
|
||||||
*/
|
|
||||||
public String getDescription()
|
|
||||||
{
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.alfresco.service.ServiceDescriptor#getInterface()
|
|
||||||
*/
|
|
||||||
public Class getInterface()
|
|
||||||
{
|
|
||||||
return interfaceClass;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.alfresco.service.ServiceDescriptor#getSupportedStoreProtocols()
|
|
||||||
*/
|
|
||||||
public Collection<String> getSupportedStoreProtocols()
|
|
||||||
{
|
|
||||||
return protocols;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.alfresco.repo.service.StoreRedirector#getSupportedStores()
|
|
||||||
*/
|
|
||||||
public Collection<StoreRef> getSupportedStores()
|
|
||||||
{
|
|
||||||
return stores;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,51 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
* As a special exception to the terms and conditions of version 2.0 of
|
|
||||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
|
||||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
|
||||||
* FLOSS exception. You should have recieved a copy of the text describing
|
|
||||||
* the FLOSS exception, and it is also available here:
|
|
||||||
* http://www.alfresco.com/legal/licensing"
|
|
||||||
*/
|
|
||||||
package org.alfresco.repo.service;
|
|
||||||
|
|
||||||
import org.springframework.aop.support.DefaultIntroductionAdvisor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service Descriptor Advisor
|
|
||||||
*
|
|
||||||
* @author David Caruana
|
|
||||||
*/
|
|
||||||
public class ServiceDescriptorAdvisor extends DefaultIntroductionAdvisor
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = -3327182176681357761L;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Construct Service Descriptor Advisor
|
|
||||||
*
|
|
||||||
* @param namespace service name namespace
|
|
||||||
* @param description service description
|
|
||||||
* @param interfaceClass service interface class
|
|
||||||
*/
|
|
||||||
public ServiceDescriptorAdvisor(String namespace, String description, Class interfaceClass)
|
|
||||||
{
|
|
||||||
super(new ServiceDescriptorMixin(namespace, description, interfaceClass), ServiceDescriptorMetaData.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,92 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
* As a special exception to the terms and conditions of version 2.0 of
|
|
||||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
|
||||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
|
||||||
* FLOSS exception. You should have recieved a copy of the text describing
|
|
||||||
* the FLOSS exception, and it is also available here:
|
|
||||||
* http://www.alfresco.com/legal/licensing"
|
|
||||||
*/
|
|
||||||
package org.alfresco.repo.service;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.FactoryBean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Factory for creating Service Descriptor Advisors.
|
|
||||||
*
|
|
||||||
* @author David Caruana
|
|
||||||
*/
|
|
||||||
public class ServiceDescriptorAdvisorFactory implements FactoryBean
|
|
||||||
{
|
|
||||||
|
|
||||||
private String namespace;
|
|
||||||
private String description;
|
|
||||||
private Class interfaceClass;
|
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.springframework.beans.factory.FactoryBean#getObject()
|
|
||||||
*/
|
|
||||||
public Object getObject() throws Exception
|
|
||||||
{
|
|
||||||
return new ServiceDescriptorAdvisor(namespace, description, interfaceClass);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.springframework.beans.factory.FactoryBean#getObjectType()
|
|
||||||
*/
|
|
||||||
public Class getObjectType()
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return ServiceDescriptorAdvisor.class;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.springframework.beans.factory.FactoryBean#isSingleton()
|
|
||||||
*/
|
|
||||||
public boolean isSingleton()
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param namespace the service name namespace
|
|
||||||
*/
|
|
||||||
public void setNamespace(String namespace)
|
|
||||||
{
|
|
||||||
this.namespace = namespace;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param description the service description
|
|
||||||
*/
|
|
||||||
public void setDescription(String description)
|
|
||||||
{
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param interfaceClass the service interface class
|
|
||||||
*/
|
|
||||||
public void setInterface(Class interfaceClass)
|
|
||||||
{
|
|
||||||
this.interfaceClass = interfaceClass;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,50 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
* As a special exception to the terms and conditions of version 2.0 of
|
|
||||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
|
||||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
|
||||||
* FLOSS exception. You should have recieved a copy of the text describing
|
|
||||||
* the FLOSS exception, and it is also available here:
|
|
||||||
* http://www.alfresco.com/legal/licensing"
|
|
||||||
*/
|
|
||||||
package org.alfresco.repo.service;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service Meta Data
|
|
||||||
*
|
|
||||||
* @author David Caruana
|
|
||||||
*/
|
|
||||||
public interface ServiceDescriptorMetaData
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @return the service name namespace
|
|
||||||
*/
|
|
||||||
public String getNamespace();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the service description
|
|
||||||
*/
|
|
||||||
public String getDescription();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the service interface class
|
|
||||||
*/
|
|
||||||
public Class getInterface();
|
|
||||||
|
|
||||||
}
|
|
@@ -1,82 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
* As a special exception to the terms and conditions of version 2.0 of
|
|
||||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
|
||||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
|
||||||
* FLOSS exception. You should have recieved a copy of the text describing
|
|
||||||
* the FLOSS exception, and it is also available here:
|
|
||||||
* http://www.alfresco.com/legal/licensing"
|
|
||||||
*/
|
|
||||||
package org.alfresco.repo.service;
|
|
||||||
|
|
||||||
import org.springframework.aop.support.DelegatingIntroductionInterceptor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Service Descriptor Mixin.
|
|
||||||
*
|
|
||||||
* @author David Caruana
|
|
||||||
*/
|
|
||||||
public class ServiceDescriptorMixin extends DelegatingIntroductionInterceptor
|
|
||||||
implements ServiceDescriptorMetaData
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = -6511459263796802334L;
|
|
||||||
|
|
||||||
private String namespace;
|
|
||||||
private String description;
|
|
||||||
private Class interfaceClass;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Construct Service Descriptor Mixin
|
|
||||||
*
|
|
||||||
* @param namespace
|
|
||||||
* @param description
|
|
||||||
* @param interfaceClass
|
|
||||||
*/
|
|
||||||
public ServiceDescriptorMixin(String namespace, String description, Class interfaceClass)
|
|
||||||
{
|
|
||||||
this.namespace = namespace;
|
|
||||||
this.description = description;
|
|
||||||
this.interfaceClass = interfaceClass;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.alfresco.repo.service.ServiceDescriptorMetaData#getNamespace()
|
|
||||||
*/
|
|
||||||
public String getNamespace()
|
|
||||||
{
|
|
||||||
return namespace;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.alfresco.repo.service.ServiceDescriptorMetaData#getDescription()
|
|
||||||
*/
|
|
||||||
public String getDescription()
|
|
||||||
{
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.alfresco.repo.service.ServiceDescriptorMetaData#getInterface()
|
|
||||||
*/
|
|
||||||
public Class getInterface()
|
|
||||||
{
|
|
||||||
return interfaceClass;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -25,12 +25,7 @@
|
|||||||
package org.alfresco.repo.service;
|
package org.alfresco.repo.service;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.alfresco.service.ServiceDescriptor;
|
|
||||||
import org.alfresco.service.ServiceRegistry;
|
import org.alfresco.service.ServiceRegistry;
|
||||||
import org.alfresco.service.cmr.action.ActionService;
|
import org.alfresco.service.cmr.action.ActionService;
|
||||||
import org.alfresco.service.cmr.audit.AuditService;
|
import org.alfresco.service.cmr.audit.AuditService;
|
||||||
@@ -66,8 +61,6 @@ import org.alfresco.service.transaction.TransactionService;
|
|||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
import org.springframework.beans.factory.BeanFactory;
|
import org.springframework.beans.factory.BeanFactory;
|
||||||
import org.springframework.beans.factory.BeanFactoryAware;
|
import org.springframework.beans.factory.BeanFactoryAware;
|
||||||
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
|
||||||
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,33 +70,12 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
|
|||||||
* @author David Caruana
|
* @author David Caruana
|
||||||
*/
|
*/
|
||||||
public class ServiceDescriptorRegistry
|
public class ServiceDescriptorRegistry
|
||||||
implements BeanFactoryAware, BeanFactoryPostProcessor, ServiceRegistry
|
implements BeanFactoryAware, ServiceRegistry
|
||||||
{
|
{
|
||||||
// Bean Factory within which the registry lives
|
// Bean Factory within which the registry lives
|
||||||
private BeanFactory beanFactory = null;
|
private BeanFactory beanFactory = null;
|
||||||
|
|
||||||
// Service Descriptor map
|
|
||||||
private Map<QName, BeanServiceDescriptor> descriptors = new HashMap<QName, BeanServiceDescriptor>();
|
|
||||||
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.springframework.beans.factory.config.BeanFactoryPostProcessor#postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory)
|
|
||||||
*/
|
|
||||||
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException
|
|
||||||
{
|
|
||||||
Map beans = beanFactory.getBeansOfType(ServiceDescriptorMetaData.class);
|
|
||||||
Iterator iter = beans.entrySet().iterator();
|
|
||||||
while (iter.hasNext())
|
|
||||||
{
|
|
||||||
Map.Entry entry = (Map.Entry)iter.next();
|
|
||||||
ServiceDescriptorMetaData metaData = (ServiceDescriptorMetaData)entry.getValue();
|
|
||||||
QName serviceName = QName.createQName(metaData.getNamespace(), (String)entry.getKey());
|
|
||||||
StoreRedirector redirector = (entry.getValue() instanceof StoreRedirector) ? (StoreRedirector)entry.getValue() : null;
|
|
||||||
BeanServiceDescriptor serviceDescriptor = new BeanServiceDescriptor(serviceName, metaData, redirector);
|
|
||||||
descriptors.put(serviceDescriptor.getQualifiedName(), serviceDescriptor);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.springframework.beans.factory.BeanFactoryAware#setBeanFactory(org.springframework.beans.factory.BeanFactory)
|
* @see org.springframework.beans.factory.BeanFactoryAware#setBeanFactory(org.springframework.beans.factory.BeanFactory)
|
||||||
*/
|
*/
|
||||||
@@ -117,7 +89,8 @@ public class ServiceDescriptorRegistry
|
|||||||
*/
|
*/
|
||||||
public Collection<QName> getServices()
|
public Collection<QName> getServices()
|
||||||
{
|
{
|
||||||
return Collections.unmodifiableSet(descriptors.keySet());
|
// TODO: Implement
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
@@ -125,15 +98,8 @@ public class ServiceDescriptorRegistry
|
|||||||
*/
|
*/
|
||||||
public boolean isServiceProvided(QName service)
|
public boolean isServiceProvided(QName service)
|
||||||
{
|
{
|
||||||
return descriptors.containsKey(service);
|
// TODO: Implement
|
||||||
}
|
throw new UnsupportedOperationException();
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.alfresco.repo.service.ServiceRegistry#getServiceDescriptor(org.alfresco.repo.ref.QName)
|
|
||||||
*/
|
|
||||||
public ServiceDescriptor getServiceDescriptor(QName service)
|
|
||||||
{
|
|
||||||
return descriptors.get(service);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@@ -1,196 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
* As a special exception to the terms and conditions of version 2.0 of
|
|
||||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
|
||||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
|
||||||
* FLOSS exception. You should have recieved a copy of the text describing
|
|
||||||
* the FLOSS exception, and it is also available here:
|
|
||||||
* http://www.alfresco.com/legal/licensing"
|
|
||||||
*/
|
|
||||||
package org.alfresco.repo.service;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import javax.transaction.UserTransaction;
|
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
|
||||||
|
|
||||||
import org.alfresco.service.ServiceDescriptor;
|
|
||||||
import org.alfresco.service.ServiceRegistry;
|
|
||||||
import org.alfresco.service.cmr.coci.CheckOutCheckInService;
|
|
||||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
|
||||||
import org.alfresco.service.cmr.lock.LockService;
|
|
||||||
import org.alfresco.service.cmr.repository.ContentService;
|
|
||||||
import org.alfresco.service.cmr.repository.CopyService;
|
|
||||||
import org.alfresco.service.cmr.repository.MimetypeService;
|
|
||||||
import org.alfresco.service.cmr.repository.NodeService;
|
|
||||||
import org.alfresco.service.cmr.search.SearchService;
|
|
||||||
import org.alfresco.service.cmr.version.VersionService;
|
|
||||||
import org.alfresco.service.namespace.QName;
|
|
||||||
import org.alfresco.service.transaction.TransactionService;
|
|
||||||
import org.springframework.context.ApplicationContext;
|
|
||||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
|
||||||
|
|
||||||
public class ServiceDescriptorRegistryTest extends TestCase
|
|
||||||
{
|
|
||||||
|
|
||||||
private ApplicationContext factory = null;
|
|
||||||
|
|
||||||
private static String TEST_NAMESPACE = "http://www.alfresco.org/test/serviceregistrytest";
|
|
||||||
private static QName invalidService = QName.createQName(TEST_NAMESPACE, "invalid");
|
|
||||||
private static QName service1 = QName.createQName(TEST_NAMESPACE, "service1");
|
|
||||||
private static QName service2 = QName.createQName(TEST_NAMESPACE, "service2");
|
|
||||||
private static QName service3 = QName.createQName(TEST_NAMESPACE, "service3");
|
|
||||||
|
|
||||||
|
|
||||||
public void setUp()
|
|
||||||
{
|
|
||||||
factory = new ClassPathXmlApplicationContext("org/alfresco/repo/service/testregistry.xml");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testDescriptor()
|
|
||||||
{
|
|
||||||
ServiceRegistry registry = (ServiceRegistry)factory.getBean("serviceRegistry");
|
|
||||||
|
|
||||||
Collection services = registry.getServices();
|
|
||||||
assertNotNull(services);
|
|
||||||
assertEquals(3, services.size());
|
|
||||||
|
|
||||||
assertTrue(registry.isServiceProvided(service1));
|
|
||||||
assertFalse(registry.isServiceProvided(invalidService));
|
|
||||||
|
|
||||||
ServiceDescriptor invalid = registry.getServiceDescriptor(invalidService);
|
|
||||||
assertNull(invalid);
|
|
||||||
ServiceDescriptor desc1 = registry.getServiceDescriptor(service1);
|
|
||||||
assertNotNull(desc1);
|
|
||||||
assertEquals(service1, desc1.getQualifiedName());
|
|
||||||
assertEquals("Test Service 1", desc1.getDescription());
|
|
||||||
assertEquals(TestServiceInterface.class, desc1.getInterface());
|
|
||||||
ServiceDescriptor desc2 = registry.getServiceDescriptor(service2);
|
|
||||||
assertNotNull(desc2);
|
|
||||||
assertEquals(service2, desc2.getQualifiedName());
|
|
||||||
assertEquals("Test Service 2", desc2.getDescription());
|
|
||||||
assertEquals(TestServiceInterface.class, desc2.getInterface());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void testService()
|
|
||||||
{
|
|
||||||
ServiceRegistry registry = (ServiceRegistry)factory.getBean("serviceRegistry");
|
|
||||||
|
|
||||||
TestServiceInterface theService1 = (TestServiceInterface)registry.getService(service1);
|
|
||||||
assertNotNull(service1);
|
|
||||||
assertEquals("Test1:service1", theService1.test("service1"));
|
|
||||||
TestServiceInterface theService2 = (TestServiceInterface)registry.getService(service2);
|
|
||||||
assertNotNull(service2);
|
|
||||||
assertEquals("Test2:service2", theService2.test("service2"));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void testStores()
|
|
||||||
{
|
|
||||||
ServiceRegistry registry = (ServiceRegistry)factory.getBean("serviceRegistry");
|
|
||||||
|
|
||||||
ServiceDescriptor desc3 = registry.getServiceDescriptor(service3);
|
|
||||||
assertNotNull(desc3);
|
|
||||||
StoreRedirector theService3 = (StoreRedirector)registry.getService(service3);
|
|
||||||
assertNotNull(service3);
|
|
||||||
|
|
||||||
Collection<String> descStores = desc3.getSupportedStoreProtocols();
|
|
||||||
assertTrue(descStores.contains("Type1"));
|
|
||||||
assertTrue(descStores.contains("Type2"));
|
|
||||||
assertFalse(descStores.contains("Invalid"));
|
|
||||||
|
|
||||||
Collection<String> serviceStores = theService3.getSupportedStoreProtocols();
|
|
||||||
for (String store: descStores)
|
|
||||||
{
|
|
||||||
assertTrue(serviceStores.contains(store));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void testAppContext()
|
|
||||||
{
|
|
||||||
ApplicationContext appContext = new ClassPathXmlApplicationContext("alfresco/application-context.xml");
|
|
||||||
|
|
||||||
ServiceRegistry registry = (ServiceRegistry)appContext.getBean(ServiceRegistry.SERVICE_REGISTRY);
|
|
||||||
assertNotNull(registry);
|
|
||||||
NodeService s1 = registry.getNodeService();
|
|
||||||
assertNotNull(s1);
|
|
||||||
CheckOutCheckInService s2 = registry.getCheckOutCheckInService();
|
|
||||||
assertNotNull(s2);
|
|
||||||
ContentService s3 = registry.getContentService();
|
|
||||||
assertNotNull(s3);
|
|
||||||
CopyService s4 = registry.getCopyService();
|
|
||||||
assertNotNull(s4);
|
|
||||||
DictionaryService s5 = registry.getDictionaryService();
|
|
||||||
assertNotNull(s5);
|
|
||||||
LockService s6 = registry.getLockService();
|
|
||||||
assertNotNull(s6);
|
|
||||||
MimetypeService s7 = registry.getMimetypeService();
|
|
||||||
assertNotNull(s7);
|
|
||||||
SearchService s8 = registry.getSearchService();
|
|
||||||
assertNotNull(s8);
|
|
||||||
TransactionService transactionService = registry.getTransactionService();
|
|
||||||
UserTransaction s9 = transactionService.getUserTransaction();
|
|
||||||
assertNotNull(s9);
|
|
||||||
UserTransaction s10 = transactionService.getUserTransaction();
|
|
||||||
assertNotNull(s10);
|
|
||||||
assertFalse(s9.equals(s10));
|
|
||||||
VersionService s11 = registry.getVersionService();
|
|
||||||
assertNotNull(s11);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public interface TestServiceInterface
|
|
||||||
{
|
|
||||||
public String test(String arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static abstract class Component implements TestServiceInterface
|
|
||||||
{
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
private Component(String type)
|
|
||||||
{
|
|
||||||
this.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String test(String arg)
|
|
||||||
{
|
|
||||||
return type + ":" + arg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Test1Component extends Component
|
|
||||||
{
|
|
||||||
private Test1Component()
|
|
||||||
{
|
|
||||||
super("Test1");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Test2Component extends Component
|
|
||||||
{
|
|
||||||
private Test2Component()
|
|
||||||
{
|
|
||||||
super("Test2");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@@ -1,111 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
|
||||||
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
|
||||||
|
|
||||||
<beans>
|
|
||||||
|
|
||||||
<import resource="testredirector.xml" />
|
|
||||||
|
|
||||||
|
|
||||||
<bean id="namespaceDAO" class="org.alfresco.repo.dictionary.NamespaceDAOImpl"></bean>
|
|
||||||
|
|
||||||
<bean id="dictionaryDAO" class="org.alfresco.repo.dictionary.DictionaryDAOImpl">
|
|
||||||
<constructor-arg index="0">
|
|
||||||
<ref bean="namespaceDAO" />
|
|
||||||
</constructor-arg>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="dictionaryBootstrap" class="org.alfresco.repo.dictionary.DictionaryBootstrap" init-method="bootstrap">
|
|
||||||
<property name="dictionaryDAO"><ref local="dictionaryDAO"/></property>
|
|
||||||
<property name="models">
|
|
||||||
<list>
|
|
||||||
<value>alfresco/model/dictionaryModel.xml</value>
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="serviceRegistry" class="org.alfresco.repo.service.ServiceDescriptorRegistry"></bean>
|
|
||||||
|
|
||||||
<bean id="AlfrescoServiceDescriptor" abstract="true"
|
|
||||||
class="org.alfresco.repo.service.ServiceDescriptorAdvisorFactory">
|
|
||||||
<property name="namespace">
|
|
||||||
<value>http://www.alfresco.org/test/serviceregistrytest</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
|
||||||
<bean id="service1" class="org.springframework.aop.framework.ProxyFactoryBean">
|
|
||||||
<property name="proxyInterfaces">
|
|
||||||
<value>org.alfresco.repo.service.ServiceDescriptorRegistryTest$TestServiceInterface</value>
|
|
||||||
</property>
|
|
||||||
<property name="target">
|
|
||||||
<ref local="test1Component" />
|
|
||||||
</property>
|
|
||||||
<property name="interceptorNames">
|
|
||||||
<list>
|
|
||||||
<idref local="service1_descriptor" />
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="service1_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.repo.service.ServiceDescriptorRegistryTest$TestServiceInterface</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Test Service 1</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
|
||||||
<bean id="service2" class="org.springframework.aop.framework.ProxyFactoryBean">
|
|
||||||
<property name="proxyInterfaces">
|
|
||||||
<value>org.alfresco.repo.service.ServiceDescriptorRegistryTest$TestServiceInterface</value>
|
|
||||||
</property>
|
|
||||||
<property name="target">
|
|
||||||
<ref local="test2Component" />
|
|
||||||
</property>
|
|
||||||
<property name="interceptorNames">
|
|
||||||
<list>
|
|
||||||
<idref local="service2_descriptor" />
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="service2_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.repo.service.ServiceDescriptorRegistryTest$TestServiceInterface</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Test Service 2</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="service3" class="org.springframework.aop.framework.ProxyFactoryBean">
|
|
||||||
<property name="proxyInterfaces">
|
|
||||||
<value>org.alfresco.repo.service.ServiceDescriptorRegistryTest$TestServiceInterface, org.alfresco.repo.service.StoreRedirector</value>
|
|
||||||
</property>
|
|
||||||
<property name="target">
|
|
||||||
<ref bean="redirector_service1" />
|
|
||||||
</property>
|
|
||||||
<property name="interceptorNames">
|
|
||||||
<list>
|
|
||||||
<idref local="service3_descriptor" />
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="service3_descriptor" parent="AlfrescoServiceDescriptor">
|
|
||||||
<property name="interface">
|
|
||||||
<value>org.alfresco.repo.service.ServiceDescriptorRegistryTest$TestServiceInterface</value>
|
|
||||||
</property>
|
|
||||||
<property name="description">
|
|
||||||
<value>Test Service 3</value>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
|
||||||
<bean id="test1Component" class="org.alfresco.repo.service.ServiceDescriptorRegistryTest$Test1Component"></bean>
|
|
||||||
|
|
||||||
<bean id="test2Component" class="org.alfresco.repo.service.ServiceDescriptorRegistryTest$Test2Component"></bean>
|
|
||||||
|
|
||||||
</beans>
|
|
@@ -1,64 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or
|
|
||||||
* modify it under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation; either version 2
|
|
||||||
* of the License, or (at your option) any later version.
|
|
||||||
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
|
|
||||||
* You should have received a copy of the GNU General Public License
|
|
||||||
* along with this program; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
|
|
||||||
* As a special exception to the terms and conditions of version 2.0 of
|
|
||||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
|
||||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
|
||||||
* FLOSS exception. You should have recieved a copy of the text describing
|
|
||||||
* the FLOSS exception, and it is also available here:
|
|
||||||
* http://www.alfresco.com/legal/licensing"
|
|
||||||
*/
|
|
||||||
package org.alfresco.service;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
import org.alfresco.service.cmr.repository.StoreRef;
|
|
||||||
import org.alfresco.service.namespace.QName;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This interface represents service meta-data.
|
|
||||||
*
|
|
||||||
* @author David Caruana
|
|
||||||
*/
|
|
||||||
public interface ServiceDescriptor
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @return the qualified name of the service
|
|
||||||
*/
|
|
||||||
public QName getQualifiedName();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the service description
|
|
||||||
*/
|
|
||||||
public String getDescription();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the service interface class description
|
|
||||||
*/
|
|
||||||
public Class getInterface();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the names of the protocols supported
|
|
||||||
*/
|
|
||||||
public Collection<String> getSupportedStoreProtocols();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the Store Refs of the stores supported
|
|
||||||
*/
|
|
||||||
public Collection<StoreRef> getSupportedStores();
|
|
||||||
}
|
|
@@ -122,15 +122,6 @@ public interface ServiceRegistry
|
|||||||
@NotAuditable
|
@NotAuditable
|
||||||
boolean isServiceProvided(QName service);
|
boolean isServiceProvided(QName service);
|
||||||
|
|
||||||
/**
|
|
||||||
* Get meta-data about the specified service
|
|
||||||
*
|
|
||||||
* @param service name of service to retrieve meta data for
|
|
||||||
* @return the service meta data
|
|
||||||
*/
|
|
||||||
@NotAuditable
|
|
||||||
ServiceDescriptor getServiceDescriptor(QName service);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the specified service.
|
* Get the specified service.
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user