mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (4.3/Cloud) to HEAD (4.3/Cloud)
57480: Merged V4.2-BUG-FIX (4.2.1) to HEAD-BUG-FIX (Cloud/4.3) 57290: Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1) 57279: Fix for MNT-9801. I have very slightly refactored the configuration of thumbnails. Rather than inject system.thumbnail.generate into both CreateThumbnail- and UpdateThumbnailActionExecuter, I am now injecting it into the ThumbnailService centrally. I left the old injector methods for backwards compatibility, but deprecated them. Now all requests to create a thumbnail via the ScriptNode API pre-check that thumbnail generation is enabled. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@61822 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -58,9 +58,6 @@ public class CreateThumbnailActionExecuter extends ActionExecuterAbstractBase
|
||||
/** Node Service */
|
||||
private NodeService nodeService;
|
||||
|
||||
/** Property turns on and off all thumbnail creation */
|
||||
private boolean generateThumbnails = true;
|
||||
|
||||
// Size limitations (in KBytes) indexed by mimetype for thumbnail creation
|
||||
private HashMap<String,Long> mimetypeMaxSourceSizeKBytes;
|
||||
|
||||
@@ -101,10 +98,17 @@ public class CreateThumbnailActionExecuter extends ActionExecuterAbstractBase
|
||||
/**
|
||||
* Enable thumbnail creation at all regardless of mimetype.
|
||||
* @param generateThumbnails a {@code false} value turns off all thumbnail creation.
|
||||
* @deprecated Use {@link ThumbnailServiceImpl#setThumbnailsEnabled(boolean)} instead.
|
||||
*/
|
||||
public void setGenerateThumbnails(boolean generateThumbnails)
|
||||
{
|
||||
this.generateThumbnails = generateThumbnails;
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Thumbnail generation is " +
|
||||
(generateThumbnails ? "enabled" : "disabled") +
|
||||
"via deprecated method in " + this.getClass().getSimpleName());
|
||||
}
|
||||
this.thumbnailService.setThumbnailsEnabled(generateThumbnails);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,7 +118,7 @@ public class CreateThumbnailActionExecuter extends ActionExecuterAbstractBase
|
||||
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
|
||||
{
|
||||
// Check if thumbnailing is generally disabled
|
||||
if (!generateThumbnails)
|
||||
if (!thumbnailService.getThumbnailsEnabled())
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
|
Reference in New Issue
Block a user