Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Avila2014-01-06 15:28:31 -0500
committerRyan D. Brooks2014-01-06 15:28:31 -0500
commit21cd0edf1727147e19802a2626f3a8051cfc9f32 (patch)
tree56e8625d59ad7864f5358b9a15a05f68ff7e1c0a /plugins/org.eclipse.osee.disposition.rest.model
parent8bc75ed4fff5f4e07811929d5542e32520e05e6d (diff)
downloadorg.eclipse.osee-21cd0edf1727147e19802a2626f3a8051cfc9f32.tar.gz
org.eclipse.osee-21cd0edf1727147e19802a2626f3a8051cfc9f32.tar.xz
org.eclipse.osee-21cd0edf1727147e19802a2626f3a8051cfc9f32.zip
feature[ats_EWFPC]: Create Disposition REST API
Create Disposition business logic Create Disposition tests Create Disposition REST API Change-Id: I6aad85db0d79c44608a504584d88225eaa5424b8
Diffstat (limited to 'plugins/org.eclipse.osee.disposition.rest.model')
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/pom.xml4
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoAnnotationData.java50
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItem.java3
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoItemData.java7
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSet.java2
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoSetData.java1
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoStrings.java48
-rw-r--r--plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/LocationRange.java5
8 files changed, 100 insertions, 20 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/pom.xml b/plugins/org.eclipse.osee.disposition.rest.model/pom.xml
index 37aa351547..f24d7924f0 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/pom.xml
+++ b/plugins/org.eclipse.osee.disposition.rest.model/pom.xml
@@ -5,9 +5,9 @@
<parent>
<groupId>org.eclipse.osee</groupId>
- <artifactId>org.eclipse.osee.x.server.parent</artifactId>
+ <artifactId>org.eclipse.osee.disposition.parent</artifactId>
<version>0.17.0-SNAPSHOT</version>
- <relativePath>../../plugins/org.eclipse.osee.x.server.parent</relativePath>
+ <relativePath>../../plugins/org.eclipse.osee.disposition.parent</relativePath>
</parent>
<artifactId>org.eclipse.osee.disposition.rest.model</artifactId>
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 ff356ba940..3580d5cd93 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
@@ -23,17 +23,29 @@ import org.json.JSONArray;
@XmlRootElement(name = "DispoAnnotationData")
public class DispoAnnotationData implements Identifiable<String> {
- private int id;
+ private String id;
private JSONArray notesList;
private String locationRefs;
- private boolean isValid;
+ private boolean isConnected;
private JSONArray idsOfCoveredDiscrepancies;
+ private String resolution;
+ private boolean isResolutionValid;
public DispoAnnotationData() {
}
- public int getId() {
+ @Override
+ public String getGuid() {
+ return id;
+ }
+
+ @Override
+ public String getName() {
+ return locationRefs;
+ }
+
+ public String getId() {
return id;
}
@@ -49,8 +61,16 @@ public class DispoAnnotationData implements Identifiable<String> {
return idsOfCoveredDiscrepancies;
}
- public boolean getIsValid() {
- return isValid;
+ public boolean getIsConnected() {
+ return isConnected;
+ }
+
+ public String getResolution() {
+ return resolution;
+ }
+
+ public boolean getIsResolutionValid() {
+ return isResolutionValid;
}
public void setLocationRefs(String locationRefs) {
@@ -61,32 +81,34 @@ public class DispoAnnotationData implements Identifiable<String> {
this.notesList = notesList;
}
- public void setId(int id) {
+ public void setId(String id) {
this.id = id;
}
- public void setIsValid(boolean isValid) {
- this.isValid = isValid;
+ public void setIsConnected(boolean isConnected) {
+ this.isConnected = isConnected;
}
public void setIdsOfCoveredDiscrepancies(JSONArray idsOfCoveredDiscrepancies) {
this.idsOfCoveredDiscrepancies = idsOfCoveredDiscrepancies;
}
- @Override
- public String getGuid() {
- return String.valueOf(id);
+ public void setResolution(String resolution) {
+ this.resolution = resolution;
}
- @Override
- public String getName() {
- return locationRefs;
+ public void setIsResolutionValid(boolean isResolutionValid) {
+ this.isResolutionValid = isResolutionValid;
}
public void addCoveredDiscrepancyIndex(Discrepancy discrepancy) {
idsOfCoveredDiscrepancies.put(discrepancy.getId());
}
+ public boolean isValid() {
+ return isConnected && isResolutionValid;
+ }
+
@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 79231b451e..bfe532cc2b 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
@@ -14,6 +14,7 @@ package org.eclipse.osee.disposition.model;
import java.util.Date;
import org.eclipse.osee.framework.jdk.core.type.Identifiable;
import org.json.JSONArray;
+import org.json.JSONObject;
/**
* @author Angel Avila
@@ -31,5 +32,5 @@ public interface DispoItem extends Identifiable<String> {
JSONArray getDiscrepanciesList();
- JSONArray getAnnotationsList();
+ JSONObject 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 389d66f5ca..5dd77eede0 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
@@ -15,6 +15,7 @@ import java.util.Date;
import javax.xml.bind.annotation.XmlRootElement;
import org.eclipse.osee.framework.jdk.core.type.Identity;
import org.json.JSONArray;
+import org.json.JSONObject;
/**
* @author Angel Avila
@@ -29,7 +30,7 @@ public class DispoItemData implements DispoItem {
private Date lastUpdate;
private String status;
private JSONArray discrepanciesList;
- private JSONArray annotationsList;
+ private JSONObject annotationsList;
public DispoItemData() {
@@ -71,7 +72,7 @@ public class DispoItemData implements DispoItem {
}
@Override
- public JSONArray getAnnotationsList() {
+ public JSONObject getAnnotationsList() {
return annotationsList;
}
@@ -83,7 +84,7 @@ public class DispoItemData implements DispoItem {
this.discrepanciesList = discrepanciesList;
}
- public void setAnnotationsList(JSONArray annotationsList) {
+ public void setAnnotationsList(JSONObject annotationsList) {
this.annotationsList = annotationsList;
}
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 234214e551..6f77bb24e4 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
@@ -26,4 +26,6 @@ public interface DispoSet extends Identifiable<String> {
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 8d2cca2a16..d13463aff4 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
@@ -63,6 +63,7 @@ public class DispoSetData extends DispoSetDescriptorData implements DispoSet {
return notesList;
}
+ @Override
public String getImportState() {
return importState;
}
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
new file mode 100644
index 0000000000..b49e3103b4
--- /dev/null
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoStrings.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.osee.disposition.model;
+
+/**
+ * @author Angel Avila
+ */
+
+public class DispoStrings {
+
+ private DispoStrings() {
+ //
+ }
+
+ // Messages
+ public static final String Program_NoneFound = "There are currently no disposition sets available on this branch";
+ public static final String Program_NotFound = "Dispositon Program was not found";
+
+ public static final String Set_NoneFound = "There are currently no disposition sets available on this branch";
+ public static final String Set_ConflictingNames = "Can't create sets with the same name";
+ public static final String Set_ErrorCreating = "Could not create set";
+ public static final String Set_EmptyNameOrPath = "The Set must have a name and import path";
+ public static final String Set_NotFound = "Dispositon Set was not found";
+
+ public static final String Item_EmptyName = "The Item must have a name";
+ public static final String Item_ConflictingNames = "Can't create items with the same name";
+ public static final String Item_NoneFound = "There are currently no disposition items available under this set";
+ public static final String Item_NotFound = "Dispositonable Item was not found";
+
+ public static final String Annotation_EmptyLocRef = "The Annotation must have a valid location reference";
+ public static final String Annotation_NoneFound = "There are currently no annotations available under this item";
+ public static final String Annotation_NotFound = "Annotation was not found";
+
+ public static final String Item_Pass = "PASS";
+ public static final String Item_Complete = "COMPLETE";
+ public static final String Item_InComplete = "INCOMPLETE";
+
+ public static final String Dispo_Config_Art = "Dispo_Config";
+}
diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/LocationRange.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/LocationRange.java
index 4eb1d35fb9..eb2139b6f5 100644
--- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/LocationRange.java
+++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/LocationRange.java
@@ -25,6 +25,11 @@ public class LocationRange {
public LocationRange() {
}
+ public LocationRange(int start) {
+ this.start = start;
+ this.end = start;
+ }
+
public LocationRange(int start, int end) {
this.start = start;
this.end = end;

Back to the top