/* 
 *  Process Aware Web Application Platform 
 * 
 *  Copyright (C) 2011-2013 Inherit S AB 
 * 
 *  This program is free software: you can redistribute it and/or modify 
 *  it under the terms of the GNU Affero General Public License as published by 
 *  the Free Software Foundation, either version 3 of the License, or 
 *  (at your option) any later version. 
 * 
 *  This program is distributed in the hope that it will be useful, 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 *  GNU Affero General Public License for more details. 
 * 
 *  You should have received a copy of the GNU Affero General Public License 
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>. 
 * 
 *  e-mail: info _at_ inherit.se 
 *  mail: Inherit S AB, Långsjövägen 8, SE-131 33 NACKA, SWEDEN 
 *  phone: +46 8 641 64 14 
 */ 
 
package org.inheritsource.service.common.domain;

import java.io.Serializable;
import java.util.Set;

import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("ActivityWorkflowInfo")
public class ActivityWorkflowInfo implements Serializable {
	
	private static final long serialVersionUID = 8813710157742764480L;
	
	UserInfo assignedUser;
	Set<UserInfo> candidates;
	int priority;
	
	public ActivityWorkflowInfo() {
		
	}

	public UserInfo getAssignedUser() {
		return assignedUser;
	}

	public void setAssignedUser(UserInfo assignedUser) {
		this.assignedUser = assignedUser;
	}

	public Set<UserInfo> getCandidates() {
		return candidates;
	}

	public void setCandidates(Set<UserInfo> candidates) {
		this.candidates = candidates;
	}

	public int getPriority() {
		return priority;
	}

	public void setPriority(int priority) {
		this.priority = priority;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((assignedUser == null) ? 0 : assignedUser.hashCode());
		result = prime * result
				+ ((candidates == null) ? 0 : candidates.hashCode());
		result = prime * result + priority;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ActivityWorkflowInfo other = (ActivityWorkflowInfo) obj;
		if (assignedUser == null) {
			if (other.assignedUser != null)
				return false;
		} else if (!assignedUser.equals(other.assignedUser))
			return false;
		if (candidates == null) {
			if (other.candidates != null)
				return false;
		} else if (!candidates.equals(other.candidates))
			return false;
		if (priority != other.priority)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "ActivityWorkflowInfo [assignedUser=" + assignedUser
				+ ", candidates=" + candidates + ", priority=" + priority + "]";
	}
	
}

@@ -1274,28 +1274,33 @@
 dUser;%0A%09Set%3C
-User
+Candidate
 Info%3E candid
@@ -1528,28 +1528,33 @@
 %09public Set%3C
-User
+Candidate
 Info%3E getCan
@@ -1621,20 +1621,25 @@
 tes(Set%3C
-User
+Candidate
 Info%3E ca

change handle og candidates