Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/model/AgileSprint.java')
-rw-r--r--plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/model/AgileSprint.java49
1 files changed, 49 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/model/AgileSprint.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/model/AgileSprint.java
new file mode 100644
index 00000000000..75a720a706b
--- /dev/null
+++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/model/AgileSprint.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2015 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.rest.internal.agile.model;
+
+import org.eclipse.osee.ats.api.agile.IAgileSprint;
+import org.eclipse.osee.ats.api.data.AtsRelationTypes;
+import org.eclipse.osee.ats.rest.IAtsServer;
+import org.eclipse.osee.ats.rest.internal.workitem.model.WorkItem;
+import org.eclipse.osee.framework.core.exception.ArtifactDoesNotExist;
+import org.eclipse.osee.logger.Log;
+import org.eclipse.osee.orcs.data.ArtifactReadable;
+
+/**
+ * @author Donald G Dunne
+ */
+public class AgileSprint extends WorkItem implements IAgileSprint {
+
+ public AgileSprint(Log logger, IAtsServer atsServer, ArtifactReadable artifact) {
+ super(logger, atsServer, artifact);
+ }
+
+ @Override
+ public boolean isActive() {
+ return getStateMgr().getStateType().isInWork();
+ }
+
+ @Override
+ public long getTeamUuid() {
+ long result = 0;
+ try {
+ ArtifactReadable agileTeam = artifact.getRelated(AtsRelationTypes.AgileTeamToSprint_AgileTeam).getOneOrNull();
+ if (agileTeam != null) {
+ result = agileTeam.getUuid();
+ }
+ } catch (ArtifactDoesNotExist ex) {
+ // do nothing
+ }
+ return result;
+ }
+
+}

Back to the top