import org.onap.vid.mso.RestMsoImplementation;
import org.onap.vid.mso.RestObject;
import org.onap.vid.utils.Logging;
+import org.onap.vid.utils.SystemPropertiesWrapper;
/**
*/
EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoRestClientNew.class);
- public MsoRestClientNew(SyncRestClient client, String baseUrl, HttpsAuthClient authClient) {
- super(authClient);
+ public MsoRestClientNew(SyncRestClient client, String baseUrl, HttpsAuthClient authClient, SystemPropertiesWrapper systemPropertiesWrapper) {
+ super(authClient,systemPropertiesWrapper);
this.client = client;
this.baseUrl = baseUrl;
this.commonHeaders = initCommonHeaders();
}
private Map<String, String> initCommonHeaders() {
- String username = SystemProperties.getProperty(MsoProperties.MSO_USER_NAME);
- String password = SystemProperties.getProperty(MsoProperties.MSO_PASSWORD);
+ String username = systemProperties.getProperty(MsoProperties.MSO_USER_NAME);
+ String password = systemProperties.getProperty(MsoProperties.MSO_PASSWORD);
String decrypted_password = Password.deobfuscate(password);
String authString = username + ":" + decrypted_password;
map.put(HttpHeaders.AUTHORIZATION, "Basic " + authStringEnc);
map.put(HttpHeaders.ACCEPT, MediaType.APPLICATION_JSON);
map.put(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON);
- map.put(X_FROM_APP_ID, SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME));
+ map.put(X_FROM_APP_ID, systemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME));
map.put(SystemProperties.ECOMP_REQUEST_ID, Logging.extractOrGenerateRequestId());
return ImmutableMap.copyOf(map);
}