Jira-integration: non persistent beans to map jira's REST response

This commit is contained in:
Miciele Ghiorghis 2012-10-24 12:26:07 +02:00 committed by Manuel Rego Casasnovas
parent 887d0ae650
commit 3174f886fa
9 changed files with 570 additions and 0 deletions

View file

@ -0,0 +1,61 @@
/*
* This file is part of LibrePlan
*
* Copyright (C) 2012 Igalia, S.L.
*
* 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/>.
*/
package org.libreplan.importers.jira;
public class Field {
String summary;
Status status;
TimeTracking timetracking;
WorkLog worklog;
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public TimeTracking getTimetracking() {
return timetracking;
}
public void setTimetracking(TimeTracking timetracking) {
this.timetracking = timetracking;
}
public WorkLog getWorklog() {
return worklog;
}
public void setWorklog(WorkLog worklog) {
this.worklog = worklog;
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
}

View file

@ -0,0 +1,75 @@
/*
* This file is part of LibrePlan
*
* Copyright (C) 2012 Igalia, S.L.
*
* 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/>.
*/
package org.libreplan.importers.jira;
public class Issue {
private String expand;
private Integer id;
private String key;
private String self;
private Field fields;
public String getExpand() {
return expand;
}
public void setExpand(String expand) {
this.expand = expand;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getSelf() {
return self;
}
public void setSelf(String self) {
this.self = self;
}
public Field getFields() {
return fields;
}
public void setFields(Field fields) {
this.fields = fields;
}
}

View file

@ -0,0 +1,43 @@
/*
* This file is part of LibrePlan
*
* Copyright (C) 2012 Igalia, S.L.
*
* 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/>.
*/
package org.libreplan.importers.jira;
public class LabelIssue {
String key;
String self;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public String getSelf() {
return self;
}
public void setSelf(String self) {
this.self = self;
}
}

View file

@ -0,0 +1,63 @@
/*
* This file is part of LibrePlan
*
* Copyright (C) 2012 Igalia, S.L.
*
* 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/>.
*/
package org.libreplan.importers.jira;
import java.util.List;
public class SearchResult {
private Integer startAt;
private Integer maxResults;
private Integer total;
private List<Issue> issues;
public Integer getStartAt() {
return startAt;
}
public void setStartAt(Integer startAt) {
this.startAt = startAt;
}
public Integer getMaxResults() {
return maxResults;
}
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
public Integer getTotal() {
return total;
}
public void setTotal(Integer total) {
this.total = total;
}
public List<Issue> getIssues() {
return issues;
}
public void setIssues(List<Issue> issues) {
this.issues = issues;
}
}

View file

@ -0,0 +1,51 @@
/*
* This file is part of LibrePlan
*
* Copyright (C) 2012 Igalia, S.L.
*
* 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/>.
*/
package org.libreplan.importers.jira;
public class Status {
Integer id;
String name;
String self;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSelf() {
return self;
}
public void setSelf(String self) {
this.self = self;
}
}

View file

@ -0,0 +1,55 @@
/*
* This file is part of LibrePlan
*
* Copyright (C) 2012 Igalia, S.L.
*
* 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/>.
*/
package org.libreplan.importers.jira;
public class TimeTracking {
private Integer originalEstimateSeconds;
private Integer remainingEstimateSeconds;
private Integer timeSpentSeconds;
public Integer getOriginalEstimateSeconds() {
return originalEstimateSeconds;
}
public void setOriginalEstimateSeconds(Integer originalEstimateSeconds) {
this.originalEstimateSeconds = originalEstimateSeconds;
}
public Integer getRemainingEstimateSeconds() {
return remainingEstimateSeconds;
}
public void setRemainingEstimateSeconds(Integer remainingEstimateSeconds) {
this.remainingEstimateSeconds = remainingEstimateSeconds;
}
public Integer getTimeSpentSeconds() {
return timeSpentSeconds;
}
public void setTimeSpentSeconds(Integer timeSpentSeconds) {
this.timeSpentSeconds = timeSpentSeconds;
}
}

View file

@ -0,0 +1,63 @@
/*
* This file is part of LibrePlan
*
* Copyright (C) 2012 Igalia, S.L.
*
* 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/>.
*/
package org.libreplan.importers.jira;
import java.util.List;
public class WorkLog {
private Integer startAt;
private Integer maxResults;
private Integer total;
private List<WorkLogItem> worklogs;
public Integer getStartAt() {
return startAt;
}
public void setStartAt(Integer startAt) {
this.startAt = startAt;
}
public Integer getMaxResults() {
return maxResults;
}
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
public Integer getTotal() {
return total;
}
public void setTotal(Integer total) {
this.total = total;
}
public List<WorkLogItem> getWorklogs() {
return worklogs;
}
public void setWorklogs(List<WorkLogItem> worklogs) {
this.worklogs = worklogs;
}
}

View file

@ -0,0 +1,60 @@
/*
* This file is part of LibrePlan
*
* Copyright (C) 2012 Igalia, S.L.
*
* 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/>.
*/
package org.libreplan.importers.jira;
public class WorkLogAuthor {
private boolean active;
private String displayName;
private String name;
private String self;
public boolean isActive() {
return active;
}
public void setActive(boolean active) {
this.active = active;
}
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSelf() {
return self;
}
public void setSelf(String self) {
this.self = self;
}
}

View file

@ -0,0 +1,99 @@
/*
* This file is part of LibrePlan
*
* Copyright (C) 2012 Igalia, S.L.
*
* 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/>.
*/
package org.libreplan.importers.jira;
import java.util.Date;
public class WorkLogItem {
private WorkLogAuthor author;
private Integer id;
private String self;
private Date created;
private Date started;
private Date updated;
private Integer timeSpentSeconds;
private String comment;
public WorkLogAuthor getAuthor() {
return author;
}
public void setAuthor(WorkLogAuthor author) {
this.author = author;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getSelf() {
return self;
}
public void setSelf(String self) {
this.self = self;
}
public Date getCreated() {
return created;
}
public void setCreated(Date created) {
this.created = created;
}
public Date getStarted() {
return started;
}
public void setStarted(Date started) {
this.started = started;
}
public Date getUpdated() {
return updated;
}
public void setUpdated(Date updated) {
this.updated = updated;
}
public Integer getTimeSpentSeconds() {
return timeSpentSeconds;
}
public void setTimeSpentSeconds(Integer timeSpentSeconds) {
this.timeSpentSeconds = timeSpentSeconds;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
}