mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for ALF-3733 (Rendition API - destination-path-template fails to create association)
The fix was primarily to ensure that templated paths with elements that resolved to empty strings, did not lead to the creation of illegal paths in the FileFolderService. An example would be //foo/bar. Added a Java test case that reproduced the issue. Added a JavaScript test case that partially reproduced the issue. Also needed to add extract method in ScriptAction to allow some internal code to be called by subclasses. This had the serendipitous benefit of reducing repeated code. This was a secondary issue whereby parameters set in the renditionDefinition were not being correctly passed from the Script layer to the Java layer. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22099 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -128,20 +128,20 @@ public class ScriptRenditionService extends BaseScopableProcessorExtension
|
||||
return new ScriptNode(renditionNode, serviceRegistry);
|
||||
}
|
||||
|
||||
public ScriptNode render(ScriptNode sourceNode, ScriptRenditionDefinition renditionDefQName)
|
||||
public ScriptNode render(ScriptNode sourceNode, ScriptRenditionDefinition scriptRenditionDef)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
StringBuilder msg = new StringBuilder();
|
||||
msg.append("Rendering source node '")
|
||||
.append(sourceNode)
|
||||
.append("' with renditionDefQName '").append(renditionDefQName)
|
||||
.append("' with renditionDefQName '").append(scriptRenditionDef)
|
||||
.append("'");
|
||||
logger.debug(msg.toString());
|
||||
}
|
||||
|
||||
ChildAssociationRef chAssRef = this.renditionService.render(sourceNode.getNodeRef(),
|
||||
renditionDefQName.getRenditionDefinition());
|
||||
scriptRenditionDef.getRenditionDefinition());
|
||||
|
||||
NodeRef renditionNode = chAssRef.getChildRef();
|
||||
if (logger.isDebugEnabled())
|
||||
|
Reference in New Issue
Block a user