1 package org.onap.simulator.presetGenerator.presets.aai;
3 import static vid.automation.test.utils.ReadFile.loadResourceAsString;
5 import com.google.common.collect.ImmutableMap;
6 import java.util.Collections;
9 import org.onap.simulator.presetGenerator.presets.BasePresets.BaseAAIPreset;
10 import org.springframework.http.HttpMethod;
12 public class PresetAAIGetSubDetailsGet extends BaseAAIPreset {
13 private String subscriberId;
14 private String responseBody;
16 private static final String baseResponseBody = loadResourceAsString("presets_templates/PresetAAIGetSubDetailsGet.json");
17 private static final String GLOBAL_CUSTOMER_ID = "GLOBAL_CUSTOMER_ID";
18 private static final String ORCH_STATUS = "<ORCH_STATUS>";
20 public PresetAAIGetSubDetailsGet(String subscriberId) {
21 this.subscriberId = subscriberId == null ? "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb" : subscriberId;
22 this.responseBody = baseResponseBody.replace(GLOBAL_CUSTOMER_ID, this.subscriberId);
25 public PresetAAIGetSubDetailsGet(String subscriberId, String orchStatus) {
26 this.subscriberId = subscriberId == null ? "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb" : subscriberId;
27 this.responseBody = baseResponseBody.replace(GLOBAL_CUSTOMER_ID, this.subscriberId);
28 this.responseBody = this.responseBody.replace("\"subscriber-name\":\"Emanuel\"", "\"subscriber-name\":\"SILVIA ROBBINS\"");
29 this.responseBody = this.responseBody.replaceAll(ORCH_STATUS, orchStatus);
33 public Map<String, List> getQueryParams() {
34 return ImmutableMap.of("depth", Collections.singletonList("2"));
38 public Object getResponseBody() {
43 public HttpMethod getReqMethod() {
44 return HttpMethod.GET;
48 public String getReqPath() {
49 return getRootPath() + "/business/customers/customer/" + getSubscriberId();
52 public String getSubscriberId() {