Merged V3.0 to HEAD

11982: Fix for ETHREEOH-906 - Writing the TICKET value directly to the page during template processing is a potential XSS security hole.
   11983: Added back .html suffix to plain HTML form upload api call - added code comment to explain why it's there.
   11984: Added debug/info level logging to Invite process.
   11985: ETHREEOH-184: thumbnail assocs do not double up on check-in and thumbnail updates are done in one action
   11986: Fix for ETHREEOH-905 - missing url encoding step for user password during webscript based login process.
   11995: Unit test fixed up, fallout from runAs merge.
   11998: Part of a fix for ETHREEOH-546 - Cannot save document to the any space for Microsoft Office
   11999: Merged V2.2 to V3.0
      11996: Fix for open Lucene ResultSet memory leaks
   12000: ETHREEOH-692 - It is impossible to login to Alfresco from Microsoft Office add-in using NTLM authentication. ETHREEOH-546 - Cannot save document to the any space for Microsoft Office.
   12001: Paging enabled by default in all Document Libraries

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12494 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2008-12-18 15:08:14 +00:00
parent c07be19e36
commit d20db6284c
3 changed files with 98 additions and 21 deletions

View File

@@ -56,6 +56,7 @@ public class UpdateThumbnailActionExecuter extends ActionExecuterAbstractBase
/** Action name and parameters */
public static final String NAME = "update-thumbnail";
public static final String PARAM_CONTENT_PROPERTY = "content-property";
public static final String PARAM_THUMBNAIL_NODE = "thumbnail-node";
/**
* Set the thumbnail service
@@ -83,10 +84,18 @@ public class UpdateThumbnailActionExecuter extends ActionExecuterAbstractBase
@Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef)
{
if (this.nodeService.exists(actionedUponNodeRef) == true)
// Get the thumbnail
NodeRef thumbnailNodeRef = (NodeRef)action.getParameterValue(PARAM_THUMBNAIL_NODE);
if (thumbnailNodeRef == null)
{
thumbnailNodeRef = actionedUponNodeRef;
}
if (this.nodeService.exists(thumbnailNodeRef) == true &&
ContentModel.TYPE_THUMBNAIL.equals(this.nodeService.getType(thumbnailNodeRef)) == true)
{
// Get the thumbnail Name
String thumbnailName = (String)this.nodeService.getProperty(actionedUponNodeRef, ContentModel.PROP_THUMBNAIL_NAME);
String thumbnailName = (String)this.nodeService.getProperty(thumbnailNodeRef, ContentModel.PROP_THUMBNAIL_NAME);
// Get the details of the thumbnail
ThumbnailRegistry registry = this.thumbnailService.getThumbnailRegistry();
@@ -105,7 +114,7 @@ public class UpdateThumbnailActionExecuter extends ActionExecuterAbstractBase
}
// Create the thumbnail
this.thumbnailService.updateThumbnail(actionedUponNodeRef, details.getTransformationOptions());
this.thumbnailService.updateThumbnail(thumbnailNodeRef, details.getTransformationOptions());
}
}
@@ -115,7 +124,8 @@ public class UpdateThumbnailActionExecuter extends ActionExecuterAbstractBase
@Override
protected void addParameterDefinitions(List<ParameterDefinition> paramList)
{
paramList.add(new ParameterDefinitionImpl(PARAM_CONTENT_PROPERTY, DataTypeDefinition.QNAME, false, getParamDisplayLabel(PARAM_CONTENT_PROPERTY)));
paramList.add(new ParameterDefinitionImpl(PARAM_CONTENT_PROPERTY, DataTypeDefinition.QNAME, false, getParamDisplayLabel(PARAM_CONTENT_PROPERTY)));
paramList.add(new ParameterDefinitionImpl(PARAM_THUMBNAIL_NODE, DataTypeDefinition.QNAME, false, getParamDisplayLabel(PARAM_THUMBNAIL_NODE)));
}
}