Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Avila2016-04-01 17:42:54 -0400
committerRyan D. Brooks2016-04-01 17:42:54 -0400
commit16c81c5b8317daab7deaa3a7e9cf9989563210a4 (patch)
treeb3ea6608415375fcd6471290659df5b8a95f4a57 /plugins/org.eclipse.osee.disposition.rest.model
parenta3f7a351fce0f66736d18f059b80aa27d15657c9 (diff)
downloadorg.eclipse.osee-16c81c5b8317daab7deaa3a7e9cf9989563210a4.tar.gz
org.eclipse.osee-16c81c5b8317daab7deaa3a7e9cf9989563210a4.tar.xz
org.eclipse.osee-16c81c5b8317daab7deaa3a7e9cf9989563210a4.zip
refactor: Move translation to JSON to single point
Diffstat (limited to 'plugins/org.eclipse.osee.disposition.rest.model')
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/Discrepancy.java1
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoAnnotationData.java11
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItem.java10
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItemData.java43
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java7
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java15
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetStatus.java3
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/OperationReport.java10
9 files changed, 69 insertions, 36 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.disposition.rest.model/META-INF/MANIFEST.MF
index ea74e9e873..be55c372b5 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.disposition.rest.model/META-INF/MANIFEST.MF
@@ -6,6 +6,5 @@ Bundle-Version: 0.24.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: Eclipse Open System Engineering Environment
Export-Package: org.eclipse.osee.disposition.model
-Import-Package: org.codehaus.jackson.annotate;version="1.9.13",
- org.eclipse.osee.framework.jdk.core.type,
- org.json
+Import-Package: org.eclipse.osee.framework.jdk.core.type
+
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/Discrepancy.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/Discrepancy.java
index 564bac5861..79a9385956 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/Discrepancy.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/Discrepancy.java
@@ -22,6 +22,7 @@ public class Discrepancy {
private int location;
public Discrepancy() {
+
}
public String getId() {
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoAnnotationData.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoAnnotationData.java
index dbd46dbe3d..77838e399a 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoAnnotationData.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoAnnotationData.java
@@ -11,9 +11,10 @@
package org.eclipse.osee.disposition.model;
+import java.util.ArrayList;
+import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
import org.eclipse.osee.framework.jdk.core.type.Identifiable;
-import org.json.JSONArray;
/**
* @author Angel Avila
@@ -28,7 +29,7 @@ public class DispoAnnotationData implements Identifiable<String> {
private String customerNotes;
private String locationRefs;
private boolean isConnected;
- private JSONArray idsOfCoveredDiscrepancies;
+ private List<String> idsOfCoveredDiscrepancies;
private String resolution;
private boolean isResolutionValid;
private String resolutionType;
@@ -68,7 +69,7 @@ public class DispoAnnotationData implements Identifiable<String> {
return locationRefs;
}
- public JSONArray getIdsOfCoveredDiscrepancies() {
+ public List<String> getIdsOfCoveredDiscrepancies() {
return idsOfCoveredDiscrepancies;
}
@@ -116,7 +117,7 @@ public class DispoAnnotationData implements Identifiable<String> {
this.isConnected = isConnected;
}
- public void setIdsOfCoveredDiscrepancies(JSONArray idsOfCoveredDiscrepancies) {
+ public void setIdsOfCoveredDiscrepancies(List<String> idsOfCoveredDiscrepancies) {
this.idsOfCoveredDiscrepancies = idsOfCoveredDiscrepancies;
}
@@ -147,7 +148,7 @@ public class DispoAnnotationData implements Identifiable<String> {
public void disconnect() {
this.isConnected = false;
- this.idsOfCoveredDiscrepancies = new JSONArray();
+ this.idsOfCoveredDiscrepancies = new ArrayList<String>();
}
}
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItem.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItem.java
index 0295a2e203..c67a237f61 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItem.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItem.java
@@ -12,9 +12,9 @@
package org.eclipse.osee.disposition.model;
import java.util.Date;
+import java.util.List;
+import java.util.Map;
import org.eclipse.osee.framework.jdk.core.type.Identifiable;
-import org.json.JSONArray;
-import org.json.JSONObject;
/**
* @author Angel Avila
@@ -36,9 +36,9 @@ public interface DispoItem extends Identifiable<String> {
Boolean getNeedsRerun();
- JSONObject getDiscrepanciesList();
+ Map<String, Discrepancy> getDiscrepanciesList();
- JSONArray getAnnotationsList();
+ List<DispoAnnotationData> getAnnotationsList();
String getMachine();
@@ -53,4 +53,6 @@ public interface DispoItem extends Identifiable<String> {
String getMethodNumber();
String getFileNumber();
+
+ boolean getIsIncludeDetails();
}
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItemData.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItemData.java
index 71a26a3be4..4fcff19da2 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItemData.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItemData.java
@@ -12,9 +12,9 @@
package org.eclipse.osee.disposition.model;
import java.util.Date;
+import java.util.List;
+import java.util.Map;
import javax.xml.bind.annotation.XmlRootElement;
-import org.json.JSONArray;
-import org.json.JSONObject;
/**
* @author Angel Avila
@@ -29,8 +29,8 @@ public class DispoItemData implements DispoItem {
private Date lastUpdate;
private String status;
private String version;
- private JSONObject discrepanciesList;
- private JSONArray annotationsList;
+ private Map<String, Discrepancy> discrepanciesList;
+ private List<DispoAnnotationData> annotationsList;
private String totalPoints;
private Boolean needsRerun;
private String machine;
@@ -38,8 +38,11 @@ public class DispoItemData implements DispoItem {
private String elapsedTime;
private Boolean aborted;
private String itemNotes;
+ private String discrepanciesAsRanges;
+ private int failureCount;
private String fileNumber;
private String methodNumber;
+ private boolean isIncludeDetails;
public DispoItemData() {
@@ -81,12 +84,12 @@ public class DispoItemData implements DispoItem {
}
@Override
- public JSONObject getDiscrepanciesList() {
+ public Map<String, Discrepancy> getDiscrepanciesList() {
return discrepanciesList;
}
@Override
- public JSONArray getAnnotationsList() {
+ public List<DispoAnnotationData> getAnnotationsList() {
return annotationsList;
}
@@ -135,15 +138,28 @@ public class DispoItemData implements DispoItem {
return methodNumber;
}
+ public String getDiscrepanciesAsRanges() {
+ return discrepanciesAsRanges;
+ }
+
+ public int getFailureCount() {
+ return failureCount;
+ }
+
+ @Override
+ public boolean getIsIncludeDetails() {
+ return isIncludeDetails;
+ }
+
public void setName(String name) {
this.name = name;
}
- public void setDiscrepanciesList(JSONObject discrepanciesList) {
+ public void setDiscrepanciesList(Map<String, Discrepancy> discrepanciesList) {
this.discrepanciesList = discrepanciesList;
}
- public void setAnnotationsList(JSONArray annotationsList) {
+ public void setAnnotationsList(List<DispoAnnotationData> annotationsList) {
this.annotationsList = annotationsList;
}
@@ -199,6 +215,10 @@ public class DispoItemData implements DispoItem {
this.itemNotes = itemNotes;
}
+ public void setFailureCount(int failureCount) {
+ this.failureCount = failureCount;
+ }
+
public void setFileNumber(String fileNumber) {
this.fileNumber = fileNumber;
}
@@ -207,4 +227,11 @@ public class DispoItemData implements DispoItem {
this.methodNumber = methodNumber;
}
+ public void setDiscrepanciesAsRanges(String discrepanciesAsRanges) {
+ this.discrepanciesAsRanges = discrepanciesAsRanges;
+ }
+
+ public void setIsIncludeDetails(boolean isIncludeDetails) {
+ this.isIncludeDetails = isIncludeDetails;
+ }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java
index 6cbd0e6568..a744bb19aa 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java
@@ -11,9 +11,8 @@
package org.eclipse.osee.disposition.model;
+import java.util.List;
import org.eclipse.osee.framework.jdk.core.type.Identifiable;
-import org.json.JSONArray;
-import org.json.JSONObject;
/**
* @author Angel Avila
@@ -23,11 +22,11 @@ public interface DispoSet extends Identifiable<String> {
String getImportPath();
- JSONArray getNotesList();
+ List<Note> getNotesList();
String getImportState();
String getDispoType();
- JSONObject getOperationSummary();
+ OperationReport getOperationSummary();
}
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java
index da04b6cfa1..b85162e605 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java
@@ -11,9 +11,8 @@
package org.eclipse.osee.disposition.model;
+import java.util.List;
import javax.xml.bind.annotation.XmlRootElement;
-import org.json.JSONArray;
-import org.json.JSONObject;
/**
* @author Angel Avila
@@ -24,9 +23,9 @@ public class DispoSetData extends DispoSetDescriptorData implements DispoSet {
private String guid;
private String operation;
- private JSONArray notesList;
+ private List<Note> notesList;
private String importState;
- private JSONObject operationSummary;
+ private OperationReport operationSummary;
public DispoSetData() {
@@ -49,16 +48,16 @@ public class DispoSetData extends DispoSetDescriptorData implements DispoSet {
this.operation = operation;
}
- public void setNotesList(JSONArray notesList) {
+ public void setNotesList(List<Note> notesList) {
this.notesList = notesList;
}
- public void setOperationSummary(JSONObject operationSummary) {
+ public void setOperationSummary(OperationReport operationSummary) {
this.operationSummary = operationSummary;
}
@Override
- public JSONArray getNotesList() {
+ public List<Note> getNotesList() {
return notesList;
}
@@ -72,7 +71,7 @@ public class DispoSetData extends DispoSetDescriptorData implements DispoSet {
}
@Override
- public JSONObject getOperationSummary() {
+ public OperationReport getOperationSummary() {
return operationSummary;
}
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetStatus.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetStatus.java
index 68fd187774..fb862abc89 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetStatus.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetStatus.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.disposition.model;
-import org.codehaus.jackson.annotate.JsonValue;
-
/**
* @author Angel Avila
*/
@@ -37,7 +35,6 @@ public enum DispoSetStatus {
return value;
}
- @JsonValue
public String getName() {
return name;
}
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/OperationReport.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/OperationReport.java
index b314f460d5..f97148eca8 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/OperationReport.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/OperationReport.java
@@ -24,7 +24,7 @@ public class OperationReport {
private DispoSetStatus status = DispoSetStatus.NO_CHANGE;
- private final List<OperationSummaryEntry> entries = new ArrayList<>();
+ private List<OperationSummaryEntry> entries = new ArrayList<>();
public OperationReport() {
}
@@ -55,4 +55,12 @@ public class OperationReport {
public DispoSetStatus getStatus() {
return status;
}
+
+ public void setStatus(DispoSetStatus status) {
+ this.status = status;
+ }
+
+ public void setEntries(List<OperationSummaryEntry> entries) {
+ this.entries = entries;
+ }
}

Back to the top