Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Avila2014-04-08 14:11:08 -0400
committerAngel Avila2014-04-09 22:10:11 -0400
commit5ddfa7ebe2f06ea2c213eb2834de1b8d0b691eab (patch)
tree27a6a298fb97297a71dbdfc6c85801ef38e7640f /plugins/org.eclipse.osee.disposition.rest.model
parent720b641a40ae4b692076f3d24e594038198fbb13 (diff)
downloadorg.eclipse.osee-5ddfa7ebe2f06ea2c213eb2834de1b8d0b691eab.tar.gz
org.eclipse.osee-5ddfa7ebe2f06ea2c213eb2834de1b8d0b691eab.tar.xz
org.eclipse.osee-5ddfa7ebe2f06ea2c213eb2834de1b8d0b691eab.zip
refactor[ats_ZSWF7]: Update Dispo Model
Diffstat (limited to 'plugins/org.eclipse.osee.disposition.rest.model')
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/Discrepancy.java31
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoAnnotationData.java26
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItem.java6
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItemData.java22
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java3
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java21
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoStrings.java5
7 files changed, 56 insertions, 58 deletions
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 d7f0b2b1aac..564bac5861a 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
@@ -11,22 +11,20 @@
package org.eclipse.osee.disposition.model;
import javax.xml.bind.annotation.XmlRootElement;
-import org.json.JSONArray;
/**
* @author Angel Avila
*/
@XmlRootElement
public class Discrepancy {
- private int id;
+ private String id;
private String text;
- private LocationRange locationRange;
- private JSONArray idsOfCoveringAnnotations;
+ private int location;
public Discrepancy() {
}
- public int getId() {
+ public String getId() {
return id;
}
@@ -34,16 +32,12 @@ public class Discrepancy {
return text;
}
- public LocationRange getLocationRange() {
- return locationRange;
- }
-
- public JSONArray getIdsOfCoveringAnnotations() {
- return idsOfCoveringAnnotations;
+ public int getLocation() {
+ return location;
}
// Setters
- public void setId(int id) {
+ public void setId(String id) {
this.id = id;
}
@@ -51,17 +45,8 @@ public class Discrepancy {
this.text = text;
}
- public void setLocationRange(LocationRange locationRange) {
- this.locationRange = locationRange;
- }
-
- public void setIdsOfCoveringAnnotations(JSONArray idsOfCoveringAnnotations) {
- this.idsOfCoveringAnnotations = idsOfCoveringAnnotations;
- }
-
- // Utils
- public void addCoveringAnnotation(DispoAnnotationData annotation) {
- idsOfCoveringAnnotations.put(annotation.getId());
+ public void setLocation(int location) {
+ this.location = location;
}
}
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 3580d5cd93e..8a8cacc31f5 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
@@ -24,7 +24,8 @@ import org.json.JSONArray;
public class DispoAnnotationData implements Identifiable<String> {
private String id;
- private JSONArray notesList;
+ private int index;
+ private String notes;
private String locationRefs;
private boolean isConnected;
private JSONArray idsOfCoveredDiscrepancies;
@@ -37,7 +38,7 @@ public class DispoAnnotationData implements Identifiable<String> {
@Override
public String getGuid() {
- return id;
+ return String.valueOf(id);
}
@Override
@@ -49,8 +50,12 @@ public class DispoAnnotationData implements Identifiable<String> {
return id;
}
- public JSONArray getNotesList() {
- return notesList;
+ public int getIndex() {
+ return index;
+ }
+
+ public String getNotes() {
+ return notes;
}
public String getLocationRefs() {
@@ -77,14 +82,18 @@ public class DispoAnnotationData implements Identifiable<String> {
this.locationRefs = locationRefs;
}
- public void setNotesList(JSONArray notesList) {
- this.notesList = notesList;
+ public void setNotes(String notes) {
+ this.notes = notes;
}
public void setId(String id) {
this.id = id;
}
+ public void setIndex(int index) {
+ this.index = index;
+ }
+
public void setIsConnected(boolean isConnected) {
this.isConnected = isConnected;
}
@@ -109,6 +118,11 @@ public class DispoAnnotationData implements Identifiable<String> {
return isConnected && isResolutionValid;
}
+ public void disconnect() {
+ this.isConnected = false;
+ this.idsOfCoveredDiscrepancies = new JSONArray();
+ }
+
@Override
public boolean matches(Identity<?>... identities) {
for (Identity<?> identity : identities) {
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 bfe532cc2bd..550d8fc9102 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
@@ -30,7 +30,9 @@ public interface DispoItem extends Identifiable<String> {
String getStatus();
- JSONArray getDiscrepanciesList();
+ String getVersion();
- JSONObject getAnnotationsList();
+ JSONObject getDiscrepanciesList();
+
+ JSONArray getAnnotationsList();
}
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 5dd77eede0e..a4c4f2b1def 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
@@ -29,8 +29,9 @@ public class DispoItemData implements DispoItem {
private Date creationDate;
private Date lastUpdate;
private String status;
- private JSONArray discrepanciesList;
- private JSONObject annotationsList;
+ private String version;
+ private JSONObject discrepanciesList;
+ private JSONArray annotationsList;
public DispoItemData() {
@@ -67,12 +68,17 @@ public class DispoItemData implements DispoItem {
}
@Override
- public JSONArray getDiscrepanciesList() {
+ public String getVersion() {
+ return version;
+ }
+
+ @Override
+ public JSONObject getDiscrepanciesList() {
return discrepanciesList;
}
@Override
- public JSONObject getAnnotationsList() {
+ public JSONArray getAnnotationsList() {
return annotationsList;
}
@@ -80,11 +86,11 @@ public class DispoItemData implements DispoItem {
this.name = name;
}
- public void setDiscrepanciesList(JSONArray discrepanciesList) {
+ public void setDiscrepanciesList(JSONObject discrepanciesList) {
this.discrepanciesList = discrepanciesList;
}
- public void setAnnotationsList(JSONObject annotationsList) {
+ public void setAnnotationsList(JSONArray annotationsList) {
this.annotationsList = annotationsList;
}
@@ -92,6 +98,10 @@ public class DispoItemData implements DispoItem {
this.status = status;
}
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
public void setLastUpdate(Date lastUpdate) {
this.lastUpdate = lastUpdate;
}
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 6f77bb24e4f..995e0933f3a 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
@@ -22,10 +22,7 @@ public interface DispoSet extends Identifiable<String> {
String getImportPath();
- String getStatusCount();
-
JSONArray getNotesList();
String getImportState();
-
}
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 d13463aff4d..2a7b923c2e0 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
@@ -22,16 +22,10 @@ import org.json.JSONArray;
@XmlRootElement(name = "DispoSetData")
public class DispoSetData extends DispoSetDescriptorData implements DispoSet {
- public enum DispositionOperationsEnum {
- NEW_IMPORT,
- RE_IMPORT
- }
-
private String guid;
- private DispositionOperationsEnum operation;
+ private String operation;
private JSONArray notesList;
private String importState;
- private String statusCount;
public DispoSetData() {
@@ -46,11 +40,11 @@ public class DispoSetData extends DispoSetDescriptorData implements DispoSet {
this.guid = guid;
}
- public DispositionOperationsEnum getOperation() {
+ public String getOperation() {
return operation;
}
- public void setOperation(DispositionOperationsEnum operation) {
+ public void setOperation(String operation) {
this.operation = operation;
}
@@ -73,15 +67,6 @@ public class DispoSetData extends DispoSetDescriptorData implements DispoSet {
}
@Override
- public String getStatusCount() {
- return statusCount;
- }
-
- public void setStatusCount(String statusCount) {
- this.statusCount = statusCount;
- }
-
- @Override
public boolean matches(Identity<?>... identities) {
for (Identity<?> identity : identities) {
if (equals(identity)) {
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoStrings.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoStrings.java
index b49e3103b47..78ab8f3dddf 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoStrings.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoStrings.java
@@ -44,5 +44,10 @@ public class DispoStrings {
public static final String Item_Complete = "COMPLETE";
public static final String Item_InComplete = "INCOMPLETE";
+ public static final String Operation_NewImport = "New_Import";
+ public static final String Operation_ReImport = "Re_Import";
+
+ public static final String DeletedDiscrepancy = "Deleted Discrepancy";
+
public static final String Dispo_Config_Art = "Dispo_Config";
}

Back to the top