blob: a626bb9f19bb9dffeb48a47b010aec5f622aaf3e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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.IAgileBacklog;
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 AgileBacklog extends WorkItem implements IAgileBacklog {
public AgileBacklog(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.AgileTeamToBacklog_AgileTeam).getOneOrNull();
if (agileTeam != null) {
result = agileTeam.getUuid();
}
} catch (ArtifactDoesNotExist ex) {
// do nothing
}
return result;
}
}
|