mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merge V1.4 to HEAD
- Ignored Enterprise-specific changes svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3701 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3703 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3704 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3705 . svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3707 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3876 . svn revert root\projects\web-client\source\web\jsp\admin\admin-console.jsp git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3879 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -84,6 +84,10 @@ public class ScriptActionExecuter extends ActionExecuterAbstractBase
|
||||
{
|
||||
NodeRef scriptRef = (NodeRef)action.getParameterValue(PARAM_SCRIPTREF);
|
||||
NodeRef spaceRef = this.serviceRegistry.getRuleService().getOwningNodeRef(action);
|
||||
if (spaceRef == null)
|
||||
{
|
||||
spaceRef = nodeService.getPrimaryParent(actionedUponNodeRef).getParentRef();
|
||||
}
|
||||
|
||||
if (nodeService.exists(scriptRef))
|
||||
{
|
||||
|
@@ -240,7 +240,10 @@ public class TransformActionExecuter extends ActionExecuterAbstractBase
|
||||
contentWriter.setMimetype(mimeType); // new mimetype
|
||||
contentWriter.setEncoding(contentReader.getEncoding()); // original encoding
|
||||
|
||||
// Try and transform the content
|
||||
// Try and transform the content - failures are caught and allowed to fail silently.
|
||||
// This is unique to this action, and is essentially a broken pattern.
|
||||
// Clients should rather get the exception and then decide to replay with rules/actions turned off or not.
|
||||
// TODO: Check failure patterns for actions.
|
||||
try
|
||||
{
|
||||
doTransform(ruleAction, contentReader, contentWriter);
|
||||
@@ -258,8 +261,16 @@ public class TransformActionExecuter extends ActionExecuterAbstractBase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Executed in a new transaction so that failures don't cause the entire transaction to rollback.
|
||||
*/
|
||||
protected void doTransform(Action ruleAction, ContentReader contentReader, ContentWriter contentWriter)
|
||||
{
|
||||
// try to pre-empt the lack of a transformer
|
||||
if (!this.contentService.isTransformable(contentReader, contentWriter))
|
||||
{
|
||||
throw new NoTransformerException(contentReader.getMimetype(), contentWriter.getMimetype());
|
||||
}
|
||||
this.contentService.transform(contentReader, contentWriter);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user