Align with CDS 1.16 api/schema changes 72/2472/4
authorSerban Jora <sj2381@att.com>
Wed, 1 Aug 2018 17:48:54 +0000 (13:48 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Wed, 1 Aug 2018 19:13:53 +0000 (15:13 -0400)
Aligns with project coding standards.
Organize imports to silence warnings.

Change-Id: I08404bd59bd5d5ae488d55d38f1a0f71079ee9c5
Signed-off-by: Serban Jora <sj2381@att.com>
101 files changed:
docs/release-notes.rst
gateway/pom.xml
gateway/src/main/java/org/acumos/federation/gateway/Application.java
gateway/src/main/java/org/acumos/federation/gateway/adapter/PeerGateway.java
gateway/src/main/java/org/acumos/federation/gateway/adapter/onap/ONAP.java
gateway/src/main/java/org/acumos/federation/gateway/adapter/onap/ONAPAdapterCondition.java
gateway/src/main/java/org/acumos/federation/gateway/adapter/onap/ONAPAdapterConfiguration.java
gateway/src/main/java/org/acumos/federation/gateway/adapter/onap/ToscaLab.java
gateway/src/main/java/org/acumos/federation/gateway/adapter/onap/sdc/ASDC.java
gateway/src/main/java/org/acumos/federation/gateway/adapter/onap/sdc/ASDCException.java
gateway/src/main/java/org/acumos/federation/gateway/cds/ArtifactBuilder.java
gateway/src/main/java/org/acumos/federation/gateway/cds/ArtifactType.java
gateway/src/main/java/org/acumos/federation/gateway/cds/Mapper.java
gateway/src/main/java/org/acumos/federation/gateway/cds/PeerStatus.java
gateway/src/main/java/org/acumos/federation/gateway/cds/SolutionBuilder.java
gateway/src/main/java/org/acumos/federation/gateway/cds/SolutionRevision.java
gateway/src/main/java/org/acumos/federation/gateway/cds/SolutionRevisionBuilder.java
gateway/src/main/java/org/acumos/federation/gateway/cds/SubscriptionScope.java
gateway/src/main/java/org/acumos/federation/gateway/cds/Updater.java
gateway/src/main/java/org/acumos/federation/gateway/cds/ValidationStatus.java
gateway/src/main/java/org/acumos/federation/gateway/common/API.java
gateway/src/main/java/org/acumos/federation/gateway/common/AbstractClient.java
gateway/src/main/java/org/acumos/federation/gateway/common/Clients.java
gateway/src/main/java/org/acumos/federation/gateway/common/FederationClient.java
gateway/src/main/java/org/acumos/federation/gateway/common/JsonRequest.java
gateway/src/main/java/org/acumos/federation/gateway/config/AdapterCondition.java
gateway/src/main/java/org/acumos/federation/gateway/config/AdapterConfiguration.java
gateway/src/main/java/org/acumos/federation/gateway/config/DockerConfiguration.java
gateway/src/main/java/org/acumos/federation/gateway/config/FederationConfiguration.java
gateway/src/main/java/org/acumos/federation/gateway/config/FederationInterfaceConfiguration.java
gateway/src/main/java/org/acumos/federation/gateway/config/GatewayCondition.java
gateway/src/main/java/org/acumos/federation/gateway/config/GatewayConfiguration.java
gateway/src/main/java/org/acumos/federation/gateway/config/InterfaceConfiguration.java
gateway/src/main/java/org/acumos/federation/gateway/config/LocalConfiguration.java
gateway/src/main/java/org/acumos/federation/gateway/config/LocalInterfaceConfiguration.java
gateway/src/main/java/org/acumos/federation/gateway/config/RegistrationCondition.java
gateway/src/main/java/org/acumos/federation/gateway/controller/AbstractController.java
gateway/src/main/java/org/acumos/federation/gateway/controller/CatalogController.java
gateway/src/main/java/org/acumos/federation/gateway/controller/ControllerContext.java
gateway/src/main/java/org/acumos/federation/gateway/controller/PeerCatalogController.java
gateway/src/main/java/org/acumos/federation/gateway/controller/PeerPeersController.java
gateway/src/main/java/org/acumos/federation/gateway/controller/PeerPingController.java
gateway/src/main/java/org/acumos/federation/gateway/controller/PeerRegistrationController.java
gateway/src/main/java/org/acumos/federation/gateway/controller/PeerSubscriptionController.java
gateway/src/main/java/org/acumos/federation/gateway/controller/PeersController.java
gateway/src/main/java/org/acumos/federation/gateway/controller/PingController.java
gateway/src/main/java/org/acumos/federation/gateway/controller/RegistrationController.java
gateway/src/main/java/org/acumos/federation/gateway/event/PeerSubscriptionEvent.java
gateway/src/main/java/org/acumos/federation/gateway/security/AuthenticationConfiguration.java
gateway/src/main/java/org/acumos/federation/gateway/security/Peer.java
gateway/src/main/java/org/acumos/federation/gateway/security/Role.java
gateway/src/main/java/org/acumos/federation/gateway/service/ArtifactService.java
gateway/src/main/java/org/acumos/federation/gateway/service/CatalogService.java
gateway/src/main/java/org/acumos/federation/gateway/service/LocalWatchService.java
gateway/src/main/java/org/acumos/federation/gateway/service/PeerService.java
gateway/src/main/java/org/acumos/federation/gateway/service/ServiceContext.java
gateway/src/main/java/org/acumos/federation/gateway/service/impl/AbstractServiceImpl.java
gateway/src/main/java/org/acumos/federation/gateway/service/impl/AbstractServiceLocalImpl.java
gateway/src/main/java/org/acumos/federation/gateway/service/impl/ArtifactServiceImpl.java
gateway/src/main/java/org/acumos/federation/gateway/service/impl/ArtifactServiceLocalImpl.java
gateway/src/main/java/org/acumos/federation/gateway/service/impl/CatalogServiceImpl.java
gateway/src/main/java/org/acumos/federation/gateway/service/impl/CatalogServiceLocalImpl.java
gateway/src/main/java/org/acumos/federation/gateway/service/impl/PeerServiceImpl.java
gateway/src/main/java/org/acumos/federation/gateway/service/impl/PeerServiceLocalImpl.java
gateway/src/main/java/org/acumos/federation/gateway/service/impl/PeerSubscriptionServiceImpl.java
gateway/src/main/java/org/acumos/federation/gateway/service/impl/ServiceImpl.java
gateway/src/main/java/org/acumos/federation/gateway/task/PeerSubscriptionTask.java
gateway/src/main/java/org/acumos/federation/gateway/task/PeerSubscriptionTaskScheduler.java
gateway/src/main/java/org/acumos/federation/gateway/task/TaskConfiguration.java
gateway/src/main/java/org/acumos/federation/gateway/util/Errors.java
gateway/src/main/java/org/acumos/federation/gateway/util/Future.java
gateway/src/main/java/org/acumos/federation/gateway/util/Futures.java
gateway/src/main/java/org/acumos/federation/gateway/util/JSONHttpMessageConverter.java
gateway/src/main/java/org/acumos/federation/gateway/util/ListBuilder.java
gateway/src/main/java/org/acumos/federation/gateway/util/MapBuilder.java
gateway/src/main/java/org/acumos/federation/gateway/util/Utils.java
gateway/src/test/java/org/acumos/federation/gateway/test/AuthorizationTest.java
gateway/src/test/java/org/acumos/federation/gateway/test/CatalogServiceTest.java
gateway/src/test/java/org/acumos/federation/gateway/test/ControllerTest.java
gateway/src/test/java/org/acumos/federation/gateway/test/LocalControllerTest.java
gateway/src/test/java/org/acumos/federation/gateway/test/LocalTester.java
gateway/src/test/java/org/acumos/federation/gateway/test/PeerGatewayTest.java
gateway/src/test/java/org/acumos/federation/gateway/test/PeerServiceTest.java
gateway/src/test/java/org/acumos/federation/gateway/test/ServiceTest.java
gateway/src/test/java/org/acumos/federation/gateway/test/TaskTest.java
gateway/src/test/java/org/acumos/federation/gateway/test/TestAdapter.java
gateway/src/test/java/org/acumos/federation/gateway/test/TestAdapterCondition.java
gateway/src/test/java/org/acumos/federation/gateway/test/TestAdapterConfiguration.java
gateway/src/test/resources/acumosa-catalog.json
gateway/src/test/resources/acumosb-catalog.json
gateway/src/test/resources/mockCDSDateSolutionsResponsePage0.json
gateway/src/test/resources/mockCDSDateSolutionsResponsePage1.json
gateway/src/test/resources/mockCDSPortalSolutionsResponse.json
gateway/src/test/resources/mockCDSSolutionResponse.json
gateway/src/test/resources/mockCDSSolutionRevisionArtifactsResponse.json
gateway/src/test/resources/mockCDSSolutionRevisionsResponse.json
gateway/src/test/resources/mockPeerSolutionResponse.json
gateway/src/test/resources/mockPeerSolutionRevisionsResponse.json
gateway/src/test/resources/mockPeerSolutionsResponse.json
gateway/src/test/resources/task-test-catalog.json
gateway/src/test/resources/test-catalog.json

index 1981fc8..6566f25 100644 (file)
@@ -22,6 +22,12 @@ Federated Gateway Release Notes
 
 The Federated Gateway server is available as a Docker image in a Docker registry.
 
+Version 1.16.0, 2018-08-01
+-------------------------
+
+* Aligns with the data model changes from CDS 1.16
+* Minor fixes in order to adhere to project coding standards.
+
 Version 1.15.1, 2018-07-31
 -------------------------
 
index 705efe8..669bdf8 100644 (file)
@@ -24,7 +24,7 @@ limitations under the License.
        <modelVersion>4.0.0</modelVersion>
        <groupId>org.acumos.federation</groupId>
        <artifactId>gateway</artifactId>
-       <version>1.15.1-SNAPSHOT</version>
+       <version>1.16.0-SNAPSHOT</version>
        <name>Federation Gateway</name>
        <description>Federated Acumos Interface for inter-acumos and ONAP communication</description>
 
@@ -74,7 +74,7 @@ limitations under the License.
                <dependency>
                        <groupId>org.acumos.common-dataservice</groupId>
                        <artifactId>cmn-data-svc-client</artifactId>
-                       <version>1.15.4</version>
+                       <version>1.16.0</version>
                </dependency>
                <dependency>
                        <groupId>org.json</groupId>
index d5b9e94..d62060c 100644 (file)
@@ -23,25 +23,18 @@ package org.acumos.federation.gateway;
 import java.io.IOException;
 
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.config.LocalConfiguration;
 import org.acumos.federation.gateway.config.FederationConfiguration;
-
-import org.springframework.boot.SpringApplication;
+import org.acumos.federation.gateway.config.LocalConfiguration;
+import org.springframework.boot.Banner;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration;
 import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
-import org.springframework.context.ApplicationContext;
-
-import org.springframework.boot.Banner;
 import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.context.annotation.FilterType;
-import org.springframework.context.annotation.ComponentScan;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.AnnotationConfigApplicationContext;
-import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.FilterType;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 
index ac3c198..889c577 100644 (file)
 
 package org.acumos.federation.gateway.adapter;
 
+import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.HashMap;
-import java.util.Collections;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
@@ -34,26 +34,22 @@ import org.acumos.cds.domain.MLPPeer;
 import org.acumos.cds.domain.MLPPeerSubscription;
 import org.acumos.cds.domain.MLPSolution;
 import org.acumos.cds.domain.MLPSolutionRevision;
-
+import org.acumos.federation.gateway.cds.Artifact;
+import org.acumos.federation.gateway.cds.Solution;
+import org.acumos.federation.gateway.cds.SolutionRevision;
+import org.acumos.federation.gateway.cds.SubscriptionScope;
+import org.acumos.federation.gateway.common.Clients;
+import org.acumos.federation.gateway.common.FederationClient;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
 import org.acumos.federation.gateway.config.GatewayCondition;
 import org.acumos.federation.gateway.event.PeerSubscriptionEvent;
-import org.acumos.federation.gateway.common.Clients;
-import org.acumos.federation.gateway.common.FederationClient;
-import org.acumos.federation.gateway.util.Errors;
-import org.acumos.federation.gateway.cds.SubscriptionScope;
-import org.acumos.federation.gateway.cds.Solution;
-import org.acumos.federation.gateway.cds.SolutionRevision;
-import org.acumos.federation.gateway.cds.Artifact;
-
 import org.acumos.federation.gateway.service.ArtifactService;
 import org.acumos.federation.gateway.service.ServiceException;
-
+import org.acumos.federation.gateway.util.Errors;
 import org.springframework.beans.factory.BeanInitializationException;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Scope;
-import org.springframework.context.annotation.Profile;
 import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Scope;
 import org.springframework.context.event.EventListener;
 import org.springframework.core.env.Environment;
 import org.springframework.core.io.Resource;
@@ -116,11 +112,11 @@ public class PeerGateway {
                log.trace(EELFLoggerDelegate.debugLogger, "PeerGateway destroyed");
        }
 
-       protected String getOwnerId(MLPPeerSubscription theSubscription/*
+       protected String getUserId(MLPPeerSubscription theSubscription/*
                                                                                                                                         * , MLPSolution theSolution
                                                                                                                                         */) {
-               String ownerId = theSubscription.getOwnerId();
-               return ownerId != null ? ownerId : this.env.getProperty("federation.operator");
+               String userId = theSubscription.getUserId();
+               return userId != null ? userId : this.env.getProperty("federation.operator");
        }
 
        @EventListener
@@ -192,9 +188,8 @@ public class PeerGateway {
                                        "Creating Local MLP Solution for peer solution " + peerSolution);
 
                        Solution localSolution = Solution.buildFrom(peerSolution)
-                                                                                                                                       .withProvider(this.peer.getName())
                        //should the creted/modified reflect this information or the information we got from the peer ?
-                                                                                                                                       .withOwner(getOwnerId(this.sub))
+                                                                                                                                       .withUser(getUserId(this.sub))
                                                                                                                                        .withSource(this.peer.getPeerId())
                                                                                                                                        .build();
                        try {
@@ -216,7 +211,7 @@ public class PeerGateway {
                                ICommonDataServiceRestClient cdsClient) {
 
                        SolutionRevision localRevision = SolutionRevision.buildFrom(peerRevision)
-                                                                                                                                                                       .withOwner(getOwnerId(this.sub))
+                                                                                                                                                                       .withUser(getUserId(this.sub))
                                                                                                                                                                        .withSource(this.peer.getPeerId())
                                                                                                                                                                        .withAccessTypeCode(this.sub.getAccessType())
                                                                                                                                                                        .withValidationStatusCode(this.peer.getValidationStatusCode())
@@ -241,7 +236,7 @@ public class PeerGateway {
                                ICommonDataServiceRestClient cdsClient) {
 
                        Artifact artifact = Artifact.buildFrom(peerArtifact)
-                                                                                                               .withOwner(getOwnerId(this.sub))
+                                                                                                               .withUser(getUserId(this.sub))
                                                                                                                .build();
                        try {
                                cdsClient.createArtifact(artifact);
@@ -264,7 +259,7 @@ public class PeerGateway {
 
                        return Artifact.buildFrom(peerArtifact)
                                                                .withId(localArtifact.getArtifactId())
-                                                               .withOwner(getOwnerId(this.sub))
+                                                               .withUser(getUserId(this.sub))
                                                                .build();
                }
 
@@ -278,15 +273,14 @@ public class PeerGateway {
 
                        //start with the peer solution and pick the few local values we ought to preserve or impose
                        Solution solution = Solution.buildFrom(peerSolution)
-                                                                                                                       .withProvider(this.peer.getName())
-                                                                                                                       .withOwner((Object... args) -> {
-                                                                                                                                       String newOwnerId = getOwnerId(this.sub);
-                                                                                                                                               if (!newOwnerId.equals(localSolution.getOwnerId())) {
+                                                                                                                       .withUser((Object... args) -> {
+                                                                                                                                       String newUserId = getUserId(this.sub);
+                                                                                                                                               if (!newUserId.equals(localSolution.getUserId())) {
                                                                                                                                                        // is this solution being updated as part of different/new subscription?
                                                                                                                                                        log.warn(EELFLoggerDelegate.errorLogger, "updating solution " +localSolution.getSolutionId()
-                                                                                                                                                       + " as part of subscription " + this.sub.getSubId() + " triggers an ownership change");
+                                                                                                                                                       + " as part of subscription " + this.sub.getSubId() + " triggers a user change");
                                                                                                                                                }
-                                                                                                                                               return newOwnerId;
+                                                                                                                                               return newUserId;
                                                                                                                                })
                                                                                                                        .withSource((Object... args) -> {
                                                                                                                                        if (localSolution.getSourceId() == null) {
@@ -308,8 +302,8 @@ public class PeerGateway {
                                                                                                                        .build();
 
                        try {
-                               cdsClient.updateSolution(localSolution);
-                               return localSolution;
+                               cdsClient.updateSolution(solution);
+                               return solution;
                        }
                        catch (HttpStatusCodeException restx) {
                                log.error(EELFLoggerDelegate.errorLogger,
@@ -402,6 +396,10 @@ public class PeerGateway {
                                List<MLPArtifact> cdsArtifacts = Collections.EMPTY_LIST;
                                if (localRevision == null) {
                                        localRevision = createMLPSolutionRevision(peerRevision, cdsClient);
+                                       if (localRevision == null) {
+                                               //cannot map this revision, move onto the next one
+                                               //continue
+                                       }
                                }
                                else {
                                        try {
index 46d3a06..356c5aa 100644 (file)
 
 package org.acumos.federation.gateway.adapter.onap;
 
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.net.URI;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
-import java.util.Collections;
-import java.util.Comparator;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
@@ -46,26 +45,22 @@ import org.acumos.federation.gateway.adapter.onap.sdc.ASDC.ArtifactType;
 import org.acumos.federation.gateway.adapter.onap.sdc.ASDC.AssetType;
 import org.acumos.federation.gateway.adapter.onap.sdc.ASDC.LifecycleState;
 import org.acumos.federation.gateway.adapter.onap.sdc.ASDCException;
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.event.PeerSubscriptionEvent;
 import org.acumos.federation.gateway.common.Clients;
 import org.acumos.federation.gateway.common.FederationClient;
-import org.apache.commons.io.IOUtils;
-
+import org.acumos.federation.gateway.config.EELFLoggerDelegate;
+import org.acumos.federation.gateway.event.PeerSubscriptionEvent;
 import org.json.JSONArray;
-import org.json.JSONObject;
 import org.json.JSONException;
-
+import org.json.JSONObject;
 import org.springframework.beans.factory.BeanInitializationException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Scope;
 import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Scope;
 import org.springframework.context.event.EventListener;
 import org.springframework.core.task.TaskExecutor;
 import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
 import org.springframework.stereotype.Component;
-import org.springframework.web.client.HttpClientErrorException;
 import org.springframework.util.StreamUtils;
 
 @Component("onap")
index b6712d7..7d55af2 100644 (file)
 
 package org.acumos.federation.gateway.adapter.onap;
 
+import org.acumos.federation.gateway.config.AdapterCondition;
 import org.springframework.context.annotation.ConditionContext;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 import org.springframework.core.env.Environment;
-
-import org.acumos.federation.gateway.config.AdapterCondition;
+import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  */
index 7706d8d..e87b46a 100644 (file)
 
 package org.acumos.federation.gateway.adapter.onap;
 
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.acumos.federation.gateway.config.AdapterConfiguration;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Profile;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 
-import org.acumos.federation.gateway.config.AdapterConfiguration;
-
 
 /**
  * Adds the specifics of a Test adapter to the generic adapter configuration.
index a0dbd2c..641cea8 100644 (file)
  */
 package org.acumos.federation.gateway.adapter.onap;
 
-import java.io.File;
-import java.io.InputStream;
-import java.io.FileInputStream;
 import java.io.ByteArrayOutputStream;
-
-import java.net.URI;
-import java.net.URL;
+import java.io.FileInputStream;
+import java.io.InputStream;
 import java.util.Properties;
 
 import org.python.util.PythonInterpreter;
index 8d98965..ebb12af 100644 (file)
 
 package org.acumos.federation.gateway.adapter.onap.sdc;
 
-import java.net.URI;
-import java.net.URISyntaxException;
-import javax.net.ssl.HttpsURLConnection;
-
 import java.io.File;
 import java.io.IOException;
 import java.io.UncheckedIOException;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Collections;
 import java.util.List;
-import java.util.LinkedList;
-import java.util.Map;
 import java.util.UUID;
-import java.util.Collections;
-
-import java.util.function.BiFunction;
 import java.util.function.UnaryOperator;
-
-import java.util.logging.Logger;
 import java.util.logging.Level;
-
-import java.util.zip.ZipInputStream;
-import java.util.zip.ZipEntry;
+import java.util.logging.Logger;
 
 import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
 
-import org.springframework.http.MediaType;
-import org.springframework.http.HttpStatus;
+import org.acumos.federation.gateway.util.Action;
+import org.acumos.federation.gateway.util.Future;
+import org.acumos.federation.gateway.util.Futures;
+import org.acumos.federation.gateway.util.JSONHttpMessageConverter;
+//import org.springframework.util.DigestUtils;
+import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Scope;
+import org.springframework.http.HttpEntity;
 import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpRequest;
 import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpRequest;
+import org.springframework.http.MediaType;
 import org.springframework.http.RequestEntity;
 import org.springframework.http.ResponseEntity;
 import org.springframework.http.client.AsyncClientHttpRequestExecution;
 import org.springframework.http.client.AsyncClientHttpRequestInterceptor;
 import org.springframework.http.client.ClientHttpResponse;
-import org.springframework.web.client.RestTemplate;
-import org.springframework.web.client.AsyncRestTemplate;
-import org.springframework.web.client.RestClientException;
-import org.springframework.web.client.HttpClientErrorException;
-import org.springframework.web.client.DefaultResponseErrorHandler;
 import org.springframework.http.converter.HttpMessageConverter;
-
-import org.springframework.util.Base64Utils;
-//import org.springframework.util.DigestUtils;
-import org.apache.commons.codec.digest.DigestUtils;
-
-import org.springframework.stereotype.Component;
-import org.springframework.context.annotation.Scope;
 import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
+import org.springframework.stereotype.Component;
+import org.springframework.util.Base64Utils;
 import org.springframework.util.concurrent.ListenableFuture;
 import org.springframework.util.concurrent.ListenableFutureCallback;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang3.StringUtils;
-
-import com.google.common.collect.ImmutableMap;
-
-import org.acumos.federation.gateway.util.JSONHttpMessageConverter;
-import org.acumos.federation.gateway.util.Action;
-import org.acumos.federation.gateway.util.Future;
-import org.acumos.federation.gateway.util.Futures;
-
-import org.json.JSONObject;
-import org.json.JSONArray;
-
-import org.apache.commons.cli.BasicParser;
-import org.apache.commons.cli.CommandLine;
-import org.apache.commons.cli.CommandLineParser;
-import org.apache.commons.cli.HelpFormatter;
-import org.apache.commons.cli.OptionBuilder;
-import org.apache.commons.cli.Option;
-import org.apache.commons.cli.Options;
-import org.apache.commons.cli.ParseException;
+import org.springframework.web.client.AsyncRestTemplate;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.RestClientException;
 
 @Component("asdc")
 @Scope("singleton")
index 2783a8a..c198b87 100644 (file)
@@ -22,12 +22,11 @@ package org.acumos.federation.gateway.adapter.onap.sdc;
 
 import java.util.Arrays;
 
+import org.json.JSONArray;
+import org.json.JSONObject;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.client.HttpClientErrorException;
 
-import org.json.JSONObject;
-import org.json.JSONArray;
-
 /** */
 public class ASDCException extends Exception {
 
index fa874da..fee3c74 100644 (file)
@@ -20,7 +20,6 @@
 package org.acumos.federation.gateway.cds;
 
 import java.util.Date;
-import java.util.List;
 
 /**
  */
@@ -51,8 +50,8 @@ public class ArtifactBuilder {
                return this;
        }
 
-       public ArtifactBuilder withOwner(String theOwnerId) {
-               this.artifact.setOwnerId(theOwnerId);
+       public ArtifactBuilder withUser(String theUserId) {
+               this.artifact.setUserId(theUserId);
                return this;
        }
 
index a4ba406..728c3ff 100644 (file)
@@ -20,7 +20,7 @@
 package org.acumos.federation.gateway.cds;
 
 import java.util.EnumSet;
-import org.acumos.cds.domain.MLPArtifactType;
+
 import org.acumos.cds.ArtifactTypeCode;
 
 /**
index e5d1712..70da464 100644 (file)
@@ -21,19 +21,18 @@ package org.acumos.federation.gateway.cds;
 
 import java.io.IOException;
 
-import com.fasterxml.jackson.core.Version;
+import org.acumos.cds.domain.MLPArtifact;
+import org.acumos.cds.domain.MLPSolution;
+import org.acumos.cds.domain.MLPSolutionRevision;
+
 import com.fasterxml.jackson.core.JsonParser;
 import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import com.fasterxml.jackson.core.Version;
 import com.fasterxml.jackson.databind.DeserializationContext;
-import com.fasterxml.jackson.databind.Module;
-import com.fasterxml.jackson.databind.module.SimpleModule;
-import com.fasterxml.jackson.databind.node.ObjectNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
+import com.fasterxml.jackson.databind.module.SimpleModule;
 
-import org.acumos.cds.domain.MLPSolution;
-import org.acumos.cds.domain.MLPSolutionRevision;
-import org.acumos.cds.domain.MLPArtifact;
 
 /**
  * Provides a Jackson ObjectMapper configured with an extension module for processing
index b43cddb..6c9a5ad 100644 (file)
@@ -20,7 +20,7 @@
 package org.acumos.federation.gateway.cds;
 
 import java.util.EnumSet;
-import org.acumos.cds.domain.MLPPeerStatus;
+
 import org.acumos.cds.PeerStatusCode;
 
 /**
index 877bd82..4616761 100644 (file)
@@ -20,7 +20,6 @@
 package org.acumos.federation.gateway.cds;
 
 import java.util.Date;
-import java.util.List;
 
 /**
  * Supplements the CDS representation of a solution with related information: revisions.
@@ -63,11 +62,6 @@ public class SolutionBuilder {
                return this;
        }
 
-       public SolutionBuilder withProvider(String theProvider) {
-               this.solution.setProvider(theProvider);
-               return this;
-       }
-
        public SolutionBuilder withDescription(String theDesc) {
                this.solution.setDescription(theDesc);
                return this;
@@ -93,15 +87,15 @@ public class SolutionBuilder {
                return this;
        }
 
-       public SolutionBuilder withOwner(String theOwnerId) {
-               this.solution.setOwnerId(theOwnerId);
+       public SolutionBuilder withUser(String theUserId) {
+               this.solution.setUserId(theUserId);
                return this;
        }
        
-       public SolutionBuilder withOwner(Updater<String, Object> theUpdater, Object... theArgs) {
-               String newOwner = theUpdater.update(theArgs);
-               if (newOwner != null)
-                       this.solution.setOwnerId(newOwner);
+       public SolutionBuilder withUser(Updater<String, Object> theUpdater, Object... theArgs) {
+               String newUser = theUpdater.update(theArgs);
+               if (newUser != null)
+                       this.solution.setUserId(newUser);
                return this;
        }
 
index 725fdaa..09eceeb 100644 (file)
@@ -21,8 +21,8 @@ package org.acumos.federation.gateway.cds;
 
 import java.util.List;
 
-import org.acumos.cds.domain.MLPSolutionRevision;
 import org.acumos.cds.domain.MLPArtifact;
+import org.acumos.cds.domain.MLPSolutionRevision;
 
 /**
  * Supplements the CDS representation of a solution with related information: revisions.
index 927e9db..e5f6ea9 100644 (file)
@@ -20,7 +20,6 @@
 package org.acumos.federation.gateway.cds;
 
 import java.util.Date;
-import java.util.List;
 
 /**
  */
@@ -81,8 +80,8 @@ public class SolutionRevisionBuilder {
                return this;
        }
 
-       public SolutionRevisionBuilder withOwner(String theOwnerId) {
-               this.revision.setOwnerId(theOwnerId);
+       public SolutionRevisionBuilder withUser(String theUserId) {
+               this.revision.setUserId(theUserId);
                return this;
        }
        
index f3bf68f..caaa745 100644 (file)
@@ -20,7 +20,6 @@
 package org.acumos.federation.gateway.cds;
 
 import java.util.EnumSet;
-import org.acumos.cds.domain.MLPSubscriptionScopeType;
 
 /**
  * Supplements the CDS representation of a subscription scope information.
index df0b6b8..ba1b69f 100644 (file)
@@ -21,6 +21,7 @@ package org.acumos.federation.gateway.cds;
 
 
 /**
+ * Functional vararg interface for calculating updates to CDS properties.
  */
 @FunctionalInterface
 public interface Updater<R,T> {
index a64b116..8811b84 100644 (file)
@@ -20,7 +20,6 @@
 package org.acumos.federation.gateway.cds;
 
 import java.util.EnumSet;
-import org.acumos.cds.domain.MLPValidationStatus;
 
 /**
  * Supplements the CDS representation of a solution validation status information.
index 1815a29..39f52bd 100644 (file)
@@ -20,8 +20,8 @@
 package org.acumos.federation.gateway.common;
 
 import java.net.URI;
-import java.util.Map;
 import java.util.Collection;
+import java.util.Map;
 
 import org.springframework.web.util.UriComponentsBuilder;
 
index 461abb2..2269df0 100644 (file)
@@ -27,10 +27,7 @@ import java.util.Date;
 import java.util.Map;
 
 import org.acumos.cds.transport.RestPageRequest;
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-
 import org.apache.http.client.HttpClient;
-
 import org.springframework.boot.web.client.RestTemplateBuilder;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
@@ -45,8 +42,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
  */
 public abstract class AbstractClient {
 
-       protected final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(getClass().getName());
-
        protected String baseUrl;
        protected RestTemplate restTemplate;
 
index 29bc0ed..6631ae7 100644 (file)
 
 package org.acumos.federation.gateway.common;
 
-import java.io.IOException;
-import java.util.HashMap;
-
-import org.apache.http.client.HttpClient;
+import java.lang.invoke.MethodHandles;
 
+import org.acumos.cds.client.CommonDataServiceRestClientImpl;
+import org.acumos.cds.client.ICommonDataServiceRestClient;
+import org.acumos.federation.gateway.cds.Mapper;
+import org.acumos.federation.gateway.config.DockerConfiguration;
+import org.acumos.federation.gateway.config.EELFLoggerDelegate;
+import org.acumos.federation.gateway.config.FederationInterfaceConfiguration;
+import org.acumos.federation.gateway.config.LocalInterfaceConfiguration;
+import org.acumos.nexus.client.NexusArtifactClient;
+import org.acumos.nexus.client.RepositoryLocation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.web.client.RestTemplateBuilder;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.annotation.Scope;
-import org.springframework.context.annotation.Import;
 import org.springframework.core.env.Environment;
-import org.springframework.stereotype.Component;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
 import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
-import org.springframework.boot.web.client.RestTemplateBuilder;
-
-import org.acumos.nexus.client.NexusArtifactClient;
-import org.acumos.nexus.client.RepositoryLocation;
+import org.springframework.stereotype.Component;
 
 import com.github.dockerjava.api.DockerClient;
 import com.github.dockerjava.core.DockerClientBuilder;
 
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.config.DockerConfiguration;
-import org.acumos.federation.gateway.config.InterfaceConfiguration;
-import org.acumos.federation.gateway.config.LocalInterfaceConfiguration;
-import org.acumos.federation.gateway.config.FederationInterfaceConfiguration;
-import org.acumos.federation.gateway.cds.Mapper;
-
-import org.acumos.cds.client.ICommonDataServiceRestClient;
-import org.acumos.cds.client.CommonDataServiceRestClientImpl;
-
-import com.fasterxml.jackson.databind.ObjectMapper;
-
 /**
  * Unique entry point for building clients: peer access clients, cds clients
  */
@@ -71,7 +61,7 @@ public class Clients {
        @Autowired
        private DockerConfiguration dockerConfig = null;
 
-       private final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(getClass().getName());
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
 
        public Clients() {
        }
index fa02ecf..80edd49 100644 (file)
 
 package org.acumos.federation.gateway.common;
 
+import java.lang.invoke.MethodHandles;
 import java.net.URI;
 import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
-import org.acumos.cds.domain.MLPPeer;
 import org.acumos.cds.domain.MLPArtifact;
+import org.acumos.cds.domain.MLPPeer;
 import org.acumos.cds.domain.MLPSolution;
 import org.acumos.cds.domain.MLPSolutionRevision;
-import org.acumos.federation.gateway.common.API;
-import org.acumos.federation.gateway.common.JsonResponse;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
 import org.acumos.federation.gateway.util.Utils;
-
 import org.apache.http.client.HttpClient;
-
 import org.springframework.core.ParameterizedTypeReference;
 import org.springframework.core.io.Resource;
 import org.springframework.http.HttpMethod;
@@ -49,6 +46,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
  */
 public class FederationClient extends AbstractClient {
 
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
+
        /**
         * @param theTarget
         *            Target
@@ -89,7 +88,7 @@ public class FederationClient extends AbstractClient {
                        log.info(EELFLoggerDelegate.debugLogger, uri + " response " + response);
                }
                return response == null ? null : response.getBody();
-       }       
+       }
 
        /**
         */
@@ -162,6 +161,7 @@ public class FederationClient extends AbstractClient {
        }
 
        /**
+        * @param theSolutionId the solution id
         * @return Peer information from Remote Acumos
         * @throws HttpStatusCodeException
         *             Throws HttpStatusCodeException if remote acumos interaction has failed.
@@ -192,9 +192,7 @@ public class FederationClient extends AbstractClient {
 
        /**
         * 
-        * @param theSolutionId
-        *            key-value pairs; ignored if null or empty. Gives special treatment
-        *            to Date-type values.
+        * @param theSolutionId the solution id
         * @return List of MLPSolution Revisions from Remote Acumos
         * @throws HttpStatusCodeException
         *             Throws HttpStatusCodeException is remote acumos is not available
index 32f31cf..2f9fdfb 100644 (file)
@@ -29,6 +29,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
  * client. Getters and setters encapsulate the fields of a class by making them
  * accessible only through its public methods and keep the values themselves
  * private.
+ * @param <T> Request body class
  */
 
 public class JsonRequest<T> implements Serializable {
index 1235781..3a311e4 100644 (file)
@@ -22,8 +22,8 @@ package org.acumos.federation.gateway.config;
 
 import org.springframework.context.annotation.Condition;
 import org.springframework.context.annotation.ConditionContext;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 import org.springframework.core.env.Environment;
+import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Bean instantiantion conditional on wether we are running as an adapter
index c546d98..1466aef 100644 (file)
 
 package org.acumos.federation.gateway.config;
 
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Import;
-import org.springframework.context.annotation.Profile;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.scheduling.annotation.EnableScheduling;
-
-import org.acumos.federation.gateway.service.CatalogService;
-import org.acumos.federation.gateway.service.PeerSubscriptionService;
-import org.acumos.federation.gateway.service.PeerService;
+import org.acumos.federation.gateway.common.Clients;
+import org.acumos.federation.gateway.security.AuthenticationConfiguration;
 import org.acumos.federation.gateway.service.ArtifactService;
+import org.acumos.federation.gateway.service.CatalogService;
 import org.acumos.federation.gateway.service.LocalWatchService;
-
-import org.acumos.federation.gateway.service.impl.ArtifactServiceImpl;
+import org.acumos.federation.gateway.service.PeerService;
+import org.acumos.federation.gateway.service.PeerSubscriptionService;
 import org.acumos.federation.gateway.service.impl.ArtifactServiceLocalImpl;
 import org.acumos.federation.gateway.service.impl.CatalogServiceLocalImpl;
 import org.acumos.federation.gateway.service.impl.PeerServiceLocalImpl;
-import org.acumos.federation.gateway.common.Clients;
-
 import org.acumos.federation.gateway.task.TaskConfiguration;
-import org.acumos.federation.gateway.security.AuthenticationConfiguration;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import org.springframework.scheduling.annotation.EnableScheduling;
 
 /**
  * Specifies common configuration required by the federation adapter.
index 4bdee9b..54d574a 100644 (file)
@@ -22,14 +22,11 @@ package org.acumos.federation.gateway.config;
 
 import java.lang.invoke.MethodHandles;
 
-import org.springframework.stereotype.Component;
 import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Configuration;
-
-import com.github.dockerjava.core.DockerClientConfig; 
-import com.github.dockerjava.core.DefaultDockerClientConfig; 
+import org.springframework.stereotype.Component;
 
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
+import com.github.dockerjava.core.DefaultDockerClientConfig;
+import com.github.dockerjava.core.DockerClientConfig;
 
 /**
  * 
index bfceb0f..16fb6fa 100644 (file)
 
 package org.acumos.federation.gateway.config;
 
-import org.springframework.boot.context.properties.ConfigurationProperties;
-//import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Scope;
-import org.springframework.context.annotation.Import;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
+import java.lang.invoke.MethodHandles;
 
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
 import org.acumos.federation.gateway.controller.CatalogController;
 import org.acumos.federation.gateway.controller.PeersController;
 import org.acumos.federation.gateway.controller.PingController;
 import org.acumos.federation.gateway.controller.RegistrationController;
-import org.acumos.federation.gateway.security.AuthenticationConfiguration;
-
 import org.apache.http.client.HttpClient;
-
+//import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.config.ConfigurableBeanFactory;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
 import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
-import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;
-import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Scope;
 
 /**
  * Provide those beans used in the interaction with other peers (federation)
@@ -54,7 +47,7 @@ public class FederationConfiguration {
 
        @Autowired
        private FederationInterfaceConfiguration interfaceConfig;
-       private EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(getClass().getName());
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
 
        public FederationConfiguration() {
        }
index 7787918..b529bd1 100644 (file)
@@ -20,9 +20,8 @@
 
 package org.acumos.federation.gateway.config;
 
-import org.springframework.stereotype.Component;
 import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Configuration;
+import org.springframework.stereotype.Component;
 
 /**
  * Defines a specific external configuration prefix for the federation interface.
index dcd9da7..65c465b 100644 (file)
@@ -22,8 +22,8 @@ package org.acumos.federation.gateway.config;
 
 import org.springframework.context.annotation.Condition;
 import org.springframework.context.annotation.ConditionContext;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 import org.springframework.core.env.Environment;
+import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Bean instantiantion conditional on wether we are running as a gateway
index 50ff17e..7369c58 100644 (file)
 
 package org.acumos.federation.gateway.config;
 
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Import;
-import org.springframework.context.annotation.Profile;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.scheduling.annotation.EnableScheduling;
-
+import org.acumos.federation.gateway.adapter.PeerGateway;
+import org.acumos.federation.gateway.common.Clients;
+import org.acumos.federation.gateway.security.AuthenticationConfiguration;
+import org.acumos.federation.gateway.service.ArtifactService;
 import org.acumos.federation.gateway.service.CatalogService;
-import org.acumos.federation.gateway.service.PeerSubscriptionService;
 import org.acumos.federation.gateway.service.PeerService;
-import org.acumos.federation.gateway.service.ArtifactService;
-
-import org.acumos.federation.gateway.service.impl.CatalogServiceImpl;
-import org.acumos.federation.gateway.service.impl.PeerSubscriptionServiceImpl;
-import org.acumos.federation.gateway.service.impl.PeerServiceImpl;
+import org.acumos.federation.gateway.service.PeerSubscriptionService;
 import org.acumos.federation.gateway.service.impl.ArtifactServiceImpl;
 import org.acumos.federation.gateway.service.impl.ArtifactServiceLocalImpl;
-import org.acumos.federation.gateway.common.Clients;
-
-import org.acumos.federation.gateway.adapter.PeerGateway;
-
+import org.acumos.federation.gateway.service.impl.CatalogServiceImpl;
+import org.acumos.federation.gateway.service.impl.PeerServiceImpl;
+import org.acumos.federation.gateway.service.impl.PeerSubscriptionServiceImpl;
 import org.acumos.federation.gateway.task.TaskConfiguration;
-import org.acumos.federation.gateway.security.AuthenticationConfiguration;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import org.springframework.context.annotation.Profile;
+import org.springframework.scheduling.annotation.EnableScheduling;
 
 
 /**
index de55e83..450f722 100644 (file)
 
 package org.acumos.federation.gateway.config;
 
-import java.io.IOException;
-import java.io.InputStream;
 import java.io.FileInputStream;
-import java.io.File;
 import java.io.FileNotFoundException;
-
-import java.net.URI;
+import java.io.IOException;
+import java.io.InputStream;
 import java.net.InetAddress;
 import java.net.UnknownHostException;
-
-import javax.net.SocketFactory;
-import javax.net.ssl.SSLContext;
-
 import java.security.KeyStore;
 
 import javax.annotation.PostConstruct;
+import javax.net.ssl.SSLContext;
 
-import org.springframework.stereotype.Component;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
-import org.springframework.boot.context.embedded.Ssl;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Scope;
-import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.io.ResourceLoader;
-import org.springframework.core.io.DefaultResourceLoader;
-
+import org.apache.catalina.connector.Connector;
+import org.apache.coyote.http11.Http11NioProtocol;
 import org.apache.http.HttpHost;
 import org.apache.http.HttpRequest;
-import org.apache.http.client.HttpClient;
-import org.apache.http.impl.client.HttpClients;
-import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.client.CredentialsProvider;
-import org.apache.http.impl.client.BasicCredentialsProvider;
-import org.apache.http.protocol.HttpContext;
 import org.apache.http.auth.AuthScope;
 import org.apache.http.auth.UsernamePasswordCredentials;
+import org.apache.http.client.CredentialsProvider;
+import org.apache.http.client.HttpClient;
 import org.apache.http.config.Registry;
 import org.apache.http.config.RegistryBuilder;
-import org.apache.http.conn.scheme.PlainSocketFactory;
-import org.apache.http.conn.scheme.Scheme;
-import org.apache.http.conn.scheme.SchemeRegistry;
+import org.apache.http.conn.routing.HttpRoute;
+import org.apache.http.conn.routing.HttpRoutePlanner;
 import org.apache.http.conn.socket.ConnectionSocketFactory;
 import org.apache.http.conn.socket.PlainConnectionSocketFactory;
 import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
 import org.apache.http.conn.ssl.SSLContextBuilder;
-import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
-import org.apache.http.impl.conn.BasicHttpClientConnectionManager;
 //import org.apache.http.ssl.SSLContexts;
 //import org.apache.http.ssl.SSLContextBuilder;
 import org.apache.http.conn.ssl.SSLContexts;
-import org.apache.http.conn.ssl.SSLContextBuilder;
-import org.apache.http.conn.routing.HttpRoute;
-import org.apache.http.conn.routing.HttpRoutePlanner;
-
-
-import org.apache.catalina.connector.Connector;
-import org.apache.coyote.http11.Http11NioProtocol;
-
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
+import org.apache.http.impl.client.BasicCredentialsProvider;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.conn.BasicHttpClientConnectionManager;
+import org.apache.http.protocol.HttpContext;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
+import org.springframework.boot.context.embedded.Ssl;
+import org.springframework.core.io.DefaultResourceLoader;
+import org.springframework.core.io.ResourceLoader;
+import org.springframework.stereotype.Component;
 
 @Component
 public class InterfaceConfiguration {
index 172deb2..e549f40 100644 (file)
 
 package org.acumos.federation.gateway.config;
 
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import java.lang.invoke.MethodHandles;
+
+import org.acumos.federation.gateway.controller.PeerCatalogController;
+import org.acumos.federation.gateway.controller.PeerPeersController;
+import org.acumos.federation.gateway.controller.PeerPingController;
+import org.acumos.federation.gateway.controller.PeerSubscriptionController;
+import org.apache.http.client.HttpClient;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.ApplicationContextAware;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Scope;
-import org.springframework.context.annotation.Import;
-import org.springframework.context.annotation.Configuration;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-
-import org.apache.http.client.HttpClient;
-
 import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
 import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
-import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;
-import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
-
-
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.controller.PeerPingController;
-import org.acumos.federation.gateway.controller.PeerPeersController;
-import org.acumos.federation.gateway.controller.PeerCatalogController;
-import org.acumos.federation.gateway.controller.PeerSubscriptionController;
-import org.acumos.federation.gateway.security.AuthenticationConfiguration;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Scope;
 
 /**
  * Provides the beans used in interactions with the local Acumos system
@@ -55,7 +45,7 @@ public class LocalConfiguration {
 
        @Autowired
        private LocalInterfaceConfiguration interfaceConfig;
-       private EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(getClass().getName());
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
 
        public LocalConfiguration() {
        }
index ae4965f..33f0c91 100644 (file)
@@ -20,9 +20,8 @@
 
 package org.acumos.federation.gateway.config;
 
-import org.springframework.stereotype.Component;
 import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Configuration;
+import org.springframework.stereotype.Component;
 
 /**
  * Defines a specific external configuration prefix for the local interface.
index 0c630a6..1738d11 100644 (file)
@@ -22,8 +22,8 @@ package org.acumos.federation.gateway.config;
 
 import org.springframework.context.annotation.Condition;
 import org.springframework.context.annotation.ConditionContext;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 import org.springframework.core.env.Environment;
+import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Expresses the configuration based condition determining wether we expose/enable the registration
index de67346..52998b9 100644 (file)
@@ -22,7 +22,6 @@ package org.acumos.federation.gateway.controller;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
 
 /**
  * 
@@ -32,7 +31,6 @@ public abstract class AbstractController {
 
        protected static final String APPLICATION_JSON = "application/json";
 
-       protected final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(getClass().getName());
        protected final ObjectMapper mapper;
 
        public AbstractController() {
index 2d3e54c..605f95a 100644 (file)
 
 package org.acumos.federation.gateway.controller;
 
+import java.lang.invoke.MethodHandles;
 import java.net.URI;
 import java.net.URISyntaxException;
-
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Callable;
 
-import java.lang.invoke.MethodHandles;
-
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -37,20 +35,15 @@ import org.acumos.cds.domain.MLPSolution;
 import org.acumos.cds.domain.MLPSolutionRevision;
 import org.acumos.federation.gateway.cds.ArtifactType;
 import org.acumos.federation.gateway.common.API;
-import org.acumos.federation.gateway.common.JSONTags;
 import org.acumos.federation.gateway.common.JsonResponse;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.security.Peer;
-import org.acumos.federation.gateway.service.CatalogService;
 import org.acumos.federation.gateway.service.ArtifactService;
-import org.acumos.federation.gateway.service.ServiceContext;
+import org.acumos.federation.gateway.service.CatalogService;
 import org.acumos.federation.gateway.util.Utils;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.io.InputStreamResource;
 import org.springframework.http.MediaType;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.util.Base64Utils;
 import org.springframework.web.bind.annotation.CrossOrigin;
@@ -60,10 +53,10 @@ import org.springframework.web.bind.annotation.RequestMethod;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 
-import io.swagger.annotations.ApiOperation;
-
 import com.github.dockerjava.api.model.Identifier;
 
+import io.swagger.annotations.ApiOperation;
+
 /**
  * 
  *
index b8c3491..ae5cef2 100644 (file)
 
 package org.acumos.federation.gateway.controller;
 
-import java.util.Map;
 import java.util.HashMap;
+import java.util.Map;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.core.context.SecurityContextHolder;
-
-import org.acumos.federation.gateway.service.ServiceContext;
 import org.acumos.federation.gateway.security.Peer;
+import org.acumos.federation.gateway.service.ServiceContext;
+import org.springframework.security.core.context.SecurityContextHolder;
 
 /**
  * The security context is thread local so we do the same for attributes.
index b8c2d83..2b04fc7 100644 (file)
 
 package org.acumos.federation.gateway.controller;
 
-import java.net.URI;
+import java.lang.invoke.MethodHandles;
 import java.util.List;
 import java.util.Map;
 
-import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import org.acumos.cds.domain.MLPPeer;
 import org.acumos.cds.domain.MLPSolution;
 import org.acumos.federation.gateway.common.API;
 import org.acumos.federation.gateway.common.Clients;
-import org.acumos.federation.gateway.common.JSONTags;
 import org.acumos.federation.gateway.common.JsonResponse;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.security.Peer;
 import org.acumos.federation.gateway.service.PeerService;
-import org.acumos.federation.gateway.service.ServiceContext;
 import org.acumos.federation.gateway.util.Utils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.io.InputStreamResource;
-import org.springframework.http.MediaType;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.util.Base64Utils;
 import org.springframework.web.bind.annotation.CrossOrigin;
@@ -63,6 +56,8 @@ import io.swagger.annotations.ApiOperation;
 @RequestMapping(API.Roots.LOCAL)
 public class PeerCatalogController extends AbstractController {
 
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
+
        @Autowired
        private Clients clients;
        @Autowired
index 63e4592..d49a5a3 100644 (file)
@@ -20,6 +20,7 @@
 
 package org.acumos.federation.gateway.controller;
 
+import java.lang.invoke.MethodHandles;
 import java.util.List;
 
 import javax.servlet.http.HttpServletResponse;
@@ -27,15 +28,11 @@ import javax.servlet.http.HttpServletResponse;
 import org.acumos.cds.domain.MLPPeer;
 import org.acumos.federation.gateway.common.API;
 import org.acumos.federation.gateway.common.Clients;
-import org.acumos.federation.gateway.common.JSONTags;
 import org.acumos.federation.gateway.common.JsonResponse;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.security.Peer;
 import org.acumos.federation.gateway.service.PeerService;
-import org.acumos.federation.gateway.service.ServiceContext;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -49,6 +46,8 @@ import io.swagger.annotations.ApiOperation;
 @RequestMapping(API.Roots.LOCAL)
 public class PeerPeersController extends AbstractController {
 
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
+
        @Autowired
        private Clients clients;
        @Autowired
index b1bdf17..9f218e8 100644 (file)
 
 package org.acumos.federation.gateway.controller;
 
-import java.util.List;
+import java.lang.invoke.MethodHandles;
 
 import javax.servlet.http.HttpServletResponse;
 
 import org.acumos.cds.domain.MLPPeer;
 import org.acumos.federation.gateway.common.API;
 import org.acumos.federation.gateway.common.Clients;
-import org.acumos.federation.gateway.common.JSONTags;
 import org.acumos.federation.gateway.common.JsonResponse;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.security.Peer;
 import org.acumos.federation.gateway.service.PeerService;
-import org.acumos.federation.gateway.service.ServiceContext;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -49,6 +45,8 @@ import io.swagger.annotations.ApiOperation;
 @RequestMapping(API.Roots.LOCAL)
 public class PeerPingController extends AbstractController {
 
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
+
        @Autowired
        private Clients clients;
        @Autowired
index a46c934..0b09cb1 100644 (file)
 
 package org.acumos.federation.gateway.controller;
 
-import java.util.List;
+import java.lang.invoke.MethodHandles;
 
 import javax.servlet.http.HttpServletResponse;
 
 import org.acumos.cds.domain.MLPPeer;
 import org.acumos.federation.gateway.common.API;
 import org.acumos.federation.gateway.common.Clients;
-import org.acumos.federation.gateway.common.JSONTags;
 import org.acumos.federation.gateway.common.JsonResponse;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.security.Peer;
 import org.acumos.federation.gateway.service.PeerService;
-import org.acumos.federation.gateway.service.ServiceContext;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.PathVariable;
@@ -49,6 +45,8 @@ import io.swagger.annotations.ApiOperation;
 @RequestMapping(API.Roots.LOCAL)
 public class PeerRegistrationController extends AbstractController {
 
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
+
        @Autowired
        private Clients clients;
        @Autowired
index 1bb6d52..401a43a 100644 (file)
 
 package org.acumos.federation.gateway.controller;
 
-import java.util.List;
+import java.lang.invoke.MethodHandles;
 
 import javax.servlet.http.HttpServletResponse;
 
 import org.acumos.cds.domain.MLPPeer;
 import org.acumos.cds.domain.MLPPeerSubscription;
-
 import org.acumos.federation.gateway.common.API;
 import org.acumos.federation.gateway.common.JsonResponse;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.security.Peer;
 import org.acumos.federation.gateway.service.PeerService;
 import org.acumos.federation.gateway.service.PeerSubscriptionService;
-import org.acumos.federation.gateway.service.ServiceContext;
 import org.acumos.federation.gateway.task.PeerSubscriptionTaskScheduler;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationContext;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
-
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -56,13 +50,13 @@ import io.swagger.annotations.ApiOperation;
 @Controller
 @RequestMapping(API.Roots.LOCAL)
 public class PeerSubscriptionController extends AbstractController {
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
 
        @Autowired
        private PeerService peerService;
-
        @Autowired
        private PeerSubscriptionService peerSubscriptionService;
-
        @Autowired
        private ApplicationContext appCtx;
 
index 55b517b..245d772 100644 (file)
 
 package org.acumos.federation.gateway.controller;
 
+import java.lang.invoke.MethodHandles;
 import java.util.List;
 
 import javax.servlet.http.HttpServletResponse;
 
 import org.acumos.cds.domain.MLPPeer;
 import org.acumos.federation.gateway.common.API;
-import org.acumos.federation.gateway.common.JSONTags;
 import org.acumos.federation.gateway.common.JsonResponse;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.security.Peer;
 import org.acumos.federation.gateway.service.PeerService;
-import org.acumos.federation.gateway.service.ServiceContext;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -47,6 +44,8 @@ import io.swagger.annotations.ApiOperation;
 @RequestMapping(API.Roots.FEDERATION)
 public class PeersController extends AbstractController {
 
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
+
        @Autowired
        PeerService peerService;
 
index e8d3531..de4033a 100644 (file)
 
 package org.acumos.federation.gateway.controller;
 
-import java.util.List;
+import java.lang.invoke.MethodHandles;
 
 import javax.servlet.http.HttpServletResponse;
 
 import org.acumos.cds.domain.MLPPeer;
 import org.acumos.federation.gateway.common.API;
-import org.acumos.federation.gateway.common.JSONTags;
 import org.acumos.federation.gateway.common.JsonResponse;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.security.Peer;
 import org.acumos.federation.gateway.service.PeerService;
-import org.acumos.federation.gateway.service.ServiceContext;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -47,6 +42,8 @@ import io.swagger.annotations.ApiOperation;
 @RequestMapping(API.Roots.FEDERATION)
 public class PingController extends AbstractController {
 
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
+
        @Autowired
        private PeerService peerService;
 
index 3173113..fa33198 100644 (file)
 
 package org.acumos.federation.gateway.controller;
 
-import java.util.List;
+import java.lang.invoke.MethodHandles;
 
 import javax.servlet.http.HttpServletResponse;
 
 import org.acumos.cds.domain.MLPPeer;
 import org.acumos.federation.gateway.common.API;
-import org.acumos.federation.gateway.common.JSONTags;
 import org.acumos.federation.gateway.common.JsonResponse;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.security.Peer;
 import org.acumos.federation.gateway.service.PeerService;
-import org.acumos.federation.gateway.service.ServiceContext;
 import org.acumos.federation.gateway.service.ServiceException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -51,6 +47,8 @@ import io.swagger.annotations.ApiOperation;
 @RequestMapping(API.Roots.FEDERATION)
 public class RegistrationController extends AbstractController {
 
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
+
        @Autowired
        private PeerService peerService;
 
index 7aeb27e..97697c5 100644 (file)
@@ -20,8 +20,8 @@
 
 package org.acumos.federation.gateway.event;
 
-import java.util.List;
 import java.util.EventObject;
+import java.util.List;
 
 import org.acumos.cds.domain.MLPPeer;
 import org.acumos.cds.domain.MLPPeerSubscription;
index 9077c60..239f42f 100644 (file)
@@ -22,36 +22,27 @@ package org.acumos.federation.gateway.security;
 
 import java.util.List;
 
+import javax.naming.InvalidNameException;
 import javax.naming.ldap.LdapName;
 import javax.naming.ldap.Rdn;
-import javax.naming.InvalidNameException;
-
 import javax.servlet.http.HttpServletResponse;
 
 import org.acumos.cds.domain.MLPPeer;
-
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
 import org.acumos.federation.gateway.service.PeerService;
 import org.acumos.federation.gateway.util.Utils;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Lazy;
-import org.springframework.context.annotation.Scope;
 import org.springframework.context.annotation.Configuration;
-
+import org.springframework.context.annotation.Lazy;
 import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
 import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
 import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
-import org.springframework.security.web.authentication.preauth.x509.X509AuthenticationFilter;
-import org.springframework.security.web.access.AccessDeniedHandler;
 import org.springframework.security.config.http.SessionCreationPolicy;
-import org.springframework.security.core.authority.AuthorityUtils;
-import org.springframework.security.core.userdetails.User;
-import org.springframework.security.core.userdetails.UserDetails;
 import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.web.access.AccessDeniedHandler;
 
 /**
  * 
index 3ec9b4a..81e2a37 100644 (file)
@@ -21,13 +21,10 @@ package org.acumos.federation.gateway.security;
 
 import java.util.Collection;
 
+import org.acumos.cds.domain.MLPPeer;
 import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.userdetails.User;
 
-import org.acumos.federation.gateway.cds.PeerStatus;
-
-import org.acumos.cds.domain.MLPPeer;
-
 /**
  * Peers constitute the users of the federation gateway.
  */
index 90400c0..dea2667 100644 (file)
  */
 package org.acumos.federation.gateway.security;
 
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.Arrays;
-
-import org.springframework.security.core.GrantedAuthority;
 
 /**
  * Each Role states a predefined set of available federation priviledges.
index 9ad4943..6e112fa 100644 (file)
  */
 package org.acumos.federation.gateway.service;
 
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.InputStreamResource;
-
 import org.acumos.cds.domain.MLPArtifact;
+import org.springframework.core.io.InputStreamResource;
+import org.springframework.core.io.Resource;
 
 /**
  * Handles access to the artifacts repository. 
index 989bbc1..cc4663e 100644 (file)
  */
 package org.acumos.federation.gateway.service;
 
-import java.io.File;
-import java.util.Map;
 import java.util.List;
-
-import org.springframework.core.io.InputStreamResource;
-
-import org.acumos.federation.gateway.cds.Artifact;
-import org.acumos.federation.gateway.cds.Solution;
-import org.acumos.federation.gateway.cds.SolutionRevision;
+import java.util.Map;
 
 import org.acumos.cds.domain.MLPArtifact;
 import org.acumos.cds.domain.MLPSolution;
 import org.acumos.cds.domain.MLPSolutionRevision;
+import org.acumos.federation.gateway.cds.Artifact;
+import org.acumos.federation.gateway.cds.Solution;
+import org.acumos.federation.gateway.cds.SolutionRevision;
 
 /**
  * Handles access to the solutions catalog. The APIs of tis interface take a
index d38ec17..421b417 100644 (file)
 
 package org.acumos.federation.gateway.service;
 
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.BufferedReader;
 import java.io.IOException;
-
+import java.net.URI;
+import java.nio.file.FileSystems;
 import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.nio.file.StandardWatchEventKinds;
 import java.nio.file.WatchEvent;
 import java.nio.file.WatchKey;
 import java.nio.file.WatchService;
-import java.nio.file.FileSystems;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import java.util.Set;
-import java.util.Map;
 import java.util.HashMap;
-import java.util.List;
-import java.util.LinkedList;
-import java.util.Date;
-import java.text.DateFormat;
-import java.util.stream.Collectors;
+import java.util.Map;
 import java.util.function.Consumer;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 
-import org.json.JSONObject;
-import org.json.JSONArray;
-
-import org.springframework.core.env.Environment;
-import org.springframework.stereotype.Service;
-import org.springframework.beans.factory.BeanInitializationException;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.scheduling.annotation.Scheduled;
-
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-
-import org.apache.commons.io.IOUtils;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Service;
 
 /**
  * Local implementations get their info from local file(s), we help them here a
index d853359..afbbede 100644 (file)
@@ -178,7 +178,7 @@ public interface PeerService {
        public default void assertPeerUnregistration(MLPPeer thePeer) throws ServiceException {
        
                if (thePeer == null)
-                       throw new ServiceException("No such peer found: " + thePeer.getSubjectName());
+                       throw new ServiceException("No such peer");
 
                PeerStatus status = PeerStatus.forCode(thePeer.getStatusCode());
                if (null == status) {
index de9519d..251aa02 100644 (file)
@@ -19,8 +19,8 @@
  */
 package org.acumos.federation.gateway.service;
 
-import java.util.Map;
 import java.util.HashMap;
+import java.util.Map;
 
 import org.acumos.federation.gateway.security.Peer;
 
index a8a32dc..655c028 100644 (file)
 
 package org.acumos.federation.gateway.service.impl;
 
-import org.springframework.context.ApplicationContext;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
+import org.acumos.cds.client.ICommonDataServiceRestClient;
 import org.acumos.federation.gateway.common.Clients;
-import org.acumos.federation.gateway.service.ServiceContext;
 import org.acumos.federation.gateway.security.Peer;
-
-import org.acumos.cds.client.ICommonDataServiceRestClient;
+import org.acumos.federation.gateway.service.ServiceContext;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationContext;
 
 /** */
 public abstract class AbstractServiceImpl {
index 088c7a1..8d506ce 100644 (file)
 
 package org.acumos.federation.gateway.service.impl;
 
-import org.springframework.core.io.Resource;
-import org.springframework.core.env.Environment;
-import org.springframework.stereotype.Service;
-import org.springframework.beans.factory.BeanInitializationException;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.beans.factory.annotation.Autowired;
-
-import org.acumos.federation.gateway.service.ServiceContext;
 import org.acumos.federation.gateway.security.Peer;
 import org.acumos.federation.gateway.service.LocalWatchService;
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-
-import org.apache.commons.io.IOUtils;
+import org.acumos.federation.gateway.service.ServiceContext;
+import org.springframework.beans.factory.BeanInitializationException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationContext;
+import org.springframework.core.io.Resource;
 
 
 public class AbstractServiceLocalImpl {
index 45f172b..4d1678f 100644 (file)
@@ -25,51 +25,26 @@ package org.acumos.federation.gateway.service.impl;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Date;
-import java.util.stream.Collectors;
-
 import java.lang.invoke.MethodHandles;
 
-import javax.annotation.PostConstruct;
-
-import org.apache.commons.io.FileUtils;
-
+import org.acumos.cds.domain.MLPArtifact;
 import org.acumos.federation.gateway.cds.ArtifactType;
-import org.acumos.federation.gateway.util.Utils;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
 import org.acumos.federation.gateway.service.ArtifactService;
 import org.acumos.federation.gateway.service.ServiceContext;
 import org.acumos.federation.gateway.service.ServiceException;
-
 import org.acumos.nexus.client.NexusArtifactClient;
 import org.acumos.nexus.client.data.UploadArtifactInfo;
+import org.springframework.core.io.InputStreamResource;
+import org.springframework.core.io.Resource;
+import org.springframework.stereotype.Service;
 
 import com.github.dockerjava.api.DockerClient;
 import com.github.dockerjava.api.model.Identifier;
 import com.github.dockerjava.api.model.Repository;
-import com.github.dockerjava.api.model.PullResponseItem;
 import com.github.dockerjava.core.command.PullImageResultCallback;
 import com.github.dockerjava.core.command.PushImageResultCallback;
 
-import org.acumos.cds.AccessTypeCode;
-import org.acumos.cds.ValidationStatusCode;
-import org.acumos.cds.client.ICommonDataServiceRestClient;
-import org.acumos.cds.domain.MLPArtifact;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.Environment;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.InputStreamResource;
-import org.springframework.stereotype.Service;
-import org.springframework.context.annotation.Conditional;
-
 
 /**
  * CDS based implementation of the CatalogService.
index 36e252f..bfe5787 100644 (file)
  * limitations under the License.
  * ===============LICENSE_END=========================================================
  */
-
-/**
- * 
- */
 package org.acumos.federation.gateway.service.impl;
 
 import java.io.File;
-import java.io.InputStream;
 import java.io.IOException;
-import java.net.URI;
-import java.util.stream.Collectors;
-
 import java.lang.invoke.MethodHandles;
+import java.net.URI;
 
-import javax.annotation.PostConstruct;
-
-import org.apache.commons.io.FileUtils;
-
-import org.acumos.federation.gateway.util.Utils;
+import org.acumos.cds.domain.MLPArtifact;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
 import org.acumos.federation.gateway.service.ArtifactService;
 import org.acumos.federation.gateway.service.ServiceContext;
 import org.acumos.federation.gateway.service.ServiceException;
-
-import org.acumos.cds.domain.MLPArtifact;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.Environment;
-import org.springframework.core.io.Resource;
+import org.apache.commons.io.FileUtils;
 import org.springframework.core.io.InputStreamResource;
+import org.springframework.core.io.Resource;
 import org.springframework.stereotype.Service;
-import org.springframework.context.annotation.Conditional;
-
-import org.apache.commons.io.FileUtils;
 
 /**
  * File based implementation of the ArtifactService.
index 158fcdf..23dc0d4 100644 (file)
  */
 package org.acumos.federation.gateway.service.impl;
 
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
+import java.lang.invoke.MethodHandles;
 import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Date;
-import java.util.Collections;
 import java.util.stream.Collectors;
 
-import java.lang.invoke.MethodHandles;
-
 import javax.annotation.PostConstruct;
 
-import org.apache.commons.io.FileUtils;
-
-import org.acumos.federation.gateway.util.Utils;
-import org.acumos.federation.gateway.util.Errors;
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.service.CatalogService;
-import org.acumos.federation.gateway.service.ServiceContext;
-import org.acumos.federation.gateway.service.ServiceException;
-
-import org.acumos.nexus.client.NexusArtifactClient;
-
 import org.acumos.cds.AccessTypeCode;
 import org.acumos.cds.ValidationStatusCode;
 import org.acumos.cds.client.ICommonDataServiceRestClient;
 import org.acumos.cds.domain.MLPArtifact;
 import org.acumos.cds.domain.MLPSolution;
 import org.acumos.cds.domain.MLPSolutionRevision;
-import org.acumos.cds.transport.RestPageResponse;
 import org.acumos.cds.transport.RestPageRequest;
-
+import org.acumos.cds.transport.RestPageResponse;
+import org.acumos.federation.gateway.cds.Artifact;
+import org.acumos.federation.gateway.cds.Solution;
+import org.acumos.federation.gateway.cds.SolutionRevision;
+import org.acumos.federation.gateway.config.EELFLoggerDelegate;
+import org.acumos.federation.gateway.service.CatalogService;
+import org.acumos.federation.gateway.service.ServiceContext;
+import org.acumos.federation.gateway.service.ServiceException;
+import org.acumos.federation.gateway.util.Errors;
+import org.apache.commons.beanutils.PropertyUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.env.Environment;
-import org.springframework.core.io.InputStreamResource;
 import org.springframework.stereotype.Service;
-import org.springframework.context.annotation.Conditional;
 import org.springframework.web.client.HttpStatusCodeException;
 
-import org.acumos.federation.gateway.cds.Solution;
-import org.acumos.federation.gateway.cds.SolutionRevision;
-import org.acumos.federation.gateway.cds.Artifact;
-
-import org.apache.commons.beanutils.PropertyUtils;
-
 /**
  * CDS based implementation of the CatalogService.
  *
@@ -153,7 +136,7 @@ public class CatalogServiceImpl extends AbstractServiceImpl
                                                                                                                                                                                new String[] {selector.get(Solution.Fields.description).toString()} :
                                                                                                                                                                                null,
                                                                                                                                                                        (Boolean)selector.get(Solution.Fields.active),
-                                                                                                                                                                       null, //owner ids
+                                                                                                                                                                       null, //user ids
                                                                                                                                                                        new String[] {selector.get(Solution.Fields.accessTypeCode).toString()},
                                                                                                                                                                        selector.containsKey(Solution.Fields.modelTypeCode) ?
                                                                                                                                                                                new String[] {selector.get(Solution.Fields.modelTypeCode).toString()} :
@@ -162,8 +145,23 @@ public class CatalogServiceImpl extends AbstractServiceImpl
                                                                                                                                                                        selector.containsKey(Solution.Fields.tags) ?
                                                                                                                                                                                new String[] {selector.get(Solution.Fields.tags).toString()} :
                                                                                                                                                                                null,
+                                                                                                                                                                       null,   //authorKeywords
+                                                                                                                                                                       null, //publisherKeywords
                                                                                                                                                                        pageRequest);
-                                               //cdsClient.searchSolutions(selector, false, pageRequest);
+/*
+       RestPageResponse<MLPSolution> findPortalSolutions(
+                                                                                                                                                                       String[] nameKeywords,
+                                                                                                                                                                       String[] descriptionKeywords,
+                                                                                                                                                                       boolean active,
+                                                                                                                                                                       String[] userIds,
+                                                                                                                                                                       String[] accessTypeCodes,
+                                                                                                                                                                       String[] modelTypeCodes,
+                                                                                                                                                                       String[] validationStatusCodes,
+                                                                                                                                                                       String[] tags,
+                                                                                                                                                                       String[] authorKeywords,
+                                                                                                                                                                       String[] publisherKeywords,
+                       RestPageRequest pageRequest);
+*/
                                        pageSolutions = pageResponse.getContent();
                                }
                                log.debug(EELFLoggerDelegate.debugLogger, "getSolutions page response {}", pageResponse);
index 3cba007..0fa1c79 100644 (file)
 
 package org.acumos.federation.gateway.service.impl;
 
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.InputStream;
 import java.io.IOException;
-import java.util.Arrays;
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.HashMap;
+import java.lang.invoke.MethodHandles;
+import java.net.URISyntaxException;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
-import java.util.Collections;
 import java.util.stream.Collectors;
 
-import java.lang.invoke.MethodHandles;
-
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.databind.MappingIterator;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.ObjectReader;
-
-import org.apache.commons.io.FileUtils;
-
+import org.acumos.cds.domain.MLPArtifact;
+import org.acumos.cds.domain.MLPSolution;
+import org.acumos.cds.domain.MLPSolutionRevision;
+import org.acumos.federation.gateway.cds.Artifact;
+import org.acumos.federation.gateway.cds.Mapper;
+import org.acumos.federation.gateway.cds.Solution;
+import org.acumos.federation.gateway.cds.SolutionRevision;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
 import org.acumos.federation.gateway.service.CatalogService;
 import org.acumos.federation.gateway.service.ServiceContext;
 import org.acumos.federation.gateway.service.ServiceException;
-import org.acumos.federation.gateway.util.Utils;
-
-import org.acumos.federation.gateway.cds.Solution;
-import org.acumos.federation.gateway.cds.SolutionRevision;
-import org.acumos.federation.gateway.cds.Artifact;
-import org.acumos.federation.gateway.cds.Mapper;
-
-import org.acumos.cds.AccessTypeCode;
-import org.acumos.cds.ValidationStatusCode;
-import org.acumos.cds.client.ICommonDataServiceRestClient;
-import org.acumos.cds.domain.MLPArtifact;
-import org.acumos.cds.domain.MLPSolution;
-import org.acumos.cds.domain.MLPSolutionRevision;
-import org.acumos.cds.transport.RestPageResponse;
-
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.BeanInitializationException;
-import org.springframework.core.env.Environment;
-import org.springframework.core.io.InputStreamResource;
-import org.springframework.stereotype.Service;
-import org.springframework.context.annotation.Conditional;
 import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Service;
+
+import com.fasterxml.jackson.databind.MappingIterator;
+import com.fasterxml.jackson.databind.ObjectReader;
 
 
 /**
index 42e62fa..137e183 100644 (file)
  */
 package org.acumos.federation.gateway.service.impl;
 
-import java.util.Collections;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.List;
-import java.util.ArrayList;
-
 import java.lang.invoke.MethodHandles;
+import java.util.ArrayList;
+import java.util.List;
 
+import org.acumos.cds.client.ICommonDataServiceRestClient;
+import org.acumos.cds.domain.MLPPeer;
+import org.acumos.cds.transport.RestPageRequest;
+import org.acumos.cds.transport.RestPageResponse;
+import org.acumos.federation.gateway.cds.PeerStatus;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.util.MapBuilder;
 import org.acumos.federation.gateway.service.PeerService;
 import org.acumos.federation.gateway.service.ServiceContext;
 import org.acumos.federation.gateway.service.ServiceException;
-import org.acumos.federation.gateway.cds.PeerStatus;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.env.Environment;
+import org.acumos.federation.gateway.util.MapBuilder;
 import org.springframework.stereotype.Service;
-import org.springframework.context.annotation.Conditional;
-
-import org.acumos.cds.client.ICommonDataServiceRestClient;
-import org.acumos.cds.domain.MLPPeer;
-import org.acumos.cds.transport.RestPageResponse;
-import org.acumos.cds.transport.RestPageRequest;
 
 /**
  * 
index a010dda..e04455d 100644 (file)
 
 package org.acumos.federation.gateway.service.impl;
 
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.BufferedReader;
 import java.io.IOException;
-
-import java.net.URI;
+import java.lang.invoke.MethodHandles;
 import java.net.URISyntaxException;
-
-import java.util.Set;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.List;
-import java.util.LinkedList;
-import java.util.Date;
 import java.util.Collections;
+import java.util.List;
 import java.util.stream.Collectors;
 
-import java.lang.invoke.MethodHandles;
-
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.fasterxml.jackson.databind.MappingIterator;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.ObjectReader;
-
-import org.springframework.core.env.Environment;
-import org.springframework.stereotype.Service;
-import org.springframework.beans.factory.BeanInitializationException;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Conditional;
-import org.springframework.beans.factory.annotation.Autowired;
-
+import org.acumos.cds.domain.MLPPeer;
+import org.acumos.cds.domain.MLPPeerSubscription;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
 import org.acumos.federation.gateway.service.PeerService;
 import org.acumos.federation.gateway.service.PeerSubscriptionService;
 import org.acumos.federation.gateway.service.ServiceContext;
 import org.acumos.federation.gateway.service.ServiceException;
+import org.springframework.beans.factory.BeanInitializationException;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Service;
 
-import org.acumos.cds.domain.MLPPeer;
-import org.acumos.cds.domain.MLPPeerSubscription;
-
-import org.apache.commons.io.IOUtils;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.MappingIterator;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.ObjectReader;
 
 @Service
 @ConfigurationProperties(prefix = "peersLocal")
index e32d731..5a9c4d4 100644 (file)
  */
 package org.acumos.federation.gateway.service.impl;
 
-import java.util.List;
-import java.util.stream.Collectors;
-
 import java.lang.invoke.MethodHandles;
+import java.util.List;
 
+import org.acumos.cds.client.ICommonDataServiceRestClient;
+import org.acumos.cds.domain.MLPPeerSubscription;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
 import org.acumos.federation.gateway.service.PeerSubscriptionService;
 import org.acumos.federation.gateway.service.ServiceException;
-import org.acumos.federation.gateway.util.Utils;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.core.env.Environment;
 import org.springframework.stereotype.Service;
-import org.springframework.context.annotation.Conditional;
-
-import org.acumos.cds.client.ICommonDataServiceRestClient;
-import org.acumos.cds.domain.MLPPeerSubscription;
-import org.acumos.cds.transport.RestPageResponse;
 
 /**
  * CDS based implementation of PeerSubscriptionService.
index 245755c..5a45b79 100644 (file)
 
 package org.acumos.federation.gateway.service.impl;
 
-import java.util.Map;
 import java.util.List;
-
-import org.acumos.federation.gateway.service.ServiceException;
+import java.util.Map;
 
 import org.acumos.cds.domain.MLPSolution;
 
index 903f1b5..58ccb49 100644 (file)
@@ -20,6 +20,7 @@
 
 package org.acumos.federation.gateway.task;
 
+import java.lang.invoke.MethodHandles;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -27,14 +28,13 @@ import java.util.Map;
 import org.acumos.cds.domain.MLPPeer;
 import org.acumos.cds.domain.MLPPeerSubscription;
 import org.acumos.cds.domain.MLPSolution;
+import org.acumos.federation.gateway.common.Clients;
+import org.acumos.federation.gateway.common.FederationClient;
 import org.acumos.federation.gateway.common.JsonResponse;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
 import org.acumos.federation.gateway.event.PeerSubscriptionEvent;
-import org.acumos.federation.gateway.common.Clients;
-import org.acumos.federation.gateway.common.FederationClient;
-import org.acumos.federation.gateway.util.Utils;
 import org.acumos.federation.gateway.service.PeerSubscriptionService;
-
+import org.acumos.federation.gateway.util.Utils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationEventPublisher;
 import org.springframework.context.annotation.Scope;
@@ -50,8 +50,7 @@ import org.springframework.stereotype.Component;
 @Scope("prototype")
 public class PeerSubscriptionTask implements Runnable {
 
-       private final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(getClass().getName());
-
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
 
        private MLPPeer peer;
        private MLPPeerSubscription subscription;
index 7327d3c..b918029 100644 (file)
 
 package org.acumos.federation.gateway.task;
 
+import java.lang.invoke.MethodHandles;
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
-import java.util.Date;
 import java.util.concurrent.ScheduledFuture;
 
-import java.lang.invoke.MethodHandles;
-
 import javax.annotation.PostConstruct;
 import javax.annotation.PreDestroy;
 
 import org.acumos.cds.domain.MLPPeer;
 import org.acumos.cds.domain.MLPPeerSubscription;
+import org.acumos.federation.gateway.cds.PeerStatus;
 import org.acumos.federation.gateway.config.EELFLoggerDelegate;
 import org.acumos.federation.gateway.service.PeerService;
 import org.acumos.federation.gateway.service.PeerSubscriptionService;
-import org.acumos.federation.gateway.cds.PeerStatus;
 import org.acumos.federation.gateway.util.Utils;
-
-import org.springframework.beans.BeansException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.ApplicationContext;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
 import org.springframework.core.env.Environment;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;
@@ -119,8 +114,7 @@ public class PeerSubscriptionTaskScheduler {
        }
 
        /**
-        * Schedule a one time execution of the subscription.
-        * The scheduler will not track the execution of suck a task.
+        * Schedule a one time execution of the subscription. The scheduler will not track the execution of suck a task.
         */
        public void runOnce(MLPPeer thePeer, MLPPeerSubscription theSub) {
                new PeerTaskHandler().runTask(thePeer, theSub);
index 6611cb7..b96f98e 100644 (file)
 
 package org.acumos.federation.gateway.task;
 
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.config.ConfigurableBeanFactory;
-import org.springframework.context.ApplicationContextAware;
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Scope;
-import org.springframework.context.annotation.Import;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-
-import org.apache.http.client.HttpClient;
-
-import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
-import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
-import org.springframework.boot.context.embedded.EmbeddedServletContainerFactory;
-import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
+import org.springframework.context.annotation.Scope;
 
 
 /**
@@ -60,7 +48,7 @@ public class TaskConfiguration {
        /**
         */
        @Bean
-  @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
+       @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
        public PeerSubscriptionTask peerSubscriptionTask() {
                return new PeerSubscriptionTask();
        }
index 40d410a..23e834e 100644 (file)
@@ -21,7 +21,6 @@
 package org.acumos.federation.gateway.util;
 
 import java.util.regex.Pattern;
-import java.util.regex.Matcher;
 import java.util.regex.PatternSyntaxException;
 
 import org.springframework.http.HttpStatus;
index 8142263..6685014 100644 (file)
@@ -22,6 +22,7 @@ package org.acumos.federation.gateway.util;
 
 /**
  * Modeled after the vertx future
+ * @param <T> Class
  */
 public interface Future<T> {
 
index cf4d0e7..12021b2 100644 (file)
 
 package org.acumos.federation.gateway.util;
 
-import java.util.List;
-import java.util.LinkedList;
 import java.util.Collections;
-
+import java.util.LinkedList;
+import java.util.List;
 import java.util.concurrent.CountDownLatch;
 import java.util.function.Function;
 
index 92afd83..33fcf20 100644 (file)
@@ -25,9 +25,12 @@ import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
 import java.io.Reader;
 import java.io.Writer;
-import java.lang.reflect.Type;
 import java.nio.charset.Charset;
 
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.json.JSONTokener;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpInputMessage;
 import org.springframework.http.HttpOutputMessage;
@@ -36,11 +39,6 @@ import org.springframework.http.converter.AbstractHttpMessageConverter;
 import org.springframework.http.converter.HttpMessageNotReadableException;
 import org.springframework.http.converter.HttpMessageNotWritableException;
 
-import org.json.JSONObject;
-import org.json.JSONArray;
-import org.json.JSONTokener;
-import org.json.JSONException;
-
 /**
  */
 public class JSONHttpMessageConverter extends AbstractHttpMessageConverter<Object> {
index 05f9eab..4d6c592 100644 (file)
@@ -21,8 +21,8 @@
 package org.acumos.federation.gateway.util;
 
 import java.util.Arrays;
-import java.util.List;
 import java.util.LinkedList;
+import java.util.List;
 
 public class ListBuilder<T> {
 
index 526b2f4..5633a9d 100644 (file)
 
 package org.acumos.federation.gateway.util;
 
-import java.util.Map;
 import java.util.HashMap;
+import java.util.Map;
 import java.util.function.Function;
-import java.util.function.BiFunction;
 
 public class MapBuilder<K, V> {
 
index dd55f16..9285418 100644 (file)
@@ -22,6 +22,7 @@ package org.acumos.federation.gateway.util;
 
 import java.io.File;
 import java.io.IOException;
+import java.lang.invoke.MethodHandles;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -34,7 +35,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 
 public class Utils {
 
-       private final static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(Utils.class);
+       private static final EELFLoggerDelegate log = EELFLoggerDelegate.getLogger(MethodHandles.lookup().lookupClass());
 
        private static ObjectMapper objectMapper = new ObjectMapper();
 
@@ -81,39 +82,39 @@ public class Utils {
        }
 
        public static String getTempFolderPath(String artifactName, String version, String nexusTempPath) {
-               logger.debug("--------------- getTempFolderPath() started --------------");
+               log.debug("--------------- getTempFolderPath() started --------------");
                if (!isEmptyOrNullString(nexusTempPath)) {
                        nexusTempPath = nexusTempPath + "/" + artifactName + "/" + version;
                        // create the directory for the solution and version specified
                        File dir = new File(nexusTempPath);
-                       logger.debug("------------ Directory for artifactName and Version : -------------" + dir);
+                       log.debug("------------ Directory for artifactName and Version : -------------" + dir);
                        if (!dir.exists()) {
-                               logger.debug("------------ Directory not exists for artifactName and Version : --------------------");
+                               log.debug("------------ Directory not exists for artifactName and Version : --------------------");
                                dir.mkdir();
-                               logger.debug("----------- New Directory created for artifactName and Version : ----------------" + dir);
+                               log.debug("----------- New Directory created for artifactName and Version : ----------------" + dir);
                        }
                }
-               logger.debug("-------------  getTempFolderPath() ended ---------------");
+               log.debug("-------------  getTempFolderPath() ended ---------------");
                return nexusTempPath;
        }
 
        public static void deletetTempFiles(String tempFolder) throws Exception {
-               logger.info("--------  deletetTempFiles() Started ------------");
+               log.info("--------  deletetTempFiles() Started ------------");
 
                File directory = new File(tempFolder);
 
                // make sure directory exists
                if (!directory.exists()) {
-                       logger.debug("----------- Directory does not exist. ----------");
+                       log.debug("----------- Directory does not exist. ----------");
 
                } else {
 
                        try {
 
                                delete(directory);
-                               logger.info("----------- deletetTempFiles() Ended ----------------");
+                               log.info("----------- deletetTempFiles() Ended ----------------");
                        } catch (Exception e) {
-                               logger.error("--------- Exception deletetTempFiles() -------------", e);
+                               log.error("--------- Exception deletetTempFiles() -------------", e);
                                throw e;
                        }
                }
@@ -121,7 +122,7 @@ public class Utils {
        }
 
        public static void delete(File file) throws IOException {
-               logger.debug("------------  delete() started ------------");
+               log.debug("------------  delete() started ------------");
                try {
                        if (file.isDirectory()) {
 
@@ -129,7 +130,7 @@ public class Utils {
                                if (file.list().length == 0) {
 
                                        file.delete();
-                                       logger.debug("--------- Directory is deleted : ----------- " + file.getAbsolutePath());
+                                       log.debug("--------- Directory is deleted : ----------- " + file.getAbsolutePath());
 
                                } else {
 
@@ -149,18 +150,18 @@ public class Utils {
                                        // check the directory again, if empty then delete it
                                        if (file.list().length == 0) {
                                                file.delete();
-                                               logger.debug(" -------Directory is deleted :------------- " + file.getAbsolutePath());
+                                               log.debug(" -------Directory is deleted :------------- " + file.getAbsolutePath());
                                        }
                                }
 
                        } else {
                                // if file, then delete it
                                file.delete();
-                               logger.debug("---------File is deleted :----------- " + file.getAbsolutePath());
+                               log.debug("---------File is deleted :----------- " + file.getAbsolutePath());
                        }
-                       logger.debug("------------- delete() ended ---------------");
+                       log.debug("------------- delete() ended ---------------");
                } catch (Exception ex) {
-                       logger.error("----------- Exceptoin Occured delete() ---------------", ex);
+                       log.error("----------- Exceptoin Occured delete() ---------------", ex);
 
                }
        }
index f0f5d68..ee82e1e 100644 (file)
  */
 package org.acumos.federation.gateway.test;
 
+import static org.junit.Assert.assertTrue;
+
 import java.util.List;
 import java.util.Scanner;
 
-import static org.junit.Assert.assertTrue;
-import static org.assertj.core.api.Assertions.assertThat; 
-
+import org.acumos.cds.domain.MLPPeer;
+import org.acumos.cds.domain.MLPSolution;
+import org.acumos.federation.gateway.common.JsonResponse;
+/* this is not good for unit testing .. */
+import org.acumos.federation.gateway.config.EELFLoggerDelegate;
+import org.acumos.federation.gateway.config.InterfaceConfigurationBuilder;
+import org.acumos.federation.gateway.config.InterfaceConfigurationBuilder.SSLBuilder;
+import org.apache.http.client.HttpClient;
 import org.junit.FixMethodOrder;
-import org.junit.runners.MethodSorters;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextHierarchy;
-import org.springframework.test.context.ContextConfiguration;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.web.WebAppConfiguration;
 import org.springframework.boot.test.web.client.TestRestTemplate;
-
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.MediaType;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpEntity;
 import org.springframework.http.ResponseEntity;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.core.ParameterizedTypeReference;
-
-import org.apache.http.client.HttpClient;
-
-/* this is not good for unit testing .. */
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.common.JsonResponse;
-import org.acumos.federation.gateway.config.InterfaceConfigurationBuilder;
-import static org.acumos.federation.gateway.config.InterfaceConfigurationBuilder.SSLBuilder;
-
-import org.acumos.cds.domain.MLPPeer;
-import org.acumos.cds.domain.MLPSolution;
-import org.acumos.cds.domain.MLPSolutionRevision;
-import org.acumos.cds.domain.MLPArtifact;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.ContextHierarchy;
+import org.springframework.test.context.junit4.SpringRunner;
 
 
 
index 315f5f6..b0275a1 100644 (file)
  */
 package org.acumos.federation.gateway.test;
 
-import java.io.InputStream;
-import java.io.Closeable;
-import java.io.IOException;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
 
-import java.util.Map;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Scanner;
 import java.util.Collections;
+import java.util.List;
 
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.CountDownLatch;
-
-import org.junit.Before;
-import static org.junit.Assert.assertTrue;
-import static org.assertj.core.api.Assertions.assertThat; 
-
+import org.acumos.cds.domain.MLPArtifact;
+import org.acumos.cds.domain.MLPPeer;
+import org.acumos.cds.domain.MLPSolution;
+import org.acumos.cds.domain.MLPSolutionRevision;
+import org.acumos.federation.gateway.cds.Solution;
+import org.acumos.federation.gateway.security.Peer;
+import org.acumos.federation.gateway.security.Role;
+import org.acumos.federation.gateway.service.CatalogService;
+import org.acumos.federation.gateway.service.ServiceContext;
+import org.acumos.federation.gateway.service.ServiceException;
 import org.junit.FixMethodOrder;
-import org.junit.runners.MethodSorters;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.web.WebAppConfiguration;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.ApplicationListener;
-import org.springframework.context.event.EventListener;
-import org.springframework.context.annotation.Bean;
-
-import org.springframework.boot.test.mock.mockito.MockBean;
-
-import org.springframework.http.HttpMethod;
-import org.springframework.http.MediaType;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.core.ParameterizedTypeReference;
-import org.springframework.core.io.ClassPathResource;
-
-import static org.mockito.Mockito.*;
-import static org.mockito.Matchers.*;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.mockito.stubbing.Answer;
-import org.mockito.invocation.InvocationOnMock;
-
-import org.apache.http.ProtocolVersion;
-import org.apache.http.StatusLine;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.client.ResponseHandler;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.client.methods.CloseableHttpResponse; 
-import org.apache.http.message.BasicStatusLine;
-import org.apache.http.entity.InputStreamEntity;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.entity.ContentType;
-
-/* this is not good for unit testing .. */
-import org.acumos.federation.gateway.common.JsonResponse;
-import org.acumos.federation.gateway.event.PeerSubscriptionEvent;
-import org.acumos.federation.gateway.common.Clients;
-import org.acumos.federation.gateway.config.LocalInterfaceConfiguration;
-import org.acumos.federation.gateway.cds.PeerStatus;
-import org.acumos.federation.gateway.security.Peer;
-import org.acumos.federation.gateway.security.Role;
-import org.acumos.federation.gateway.service.CatalogService;
-import org.acumos.federation.gateway.service.ServiceContext;
-import org.acumos.federation.gateway.service.ServiceException;
-import org.acumos.federation.gateway.cds.Solution;
-import org.acumos.federation.gateway.cds.SolutionRevision;
-
-import org.acumos.cds.domain.MLPPeer;
-import org.acumos.cds.domain.MLPPeerSubscription;
-import org.acumos.cds.domain.MLPSolution;
-import org.acumos.cds.domain.MLPSolutionRevision;
-import org.acumos.cds.domain.MLPArtifact;
-import org.acumos.cds.client.ICommonDataServiceRestClient;
-import org.acumos.cds.transport.RestPageRequest;
-import org.acumos.cds.transport.RestPageResponse;
-
-import org.acumos.nexus.client.NexusArtifactClient;
-import org.acumos.nexus.client.data.UploadArtifactInfo;
 
 
 /**
@@ -159,13 +87,16 @@ public class CatalogServiceTest extends ServiceTest {
                registerMockResponse("GET /ccds/solution/search/date?atc=PB&datems=1531747662&vsc=PS&active=true&page=1&size=50", MockResponse.success("mockCDSDateSolutionsResponsePage1.json"));
                registerMockResponse("GET /ccds/solution/10101010-1010-1010-1010-101010101010", MockResponse.success("mockCDSSolutionResponse.json"));
                registerMockResponse("GET /ccds/solution/10101010-1010-1010-1010-101010101010/revision", MockResponse.success("mockCDSSolutionRevisionsResponse.json"));
-               registerMockResponse("GET /ccds/solution/10101010-1010-1010-1010-101010101010/revision/a0a0a0a0-a0a0-a0a0-a0a0-a0a0a0a0a0a0/artifact", MockResponse.success("mockCDSSolutionRevisionArtifactsResponse.json"));
+               //registerMockResponse("GET /ccds/solution/10101010-1010-1010-1010-101010101010/revision/a0a0a0a0-a0a0-a0a0-a0a0-a0a0a0a0a0a0/artifact", MockResponse.success("mockCDSSolutionRevisionArtifactsResponse.json"));
+               registerMockResponse("GET /ccds/revision/a0a0a0a0-a0a0-a0a0-a0a0-a0a0a0a0a0a0/artifact", MockResponse.success("mockCDSSolutionRevisionArtifactsResponse.json"));
                registerMockResponse("GET /ccds/solution/f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0", new MockResponse(400, "Error", "mockCDSNoEntryWithIDResponse.json"));
                registerMockResponse("GET /ccds/solution/f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0/revision", new MockResponse(400, "Error", "mockCDSNoEntryWithIDResponse.json"));
-               registerMockResponse("GET /ccds/solution/f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0/revision/f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0/artifact", new MockResponse(400, "Error", "mockCDSNoEntryWithIDResponse.json"));
+               //registerMockResponse("GET /ccds/solution/f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0/revision/f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0/artifact", new MockResponse(400, "Error", "mockCDSNoEntryWithIDResponse.json"));
+               registerMockResponse("GET /ccds/revision/f0f0f0f0-f0f0-f0f0-f0f0-f0f0f0f0f0f0/artifact", new MockResponse(400, "Error", "mockCDSNoEntryWithIDResponse.json"));
                registerMockResponse("GET /ccds/solution/f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1f1", new MockResponse(412, "Error", "mockCDSErrorResponse.json"));
                registerMockResponse("GET /ccds/solution/f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1f1/revision", new MockResponse(412, "Error", "mockCDSErrorResponse.json"));
-               registerMockResponse("GET /ccds/solution/f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1f1/revision/f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1f1/artifact", new MockResponse(412, "Error", "mockCDSErrorResponse.json"));
+               //registerMockResponse("GET /ccds/solution/f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1f1/revision/f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1f1/artifact", new MockResponse(412, "Error", "mockCDSErrorResponse.json"));
+               registerMockResponse("GET /ccds/revision/f1f1f1f1-f1f1-f1f1-f1f1-f1f1f1f1f1f1/artifact", new MockResponse(412, "Error", "mockCDSErrorResponse.json"));
                registerMockResponse("GET /ccds/peer/search?isSelf=true&_j=a", MockResponse.success("mockCDSPeerSearchSelfResponse.json"));
        }
 
@@ -230,7 +161,7 @@ public class CatalogServiceTest extends ServiceTest {
                        }
                }
                catch (Exception x) {
-                       assertTrue("Unexpected catalog test outcome: " + x, 1 == 0);
+                       fail("Unexpected catalog test outcome: " + x);
                }
        }
 
index 38eceac..309403b 100644 (file)
  */
 package org.acumos.federation.gateway.test;
 
+import static org.junit.Assert.assertTrue;
+
 import java.util.List;
 import java.util.Scanner;
 
-import static org.junit.Assert.assertTrue;
-import static org.assertj.core.api.Assertions.assertThat; 
-
+import org.acumos.cds.domain.MLPArtifact;
+import org.acumos.cds.domain.MLPPeer;
+import org.acumos.cds.domain.MLPSolution;
+import org.acumos.cds.domain.MLPSolutionRevision;
+import org.acumos.federation.gateway.common.JsonResponse;
+/* this is not good for unit testing .. */
+import org.acumos.federation.gateway.config.EELFLoggerDelegate;
+import org.acumos.federation.gateway.config.InterfaceConfigurationBuilder;
+import org.acumos.federation.gateway.config.InterfaceConfigurationBuilder.SSLBuilder;
+import org.apache.http.client.HttpClient;
 import org.junit.FixMethodOrder;
-import org.junit.runners.MethodSorters;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextHierarchy;
-import org.springframework.test.context.ContextConfiguration;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.web.WebAppConfiguration;
 import org.springframework.boot.test.web.client.TestRestTemplate;
-
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.MediaType;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpEntity;
 import org.springframework.http.ResponseEntity;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.core.ParameterizedTypeReference;
-
-import org.apache.http.client.HttpClient;
-
-/* this is not good for unit testing .. */
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.common.JsonResponse;
-import org.acumos.federation.gateway.config.InterfaceConfigurationBuilder;
-import static org.acumos.federation.gateway.config.InterfaceConfigurationBuilder.SSLBuilder;
-
-import org.acumos.cds.domain.MLPPeer;
-import org.acumos.cds.domain.MLPSolution;
-import org.acumos.cds.domain.MLPSolutionRevision;
-import org.acumos.cds.domain.MLPArtifact;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.ContextHierarchy;
+import org.springframework.test.context.junit4.SpringRunner;
 
 
 
@@ -173,7 +166,7 @@ public class ControllerTest {
 
                assertTrue(response != null);
                assertTrue(response.getStatusCodeValue() == 200);
-               assertTrue(response.getBody().getContent().getOwnerId().equals("admin")); //no errors
+               assertTrue(response.getBody().getContent().getUserId().equals("admin")); //no errors
        }
 
        @Test
index b9e497c..4f7ffa0 100644 (file)
  */
 package org.acumos.federation.gateway.test;
 
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.when;
+
+import java.io.IOException;
 import java.util.List;
 import java.util.Scanner;
-import java.io.IOException;
-
-import static org.mockito.Mockito.*;
-import static org.mockito.Matchers.*;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.mockito.stubbing.Answer;
-import org.mockito.invocation.InvocationOnMock;
 
+import org.acumos.cds.domain.MLPPeer;
+import org.acumos.cds.domain.MLPSolution;
+import org.acumos.federation.gateway.common.Clients;
+import org.acumos.federation.gateway.common.FederationClient;
+import org.acumos.federation.gateway.common.JsonResponse;
+import org.acumos.federation.gateway.config.EELFLoggerDelegate;
+import org.acumos.federation.gateway.config.InterfaceConfigurationBuilder;
+import org.acumos.federation.gateway.config.InterfaceConfigurationBuilder.SSLBuilder;
+import org.apache.http.HttpResponse;
+import org.apache.http.ProtocolVersion;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.InputStreamEntity;
+import org.apache.http.message.BasicHttpResponse;
+import org.apache.http.message.BasicStatusLine;
+import org.apache.http.protocol.HttpContext;
+import org.junit.Before;
 import org.junit.FixMethodOrder;
-import org.junit.runners.MethodSorters;
 import org.junit.Test;
-import org.junit.Before;
 import org.junit.runner.RunWith;
-import static org.junit.Assert.assertTrue;
-import static org.assertj.core.api.Assertions.assertThat; 
-
-import org.springframework.web.client.RestTemplate;
-import org.springframework.web.client.HttpClientErrorException;
-import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.beans.factory.annotation.Autowired;
+import org.junit.runners.MethodSorters;
+import org.mockito.MockitoAnnotations;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.test.context.ContextHierarchy;
-import org.springframework.test.context.ContextConfiguration;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.web.WebAppConfiguration;
-import org.springframework.boot.context.embedded.LocalServerPort;
-import org.springframework.boot.test.web.client.TestRestTemplate;
 import org.springframework.boot.test.mock.mockito.MockBean;
-
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.MediaType;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpEntity;
 import org.springframework.http.ResponseEntity;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.core.ParameterizedTypeReference;
-import org.springframework.core.io.ClassPathResource;
-
-import org.apache.http.ProtocolVersion;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.ResponseHandler;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.message.BasicStatusLine;
-import org.apache.http.entity.InputStreamEntity;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.entity.ContentType;
-
-import org.acumos.federation.gateway.common.Clients;
-import org.acumos.federation.gateway.common.FederationClient;
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.common.JsonResponse;
-import org.acumos.federation.gateway.config.InterfaceConfigurationBuilder;
-import static org.acumos.federation.gateway.config.InterfaceConfigurationBuilder.SSLBuilder;
-
-import org.acumos.cds.domain.MLPPeer;
-import org.acumos.cds.domain.MLPSolution;
-import org.acumos.cds.domain.MLPSolutionRevision;
-import org.acumos.cds.domain.MLPArtifact;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.ContextHierarchy;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.RestTemplate;
 
 
 
index a836478..4f7d71b 100644 (file)
 package org.acumos.federation.gateway.test;
 
 import java.util.List;
-import java.util.Scanner;
-import java.util.Collections;
-
-import org.springframework.web.client.RestTemplate;
-
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.ApplicationListener;
-import org.springframework.context.event.EventListener;
-import org.springframework.context.annotation.Bean;
-
-import org.springframework.boot.test.mock.mockito.MockBean;
 
+import org.acumos.cds.domain.MLPPeer;
+import org.acumos.cds.domain.MLPSolution;
+/* this is not good for unit testing .. */
+import org.acumos.federation.gateway.common.JsonResponse;
+import org.acumos.federation.gateway.config.InterfaceConfigurationBuilder;
+import org.acumos.federation.gateway.config.InterfaceConfigurationBuilder.SSLBuilder;
+import org.apache.http.client.HttpClient;
+import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.MediaType;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpEntity;
 import org.springframework.http.ResponseEntity;
-import org.springframework.http.client.SimpleClientHttpRequestFactory;
 import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.core.ParameterizedTypeReference;
-import org.springframework.core.io.ClassPathResource;
-
-import org.apache.http.ProtocolVersion;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.ResponseHandler;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.message.BasicStatusLine;
-import org.apache.http.entity.InputStreamEntity;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.entity.ContentType;
-
-/* this is not good for unit testing .. */
-import org.acumos.federation.gateway.common.JsonResponse;
-import org.acumos.federation.gateway.config.InterfaceConfigurationBuilder;
-import static org.acumos.federation.gateway.config.InterfaceConfigurationBuilder.SSLBuilder;
-
-import org.acumos.cds.domain.MLPPeer;
-import org.acumos.cds.domain.MLPSolution;
+import org.springframework.web.client.RestTemplate;
 
 
 
index f7dda8a..608fe21 100644 (file)
  */
 package org.acumos.federation.gateway.test;
 
-import java.io.InputStream;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.when;
 
-import java.util.Map;
-import java.util.List;
-import java.util.Scanner;
+import java.io.InputStream;
 import java.util.Collections;
-
-import java.util.concurrent.TimeUnit;
+import java.util.List;
+import java.util.Map;
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
+import org.acumos.cds.client.ICommonDataServiceRestClient;
+import org.acumos.cds.domain.MLPArtifact;
+import org.acumos.cds.domain.MLPPeer;
+import org.acumos.cds.domain.MLPPeerSubscription;
+import org.acumos.cds.domain.MLPSolution;
+import org.acumos.cds.domain.MLPSolutionRevision;
+import org.acumos.cds.transport.RestPageRequest;
+import org.acumos.cds.transport.RestPageResponse;
+import org.acumos.federation.gateway.cds.PeerStatus;
+import org.acumos.federation.gateway.common.Clients;
+import org.acumos.federation.gateway.common.FederationClient;
+import org.acumos.nexus.client.NexusArtifactClient;
+import org.acumos.nexus.client.data.UploadArtifactInfo;
+import org.apache.http.HttpResponse;
+import org.apache.http.ProtocolVersion;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.entity.ByteArrayEntity;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.InputStreamEntity;
+import org.apache.http.message.BasicHttpResponse;
+import org.apache.http.message.BasicStatusLine;
+import org.apache.http.protocol.HttpContext;
 import org.junit.Before;
-import static org.junit.Assert.assertTrue;
-import static org.assertj.core.api.Assertions.assertThat; 
-
 import org.junit.FixMethodOrder;
-import org.junit.runners.MethodSorters;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.web.WebAppConfiguration;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.ApplicationListener;
-import org.springframework.context.event.EventListener;
-import org.springframework.context.annotation.Bean;
-
 import org.springframework.boot.test.mock.mockito.MockBean;
-
-import org.springframework.http.HttpMethod;
-import org.springframework.http.MediaType;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.context.ApplicationContext;
 import org.springframework.core.io.ClassPathResource;
-
-import static org.mockito.Mockito.*;
-import static org.mockito.Matchers.*;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.mockito.stubbing.Answer;
-import org.mockito.invocation.InvocationOnMock;
-
-import org.apache.http.ProtocolVersion;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.ResponseHandler;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.message.BasicStatusLine;
-import org.apache.http.entity.InputStreamEntity;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.entity.ContentType;
-
-/* this is not good for unit testing .. */
-import org.acumos.federation.gateway.common.JsonResponse;
-import org.acumos.federation.gateway.event.PeerSubscriptionEvent;
-import org.acumos.federation.gateway.common.Clients;
-import org.acumos.federation.gateway.common.FederationClient;
-import org.acumos.federation.gateway.cds.PeerStatus;
-
-import org.acumos.cds.domain.MLPPeer;
-import org.acumos.cds.domain.MLPPeerSubscription;
-import org.acumos.cds.domain.MLPSolution;
-import org.acumos.cds.domain.MLPSolutionRevision;
-import org.acumos.cds.domain.MLPArtifact;
-import org.acumos.cds.client.ICommonDataServiceRestClient;
-import org.acumos.cds.transport.RestPageRequest;
-import org.acumos.cds.transport.RestPageResponse;
-
-import org.acumos.nexus.client.NexusArtifactClient;
-import org.acumos.nexus.client.data.UploadArtifactInfo;
+import org.springframework.test.context.junit4.SpringRunner;
 
 
 /**
index a0c53f1..11fefe0 100644 (file)
  */
 package org.acumos.federation.gateway.test;
 
-import java.io.InputStream;
-import java.io.Closeable;
-import java.io.IOException;
-
-import java.util.Map;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Scanner;
-import java.util.Collections;
-
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.CountDownLatch;
-
-import org.junit.Before;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
-import static org.assertj.core.api.Assertions.assertThat; 
 
+import java.util.List;
+
+import org.acumos.cds.domain.MLPPeer;
+import org.acumos.federation.gateway.security.Peer;
+import org.acumos.federation.gateway.security.Role;
+import org.acumos.federation.gateway.service.PeerService;
+import org.acumos.federation.gateway.service.ServiceContext;
+import org.acumos.federation.gateway.service.ServiceException;
 import org.junit.FixMethodOrder;
-import org.junit.runners.MethodSorters;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.web.WebAppConfiguration;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.ApplicationListener;
-import org.springframework.context.event.EventListener;
-import org.springframework.context.annotation.Bean;
-
-import org.springframework.boot.test.mock.mockito.MockBean;
-
-import org.springframework.http.HttpMethod;
-import org.springframework.http.MediaType;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.core.ParameterizedTypeReference;
-import org.springframework.core.io.ClassPathResource;
-
-import static org.mockito.Mockito.*;
-import static org.mockito.Matchers.*;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.mockito.stubbing.Answer;
-import org.mockito.invocation.InvocationOnMock;
-
-import org.apache.http.ProtocolVersion;
-import org.apache.http.StatusLine;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.client.ResponseHandler;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.client.methods.CloseableHttpResponse; 
-import org.apache.http.message.BasicStatusLine;
-import org.apache.http.entity.InputStreamEntity;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.entity.ContentType;
-
-/* this is not good for unit testing .. */
-import org.acumos.federation.gateway.common.JsonResponse;
-import org.acumos.federation.gateway.event.PeerSubscriptionEvent;
-import org.acumos.federation.gateway.common.Clients;
-import org.acumos.federation.gateway.config.LocalInterfaceConfiguration;
-import org.acumos.federation.gateway.cds.PeerStatus;
-import org.acumos.federation.gateway.security.Peer;
-import org.acumos.federation.gateway.security.Role;
-import org.acumos.federation.gateway.service.PeerService;
-import org.acumos.federation.gateway.service.ServiceContext;
-import org.acumos.federation.gateway.service.ServiceException;
-
-import org.acumos.cds.domain.MLPPeer;
-import org.acumos.cds.domain.MLPPeerSubscription;
 
 
 /**
index 1c4dda1..8b66e0c 100644 (file)
  */
 package org.acumos.federation.gateway.test;
 
-import java.io.InputStream;
-import java.io.Closeable;
-import java.io.IOException;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.when;
 
-import java.util.Map;
+import java.io.IOException;
 import java.util.HashMap;
-import java.util.List;
-import java.util.Scanner;
-import java.util.Collections;
-
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.CountDownLatch;
-
-import org.junit.Before;
-import static org.junit.Assert.assertTrue;
-import static org.assertj.core.api.Assertions.assertThat; 
-
-import org.junit.FixMethodOrder;
-import org.junit.runners.MethodSorters;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.web.WebAppConfiguration;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-
-import org.springframework.context.ApplicationContext;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.ApplicationListener;
-import org.springframework.context.event.EventListener;
-import org.springframework.context.annotation.Bean;
-
-import org.springframework.boot.test.mock.mockito.MockBean;
-
-import org.springframework.http.HttpMethod;
-import org.springframework.http.MediaType;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.core.ParameterizedTypeReference;
-import org.springframework.core.io.ClassPathResource;
-
-import static org.mockito.Mockito.*;
-import static org.mockito.Matchers.*;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
-import org.mockito.stubbing.Answer;
-import org.mockito.invocation.InvocationOnMock;
+import java.util.Map;
 
+import org.acumos.federation.gateway.config.LocalInterfaceConfiguration;
+import org.apache.http.HttpResponse;
 import org.apache.http.ProtocolVersion;
 import org.apache.http.StatusLine;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.client.ResponseHandler;
+import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.protocol.HttpContext;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.InputStreamEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.client.methods.CloseableHttpResponse; 
 import org.apache.http.message.BasicStatusLine;
-import org.apache.http.entity.InputStreamEntity;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.entity.ContentType;
-
-/* this is not good for unit testing .. */
-import org.acumos.federation.gateway.config.LocalInterfaceConfiguration;
+import org.apache.http.protocol.HttpContext;
+import org.junit.Before;
+import org.mockito.MockitoAnnotations;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.context.ApplicationContext;
+import org.springframework.core.io.ClassPathResource;
 
 
 /**
@@ -157,7 +112,7 @@ public abstract class ServiceTest {
                                                httpResponse.addHeader("Content-Length", String.valueOf(resource.contentLength()));
                                        }
                                        catch (IOException iox) {
-                                               throw new IOException("Failed to load mock resource " + resource);
+                                               throw new IOException("Failed to load mock resource " + resource, iox);
                                        }
 
                                        return httpResponse;
index eb2babb..546202c 100644 (file)
  */
 package org.acumos.federation.gateway.test;
 
-import java.util.List;
-import java.util.Scanner;
-import java.util.Collections;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.when;
 
-import java.util.concurrent.TimeUnit;
+import java.util.Collections;
+import java.util.List;
 import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
-import static org.junit.Assert.assertTrue;
-import static org.assertj.core.api.Assertions.assertThat; 
-
+import org.acumos.cds.domain.MLPSolution;
+import org.acumos.federation.gateway.common.Clients;
+import org.acumos.federation.gateway.common.FederationClient;
+import org.acumos.federation.gateway.common.JsonResponse;
+/* this is not good for unit testing .. */
+import org.acumos.federation.gateway.config.EELFLoggerDelegate;
+import org.acumos.federation.gateway.event.PeerSubscriptionEvent;
+import org.apache.http.HttpHost;
+import org.apache.http.HttpRequest;
+import org.apache.http.HttpResponse;
+import org.apache.http.ProtocolVersion;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.ResponseHandler;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.entity.ContentType;
+import org.apache.http.entity.InputStreamEntity;
+import org.apache.http.message.BasicHttpResponse;
+import org.apache.http.message.BasicStatusLine;
+import org.apache.http.protocol.HttpContext;
 import org.junit.FixMethodOrder;
-import org.junit.runners.MethodSorters;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextHierarchy;
-import org.springframework.test.context.ContextConfiguration;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringRunner;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-import org.springframework.test.context.web.WebAppConfiguration;
-import org.springframework.boot.test.web.client.TestRestTemplate;
-
+import org.springframework.boot.test.mock.mockito.MockBean;
 import org.springframework.context.ApplicationContext;
-import org.springframework.context.ConfigurableApplicationContext;
-import org.springframework.context.ApplicationListener;
-import org.springframework.context.event.EventListener;
 import org.springframework.context.annotation.Bean;
-
-import org.springframework.boot.test.mock.mockito.MockBean;
-
-import org.springframework.http.HttpMethod;
-import org.springframework.http.MediaType;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.ResponseEntity;
-import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
-import org.springframework.core.ParameterizedTypeReference;
+import org.springframework.context.event.EventListener;
 import org.springframework.core.io.ClassPathResource;
-
-import static org.mockito.Mockito.*;
-import static org.mockito.Matchers.*;
-import org.mockito.stubbing.Answer;
-import org.mockito.invocation.InvocationOnMock;
-
-import org.apache.http.ProtocolVersion;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.ResponseHandler;
-import org.apache.http.client.methods.HttpUriRequest;
-import org.apache.http.protocol.HttpContext;
-import org.apache.http.message.BasicHttpResponse;
-import org.apache.http.message.BasicStatusLine;
-import org.apache.http.entity.InputStreamEntity;
-import org.apache.http.entity.ByteArrayEntity;
-import org.apache.http.entity.ContentType;
-
-/* this is not good for unit testing .. */
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.common.JsonResponse;
-import org.acumos.federation.gateway.event.PeerSubscriptionEvent;
-import org.acumos.federation.gateway.common.Clients;
-import org.acumos.federation.gateway.common.FederationClient;
-
-import org.acumos.cds.domain.MLPPeer;
-import org.acumos.cds.domain.MLPSolution;
-import org.acumos.cds.domain.MLPSolutionRevision;
-import org.acumos.cds.domain.MLPArtifact;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.ContextHierarchy;
+import org.springframework.test.context.junit4.SpringRunner;
 
 
 
index 6cd3da4..fa83200 100644 (file)
@@ -34,18 +34,16 @@ import org.acumos.cds.domain.MLPArtifact;
 import org.acumos.cds.domain.MLPPeer;
 import org.acumos.cds.domain.MLPSolution;
 import org.acumos.cds.domain.MLPSolutionRevision;
-import org.acumos.federation.gateway.config.EELFLoggerDelegate;
-import org.acumos.federation.gateway.event.PeerSubscriptionEvent;
+import org.acumos.federation.gateway.cds.Solution;
 import org.acumos.federation.gateway.common.Clients;
 import org.acumos.federation.gateway.common.FederationClient;
-import org.acumos.federation.gateway.cds.Solution;
-
+import org.acumos.federation.gateway.config.EELFLoggerDelegate;
+import org.acumos.federation.gateway.event.PeerSubscriptionEvent;
 import org.springframework.beans.factory.annotation.Autowired;
 //import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.context.annotation.Scope;
-import org.springframework.context.annotation.Profile;
 import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Scope;
 import org.springframework.context.event.EventListener;
 import org.springframework.core.io.Resource;
 import org.springframework.core.task.TaskExecutor;
index bdfb45f..a2ab1fb 100644 (file)
 
 package org.acumos.federation.gateway.test;
 
+import org.acumos.federation.gateway.config.AdapterCondition;
 import org.springframework.context.annotation.ConditionContext;
-import org.springframework.core.type.AnnotatedTypeMetadata;
 import org.springframework.core.env.Environment;
-
-import org.acumos.federation.gateway.config.AdapterCondition;
+import org.springframework.core.type.AnnotatedTypeMetadata;
 
 /**
  * Tests if we are in a test Adapter setup/profile
index 4fdaecc..0f6f9a4 100644 (file)
 
 package org.acumos.federation.gateway.test;
 
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.acumos.federation.gateway.config.AdapterConfiguration;
 import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Profile;
 import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
 
-import org.acumos.federation.gateway.config.AdapterConfiguration;
-
 
 /**
  * Adds the specifics of a Test adapter to the generic adapter configuration.
index f922381..86bbc9e 100644 (file)
@@ -2,7 +2,7 @@
   "solutionId":"6793411f-c7a1-4e93-85bc-f91d267541d8",
   "name":"traffic-ram",
   "description":"Round about traffic model",
-  "ownerId":"admin",
+  "userId":"admin",
   "active":"true",
   "modelTypeCode":"CL",
   "toolkitTypeCode":"",
@@ -16,7 +16,7 @@
     "description":"First attempt",
     "version":"1.0",
     "metadata":"acumosa",
-    "ownerId":"admin",
+    "userId":"admin",
        "created":"2017-08-10",
        "modified":"2017-08-11",
        "validationStatusCode":"PS",
index e5c17b9..8e6d9f6 100644 (file)
@@ -2,7 +2,7 @@
   "solutionId":"9d7973ac-2b19-439f-9753-e83a77ea6b6e",
   "name":"traffic-jam",
   "description":"Jam traffic model",
-  "ownerId":"ak1234",
+  "userId":"ak1234",
   "active":"true",
   "modelTypeCode":"RT",
   "toolkitTypeCode":"",
@@ -18,7 +18,7 @@
     "metadata":"acumosb",
        "validationStatusCode":"PS",
        "accessTypeCode":"PB",
-    "ownerId":"ak1234",
+    "userId":"ak1234",
        "created":"2017-09-10",
        "modified":"2017-09-11",
     "artifacts":[
index 9936f9d..5ccf890 100644 (file)
@@ -6,13 +6,12 @@
       "solutionId": "02252a2f-3e21-4bdb-839a-0512a3d6bd44",
       "name": "manipulate",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "0632eab1-2b79-4ab9-9349-bbffdad4f5af",
       "name": "Image_Mood",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "CL",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "1ccb5226-8b0c-4050-bb3c-64b75d17c6b1",
+      "userId": "1ccb5226-8b0c-4050-bb3c-64b75d17c6b1",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "086099c8-65fa-44ba-be38-c9ad36352ddf",
       "name": "padd",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "0f963533-f8bd-4183-a30b-b2474507c297",
       "name": "R_CMD_Model_1207",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DT",
       "toolkitTypeCode": "RC",
       "origin": null,
-      "ownerId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
+      "userId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "26bd497c-c833-4795-8c81-5abaaf4c9d67",
       "name": "Sanity_250620181",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DS",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [],
       "webStats": {
       "solutionId": "26cc5a84-b888-40ff-92aa-989c4972390a",
       "name": "subtract",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "26cd2116-c1e1-49a7-9b2e-2200eaaf379a",
       "name": "TestClear",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "26d4ed7e-3bef-49d7-9a6a-84f131d8b3b7",
       "name": "Sanity_15062018",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "34cc31da-491a-4f52-99b8-475d82e9268a",
       "name": "poutput",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "38efeef1-e4f4-4298-9f68-6f0052d6ade9",
       "name": "Predictor",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "TF",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "3ace2b0d-f1c2-439f-9e2f-f2e3e1cbc25d",
       "name": "COMLEXSOL_120618",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "3f262306-41b2-4ae5-b0a9-dbd0057ed27b",
       "name": "ATT-Image Mood Classifier",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "CL",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "1ccb5226-8b0c-4050-bb3c-64b75d17c6b1",
+      "userId": "1ccb5226-8b0c-4050-bb3c-64b75d17c6b1",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "3f55db61-003b-434f-bd0c-4106880d4743",
       "name": "Image_Class_CLI_26072018",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "CL",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
+      "userId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "42042b12-0bbf-4dea-9b3a-77fff7aeaaaa",
       "name": "dump_add",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "43aedb81-8da0-45e7-ab72-726fa6cb2959",
       "name": "dump_classify",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "472a6549-9709-4ba4-b9c3-93600d86e633",
       "name": "complex06",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [],
       "webStats": {
       "solutionId": "482c985a-2e1a-48a6-8546-918e5c604ffd",
       "name": "average",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "4c1ac01d-fd0e-4873-a37d-cdd14fd6539a",
       "name": "Image_Classification_CLI_15060618",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "CL",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
+      "userId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "4d021a48-34ba-44dc-b7d1-ddd2922ca14b",
       "name": "R_Model_0907_IST2",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DS",
       "toolkitTypeCode": "RC",
       "origin": null,
-      "ownerId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
+      "userId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "515f1b30-44cd-4622-8d1f-2433178a659a",
       "name": "FaceDetect",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DT",
       "toolkitTypeCode": "TF",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "55a8c053-93f2-41a0-8796-51632a02e93e",
       "name": "ZDBTEST",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "5d787336-1c2b-46a4-a2ae-ae549aa1da4b",
       "name": "Web_R_Model_03072018",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DS",
       "toolkitTypeCode": "RC",
       "origin": null,
-      "ownerId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
+      "userId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "614544b9-91cb-47fe-9a77-5162862a6e1e",
       "name": "threatanalytics16-03",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DS",
       "toolkitTypeCode": "H2",
       "origin": null,
-      "ownerId": "d6843a76-e3dd-4e90-aca0-0ce0ece7cb11",
+      "userId": "d6843a76-e3dd-4e90-aca0-0ce0ece7cb11",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "62008a4d-f9f7-4460-a304-85bffa29c455",
       "name": "Classifier",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "CL",
       "toolkitTypeCode": "TF",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "6414fade-da9b-431e-9646-2b842a335b58",
       "name": "PublicTest",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "649f3b2e-552d-45fe-8e21-f296963640f8",
       "name": "predict",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [],
       "webStats": {
       "solutionId": "6c863ad6-b6f3-4bbf-a79e-65a75a27db5d",
       "name": "TestOnboardV13",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "CL",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "1cd99dd8-51be-4ee2-a005-dda9bea861ba",
+      "userId": "1cd99dd8-51be-4ee2-a005-dda9bea861ba",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "7153fcaf-3d9f-4939-9c84-dc1088f919fb",
       "name": "PUB_07202018_WEM",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "H2",
       "origin": null,
-      "ownerId": "54111bdc-b25d-4859-ad03-4d72ff0d7b6c",
+      "userId": "54111bdc-b25d-4859-ad03-4d72ff0d7b6c",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "770944aa-632e-45d9-9e49-08608d8e47cc",
       "name": "Splitter",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DT",
       "toolkitTypeCode": "SP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "79325e62-96b2-42b4-959c-1827ed1cfe46",
       "name": "aSentiment_Analysis_02052018",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
+      "userId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "7a0be4cb-88ca-4b37-9dda-b3dada6525cc",
       "name": "square",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "7ce2eeba-c335-43fe-bb41-97829a45a46c",
       "name": "concatenate",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "817145f9-7479-4210-a565-971904188c3b",
       "name": "Complex",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "81e76cd9-add6-4032-9a48-bbce8cccb4f6",
       "name": "Sanity_05062018",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "853c33e9-7a06-49ba-858f-2e220cf367c7",
       "name": "Face_Detect",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "CL",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "1ccb5226-8b0c-4050-bb3c-64b75d17c6b1",
+      "userId": "1ccb5226-8b0c-4050-bb3c-64b75d17c6b1",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "8a46def9-b651-472a-a51b-76fac2e3adec",
       "name": "Collator",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DT",
       "toolkitTypeCode": "CO",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "8ddd620a-f06b-40fe-a8e9-3b7518603498",
       "name": "GenericDataMapper",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DT",
       "toolkitTypeCode": "TF",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "91dbc61f-ec4d-465b-b8d3-379db6e08865",
       "name": "ASHTEST",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "98def80a-79a5-416c-b3f2-7c60298e8e46",
       "name": "PUB_07102018_H2O",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "H2",
       "origin": null,
-      "ownerId": "54111bdc-b25d-4859-ad03-4d72ff0d7b6c",
+      "userId": "54111bdc-b25d-4859-ad03-4d72ff0d7b6c",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "a2b6395f-e79f-4661-bd3d-ba5200fd8654",
       "name": "VM_Predictor_29062018",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
+      "userId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "a589e693-5822-419d-bb4e-26e617b42e80",
       "name": "Sanity_23072018",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "a8c427a5-3443-4ec5-a722-beab54746940",
       "name": "H2O_Web_25062018",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DT",
       "toolkitTypeCode": "H2",
       "origin": null,
-      "ownerId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
+      "userId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "a923bc07-e6ef-4fa8-9496-3c6f49b97e40",
       "name": "GenZipDataBroker",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DS",
       "toolkitTypeCode": "BR",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [],
       "webStats": {
       "solutionId": "aef71d34-d222-4901-ba94-6e71e24a396e",
       "name": "Word_Embeddings_14052018",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
+      "userId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "afaaed91-7434-4f9c-bf50-e22fbbe99be6",
       "name": "CrossSell_Analytics",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
+      "userId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "b2f33377-2999-4422-b6e6-afb3c2ac76d9",
       "name": "ingest",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "c197773a-1377-4573-a868-1413bd85e2d4",
       "name": "VmPredictor",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DS",
       "toolkitTypeCode": "PB",
       "origin": null,
-      "ownerId": "d6843a76-e3dd-4e90-aca0-0ce0ece7cb11",
+      "userId": "d6843a76-e3dd-4e90-aca0-0ce0ece7cb11",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "c3130c2f-3fe0-4fba-bf4e-71f2b549a2c2",
       "name": "PUB_07132018_WEM",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "H2",
       "origin": null,
-      "ownerId": "54111bdc-b25d-4859-ad03-4d72ff0d7b6c",
+      "userId": "54111bdc-b25d-4859-ad03-4d72ff0d7b6c",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "c6272bad-c0f2-4e21-85e7-8ceee5576854",
       "name": "DesignStudioDemo",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "c7ebf361-4096-496a-8ed7-082d40e908da",
       "name": "paverage",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
index a2932a6..e6c057b 100644 (file)
@@ -6,13 +6,12 @@
       "solutionId": "c8618ba1-3ae3-4d0e-a7df-bd32277e7dcb",
       "name": "Test_934_220618",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "cd253df2-2368-4ae0-b8ea-529533845435",
       "name": "Test_934",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "d8e96d4e-ade7-432c-a8ed-335627364fca",
       "name": "ATT-Face_Privacy_Filter",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "CL",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "1ccb5226-8b0c-4050-bb3c-64b75d17c6b1",
+      "userId": "1ccb5226-8b0c-4050-bb3c-64b75d17c6b1",
       "sourceId": null,
       "tags": [],
       "webStats": {
       "solutionId": "d9f4470f-d663-4888-93ce-40585977b225",
       "name": "Web_VM_Predictor_12032018",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "d6843a76-e3dd-4e90-aca0-0ce0ece7cb11",
+      "userId": "d6843a76-e3dd-4e90-aca0-0ce0ece7cb11",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "dc5bd274-73e0-4d22-a50d-c9b846d43758",
       "name": "Web_2Crosssell_Analytics_09072018",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
+      "userId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "dc9238ed-6894-4883-9f38-9df45829c97a",
       "name": "SolDeployToAzure",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "e1d28090-08cb-423c-872b-61ea9eb9c378",
       "name": "output",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [],
       "webStats": {
       "solutionId": "e5594e6a-153a-4d5d-924c-ea6cc353c001",
       "name": "Aggregator",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DT",
       "toolkitTypeCode": "TF",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "e65a9ec8-2da4-418a-a4f5-d26343789ac0",
       "name": "multiply",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "eb86a965-5163-4abf-ab14-59c3b12cf805",
       "name": "face_privacy_filter_detect",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DT",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "9e2def76-ab29-4125-a65c-62ff14cfc6e9",
+      "userId": "9e2def76-ab29-4125-a65c-62ff14cfc6e9",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "ed83b658-68b9-4297-aab2-c3bada538fb0",
       "name": "ONAP_vm_predictor_03072018",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DT",
       "toolkitTypeCode": "ON",
       "origin": null,
-      "ownerId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
+      "userId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "ed9079a3-543e-47e8-a9a1-2cb7b34f4c77",
       "name": "ONAP_Image_Classification_CLI_09072018",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "CL",
       "toolkitTypeCode": "ON",
       "origin": null,
-      "ownerId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
+      "userId": "c8ae58d8-d5a5-4faf-9b55-f9f46117cdb5",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "ed9df521-0010-4ab0-8019-795b999469a2",
       "name": "iB9",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "CL",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "a1d9b9b4-657d-429a-b973-29d344ef3773",
+      "userId": "a1d9b9b4-657d-429a-b973-29d344ef3773",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "f0424d94-1bc1-47f9-86b2-13d41e0f3374",
       "name": "akash",
       "description": "test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "d1e838c8-d8be-4ca4-968c-2ba5c6c04e55",
+      "userId": "d1e838c8-d8be-4ca4-968c-2ba5c6c04e55",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "f14db7a1-b4cd-4404-b636-82c5392a3e0e",
       "name": "AzureTest_240520",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "f23973e3-f22d-4f92-a3d1-3c1ceaf9b62a",
       "name": "ist-to-dev-federation-test",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "CL",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "4265e711-ea85-4131-bcfa-d7817c4472e5",
+      "userId": "4265e711-ea85-4131-bcfa-d7817c4472e5",
       "sourceId": null,
       "tags": [],
       "webStats": {
       "solutionId": "f509964b-9b11-4ab8-82ca-3a2bf009027c",
       "name": "composite Sol",
       "description": "Test Solution",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "f8253166-c440-4d17-abb9-0ae5c17e33d7",
       "name": "psubtract",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "fb6d09b5-b9f6-48e4-b5a3-19c365410c64",
       "name": "ATT-Image Classification",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "CL",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "1ccb5226-8b0c-4050-bb3c-64b75d17c6b1",
+      "userId": "1ccb5226-8b0c-4050-bb3c-64b75d17c6b1",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "fb72cb59-3c11-4e01-b5ce-1eb1dcc19ec8",
       "name": "pmultiply",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "fb7a2559-5037-4ec4-862d-28b11b333dd6",
       "name": "AlarmGenerator",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "DT",
       "toolkitTypeCode": "TF",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
index 441b392..da19253 100644 (file)
@@ -6,13 +6,12 @@
       "solutionId": "26cc5a84-b888-40ff-92aa-989c4972390a",
       "name": "subtract",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "26cd2116-c1e1-49a7-9b2e-2200eaaf379a",
       "name": "TestClear",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "26d4ed7e-3bef-49d7-9a6a-84f131d8b3b7",
       "name": "Sanity_15062018",
       "description": "Test",
-      "provider": "Acumos",
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "CP",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "34cc31da-491a-4f52-99b8-475d82e9268a",
       "name": "poutput",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "RG",
       "toolkitTypeCode": "SK",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
       "solutionId": "38efeef1-e4f4-4298-9f68-6f0052d6ade9",
       "name": "Predictor",
       "description": null,
-      "provider": null,
       "metadata": null,
       "active": true,
       "modelTypeCode": "PR",
       "toolkitTypeCode": "TF",
       "origin": null,
-      "ownerId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
+      "userId": "fea37214-e7ef-4ec7-8c12-b10f88669a28",
       "sourceId": null,
       "tags": [
         {
index d7a260c..a9b541c 100644 (file)
@@ -4,13 +4,12 @@
   "solutionId": "10101010-1010-1010-1010-101010101010",
   "name": "test",
   "description": "test",
-  "provider": "Acumos",
   "metadata": null,
   "active": true,
   "modelTypeCode": "PR",
   "toolkitTypeCode": "CP",
   "origin": null,
-  "ownerId": "d1e838c8-d8be-4ca4-968c-2ba5c6c04e55",
+  "userId": "d1e838c8-d8be-4ca4-968c-2ba5c6c04e55",
   "sourceId": null,
   "tags": [
     {
index bab5d33..57032b7 100644 (file)
@@ -10,6 +10,6 @@
     "uri": "com/artifact/f0424d94-1bc1-47f9-86b2-13d41e0f3374_ACUMOS-CDUMP-F0424D94-1BC1-47F9-86B2-13D41E0F3374/1.1/f0424d94-1bc1-47f9-86b2-13d41e0f3374_ACUMOS-CDUMP-F0424D94-1BC1-47F9-86B2-13D41E0F3374-1.1.json",
     "size": 249,
     "metadata": null,
-    "ownerId": "d1e838c8-d8be-4ca4-968c-2ba5c6c04e55"
+    "userId": "d1e838c8-d8be-4ca4-968c-2ba5c6c04e55"
   }
 ]
index 25941c4..23d9889 100644 (file)
@@ -10,7 +10,7 @@
     "accessTypeCode": "PB",
     "validationStatusCode": "PS",
     "solutionId": "10101010-1010-1010-1010-101010101010",
-    "ownerId": "d1e838c8-d8be-4ca4-968c-2ba5c6c04e55",
+    "userId": "d1e838c8-d8be-4ca4-968c-2ba5c6c04e55",
     "sourceId": null
   },
   {
@@ -24,7 +24,7 @@
     "accessTypeCode": "PB",
     "validationStatusCode": "NV",
     "solutionId": "10101010-1010-1010-1010-101010101010",
-    "ownerId": "d1e838c8-d8be-4ca4-968c-2ba5c6c04e55",
+    "userId": "d1e838c8-d8be-4ca4-968c-2ba5c6c04e55",
     "sourceId": null
   }
 ]
index e44b06b..c2e615a 100644 (file)
@@ -4,7 +4,7 @@
   "solutionId":"6793411f-c7a1-4e93-85bc-f91d267541d8",
   "name":"mock model",
   "description":"Test mock model",
-  "ownerId":"admin",
+  "userId":"admin",
   "active":"true",
   "modelTypeCode":"CL",
   "toolkitTypeCode":"",
index 1718b41..bc9234e 100644 (file)
@@ -7,7 +7,7 @@
   "description":"First attempt",
   "version":"1.0",
   "metadata":"acumosa",
-  "ownerId":"admin",
+  "userId":"admin",
   "created":"2017-08-10",
   "modified":"2017-08-11"
  }]
index 6e89f83..7ef7e1e 100644 (file)
@@ -4,7 +4,7 @@
   "solutionId":"6793411f-c7a1-4e93-85bc-f91d267541d8",
   "name":"mock model",
   "description":"Test mock model",
-  "ownerId":"admin",
+  "userId":"admin",
   "active":"true",
   "modelTypeCode":"CL",
   "toolkitTypeCode":"",
index dc12260..1d5d193 100644 (file)
@@ -2,7 +2,7 @@
   "solutionId":"00000000-0000-0000-0000-000000000000",
   "name":"traffic-ram",
   "description":"Round about traffic model",
-  "ownerId":"admin",
+  "userId":"admin",
   "active":"true",
   "modelTypeCode":"CL",
   "toolkitTypeCode":"",
@@ -18,7 +18,7 @@
     "metadata":"acumosa",
     "validationStatusCode":"PS",
     "accessTypeCode":"PB",
-    "ownerId":"admin",
+    "userId":"admin",
        "created":"2017-08-10",
        "modified":"2017-08-11",
     "artifacts":[
index c1fd37d..876d12e 100644 (file)
@@ -2,7 +2,7 @@
   "solutionId":"00000000-0000-0000-0000-000000000000",
   "name":"traffic-ram",
   "description":"Round about traffic model",
-  "ownerId":"admin",
+  "userId":"admin",
   "active":"true",
   "modelTypeCode":"CL",
   "toolkitTypeCode":"",
@@ -18,7 +18,7 @@
     "metadata":"acumosa",
        "validationStatusCode":"PS",
     "accessTypeCode":"PB",
-    "ownerId":"admin",
+    "userId":"admin",
        "created":"2017-08-10",
        "modified":"2017-08-11",
     "artifacts":[