mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
TransformationOptions update - add a new flag for including embedded resources
Also fix ImageTransformationOptions to properly obey the TransformationOptions contract, by including the extra details in the toMap method git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22859 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
*/
|
||||
package org.alfresco.repo.content.transform.magick;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.service.cmr.repository.TransformationOptions;
|
||||
|
||||
/**
|
||||
@@ -27,6 +30,10 @@ import org.alfresco.service.cmr.repository.TransformationOptions;
|
||||
*/
|
||||
public class ImageTransformationOptions extends TransformationOptions
|
||||
{
|
||||
public static final String OPT_COMMAND_OPTIONS = "commandOptions";
|
||||
public static final String OPT_IMAGE_RESIZE_OPTIONS = "imageResizeOptions";
|
||||
public static final String OPT_IMAGE_CROP_OPTIONS = "imageCropOptions";
|
||||
|
||||
/** Command string options, provided for backward compatibility */
|
||||
private String commandOptions = "";
|
||||
|
||||
@@ -88,6 +95,21 @@ public class ImageTransformationOptions extends TransformationOptions
|
||||
return msg.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the base class implementation to add our options
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> toMap()
|
||||
{
|
||||
Map<String, Object> baseProps = super.toMap();
|
||||
Map<String, Object> props = new HashMap<String, Object>(baseProps);
|
||||
props.put(OPT_COMMAND_OPTIONS, commandOptions);
|
||||
props.put(OPT_IMAGE_RESIZE_OPTIONS, resizeOptions);
|
||||
props.put(OPT_IMAGE_CROP_OPTIONS, cropOptions);
|
||||
return props;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param cropOptions the cropOptions to set
|
||||
*/
|
||||
|
Reference in New Issue
Block a user