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

@@ -38,7 +38,7 @@ import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.executer.TransformActionExecuter;
import org.alfresco.repo.content.transform.magick.ImageMagickContentTransformer;
import org.alfresco.repo.content.transform.magick.ImageTransformationOptions;
import org.alfresco.repo.search.QueryParameterDefImpl;
import org.alfresco.repo.version.VersionModel;
import org.alfresco.service.ServiceRegistry;
@@ -1742,9 +1742,12 @@ public class ScriptNode implements Serializable, Scopeable
public ScriptNode transform(ContentService contentService, NodeRef nodeRef, ContentReader reader,
ContentWriter writer)
{
Map<String, Object> opts = new HashMap<String, Object>(1);
opts.put(ImageMagickContentTransformer.KEY_OPTIONS, options != null ? options : "");
contentService.getImageTransformer().transform(reader, writer, opts);
ImageTransformationOptions imageOptions = new ImageTransformationOptions();
if (options != null)
{
imageOptions.setCommandOptions(options);
}
contentService.getImageTransformer().transform(reader, writer, imageOptions);
return newInstance(nodeRef, services, scope);
}