Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2014-07-29 19:39:03 +0000
committerRoberto E. Escobar2014-09-29 22:54:55 +0000
commitbe16dcc01d7c3c5b9958bf8e626fb8b011982511 (patch)
tree975dc4dc93e1d3666d00a63fe48e2c79087e6c5c
parentdd9df47229f7c9175caedd186018c85f99246537 (diff)
downloadorg.eclipse.osee-be16dcc01d7c3c5b9958bf8e626fb8b011982511.tar.gz
org.eclipse.osee-be16dcc01d7c3c5b9958bf8e626fb8b011982511.tar.xz
org.eclipse.osee-be16dcc01d7c3c5b9958bf8e626fb8b011982511.zip
feature[ats_ATS64164]: CPA: Get applicability options from enum type
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java
index 6a46af7daa3..a798af347b9 100644
--- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/cpa/CpaResource.java
@@ -56,6 +56,7 @@ import org.eclipse.osee.framework.jdk.core.util.DateUtil;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.jaxrs.OseeWebApplicationException;
import org.eclipse.osee.orcs.data.ArtifactReadable;
+import org.eclipse.osee.orcs.data.EnumEntry;
import org.eclipse.osee.orcs.search.QueryBuilder;
/**
@@ -283,8 +284,10 @@ public final class CpaResource {
@Produces(MediaType.APPLICATION_JSON)
public CpaConfig getConfigs() throws Exception {
CpaConfig config = new CpaConfig();
- config.getApplicabilityOptions().add("Yes");
- config.getApplicabilityOptions().add("No");
+ for (EnumEntry entry : orcsApi.getOrcsTypes(null).getAttributeTypes().getEnumType(
+ AtsAttributeTypes.ApplicableToProgram).values()) {
+ config.getApplicabilityOptions().add(entry.getName());
+ }
for (IAtsCpaService service : cpaRegistry.getServices()) {
config.getTools().add(new CpaConfigTool(service.getId()));
}

Back to the top