Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2014-07-10 18:12:42 +0000
committerRoberto E. Escobar2014-08-28 23:59:21 +0000
commit5d08615ad65ef6b236fc50a55722e9cd09c4492e (patch)
tree9ca714aa48692ed81f94e1f1efef68e6daea2860 /plugins/org.eclipse.osee.ats.core
parent83ec09fb7705f8e596736d8aab99d8e8143efcf6 (diff)
downloadorg.eclipse.osee-5d08615ad65ef6b236fc50a55722e9cd09c4492e.tar.gz
org.eclipse.osee-5d08615ad65ef6b236fc50a55722e9cd09c4492e.tar.xz
org.eclipse.osee-5d08615ad65ef6b236fc50a55722e9cd09c4492e.zip
feature[ats_ATS64164]: CPA: Create CpaResource
Diffstat (limited to 'plugins/org.eclipse.osee.ats.core')
-rw-r--r--plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF3
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaDecision.java132
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaFactory.java61
-rw-r--r--plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaProgram.java24
4 files changed, 220 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF
index af97834ea0f..5c6e91d32a1 100644
--- a/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.ats.core/META-INF/MANIFEST.MF
@@ -15,9 +15,11 @@ Import-Package: com.google.inject,
org.eclipse.osee.ats.api,
org.eclipse.osee.ats.api.ai,
org.eclipse.osee.ats.api.commit,
+ org.eclipse.osee.ats.api.cpa,
org.eclipse.osee.ats.api.data,
org.eclipse.osee.ats.api.ev,
org.eclipse.osee.ats.api.notify,
+ org.eclipse.osee.ats.api.program,
org.eclipse.osee.ats.api.review,
org.eclipse.osee.ats.api.rule,
org.eclipse.osee.ats.api.team,
@@ -52,6 +54,7 @@ Export-Package: org.eclipse.osee.ats.core,
org.eclipse.osee.ats.core.ai,
org.eclipse.osee.ats.core.column,
org.eclipse.osee.ats.core.config,
+ org.eclipse.osee.ats.core.cpa,
org.eclipse.osee.ats.core.internal.state,
org.eclipse.osee.ats.core.model,
org.eclipse.osee.ats.core.model.impl,
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaDecision.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaDecision.java
new file mode 100644
index 00000000000..6bdd975cb1c
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaDecision.java
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2014 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.ats.core.cpa;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import org.eclipse.osee.ats.api.cpa.IAtsCpaDecision;
+import org.eclipse.osee.framework.jdk.core.type.UuidNamedIdentity;
+
+/**
+ * @author Donald G. Dunne
+ */
+@XmlRootElement
+public class CpaDecision extends UuidNamedIdentity<String> implements IAtsCpaDecision {
+
+ String applicability, rationale, assignees, pcrSystem, origPcrLocation, decisionLocation, duplicatedPcrLocation,
+ originatingProgram, completedBy, completedDate;
+ boolean complete = false;
+
+ public CpaDecision(String id, String name) {
+ super(id, name);
+ }
+
+ @Override
+ public String getRationale() {
+ return rationale;
+ }
+
+ public void setRationale(String rationale) {
+ this.rationale = rationale;
+ }
+
+ @Override
+ public boolean isComplete() {
+ return complete;
+ }
+
+ public void setComplete(Boolean complete) {
+ this.complete = complete;
+ }
+
+ public String getPcrSystem() {
+ return pcrSystem;
+ }
+
+ public void setPcrSystem(String pcrSystem) {
+ this.pcrSystem = pcrSystem;
+ }
+
+ @Override
+ public String getAssignees() {
+ return assignees;
+ }
+
+ public void setAssignees(String assignees) {
+ this.assignees = assignees;
+ }
+
+ public String getOrigPcrLocation() {
+ return origPcrLocation;
+ }
+
+ public void setOrigPcrLocation(String origPcrLocation) {
+ this.origPcrLocation = origPcrLocation;
+ }
+
+ public String getDecisionLocation() {
+ return decisionLocation;
+ }
+
+ public void setDecisionLocation(String decisionLocation) {
+ this.decisionLocation = decisionLocation;
+ }
+
+ public String getDuplicatedPcrLocation() {
+ return duplicatedPcrLocation;
+ }
+
+ public void setDuplicatedPcrLocation(String duplicatedPcrLocation) {
+ this.duplicatedPcrLocation = duplicatedPcrLocation;
+ }
+
+ public String getOriginatingProgram() {
+ return originatingProgram;
+ }
+
+ public void setOriginatingProgram(String originatingProgram) {
+ this.originatingProgram = originatingProgram;
+ }
+
+ @Override
+ public String completedBy() {
+ return null;
+ }
+
+ @Override
+ public String completedDate() {
+ return null;
+ }
+
+ public String getCompletedBy() {
+ return completedBy;
+ }
+
+ public void setCompletedBy(String completedBy) {
+ this.completedBy = completedBy;
+ }
+
+ public String getCompletedDate() {
+ return completedDate;
+ }
+
+ public void setCompletedDate(String completedDate) {
+ this.completedDate = completedDate;
+ }
+
+ public String getApplicability() {
+ return applicability;
+ }
+
+ public void setApplicability(String applicability) {
+ this.applicability = applicability;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaFactory.java
new file mode 100644
index 00000000000..15b88b643a1
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaFactory.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2014 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.ats.core.cpa;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.eclipse.osee.ats.api.cpa.IAtsCpaDecision;
+import org.eclipse.osee.ats.api.program.IAtsProgram;
+import org.eclipse.osee.ats.api.workflow.IAtsTeamWorkflow;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class CpaFactory {
+
+ private static final Map<String, Object> idToStoreObject = new HashMap<String, Object>(500);
+ public static final String CPA_BASEPATH_KEY = "ats.cpa.basepath";
+
+ public static CpaProgram get(IAtsProgram program) {
+ return getProgram(program, null);
+ }
+
+ public static CpaProgram getProgram(IAtsProgram program, Object storeObject) {
+ CpaProgram prog = new CpaProgram(program.getUuid(), program.getName());
+ setStoreObject(String.valueOf(program.getUuid()), storeObject);
+ return prog;
+ }
+
+ private static void setStoreObject(String key, Object object) {
+ idToStoreObject.put(key, object);
+ }
+
+ public static Object getStoreObject(Object obj) {
+ Object result = null;
+ if (obj instanceof IAtsProgram) {
+ result = idToStoreObject.get(((IAtsProgram) obj).getUuid());
+ } else if (obj instanceof IAtsCpaDecision) {
+ result = idToStoreObject.get(((IAtsCpaDecision) obj).getUuid());
+ }
+ return result;
+ }
+
+ public static CpaDecision getDecision(IAtsTeamWorkflow teamWf) {
+ return getDecision(teamWf, null);
+ }
+
+ public static CpaDecision getDecision(IAtsTeamWorkflow teamWf, Object storeObject) {
+ CpaDecision decision = new CpaDecision(teamWf.getAtsId(), teamWf.getName());
+ setStoreObject(teamWf.getAtsId(), storeObject);
+ return decision;
+ }
+
+}
diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaProgram.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaProgram.java
new file mode 100644
index 00000000000..ec404b1ed26
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/cpa/CpaProgram.java
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2014 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.ats.core.cpa;
+
+import org.eclipse.osee.ats.api.cpa.IAtsCpaProgram;
+import org.eclipse.osee.framework.jdk.core.type.UuidNamedIdentity;
+
+/**
+ * @author Donald G. Dunne
+ */
+public class CpaProgram extends UuidNamedIdentity<Long> implements IAtsCpaProgram {
+
+ public CpaProgram(Long uuid, String name) {
+ super(uuid, name);
+ }
+}

Back to the top