001/**
002 * Copyright 2005-2016 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.kuali.rice.kew.rule;
017
018import java.io.Serializable;
019import java.util.ArrayList;
020import java.util.List;
021
022import org.kuali.rice.kew.actionrequest.ActionRequestValue;
023import org.kuali.rice.kew.api.identity.Id;
024
025/**
026 * The resolution of a qualified role (role name + data) to a List of recipient
027 * {@link Id}s.  In addition to the Ids of the recipients, a ResolvedQualifiedRole 
028 * can also contain a label for the role (to be displayed on the Route Log) and
029 * an annotation (to be displayed on the generated {@link ActionRequestValue}).
030 * 
031 * @see Id
032 * @see ActionRequestValue
033 *
034 * @author Kuali Rice Team (rice.collab@kuali.org)
035 */
036public class ResolvedQualifiedRole implements Serializable {
037
038        private static final long serialVersionUID = 5397269690550273869L;
039        
040        private List<Id> recipients = new ArrayList<Id>();
041    private String qualifiedRoleLabel;
042    private String annotation;
043
044    public ResolvedQualifiedRole() {
045    }
046
047    public ResolvedQualifiedRole(String qualifiedRoleLabel, List<Id> recipients) {
048        this(qualifiedRoleLabel, recipients, "");
049    }
050    
051    public ResolvedQualifiedRole(String qualifiedRoleLabel, List<Id> recipients, String annotation) {
052        this.qualifiedRoleLabel = qualifiedRoleLabel;
053        this.recipients = recipients;
054        this.annotation = annotation;
055    }
056    
057    public List<Id> getRecipients() {
058        return recipients;
059    }
060    public void setRecipients(List<Id> users) {
061        this.recipients = users;
062    }
063    public String getQualifiedRoleLabel() {
064        return qualifiedRoleLabel;
065    }
066    public void setQualifiedRoleLabel(String qualifiedRoleLabel) {
067        this.qualifiedRoleLabel = qualifiedRoleLabel;
068    }
069    public String getAnnotation() {
070        return annotation;
071    }
072    public void setAnnotation(String annotation) {
073        this.annotation = annotation;
074    }
075    
076}