blob: d1bf5c673149e51ee4bc266a5592b4702152bc94 (
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
|
/*******************************************************************************
* Copyright (c) 2017 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.framework.skynet.core.utility;
import java.util.List;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.FeatureDefinitionData;
import org.eclipse.osee.framework.jdk.core.type.HashCollection;
import org.eclipse.osee.framework.skynet.core.internal.ServiceUtil;
import org.eclipse.osee.orcs.rest.client.OseeClient;
/**
* @author David W. Miller
*/
public class ApplicabilityUtility {
public static HashCollection<String, String> getValidFeatureValuesForBranch(BranchId branch) {
OseeClient oseeClient = ServiceUtil.getOseeClient();
List<FeatureDefinitionData> featureDefinitionData =
oseeClient.getApplicabilityEndpoint(branch).getFeatureDefinitionData();
HashCollection<String, String> validFeatureValues = new HashCollection<>();
for (FeatureDefinitionData feat : featureDefinitionData) {
validFeatureValues.put(feat.getName().toUpperCase(), feat.getValues());
}
return validFeatureValues;
}
}
|