package kr.wisestone.owl.web.form;
|
|
import com.google.common.collect.Lists;
|
import kr.wisestone.owl.util.ConvertUtil;
|
import kr.wisestone.owl.util.MapUtil;
|
|
import java.util.List;
|
import java.util.Map;
|
|
public class ProjectForm {
|
private Long id;
|
private Long parentProjectId;
|
private String name;
|
private String description;
|
private String status;
|
private String projectKey;
|
private String startDate;
|
private String endDate;
|
private String projectType;
|
private Long workspaceId;
|
private List<Long> managerIds = Lists.newArrayList();
|
private List<Long> removeIds = Lists.newArrayList();
|
private List<Long> userIds = Lists.newArrayList();
|
private List<Long> departmentIds = Lists.newArrayList();
|
|
public ProjectForm() {
|
}
|
|
public static ProjectForm make(Map<String, Object> params) {
|
ProjectForm form = ConvertUtil.convertMapToClass(params, ProjectForm.class);
|
|
if (MapUtil.getLongs(params, "managerIds") != null) {
|
form.setManagerIds(MapUtil.getLongs(params, "managerIds"));
|
}
|
|
if (MapUtil.getLongs(params, "userIds") != null) {
|
form.setUserIds(MapUtil.getLongs(params, "userIds"));
|
}
|
|
if (MapUtil.getLongs(params, "departmentIds") != null) {
|
form.setDepartmentIds(MapUtil.getLongs(params, "departmentIds"));
|
}
|
|
if (MapUtil.getLongs(params, "removeIds") != null) {
|
form.setRemoveIds(MapUtil.getLongs(params, "removeIds"));
|
}
|
|
if (form.getProjectKey() != null) {
|
form.setProjectKey(form.getProjectKey().toUpperCase());
|
}
|
|
return form;
|
}
|
|
public Long getId() {
|
return id;
|
}
|
|
public void setId(Long id) {
|
this.id = id;
|
}
|
|
public Long getParentProjectId() {
|
return this.parentProjectId;
|
}
|
|
public void setParentProjectId(Long id) {
|
this.parentProjectId = id;
|
}
|
|
public String getName() {
|
return name;
|
}
|
|
public void setName(String name) {
|
this.name = name;
|
}
|
|
public String getDescription() {
|
return description;
|
}
|
|
public void setDescription(String description) {
|
this.description = description;
|
}
|
|
public String getStatus() {
|
return status;
|
}
|
|
public void setStatus(String status) {
|
this.status = status;
|
}
|
|
public String getStartDate() {
|
return startDate;
|
}
|
|
public void setStartDate(String startDate) {
|
this.startDate = startDate;
|
}
|
|
public String getEndDate() {
|
return endDate;
|
}
|
|
public void setEndDate(String endDate) {
|
this.endDate = endDate;
|
}
|
|
public String getProjectType() {
|
return projectType;
|
}
|
|
public void setProjectType(String projectType) {
|
this.projectType = projectType;
|
}
|
|
public List<Long> getManagerIds() {
|
return managerIds;
|
}
|
|
public void setManagerIds(List<Long> managerIds) {
|
this.managerIds = managerIds;
|
}
|
|
public String getProjectKey() {
|
return projectKey;
|
}
|
|
public void setProjectKey(String projectKey) {
|
this.projectKey = projectKey;
|
}
|
|
public Long getWorkspaceId() {
|
return workspaceId;
|
}
|
|
public void setWorkspaceId(Long workspaceId) {
|
this.workspaceId = workspaceId;
|
}
|
|
public List<Long> getUserIds() {
|
return userIds;
|
}
|
|
public void setUserIds(List<Long> userIds) {
|
this.userIds = userIds;
|
}
|
|
public List<Long> getRemoveIds() {
|
return removeIds;
|
}
|
|
public void setRemoveIds(List<Long> removeIds) {
|
this.removeIds = removeIds;
|
}
|
|
public void addRemoveIds(Long removeId) {
|
this.removeIds.add(removeId);
|
}
|
|
public List<Long> getDepartmentIds() {
|
return departmentIds;
|
}
|
|
public void setDepartmentIds(List<Long> departmentIds) {
|
this.departmentIds = departmentIds;
|
}
|
}
|