mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-22 15:12:38 +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
40 lines
1.3 KiB
Java
40 lines
1.3 KiB
Java
package org.alfresco.repo.action.executer;
|
|
|
|
import java.util.List;
|
|
|
|
import org.alfresco.service.cmr.action.Action;
|
|
import org.alfresco.service.cmr.action.ParameterDefinition;
|
|
import org.alfresco.service.cmr.repository.NodeRef;
|
|
import org.alfresco.service.cmr.repository.NodeService;
|
|
import org.alfresco.service.cmr.security.OwnableService;
|
|
|
|
/**
|
|
* Take Ownership action executor
|
|
*
|
|
* @author Neil Mc Erlean
|
|
* @since 5.0
|
|
*/
|
|
public class TakeOwnershipActionExecuter extends ActionExecuterAbstractBase
|
|
{
|
|
public static final String NAME = "take-ownership";
|
|
|
|
private NodeService nodeService;
|
|
private OwnableService ownableService;
|
|
|
|
public void setNodeService (NodeService service) { this.nodeService = service; }
|
|
public void setOwnableService(OwnableService service) { this.ownableService = service; }
|
|
|
|
@Override protected void addParameterDefinitions(List<ParameterDefinition> paramList)
|
|
{
|
|
// Intentionally empty. There are no parameters for this action.
|
|
}
|
|
|
|
public void executeImpl(Action ruleAction, NodeRef actionedUponNodeRef)
|
|
{
|
|
if (nodeService.exists(actionedUponNodeRef) && isApplicableType(actionedUponNodeRef))
|
|
{
|
|
ownableService.takeOwnership(actionedUponNodeRef);
|
|
}
|
|
}
|
|
}
|