cancel
Showing results for 
Search instead for 
Did you mean: 

About Transformation of Contents

joel18
Champ in-the-making
Champ in-the-making
Hello everyone,

    When I am using Alfresco, I meet an emergent problem. The problem is that when I upload a Doc file and want to transform a  Doc file to PDF file, I don't want to define the destination where I put PDF file. I can post files transformed anywhere.
    For example, I upload a file in a space I have created. Then file is transformed into PDF file and posted in this space. If I upload a file in another space, the file is tranformed and posted in that space. I don't hope to define the destination where the file is transformed.
   Can anyone help me to solve this problem? Thank you very much.
5 REPLIES 5

jbarmash
Champ in-the-making
Champ in-the-making
The way to do this would be to write another content rule that does not require a space as a parameter.   If I were doing that, I'd find where in the source the transformation action happens, copy that out of alfresco, rename files to avoid clashes, modify the code.  Then I'd package it as an extension and override the configuration files to point to your new action. 

Does that make sense?  Since you have access to the source, and you can add new actions, you take the action out of alfresco source, and customize for your needs.

joel18
Champ in-the-making
Champ in-the-making
Thank you. I wil try to change the action code. But in SDK, which java file should I change and rebuild?

jbarmash
Champ in-the-making
Champ in-the-making
It's not the SDK that you should be looking at, but the original source code of the product - find the files related to the transformation, as well as related config files.  Copy them out int a separate place.

I believe SDK has an example of action - you should use the infrastructure there (i.e. CustomAction Sample's build file and file layout perhaps).   Move files from line above into it, and use that sample for Eclipse Project and build files.  Hope this gets you on the path.

joel18
Champ in-the-making
Champ in-the-making
Thank you very much. But the type of files we need to correct is xml or ohters?

jbarmash
Champ in-the-making
Champ in-the-making
Thank you very much. But the type of files we need to correct is xml or ohters?

Java to modify the functionality and xml to point alfresco at the new code.    Also, probably the related JSP files.