/**
*
*/
package net.tasksnow.model.cards;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
/**
* @author Benjamin
*
*/
public class Task implements Serializable {
private int id = 0;
private String name = "";
private Date date = null;
private ArrayList<Label> labelList = null;
private int projectID = 0;
private String projectName = "";
private String description = "";
private int importance = 0;
private boolean notification = false;
private int status = 0;
private int action = 0;
/**
* When creating a new task after a user dialog, just set the id to -1 and project name to ""
*
* @param id
* @param task
* @param tags
* @param projectName
* @param description
* @param date
* @param projectID
* @param importance
* @param notification
* @param done
*/
public Task(int id, String task, ArrayList<Label> tags, String description, Date date, int projectID, int importance,
boolean notification, int status, int action, String projectname) {
this.id = id;
this.name = task;
this.date = date;
this.description = description;
this.labelList = tags;
this.projectID = projectID;
this.importance = importance;
this.notification = notification;
this.status = status;
this.action = action;
this.projectName = projectname;
}
public Task() {
}
/**
* @return the id
*/
public int getId() {
return id;
}
/**
* @return the projectID
*/
public int getProjectID() {
return projectID;
}
/**
* @param projectID
* the projectID to set
*/
public void setProjectID(int projectID) {
this.projectID = projectID;
}
/**
* @return the done
*/
public int getStatus() {
return status;
}
/**
* @param done
* the done to set
*/
public void setStatus(int status) {
this.status = status;
}
/**
* @return the notification
*/
public boolean getNotification() {
return notification;
}
/**
* @param notification
* the notification to set
*/
public void setNotification(boolean notification) {
this.notification = notification;
}
/**
* @return the importance
*/
public int getImportance() {
return importance;
}
/**
* @param importance
* the importance to set
*/
public void setImportance(int importance) {
this.importance = importance;
}
/**
* @return the task
*/
public String getName() {
return name;
}
/**
* @param task
* the task to set
*/
public void setName(String name) {
this.name = name;
}
/**
* @return the date
*/
public Date getDate() {
return date;
}
/**
* @param date
* the date to set
*/
public void setDate(Date date) {
this.date = date;
}
/**
* @return the tags
*/
public ArrayList<Label> getLabels() {
return labelList;
}
/**
* @param tags
* the tags to set
*/
public void setLabels(ArrayList<Label> labels) {
this.labelList = labels;
}
public String getLabelString() {
String returnStr = "";
for (Label label : getLabels()) {
returnStr += label.getValue() + " ";
}
return returnStr;
}
/**
* @return the description
*/
public String getDescription() {
return description;
}
/**
* @param description
* the description to set
*/
public void setDescription(String description) {
this.description = description;
}
/**
* @return the action
*/
public int getAction() {
return action;
}
/**
* @param action
* the action to set
*/
public void setAction(int action) {
this.action = action;
}
/**
* @return the projectName
*/
public String getProjectName() {
return projectName;
}
/**
* @param projectName
* the projectName to set
*/
public void setProjectName(String projectName) {
this.projectName = projectName;
}
}