package com.atlassian.confluence.extra.workflow;



/**
 * Created by IntelliJ IDEA.
 * User: Tomd
 * Date: 13/05/2005
 * Time: 16:01:38
 * To change this template use File | Settings | File Templates.
 */
public abstract class AssignmentAction extends BaseAction
{
    public void setRole(String role)
    {
        this.role = role;
    }

    public String getRole()
    {
        return role;
    }

    private String role;

    public AssignmentAction(String role)
    {
        if (role != null)
        {
            this.role = role.trim();
        }
    }

    public boolean isConfigError()
    {
        return role == null || role.length() == 0;
    }

    protected String getAssignmentKey()
    {
        return "assignment:" + getRole();
    }
}
