diff options
author | 2018-02-20 18:03:30 +0200 | |
---|---|---|
committer | 2018-02-27 14:47:52 +0200 | |
commit | efedea1c5d80532f5b1180d57c8dafce5dcb302a (patch) | |
tree | c4bdefe8758b01f31c9e91a9ded0ab989daeb5e2 /vid-app-common/src/main/java/org/onap/vid | |
parent | b94bd70f1595fad9546c3506393613f68504f495 (diff) |
org.onap migration
Change-Id: I5e2d01a6da21d4003c910b5fe0702b35c2089a77
Issue-ID: VID-86
Signed-off-by: Ofir Sonsino <os0695@intl.att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid')
71 files changed, 146 insertions, 130 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java index 2b8cf3a0..6ed34590 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/AaiClient.java @@ -7,7 +7,7 @@ import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.onap.vid.aai.util.AAIRestInterface; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.aai.model.AaiGetAicZone.AicZones; import org.onap.vid.aai.model.AaiGetOperationalEnvironments.OperationalEnvironmentList; import org.onap.vid.aai.model.*; diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIProperties.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIProperties.java index 254584ca..d76bde83 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIProperties.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIProperties.java @@ -21,7 +21,7 @@ package org.onap.vid.aai.util; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.util.SystemProperties; /** * The Class AAIProperties. diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java index 13b7d30b..226850d2 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/AAIRestInterface.java @@ -35,8 +35,8 @@ import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import com.att.eelf.configuration.EELFLogger; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.eclipse.jetty.util.security.Password; import org.onap.vid.utils.Logging; import org.springframework.http.HttpMethod; @@ -292,12 +292,17 @@ public class AAIRestInterface { initRestClient(); url = SystemProperties.getProperty(AAIProperties.AAI_SERVER_URL) + path; + String vidUsername = SystemProperties.getProperty(AAIProperties.AAI_VID_USERNAME); + String vidPassword = Password.deobfuscate(SystemProperties.getProperty(AAIProperties.AAI_VID_PASSWD_X)); + String encodeThis = vidUsername + ":" + vidPassword; + Logging.logRequest(outgoingRequestsLogger, HttpMethod.PUT, url, payload); final Response cres = client.target(url) .request() .accept(responseType) .header(TRANSACTION_ID_HEADER, transId) .header(FROM_APP_ID_HEADER, fromAppId) + .header("Authorization", "Basic " + Base64.getEncoder().encodeToString(encodeThis.getBytes("utf-8"))) .header(requestIdHeaderKey, getHttpServletRequest().getHeader(requestIdHeaderKey)) .put(Entity.entity(payload, MediaType.APPLICATION_JSON)); Logging.logResponse(outgoingRequestsLogger, HttpMethod.PUT, url, cres); diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsAuthClient.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsAuthClient.java index 0cf32cd4..3bc8e4a3 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsAuthClient.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsAuthClient.java @@ -36,8 +36,8 @@ import javax.ws.rs.client.ClientBuilder; import org.eclipse.jetty.util.security.Password; import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.HttpUrlConnectorProvider; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; /** * The Class HttpsAuthClient. */ @@ -56,7 +56,7 @@ public class HttpsAuthClient{ ClientConfig config = new ClientConfig(); //config.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE); - //config.getClasses().add(org.openecomp.aai.util.CustomJacksonJaxBJsonProvider.class); + //config.getClasses().add(org.onap.aai.util.CustomJacksonJaxBJsonProvider.class); try { diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsComponentsClient.java b/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsComponentsClient.java index 54d7f468..10022219 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsComponentsClient.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/util/HttpsComponentsClient.java @@ -31,7 +31,7 @@ import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.impl.client.HttpClients; import org.eclipse.jetty.util.security.Password; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.util.SystemProperties; /** diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl.java b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl.java index 12881b64..6635b1bf 100644 --- a/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/parser/ToscaParserImpl.java @@ -14,7 +14,7 @@ import java.util.Map.Entry; import java.util.zip.ZipFile; import org.apache.commons.lang3.mutable.MutableBoolean; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; import org.onap.vid.asdc.AsdcCatalogException; import org.onap.vid.asdc.beans.Service; diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/rest/RestfulAsdcClient.java b/vid-app-common/src/main/java/org/onap/vid/asdc/rest/RestfulAsdcClient.java index a8dc2871..1fe9df18 100644 --- a/vid-app-common/src/main/java/org/onap/vid/asdc/rest/RestfulAsdcClient.java +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/rest/RestfulAsdcClient.java @@ -21,7 +21,7 @@ package org.onap.vid.asdc.rest; import com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.asdc.AsdcCatalogException; import org.onap.vid.asdc.AsdcClient; import org.onap.vid.asdc.beans.Artifact; diff --git a/vid-app-common/src/main/java/org/onap/vid/client/HttpBasicClient.java b/vid-app-common/src/main/java/org/onap/vid/client/HttpBasicClient.java index d0a34ce3..ac057a87 100644 --- a/vid-app-common/src/main/java/org/onap/vid/client/HttpBasicClient.java +++ b/vid-app-common/src/main/java/org/onap/vid/client/HttpBasicClient.java @@ -32,7 +32,7 @@ import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.ClientProperties; import org.springframework.beans.factory.annotation.Autowired; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; /** * General HTTP client. diff --git a/vid-app-common/src/main/java/org/onap/vid/client/HttpsBasicClient.java b/vid-app-common/src/main/java/org/onap/vid/client/HttpsBasicClient.java index e81be9f6..0f8c028b 100644 --- a/vid-app-common/src/main/java/org/onap/vid/client/HttpsBasicClient.java +++ b/vid-app-common/src/main/java/org/onap/vid/client/HttpsBasicClient.java @@ -35,8 +35,8 @@ import javax.ws.rs.client.ClientBuilder; import org.eclipse.jetty.util.security.Password; import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.ClientProperties; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.onap.vid.properties.VidProperties; /** diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseEcompRequestIdFilter.java b/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseEcompRequestIdFilter.java index a83fa281..7501b103 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseEcompRequestIdFilter.java +++ b/vid-app-common/src/main/java/org/onap/vid/controller/filter/PromiseEcompRequestIdFilter.java @@ -3,7 +3,7 @@ package org.onap.vid.controller.filter; import com.google.common.collect.ImmutableList; import org.apache.commons.lang3.StringUtils; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.web.filter.GenericFilterBean; import javax.servlet.FilterChain; @@ -19,7 +19,7 @@ import java.util.Collections; import java.util.Enumeration; import java.util.UUID; -import static org.openecomp.portalsdk.core.util.SystemProperties.ECOMP_REQUEST_ID; +import static org.onap.portalsdk.core.util.SystemProperties.ECOMP_REQUEST_ID; @WebFilter(urlPatterns = "/*") public class PromiseEcompRequestIdFilter extends GenericFilterBean { diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/filter/TempFilterForCORS.java b/vid-app-common/src/main/java/org/onap/vid/controller/filter/TempFilterForCORS.java index 02dcde09..e89ae99e 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/filter/TempFilterForCORS.java +++ b/vid-app-common/src/main/java/org/onap/vid/controller/filter/TempFilterForCORS.java @@ -1,7 +1,7 @@ package org.onap.vid.controller.filter; import org.apache.commons.lang3.StringUtils; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.web.filter.GenericFilterBean; import javax.servlet.FilterChain; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAaiController.java b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAaiController.java index 29e7a4d7..c57d93cb 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAaiController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAaiController.java @@ -21,7 +21,7 @@ package org.onap.vid.controller.test; import org.codehaus.jackson.map.ObjectMapper; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.onap.vid.model.ExceptionResponse; import org.springframework.web.bind.annotation.*; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAsdcController.java b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAsdcController.java index 2b289b91..ae639647 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAsdcController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestAsdcController.java @@ -21,7 +21,7 @@ package org.onap.vid.controller.test; import org.codehaus.jackson.map.ObjectMapper; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.onap.vid.model.ExceptionResponse; import org.springframework.web.bind.annotation.*; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/test/TestMsoController.java b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestMsoController.java index 9d6a3de9..ba4476fa 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/test/TestMsoController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestMsoController.java @@ -21,7 +21,7 @@ package org.onap.vid.controller.test; import org.codehaus.jackson.map.ObjectMapper; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.onap.vid.model.ExceptionResponse; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/test/TestPageController.java b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestPageController.java index 48ccdf8d..d4c65f85 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/test/TestPageController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controller/test/TestPageController.java @@ -20,7 +20,7 @@ package org.onap.vid.controller.test; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.controller.RestrictedBaseController; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/AaiController.java index 1719ff6d..b7dfd37c 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/AaiController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/AaiController.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.vid.controller; +package org.onap.vid.controllers; import org.codehaus.jackson.JsonGenerationException; import org.codehaus.jackson.map.JsonMappingException; @@ -36,9 +36,9 @@ import org.onap.vid.roles.Role; import org.onap.vid.roles.RoleProvider; import org.onap.vid.roles.RoleValidator; import org.onap.vid.services.AaiService; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/ChangeManagementController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/ChangeManagementController.java index 4f307ed9..fc5bc0b2 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/ChangeManagementController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/ChangeManagementController.java @@ -1,11 +1,11 @@ -package org.onap.vid.controller; +package org.onap.vid.controllers; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.commons.lang3.tuple.Pair; import org.json.simple.JSONArray; -import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.controller.UnRestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.changeManagement.*; import org.onap.vid.exceptions.NotFoundException; import org.onap.vid.model.ExceptionResponse; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java b/vid-app-common/src/main/java/org/onap/vid/controllers/ControllersUtils.java index 1df4f42b..3f8cfa6a 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/ControllersUtils.java @@ -1,9 +1,9 @@ -package org.onap.vid.controller; +package org.onap.vid.controllers; import org.apache.commons.lang3.exception.ExceptionUtils; -import org.openecomp.portalsdk.core.domain.User; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.domain.User; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.onap.vid.model.ExceptionResponse; import org.slf4j.MDC; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/HealthCheckController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/HealthCheckController.java index 2368649a..149c5bda 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/HealthCheckController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/HealthCheckController.java @@ -18,11 +18,11 @@ * ============LICENSE_END========================================================= */ -package org.onap.vid.controller; +package org.onap.vid.controllers; -import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.controller.UnRestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.onap.vid.dao.FnAppDoaImpl; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PathVariable; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/LoggerController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/LoggerController.java index e70c8711..14d02721 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/LoggerController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/LoggerController.java @@ -1,4 +1,4 @@ -package org.onap.vid.controller; +package org.onap.vid.controllers; import ch.qos.logback.classic.LoggerContext; import ch.qos.logback.core.Appender; @@ -6,8 +6,8 @@ import ch.qos.logback.core.FileAppender; import ch.qos.logback.core.spi.AppenderAttachable; import org.apache.commons.io.input.ReversedLinesFileReader; import org.apache.commons.lang3.StringUtils; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.model.ExceptionResponse; import org.onap.vid.roles.Role; import org.onap.vid.roles.RoleProvider; @@ -109,7 +109,7 @@ public class LoggerController extends RestrictedBaseController { @ExceptionHandler({ IOException.class, InternalServerErrorException.class }) @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) public ExceptionResponse ioExceptionHandler(Exception e) { - return org.onap.vid.controller.ControllersUtils.handleException(e, LOGGER); + return org.onap.vid.controllers.ControllersUtils.handleException(e, LOGGER); } } diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/MaintenanceController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/MaintenanceController.java index df1e6e42..c961f593 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/MaintenanceController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/MaintenanceController.java @@ -1,8 +1,8 @@ -package org.onap.vid.controller; +package org.onap.vid.controllers; -import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.controller.UnRestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.category.AddCategoryOptionResponse; import org.onap.vid.category.AddCategoryOptionsRequest; import org.onap.vid.category.CategoryParameterOptionRep; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/MsoConfig.java b/vid-app-common/src/main/java/org/onap/vid/controllers/MsoConfig.java index 2aa52b85..f3dbf5df 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/MsoConfig.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/MsoConfig.java @@ -1,4 +1,4 @@ -package org.onap.vid.controller; +package org.onap.vid.controllers; import com.fasterxml.jackson.databind.ObjectMapper; import org.onap.vid.factories.MsoRequestFactory; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/MsoController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java index 1ce1d64c..420ae23e 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/MsoController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/MsoController.java @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -package org.onap.vid.controller; +package org.onap.vid.controllers; import com.fasterxml.jackson.databind.ObjectMapper; @@ -28,8 +28,8 @@ import org.onap.vid.mso.MsoResponseWrapper; import org.onap.vid.mso.rest.Request; import org.onap.vid.mso.rest.RequestDetails; import org.onap.vid.mso.rest.Task; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/OperationalEnvironmentController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/OperationalEnvironmentController.java index e57aab39..fd8ae140 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/OperationalEnvironmentController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/OperationalEnvironmentController.java @@ -1,12 +1,12 @@ -package org.onap.vid.controller; +package org.onap.vid.controllers; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.base.MoreObjects; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.changeManagement.RequestDetailsWrapper; import org.onap.vid.model.ExceptionResponse; import org.onap.vid.model.RequestReferencesContainer; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/PolicyController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/PolicyController.java index 4e9ec253..7519053a 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/PolicyController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/PolicyController.java @@ -18,11 +18,11 @@ * ============LICENSE_END========================================================= */ -package org.onap.vid.controller; +package org.onap.vid.controllers; import org.json.simple.JSONObject; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.policy.*; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/PropertyController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/PropertyController.java index 2d282edb..8066507a 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/PropertyController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/PropertyController.java @@ -18,11 +18,11 @@ * ============LICENSE_END========================================================= */ -package org.onap.vid.controller; +package org.onap.vid.controllers; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.onap.vid.category.CategoryParametersResponse; import org.onap.vid.model.CategoryParameter.Family; import org.onap.vid.services.CategoryParameterService; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/RoleGeneratorController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/RoleGeneratorController.java index 3e15153a..2dbb4d11 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/RoleGeneratorController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/RoleGeneratorController.java @@ -1,8 +1,8 @@ -package org.onap.vid.controller; +package org.onap.vid.controllers; import fj.test.Bool; import org.json.JSONObject; -import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController; +import org.onap.portalsdk.core.controller.UnRestrictedBaseController; import org.onap.vid.services.RoleGeneratorService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/VidController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/VidController.java index c93d8027..84ba587b 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/VidController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/VidController.java @@ -18,10 +18,10 @@ * ============LICENSE_END========================================================= */ -package org.onap.vid.controller; +package org.onap.vid.controllers; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; import org.onap.vid.asdc.AsdcCatalogException; import org.onap.vid.asdc.beans.SecureServices; @@ -105,7 +105,8 @@ public class VidController extends RestrictedBaseController { SecureServices secureServices = new SecureServices(); List<Role> roles = roleProvider.getUserRoles(request); secureServices.setServices(aaiService.getServicesByDistributionStatus()); - secureServices.setReadOnly(roleProvider.userPermissionIsReadOnly(roles)); + //Disable roles until AAF integration finishes + //secureServices.setReadOnly(roleProvider.userPermissionIsReadOnly(roles)); return secureServices; } catch (Exception t) { diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/ViewLogController.java b/vid-app-common/src/main/java/org/onap/vid/controllers/ViewLogController.java index 4a87df10..a95f0add 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/ViewLogController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/ViewLogController.java @@ -18,10 +18,10 @@ * ============LICENSE_END========================================================= */ -package org.onap.vid.controller; +package org.onap.vid.controllers; -import org.openecomp.portalsdk.core.controller.RestrictedBaseController; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.controller.RestrictedBaseController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java b/vid-app-common/src/main/java/org/onap/vid/controllers/WebConfig.java index 2838e7f3..295a5fce 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/WebConfig.java +++ b/vid-app-common/src/main/java/org/onap/vid/controllers/WebConfig.java @@ -1,4 +1,4 @@ -package org.onap.vid.controller; +package org.onap.vid.controllers; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.io.IOUtils; @@ -11,6 +11,7 @@ import org.onap.vid.asdc.local.LocalAsdcClient; import org.onap.vid.asdc.memory.InMemoryAsdcClient; import org.onap.vid.asdc.parser.ToscaParserImpl2; import org.onap.vid.asdc.rest.RestfulAsdcClient; +import org.onap.vid.controllers.VidController; import org.onap.vid.properties.AsdcClientConfiguration; import org.onap.vid.properties.AsdcClientConfiguration.AsdcClientType; import org.onap.vid.services.AaiService; diff --git a/vid-app-common/src/main/java/org/onap/vid/dao/FnAppDoaImpl.java b/vid-app-common/src/main/java/org/onap/vid/dao/FnAppDoaImpl.java index c27d17e1..d21cc5fb 100644 --- a/vid-app-common/src/main/java/org/onap/vid/dao/FnAppDoaImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/dao/FnAppDoaImpl.java @@ -33,7 +33,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Properties; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; public class FnAppDoaImpl { diff --git a/vid-app-common/src/main/java/org/onap/vid/dao/ProfileDao.java b/vid-app-common/src/main/java/org/onap/vid/dao/ProfileDao.java index e6a8a4e5..76911780 100644 --- a/vid-app-common/src/main/java/org/onap/vid/dao/ProfileDao.java +++ b/vid-app-common/src/main/java/org/onap/vid/dao/ProfileDao.java @@ -21,7 +21,7 @@ package org.onap.vid.dao; import java.util.List; -import org.openecomp.portalsdk.core.domain.Profile; +import org.onap.portalsdk.core.domain.Profile; /** * The Interface ProfileDao. diff --git a/vid-app-common/src/main/java/org/onap/vid/logging/VidLoggerAspect.java b/vid-app-common/src/main/java/org/onap/vid/logging/VidLoggerAspect.java index e4e0edb8..afde44e3 100644 --- a/vid-app-common/src/main/java/org/onap/vid/logging/VidLoggerAspect.java +++ b/vid-app-common/src/main/java/org/onap/vid/logging/VidLoggerAspect.java @@ -5,9 +5,9 @@ import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; -import org.openecomp.portalsdk.core.logging.aspect.EELFLoggerAdvice; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.aspect.EELFLoggerAdvice; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.beans.factory.annotation.Autowired; import java.net.InetAddress; @@ -38,8 +38,8 @@ public class VidLoggerAspect { public void vidControllers() {} @Around("vidControllers() && (" + - " @within(org.openecomp.portalsdk.core.logging.aspect.AuditLog)" + - " || @annotation(org.openecomp.portalsdk.core.logging.aspect.AuditLog)" + + " @within(org.onap.portalsdk.core.logging.aspect.AuditLog)" + + " || @annotation(org.onap.portalsdk.core.logging.aspect.AuditLog)" + " || @annotation(org.springframework.web.bind.annotation.RequestMapping)" + ")") public Object logAuditMethodClassAround(ProceedingJoinPoint joinPoint) throws Throwable { diff --git a/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameter.java b/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameter.java index e2939996..a98a71bc 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameter.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameter.java @@ -1,8 +1,8 @@ package org.onap.vid.model; //import org.hibernate.annotations.Table; -import org.openecomp.portalsdk.core.domain.support.DomainVo; -import org.onap.vid.controller.MaintenanceController; +import org.onap.portalsdk.core.domain.support.DomainVo; +import org.onap.vid.controllers.MaintenanceController; //import javax.persistence.*; import javax.persistence.*; diff --git a/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameterOption.java b/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameterOption.java index 39efb2c5..141d2c14 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameterOption.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/CategoryParameterOption.java @@ -1,6 +1,6 @@ package org.onap.vid.model; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.domain.support.DomainVo; import javax.persistence.*; import java.io.Serializable; diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ExceptionTranslator.java b/vid-app-common/src/main/java/org/onap/vid/model/ExceptionTranslator.java index c600243a..a51ae12c 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/ExceptionTranslator.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/ExceptionTranslator.java @@ -2,7 +2,7 @@ package org.onap.vid.model; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; diff --git a/vid-app-common/src/main/java/org/onap/vid/model/NewNode.java b/vid-app-common/src/main/java/org/onap/vid/model/NewNode.java index 89a808b1..394f7b96 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/NewNode.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/NewNode.java @@ -5,7 +5,7 @@ import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.Map; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.asdc.beans.tosca.Input; diff --git a/vid-app-common/src/main/java/org/onap/vid/model/NewServiceModel.java b/vid-app-common/src/main/java/org/onap/vid/model/NewServiceModel.java index e343b6de..9ac0836a 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/NewServiceModel.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/NewServiceModel.java @@ -28,7 +28,7 @@ import java.util.Map.Entry; import org.onap.vid.asdc.beans.tosca.Group; import org.onap.vid.asdc.beans.tosca.ToscaModel; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.properties.VidProperties; /** * The Class ServiceModel. diff --git a/vid-app-common/src/main/java/org/onap/vid/model/NewVNF.java b/vid-app-common/src/main/java/org/onap/vid/model/NewVNF.java index 8e8c89f5..dba6bdc5 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/NewVNF.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/NewVNF.java @@ -6,7 +6,7 @@ import java.util.HashMap; import java.util.Map; import java.util.regex.Pattern; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.asdc.beans.tosca.NodeTemplate; public class NewVNF extends NewNode { diff --git a/vid-app-common/src/main/java/org/onap/vid/model/Node.java b/vid-app-common/src/main/java/org/onap/vid/model/Node.java index 7623a386..474dfb55 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/Node.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/Node.java @@ -30,7 +30,7 @@ import java.util.Map.Entry; import org.onap.vid.asdc.beans.tosca.Input; import org.onap.vid.asdc.beans.tosca.NodeTemplate; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; /** * The Class Node. */ diff --git a/vid-app-common/src/main/java/org/onap/vid/model/PortMirroringConfig.java b/vid-app-common/src/main/java/org/onap/vid/model/PortMirroringConfig.java index dd3d5db7..8c1fe66b 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/PortMirroringConfig.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/PortMirroringConfig.java @@ -1,7 +1,7 @@ package org.onap.vid.model; import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.openecomp.sdc.toscaparser.api.NodeTemplate; import org.openecomp.sdc.toscaparser.api.RequirementAssignments; diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java b/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java index dab18d51..7a1da804 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/ServiceModel.java @@ -30,7 +30,7 @@ import java.util.Map.Entry; import org.onap.vid.asdc.beans.tosca.Group; import org.onap.vid.asdc.beans.tosca.NodeTemplate; import org.onap.vid.asdc.beans.tosca.ToscaModel; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.properties.VidProperties; /** * The Class ServiceModel. diff --git a/vid-app-common/src/main/java/org/onap/vid/model/ServiceProxy.java b/vid-app-common/src/main/java/org/onap/vid/model/ServiceProxy.java index f412a1e5..628f5602 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/ServiceProxy.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/ServiceProxy.java @@ -1,6 +1,6 @@ package org.onap.vid.model; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import java.text.DateFormat; import java.text.SimpleDateFormat; diff --git a/vid-app-common/src/main/java/org/onap/vid/model/SubscriberList.java b/vid-app-common/src/main/java/org/onap/vid/model/SubscriberList.java index 5f935971..6e3d3e79 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/SubscriberList.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/SubscriberList.java @@ -1,6 +1,6 @@ package org.onap.vid.model; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.web.support.UserUtils; import java.util.List; diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VNF.java b/vid-app-common/src/main/java/org/onap/vid/model/VNF.java index e558e957..54e54947 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/VNF.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/VNF.java @@ -29,10 +29,8 @@ import java.util.Map.Entry; import java.util.regex.Pattern; import org.onap.vid.asdc.beans.tosca.NodeTemplate; - -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.onap.vid.controller.VidController; - +import org.onap.vid.controllers.VidController; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.asdc.beans.tosca.Group; import org.onap.vid.asdc.beans.tosca.Input; diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VNFDao.java b/vid-app-common/src/main/java/org/onap/vid/model/VNFDao.java index 13e2ebb5..1a630123 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/VNFDao.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/VNFDao.java @@ -1,7 +1,7 @@ package org.onap.vid.model; import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.domain.support.DomainVo; import javax.persistence.*; import java.io.Serializable; diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VfModule.java b/vid-app-common/src/main/java/org/onap/vid/model/VfModule.java index ac19587e..9ddff8d8 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/VfModule.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/VfModule.java @@ -28,7 +28,7 @@ import java.util.Map; import java.util.Map.Entry; import org.onap.vid.asdc.beans.tosca.Group; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; /** * The Class VfModule. diff --git a/vid-app-common/src/main/java/org/onap/vid/model/VidWorkflow.java b/vid-app-common/src/main/java/org/onap/vid/model/VidWorkflow.java index 985289b4..5b9eeeba 100644 --- a/vid-app-common/src/main/java/org/onap/vid/model/VidWorkflow.java +++ b/vid-app-common/src/main/java/org/onap/vid/model/VidWorkflow.java @@ -2,7 +2,7 @@ package org.onap.vid.model; import com.fasterxml.jackson.annotation.JsonIgnore; -import org.openecomp.portalsdk.core.domain.support.DomainVo; +import org.onap.portalsdk.core.domain.support.DomainVo; import javax.persistence.*; import java.io.Serializable; diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java index c197299f..8db7c3c5 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogic.java @@ -1,7 +1,7 @@ package org.onap.vid.mso; import org.onap.vid.changeManagement.RequestDetailsWrapper; -import org.onap.vid.controller.OperationalEnvironmentController; +import org.onap.vid.controllers.OperationalEnvironmentController; import org.onap.vid.mso.model.OperationalEnvironmentActivateInfo; import org.onap.vid.mso.model.OperationalEnvironmentDeactivateInfo; import org.onap.vid.mso.rest.OperationalEnvironment.OperationEnvironmentRequestDetails; diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java index 6ad6b5fd..95b175aa 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoBusinessLogicImpl.java @@ -6,11 +6,11 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.onap.vid.changeManagement.ChangeManagementRequest; import org.onap.vid.changeManagement.RequestDetailsWrapper; -import org.onap.vid.controller.OperationalEnvironmentController; +import org.onap.vid.controllers.OperationalEnvironmentController; import org.onap.vid.domain.mso.RequestInfo; import org.onap.vid.mso.model.OperationalEnvironmentActivateInfo; import org.onap.vid.mso.model.OperationalEnvironmentDeactivateInfo; @@ -25,7 +25,7 @@ import java.util.*; import java.util.regex.Pattern; import static org.onap.vid.changeManagement.ChangeManagementRequest.MsoChangeManagementRequest; -import static org.onap.vid.controller.MsoController.*; +import static org.onap.vid.controllers.MsoController.*; import static org.onap.vid.mso.MsoProperties.*; public class MsoBusinessLogicImpl implements MsoBusinessLogic { diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java b/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java index 607d8419..584e8581 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/MsoProperties.java @@ -20,8 +20,8 @@ package org.onap.vid.mso; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import java.text.DateFormat; import java.text.SimpleDateFormat; 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 eae705ab..d2ccd0bd 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 @@ -23,7 +23,7 @@ package org.onap.vid.mso; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.glassfish.jersey.client.ClientResponse; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import java.text.DateFormat; import java.text.SimpleDateFormat; diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java b/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java index 8cee23b4..1b4c5273 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/RestMsoImplementation.java @@ -4,8 +4,8 @@ import com.att.eelf.configuration.EELFLogger; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.codec.binary.Base64; import org.eclipse.jetty.util.security.Password; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.onap.vid.client.HttpBasicClient; import org.onap.vid.client.HttpsBasicClient; import org.onap.vid.mso.rest.RequestDetails; diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/RestObject.java b/vid-app-common/src/main/java/org/onap/vid/mso/RestObject.java index 4e2bea05..e5024518 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/RestObject.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/RestObject.java @@ -22,7 +22,7 @@ package org.onap.vid.mso; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.MoreObjects; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import javax.ws.rs.core.Response; import java.text.DateFormat; diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/model/OperationalEnvironmentActivateInfo.java b/vid-app-common/src/main/java/org/onap/vid/mso/model/OperationalEnvironmentActivateInfo.java index bca643a6..a5a10a77 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/model/OperationalEnvironmentActivateInfo.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/model/OperationalEnvironmentActivateInfo.java @@ -1,7 +1,8 @@ package org.onap.vid.mso.model; +import org.onap.vid.controllers.OperationalEnvironmentController; + import com.google.common.base.MoreObjects; -import org.onap.vid.controller.OperationalEnvironmentController; public class OperationalEnvironmentActivateInfo extends OperationalEnvironmentController.OperationalEnvironmentActivateBody { private final String userId; diff --git a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java index 9bb54035..20f22afa 100644 --- a/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java +++ b/vid-app-common/src/main/java/org/onap/vid/mso/rest/MsoRestClientNew.java @@ -1,6 +1,6 @@ package org.onap.vid.mso.rest; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.changeManagement.MsoRequestDetails; import org.onap.vid.changeManagement.RequestDetailsWrapper; import org.onap.vid.model.RequestReferencesContainer; diff --git a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyProperties.java b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyProperties.java index 2afb2d4a..940adddb 100644 --- a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyProperties.java +++ b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyProperties.java @@ -1,6 +1,6 @@ package org.onap.vid.policy; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.util.SystemProperties; public class PolicyProperties extends SystemProperties { diff --git a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInt.java b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInt.java index b58fe28f..65dcb818 100644 --- a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInt.java +++ b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInt.java @@ -21,7 +21,7 @@ package org.onap.vid.policy; import com.fasterxml.jackson.databind.ObjectMapper; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.policy.rest.RequestDetails; import java.text.DateFormat; diff --git a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterface.java b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterface.java index 875586d9..eb5db7db 100644 --- a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterface.java +++ b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyRestInterface.java @@ -3,8 +3,8 @@ package org.onap.vid.policy; import org.apache.commons.codec.binary.Base64; import org.eclipse.jetty.util.security.Password; import org.json.simple.JSONObject; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.onap.vid.client.HttpBasicClient; import org.onap.vid.policy.rest.RequestDetails; diff --git a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyUtil.java b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyUtil.java index 60835284..74056975 100644 --- a/vid-app-common/src/main/java/org/onap/vid/policy/PolicyUtil.java +++ b/vid-app-common/src/main/java/org/onap/vid/policy/PolicyUtil.java @@ -5,7 +5,7 @@ import java.text.SimpleDateFormat; import java.util.Date; import org.glassfish.jersey.client.ClientResponse; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.policy.PolicyResponseWrapper; import org.onap.vid.policy.PolicyUtil; import org.onap.vid.policy.RestObject; diff --git a/vid-app-common/src/main/java/org/onap/vid/properties/VidProperties.java b/vid-app-common/src/main/java/org/onap/vid/properties/VidProperties.java index 9108ae16..7324fe9e 100644 --- a/vid-app-common/src/main/java/org/onap/vid/properties/VidProperties.java +++ b/vid-app-common/src/main/java/org/onap/vid/properties/VidProperties.java @@ -20,8 +20,8 @@ package org.onap.vid.properties; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.onap.vid.model.ModelConstants; import java.text.DateFormat; diff --git a/vid-app-common/src/main/java/org/onap/vid/roles/RoleProvider.java b/vid-app-common/src/main/java/org/onap/vid/roles/RoleProvider.java index 63cc2bbb..1886f333 100644 --- a/vid-app-common/src/main/java/org/onap/vid/roles/RoleProvider.java +++ b/vid-app-common/src/main/java/org/onap/vid/roles/RoleProvider.java @@ -2,8 +2,8 @@ package org.onap.vid.roles; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.web.support.UserUtils; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.web.support.UserUtils; import org.onap.vid.aai.AaiResponse; import org.onap.vid.aai.exceptions.RoleParsingException; import org.onap.vid.model.ModelConstants; @@ -53,9 +53,10 @@ public class RoleProvider { LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "Entering to get user role for user " + UserUtils.getUserId(request)); List<Role> roleList = new ArrayList<>(); - HashMap roles = UserUtils.getRoles(request); + //Disable roles until AAF integration finishes + /*Map roles = UserUtils.getRoles(request); for (Object role : roles.keySet()) { - org.openecomp.portalsdk.core.domain.Role sdkRol = (org.openecomp.portalsdk.core.domain.Role) roles.get(role); + org.onap.portalsdk.core.domain.Role sdkRol = (org.onap.portalsdk.core.domain.Role) roles.get(role); LOG.debug(EELFLoggerDelegate.debugLogger, logPrefix + "Role " + sdkRol.getName() + " is being proccessed"); try { @@ -72,7 +73,7 @@ public class RoleProvider { LOG.error(logPrefix + " Failed to parse permission"); } - } + }*/ return roleList; } diff --git a/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidator.java b/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidator.java index f4f17fac..7486eba9 100644 --- a/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidator.java +++ b/vid-app-common/src/main/java/org/onap/vid/roles/RoleValidator.java @@ -10,6 +10,7 @@ import java.util.Map; */ public class RoleValidator { + private boolean disableRoles = true; private List<Role> userRoles; public RoleValidator(List<Role> roles) { @@ -17,6 +18,8 @@ public class RoleValidator { } public boolean isSubscriberPermitted(String subscriberName) { + if(this.disableRoles) return true; + for (Role role : userRoles) { if (role.getSubscribeName().equals(subscriberName)) return true; @@ -25,6 +28,8 @@ public class RoleValidator { } public boolean isServicePermitted(String subscriberName, String serviceType) { + if(this.disableRoles) return true; + for (Role role : userRoles) { if (role.getSubscribeName().equals(subscriberName) && role.getServiceType().equals(serviceType)) return true; @@ -33,6 +38,8 @@ public class RoleValidator { } public boolean isMsoRequestValid(RequestDetails mso_request) { + if(this.disableRoles) return true; + try { String globalSubscriberIdRequested = (String) ((Map) ((Map) mso_request.getAdditionalProperties().get("requestDetails")).get("subscriberInfo")).get("globalSubscriberId"); String serviceType = (String) ((Map) ((Map) mso_request.getAdditionalProperties().get("requestDetails")).get("requestParameters")).get("subscriptionServiceType"); @@ -45,6 +52,8 @@ public class RoleValidator { } public boolean isTenantPermitted(String globalCustomerId, String serviceType, String tenantName) { + if(this.disableRoles) return true; + for (Role role : userRoles) { if (role.getSubscribeName().equals(globalCustomerId) && role.getServiceType().equals(serviceType) diff --git a/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerProperties.java b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerProperties.java index bb5f6ebb..8f0b6b0e 100644 --- a/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerProperties.java +++ b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerProperties.java @@ -1,6 +1,6 @@ package org.onap.vid.scheduler; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.util.SystemProperties; public class SchedulerProperties extends SystemProperties { diff --git a/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterface.java b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterface.java index 2077e7a4..77fc5c2c 100644 --- a/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterface.java +++ b/vid-app-common/src/main/java/org/onap/vid/scheduler/SchedulerRestInterface.java @@ -10,8 +10,8 @@ import javax.ws.rs.core.Response; import org.apache.commons.codec.binary.Base64; import org.eclipse.jetty.util.security.Password; import org.json.simple.JSONObject; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.onap.vid.client.HttpBasicClient; import org.onap.vid.client.HttpsBasicClient; import org.onap.vid.scheduler.SchedulerProperties; diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java index ffb43803..92ce0c26 100644 --- a/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java @@ -2,7 +2,7 @@ package org.onap.vid.services; import org.apache.http.HttpStatus; import org.onap.vid.aai.model.AaiGetAicZone.AicZones; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.aai.*; import org.onap.vid.aai.ServiceInstance; import org.onap.vid.aai.ServiceSubscription; diff --git a/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java index 02d3521d..3887fdfc 100644 --- a/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/services/CategoryParameterServiceImpl.java @@ -4,8 +4,8 @@ import java.io.IOException; import java.util.*; import java.util.stream.Collectors; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.DataAccessService; import org.onap.vid.category.AddCategoryOptionResponse; import org.onap.vid.category.CategoryParameterOptionRep; import org.onap.vid.model.CategoryParameter; diff --git a/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementServiceImpl.java index 078f4494..8f2a8762 100644 --- a/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementServiceImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/services/ChangeManagementServiceImpl.java @@ -6,9 +6,9 @@ import org.hibernate.NonUniqueObjectException; import org.json.JSONObject; import org.json.simple.JSONArray; import org.json.simple.parser.JSONParser; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.service.DataAccessService; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.service.DataAccessService; +import org.onap.portalsdk.core.util.SystemProperties; import org.onap.vid.changeManagement.*; import org.onap.vid.exceptions.NotFoundException; import org.onap.vid.model.VNFDao; diff --git a/vid-app-common/src/main/java/org/onap/vid/services/CsvServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/CsvServiceImpl.java index 689da34b..e0100e5b 100644 --- a/vid-app-common/src/main/java/org/onap/vid/services/CsvServiceImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/services/CsvServiceImpl.java @@ -3,7 +3,7 @@ package org.onap.vid.services; import com.opencsv.CSVReader; import org.json.JSONArray; import org.json.JSONObject; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; diff --git a/vid-app-common/src/main/java/org/onap/vid/services/VidServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/VidServiceImpl.java index 7b0d1a04..44cfb28b 100644 --- a/vid-app-common/src/main/java/org/onap/vid/services/VidServiceImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/services/VidServiceImpl.java @@ -1,6 +1,6 @@ package org.onap.vid.services; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException; import org.onap.vid.asdc.AsdcCatalogException; import org.onap.vid.asdc.AsdcClient; diff --git a/vid-app-common/src/main/java/org/onap/vid/utils/Logging.java b/vid-app-common/src/main/java/org/onap/vid/utils/Logging.java index 16dde568..1425f149 100644 --- a/vid-app-common/src/main/java/org/onap/vid/utils/Logging.java +++ b/vid-app-common/src/main/java/org/onap/vid/utils/Logging.java @@ -3,8 +3,8 @@ package org.onap.vid.utils; import com.att.eelf.configuration.EELFLogger; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate; -import org.openecomp.portalsdk.core.util.SystemProperties; +import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; +import org.onap.portalsdk.core.util.SystemProperties; import org.springframework.http.HttpMethod; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; |