diff options
Diffstat (limited to 'vid-app-common/src/main')
9 files changed, 16 insertions, 30 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/PombaRestInterface.java b/vid-app-common/src/main/java/org/onap/vid/aai/PombaRestInterface.java index b118901a4..2f69e397c 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/PombaRestInterface.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/PombaRestInterface.java @@ -4,6 +4,7 @@ * ================================================================================ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2018 - 2019 Nokia. All rights reserved. + * Modifications Copyright (C) 2019 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,13 +36,13 @@ import java.util.UUID; import static org.onap.vid.utils.Logging.REQUEST_ID_HEADER_KEY; public class PombaRestInterface extends AAIRestInterface { + + private Client client = null; public PombaRestInterface (HttpsAuthClient httpsAuthClientFactory, ServletRequestHelper servletRequestHelper, SystemPropertyHelper systemPropertyHelper) { super(httpsAuthClientFactory, servletRequestHelper, systemPropertyHelper); } - private Client client = null; - @Override protected void initRestClient() { diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java index d03362ba8..af665f849 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/SubscriberListWithFilterData.java @@ -3,6 +3,7 @@ * VID * ================================================================================ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,6 +32,8 @@ import java.util.List; * Created by Oren on 7/5/17. */ public class SubscriberListWithFilterData { + + public List<SubscriberWithFilter> customer; public SubscriberListWithFilterData(SubscriberList subscriberList, RoleValidator roleValidator){ List<Subscriber> subscribers = subscriberList != null ? subscriberList.customer : new ArrayList<>(); @@ -46,5 +49,4 @@ public class SubscriberListWithFilterData { } } - public List<SubscriberWithFilter> customer; } diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/ResourceType.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/ResourceType.java index 83a3cae1d..4d49b5806 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/model/ResourceType.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/ResourceType.java @@ -37,7 +37,7 @@ public enum ResourceType { INSTANCE_GROUP("instance-groups", "instance-group-name"), VOLUME_GROUP("volume-groups", "volume-group-name"); - private static Map<String, ResourceType> AAI_FORMAT_MAP = Stream + private static final Map<String, ResourceType> AAI_FORMAT_MAP = Stream .of(ResourceType.values()) .collect(Collectors.toMap(s -> s.aaiFormat, Function.identity())); diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/SSLContextProvider.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/SSLContextProvider.java index 8a674609d..400e788d0 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/util/SSLContextProvider.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/SSLContextProvider.java @@ -34,7 +34,7 @@ public class SSLContextProvider { private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SSLContextProvider.class); - public SSLContext getSslContext(String keystorePath, String keystorePassword, HttpClientMode httpClientMode) throws HttpClientBuilderException { + public SSLContext getSslContext(String keystorePath, String keystorePassword, HttpClientMode httpClientMode){ try { final SSLContext ctx = SSLContext.getInstance("TLSv1.2"); KeyManager[] keyManagers = getKeyManagerFactory(keystorePath, keystorePassword, httpClientMode); diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Group.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Group.java index e1d2544b7..132987a22 100644 --- a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Group.java +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Group.java @@ -38,7 +38,7 @@ public class Group { private ToscaMetadata metadata; /** The vf module type. */ - private String vf_module_type; + private String vfModuleType; /** The properties. */ private Map<String, Object> properties; @@ -103,7 +103,7 @@ public class Group { * @return the vf module type */ public String getvf_module_type() { - return vf_module_type; + return vfModuleType; } /** @@ -111,8 +111,8 @@ public class Group { * * @param vf_module_type the new vf module type */ - public void setvf_module_type(String vf_module_type) { - this.vf_module_type = vf_module_type; + public void setvf_module_type(String vfModuleType) { + this.vfModuleType = vfModuleType; } /** diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java index 5171b7ac8..626816f7f 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoUtil.java @@ -49,7 +49,8 @@ public class MsoUtil { if (httpResponse.getRawBody() != null) { try { T body = httpResponse.getBody(); - String entityStr = body instanceof String ? (String) body : JACKSON_OBJECT_MAPPER.writeValueAsString(httpResponse.getBody()); + String entityStr = (body instanceof String || body==null) ? (String) body : + JACKSON_OBJECT_MAPPER.writeValueAsString(httpResponse.getBody()); msoResponseWrapper.setEntity(entityStr); } catch(JsonProcessingException e) { ExceptionUtils.rethrow(e); diff --git a/vid-app-common/src/main/webapp/WEB-INF/web.xml b/vid-app-common/src/main/webapp/WEB-INF/web.xml deleted file mode 100755 index 7f0a40ef2..000000000 --- a/vid-app-common/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee"
- xmlns:web="http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
- version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee">
-
- <display-name>vid-common</display-name>
-
- <!-- The app can function on a HA cluster -->
- <distributable />
-
- <session-config>
- <session-timeout>7</session-timeout>
- <tracking-mode>COOKIE</tracking-mode>
- </session-config>
-
-</web-app>
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js index 072adf305..e66b8ff6c 100755 --- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js @@ -531,7 +531,7 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER", $scope.isPermitted = first.isPermitted;
deferred.resolve(first.isPermitted);
} else {
- deferred.reject("some error while resolveIfIsPermitted")
+ deferred.reject("some error while resolveIfIsPermitted");
}
});
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js index e545aadb1..6b45a7479 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/services/change-management.service.js @@ -119,8 +119,7 @@ }); return deferred.promise; - }; - + }; this.postChangeManagementNow = function (requestData, vnfName) { var url = COMPONENT.CHANGE_MANAGEMENT_OPERATION_NO_SCHEDULER.replace('@vnfName', vnfName); return $http.post(url, requestData) |