package com.atlassian.confluence.extra.workflow;

import com.atlassian.user.User;
import com.atlassian.user.User;

/**
 * Created by IntelliJ IDEA.
 * User: Tomd
 * Date: 13/05/2005
 * Time: 16:05:33
 * To change this template use File | Settings | File Templates.
 */
public class SingleAssignmentAction extends AssignmentAction
{
    public SingleAssignmentAction(String role)
    {
        super(role);
    }

    public SingleAssignmentAction()
    {
        super(null);
    }

    public void perform(WorkflowClient client, User user)
    {
        client.setValue(getAssignmentKey(), user.getName());
    }

    public String getDescription()
    {
        return "Assign the current user to the page with the role '" + getRole() + "'";
    }
}
