Home

For any content management system it is very obvious that they have to deal with contents of multiple types and it should also have capability to manipulate those contents. Alfresco also has embedded openoffice, pdf box and apache poi libraries which helps alfresco to deal with this content manipulations.

It provides alfresco capability to transform and manage different type of contents. For instance when you fire a rule from front end to convert word document to pdf file it internally invoke any one of the Content transformer to achieve that and that transformer uses openoffice services or apache poi apis to achieve final results. Alfresco has this multiple inbuilt content transformer available out of box.

If you want to see the list of all available content transformers you can see it over here. http://localhost:8080/alfresco/service/mimetypes

It shows list of all the currently registered mimetypes, and provide a details link for each one. Selecting the details link will then show which transformations are currently supported both to and from that mimetype, and by what transformer. If a transformer becomes unavailable (eg the Open Office connection dies), then refreshing the list will show the updated transformations.

Also you can see for context file within your alfresco installation under

<TOMCAT_HOME>/webapps/alfresco/WEB-INF/classes/alfresco/content-services-context.xml

Here is the sample entry of one of the transformer

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!-- Content Transformation Regisitry -->
  <bean id="contentTransformerRegistry" class="org.alfresco.repo.content.transform.ContentTransformerRegistry" />
  <!-- Abstract bean definition defining base definition for all transformers -->
  <bean id="baseContentTransformer"
        class="org.alfresco.repo.content.transform.AbstractContentTransformer"
        abstract="true"
        init-method="register">
     <property name="mimetypeService">
        <ref bean="mimetypeService" />
     </property>
     <property name="registry">
        <ref bean="contentTransformerRegistry" />
     </property>
  </bean>
  
  <!-- Content Transformations -->
  <bean id="transformer.StringExtracter"
        class="org.alfresco.repo.content.transform.StringExtractingContentTransformer"
        parent="baseContentTransformer" />

As you can see those transformers are wired as spring beans with in alfresco. If you ever has requirement you can also declare your own content transformer.

There is one more powerful use of these transformers which is abstract from end user. Alfresco uses it for indexing, wondering how? That is because indexer can only index contents which are in text format. So, whenever content is uploaded in alfresco internal transformer for respective mime type is invoked and it converts content in to text form which is then passed to indexing engine.

What are ComplexContentTransformer?

If there are no direct transformation from one type of another available but it is possible through intermediate transformation then it is called as complex transformation. For instance transformation from mimetype A->C is requested but only A-B and B-C is available, the transformation registry will not automatically assume that chaining the transformation together will be a useful thing to do. Linked transformations can be manually declared using the ComplexContentTransformer.

Looking for quality Alfresco Web Hosting? Look no further than Arvixe Web Hosting!

Publicités

Laisser un commentaire

Choisissez une méthode de connexion pour poster votre commentaire:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s