mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
125603 rmunteanu: Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2) 125484 slanglois: MNT-16155 Update source headers - remove old Copyrights from Java and JSP dource files git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@125781 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
75 lines
2.0 KiB
Java
75 lines
2.0 KiB
Java
package org.alfresco.repo.action.scheduled;
|
|
|
|
import java.util.List;
|
|
|
|
import org.alfresco.service.cmr.action.Action;
|
|
import org.alfresco.service.cmr.action.CompositeAction;
|
|
import org.alfresco.service.cmr.repository.NodeRef;
|
|
|
|
/**
|
|
* The template to define a composite action.
|
|
*
|
|
* @author Andy Hind
|
|
*/
|
|
public class CompositeTemplateActionDefinition extends AbstractTemplateActionDefinition
|
|
{
|
|
|
|
/*
|
|
* The list of action templates that define this composite
|
|
*/
|
|
private List<TemplateActionDefinition> templateActionDefinitions;
|
|
|
|
/**
|
|
* Default constructor.
|
|
*
|
|
*/
|
|
public CompositeTemplateActionDefinition()
|
|
{
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Set the action templates - IOC.
|
|
*
|
|
* @param templateActionDefinitions List<TemplateActionDefinition>
|
|
*/
|
|
public void setTemplateActionDefinitions(List<TemplateActionDefinition> templateActionDefinitions)
|
|
{
|
|
this.templateActionDefinitions = templateActionDefinitions;
|
|
|
|
}
|
|
|
|
/**
|
|
* Get the list of template actions.
|
|
*
|
|
* @return - a list of templates for action definitions.
|
|
*/
|
|
public List<TemplateActionDefinition> templateActionDefinitions()
|
|
{
|
|
return templateActionDefinitions;
|
|
}
|
|
|
|
/**
|
|
* Build the composite action in the context of the given node.
|
|
* @param nodeRef NodeRef
|
|
* @return - the contextualised action.
|
|
*
|
|
*/
|
|
public Action getAction(NodeRef nodeRef)
|
|
{
|
|
CompositeAction compositeAction = getActionService().createCompositeAction();
|
|
for(TemplateActionDefinition tad : templateActionDefinitions)
|
|
{
|
|
compositeAction.addAction(tad.getAction(nodeRef));
|
|
}
|
|
|
|
if (getCompensatingTemplateCompositeActionDefinition() != null)
|
|
{
|
|
compositeAction.setCompensatingAction(getCompensatingTemplateCompositeActionDefinition().getAction(nodeRef));
|
|
}
|
|
|
|
return compositeAction;
|
|
}
|
|
|
|
}
|