Transformation service changes to support thumbnail service, shell of thumbnail service API

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8658 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2008-04-02 11:28:39 +00:00
parent dca8be14dd
commit e5bfb7e8fa
58 changed files with 2032 additions and 718 deletions

View File

@@ -40,6 +40,7 @@
<import resource="classpath*:alfresco/office-addin-context.xml"/>
<import resource="classpath:alfresco/projects-context.xml"/>
<import resource="classpath:alfresco/blog-context.xml"/>
<import resource="classpath:alfresco/thumbnail-service-context.xml"/>
<import resource="classpath*:alfresco/patch/*-context.xml" />
<import resource="classpath*:alfresco/domain/*-context.xml" />

View File

@@ -190,16 +190,16 @@
<bean id="transformer.BinaryPassThrough"
class="org.alfresco.repo.content.transform.BinaryPassThroughContentTransformer"
parent="baseContentTransformer" />
parent="baseContentTransformer" />
<bean id="transformer.PdfBox"
class="org.alfresco.repo.content.transform.PdfBoxContentTransformer"
parent="baseContentTransformer" >
<property name="explicitTransformations">
<list>
<bean class="org.alfresco.repo.content.transform.ContentTransformerRegistry$TransformationKey" >
<constructor-arg><value>application/pdf</value></constructor-arg>
<constructor-arg><value>text/plain</value></constructor-arg>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails" >
<property name="sourceMimetype"><value>application/pdf</value></property>
<property name="targetMimetype"><value>text/plain</value></property>
</bean>
</list>
</property>
@@ -210,7 +210,7 @@
parent="baseContentTransformer" >
<property name="explicitTransformations">
<list>
<bean class="org.alfresco.repo.content.transform.ContentTransformerRegistry$TransformationKey" >
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails" >
<constructor-arg><value>text/plain</value></constructor-arg>
<constructor-arg><value>application/pdf</value></constructor-arg>
</bean>
@@ -227,9 +227,9 @@
parent="baseContentTransformer" >
<property name="explicitTransformations">
<list>
<bean class="org.alfresco.repo.content.transform.ContentTransformerRegistry$TransformationKey" >
<constructor-arg><value>application/msword</value></constructor-arg>
<constructor-arg><value>text/plain</value></constructor-arg>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails" >
<property name="sourceMimetype"><value>application/msword</value></property>
<property name="targetMimetype"><value>text/plain</value></property>
</bean>
</list>
</property>

View File

@@ -309,6 +309,20 @@
<aspect>sys:localized</aspect>
</mandatory-aspects>
</type>
<!-- Thumbnail content type -->
<type name="cm:thumbnail">
<title>Thumbnail</title>
<parent>cm:content</parent>
<archive>true</archive>
<properties>
<property name="cm:options">
<title>Thumbnail Options</title>
<type>d:any</type>
<mandatory>false</mandatory>
</property>
</properties>
</type>
</types>
@@ -816,6 +830,25 @@
<aspect>cm:mlDocument</aspect>
</mandatory-aspects>
</aspect>
<!-- Thumbnailed aspect relates a content node to it's thumbnails -->
<aspect name="cm:thumbnailed">
<title>Thumbnailed</title>
<associations>
<child-association name="cm:thumbnails">
<source>
<mandatory>false</mandatory>
<many>true</many>
</source>
<target>
<class>cm:thumbnail</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</child-association>
</associations>
</aspect>
</aspects>
</model>

View File

@@ -0,0 +1,45 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- Thumbnail service bean -->
<bean id="ThumbnailService" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="proxyInterfaces">
<value>org.alfresco.service.cmr.thumbnail.ThumbnailService</value>
</property>
<property name="target">
<ref bean="thumbnailService"/>
</property>
<property name="interceptorNames">
<list>
<idref local="ThumbnailService_transaction"/>
<idref bean="AuditMethodInterceptor"/>
<idref bean="exceptionTranslator"/>
<idref local="ThumbnailService_security"/>
</list>
</property>
</bean>
<!-- Thumbnail service transaction bean -->
<bean id="ThumbnailService_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>
<!-- Thumbnail service security bean -->
<bean id="ThumbnailService_security" class="org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor" />
<!-- Thumbnail service implemenation bean -->
<bean id="thumbnailService" class="org.alfresco.repo.thumbnail.ThumbnailServiceImpl">
<property name="nodeService" ref="NodeService"/>
<property name="contentService" ref="ContentService"/>
</bean>
</beans>