blob: 82f22c2e33baf6a9128be9cb5c186da5c6df969e (
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
|
/*******************************************************************************
* 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.ats.core.internal.column.ev;
import org.eclipse.osee.ats.api.IAtsServices;
import org.eclipse.osee.ats.api.data.AtsAttributeTypes;
import org.eclipse.osee.ats.api.ev.IAtsEarnedValueServiceProvider;
import org.eclipse.osee.ats.api.ev.IAtsWorkPackage;
import org.eclipse.osee.framework.core.data.ArtifactToken;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
/**
* @author Donald G. Dunne
*/
public class WorkPackageProgramColumn extends AbstractRelatedWorkPackageColumn {
public WorkPackageProgramColumn(IAtsEarnedValueServiceProvider earnedValueServiceProvider, IAtsServices services) {
super(earnedValueServiceProvider, services);
}
@Override
protected String getColumnValue(IAtsWorkPackage workPkg) {
try {
return workPkg.getWorkPackageProgram();
} catch (OseeCoreException ex) {
return AtsColumnService.CELL_ERROR_PREFIX + " - " + ex.getLocalizedMessage();
}
}
@Override
protected String getColumnValue(ArtifactToken wpArt) {
if (services == null) {
return "";
}
return services.getAttributeResolver().getSoleAttributeValue(wpArt, AtsAttributeTypes.WorkPackageProgram, "");
}
}
|