mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Thumbnail Service: text and html to image and swf now work
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10705 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
package org.alfresco.repo.thumbnail;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -55,7 +56,7 @@ import org.alfresco.util.ParameterCheck;
|
||||
public class ThumbnailServiceImpl implements ThumbnailService
|
||||
{
|
||||
/** Error messages */
|
||||
private static final String ERR_NO_CREATE = "Thumbnail could not be created as required transformation is not supported.";
|
||||
private static final String ERR_NO_CREATE = "Thumbnail could not be created as required transformation is not supported from {0} to {1}";
|
||||
private static final String ERR_DUPLICATE_NAME = "Thumbnail could not be created because of a duplicate name";
|
||||
private static final String ERR_NO_PARENT = "Thumbnail has no parent so update cannot take place.";
|
||||
private static final String ERR_TOO_PARENT = "Thumbnail has more than one source content node. This is invalid so update cannot take place.";
|
||||
@@ -209,7 +210,7 @@ public class ThumbnailServiceImpl implements ThumbnailService
|
||||
if (this.contentService.isTransformable(reader, writer, transformationOptions) == false)
|
||||
{
|
||||
// Throw exception indicating that the thumbnail could not be created
|
||||
throw new ThumbnailException(ERR_NO_CREATE);
|
||||
throw new ThumbnailException(MessageFormat.format(ERR_NO_CREATE, reader.getMimetype(), writer.getMimetype()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -278,7 +279,7 @@ public class ThumbnailServiceImpl implements ThumbnailService
|
||||
if (this.contentService.isTransformable(reader, writer, transformationOptions) == false)
|
||||
{
|
||||
// Throw exception indicating that the thumbnail could not be created
|
||||
throw new ThumbnailException(ERR_NO_CREATE);
|
||||
throw new ThumbnailException(MessageFormat.format(ERR_NO_CREATE, reader.getMimetype(), writer.getMimetype()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user