Merged V3.4-BUG-FIX to HEAD

28650: Merged DEV/TEMPORARY to V3.4-BUG-FIX
      28637: ALF-5601: WCM Reviewer should be able to modify 'Launch Date' of the review item.
         Set "wcmwf:launchDate" to read-only on "submitpendingTask".
   28697: Fix for ALF-2711 - Fix to handle incorrect (negative size!) content length headers sent by Adobe Flash when uploading files over 2GB.
   28702: Merged DEV to V3.4-BUG-FIX
      28693: ALF-9314: Unable to add to multi-valued properties via AVM Console
             The node property value of Collection type must be set within square braces
             as a comma separated values without spaces. E.g. [aaa,bbb,ccc] 
   28718: Merged PATCHES/V3.4.2 to V3.4-BUG-FIX
      28569: ALF-9253 / ALF-9166: 'A valid SecureContext was not provided in the RequestContext' exception on startup following upgrade to 3.4.1
      28618: ALF-8385 / ALF-9364: Merged DEV/TEMPORARY to PATCHES/V3.4.2
         28565: ALF-5887 Addition of RenameUser command line toolContext
            - PersonServiceImpl should not disable normal behaviour when handling duplicate Person NodeRefs as the userAuthorityCache does not get updated correctly
            - Tool (base class for Import, Export and RenameUser command line tools) should not automatically login if setLogin(false) has been called. 
   28719: Merged V3.4 to V3.4-BUG-FIX
      28648: ALF-9103: Remove obsolete (and mis-spelled) use-old-dm-alcs-context.xml.sample
      28701: Corrected library for - Fix for ALF-7860 - Regression: Close button doesn't work in Node Browser


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28721 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2011-06-30 11:36:51 +00:00
parent 404b096c44
commit eddc7efe0c
10 changed files with 915 additions and 94 deletions

View File

@@ -27,6 +27,7 @@ import java.util.Set;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.ActionModel;
import org.alfresco.repo.action.RuntimeActionService;
import org.alfresco.repo.policy.BehaviourFilter;
import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.action.CompositeAction;
import org.alfresco.service.cmr.rendition.RenditionDefinition;
@@ -59,6 +60,7 @@ public class RenditionDefinitionPersisterImpl implements RenditionDefinitionPers
/* Injected services */
private NodeService nodeService;
private RuntimeActionService runtimeActionService;
private BehaviourFilter behaviourFilter;
/**
* Injects the NodeService bean.
@@ -79,7 +81,13 @@ public class RenditionDefinitionPersisterImpl implements RenditionDefinitionPers
{
this.runtimeActionService = runtimeActionService;
}
public void setBehaviourFilter(BehaviourFilter behaviourFilter)
{
this.behaviourFilter = behaviourFilter;
}
public List<RenditionDefinition> loadRenditionDefinitions()
{
checkRenderingActionRootNodeExists();
@@ -147,12 +155,23 @@ public class RenditionDefinitionPersisterImpl implements RenditionDefinitionPers
public void saveRenditionDefinition(RenditionDefinition renderingAction)
{
NodeRef actionNodeRef = findOrCreateActionNode(renderingAction);
// TODO Serialize using JSON content instead.
// The current serialization mechanism creates a complex content model
// structure which is verbose and a JSON-based approach using a simplified
// content model perhaps could offer performance improvements.
runtimeActionService.saveActionImpl(actionNodeRef, renderingAction);
// ALF-9166 describes a problem whereby versionable saved rendition definition nodes cause problems on upgrade.
// This appears to be due to a rule defined on Company Home. The behaviour suppression below is a workaround for that issue.
try
{
behaviourFilter.disableBehaviour(actionNodeRef, ContentModel.ASPECT_VERSIONABLE);
// TODO Serialize using JSON content instead.
// The current serialization mechanism creates a complex content model
// structure which is verbose and a JSON-based approach using a simplified
// content model perhaps could offer performance improvements.
runtimeActionService.saveActionImpl(actionNodeRef, renderingAction);
}
finally
{
behaviourFilter.enableBehaviour(actionNodeRef, ContentModel.ASPECT_VERSIONABLE);
}
}
public void deleteRenditionDefinition(RenditionDefinition renderingAction)