AnsweredAssumed Answered

Howto setup Runtime Transform Command for an Event?

Question asked by samjeff on Aug 1, 2008
Dear all,

I have already setup runtime exec transform command, and it is successful, like this code:

<beans>
   <bean id="transformer.Ocr.Pdf2Txt" class="org.alfresco.repo.content.transform.RuntimeExecutableContentTransformer" parent="baseContentTransformer">
      <property name="transformCommand">
         <bean class="org.alfresco.util.exec.RuntimeExec">
            <property name="commandMap">
                <map>
                    <entry key="Windows.*">
                        <value>myconvert.bat ${source} ${target}</value>
                    </entry>
                </map>
            </property>
            <property name="errorCodes">
               <value>1,2</value>
            </property>
         </bean>
      </property>
      <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>
         </list>
      </property>
   </bean>
</beans>

But, the transform command always running on all event: upload, copy, delete, right click, etc..
Howto setup this runtime exec only running on one event, for example: upload only?
Because it doesn't need to run every time, I need only running on upload only.
Would you please to help me?
I really appreciate your help
Thanks a lot.

Outcomes