diff --git a/NOTICE b/NOTICE index 166e725082f67083b4444d6c55bc7027a908e3de..f18d78c82ced8da20b79daa2700d4fbecc864ae4 100644 --- a/NOTICE +++ b/NOTICE @@ -18,6 +18,7 @@ The following software have components provided under the terms of this license: - Cobertura code coverage (from http://cobertura.sourceforge.net) - Plexus :: Default Container (from ) - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) +- StAX (from http://stax.codehaus.org/) - oro (from ) ======================================================================== @@ -225,17 +226,13 @@ The following software have components provided under the terms of this license: - Apache Ant Core (from http://ant.apache.org/) - Apache Ant Launcher (from http://ant.apache.org/) - Apache Commons BeanUtils (from http://commons.apache.org/proper/commons-beanutils/) -- Apache Commons BeanUtils (from http://commons.apache.org/proper/commons-beanutils/) - Apache Commons CLI (from http://commons.apache.org/proper/commons-cli/) - Apache Commons Codec (from http://commons.apache.org/proper/commons-codec/) - Apache Commons Codec (from http://commons.apache.org/proper/commons-codec/) -- Apache Commons Collections (from http://commons.apache.org/proper/commons-collections/) - Apache Commons Lang (from http://commons.apache.org/proper/commons-lang/) - Apache Commons Logging (from http://commons.apache.org/proper/commons-logging/) - Apache Commons Logging (from http://commons.apache.org/proper/commons-logging/) - Apache Commons Logging (from http://commons.apache.org/proper/commons-logging/) -- Apache Commons Text (from http://commons.apache.org/proper/commons-text/) -- Apache Commons Validator (from http://commons.apache.org/proper/commons-validator/) - Apache Commons Validator (from http://commons.apache.org/proper/commons-validator/) - Apache Geronimo JMS Spec 2.0 (from http://geronimo.apache.org/maven/${siteId}/${version}) - Apache Groovy (from http://groovy-lang.org) @@ -264,6 +261,8 @@ The following software have components provided under the terms of this license: - AssertJ fluent assertions (from ) - Asynchronous Http Client (from ) - Asynchronous Http Client Netty Utils (from ) +- Azure AD Spring Security Integration Spring Boot Starter (from https://github.com/Microsoft/azure-spring-boot) +- Azure Metrics Spring Boot Starter (from https://github.com/Microsoft/azure-spring-boot) - Bean Validation API (from http://beanvalidation.org) - Byte Buddy (without dependencies) (from ) - Byte Buddy Java agent (from ) @@ -272,8 +271,6 @@ The following software have components provided under the terms of this license: - CloudWatch Metrics for AWS Java SDK (from https://aws.amazon.com/sdkforjava) - Cobertura code coverage (from http://cobertura.sourceforge.net) - Commons Digester (from http://commons.apache.org/digester/) -- Commons Digester (from http://commons.apache.org/digester/) -- Commons IO (from http://commons.apache.org/io/) - Commons IO (from http://commons.apache.org/io/) - Commons Lang (from http://commons.apache.org/lang/) - Converter: Jackson (from ) @@ -312,6 +309,7 @@ The following software have components provided under the terms of this license: - IBM COS SDK For Java (from https://github.com/ibm/ibm-cos-sdk-java) - IBM COS SDK for Java - Core (from https://github.com/ibm/ibm-cos-sdk-java) - Identity and Access Management (IAM) API v1-rev247-1.23.0 (from ) +- IntelliJ IDEA Annotations (from http://www.jetbrains.org) - J2ObjC Annotations (from https://github.com/google/j2objc/) - J2ObjC Annotations (from https://github.com/google/j2objc/) - JBoss Logging 3 (from http://www.jboss.org) @@ -326,27 +324,40 @@ The following software have components provided under the terms of this license: - Jackson 2 extensions to the Google HTTP Client Library for Java. (from https://github.com/google/google-http-java-client.git/google-http-client-jackson2) - Jackson dataformat: CBOR (from http://github.com/FasterXML/jackson-dataformats-binary) - Jackson datatype: JSR310 (from http://wiki.fasterxml.com/JacksonModuleJSR310) +- Jackson datatype: JSR310 (from http://wiki.fasterxml.com/JacksonModuleJSR310) - Jackson extensions to the Google HTTP Client Library for Java. (from ) - Jackson-annotations (from http://github.com/FasterXML/jackson) +- Jackson-annotations (from http://github.com/FasterXML/jackson) +- Jackson-core (from https://github.com/FasterXML/jackson-core) - Jackson-core (from https://github.com/FasterXML/jackson-core) - Jackson-dataformat-Smile (from http://github.com/FasterXML/jackson-dataformat-smile) - Jackson-dataformat-XML (from http://wiki.fasterxml.com/JacksonExtensionXmlDataBinding) - Jackson-dataformat-YAML (from https://github.com/FasterXML/jackson) +- Jackson-dataformat-YAML (from https://github.com/FasterXML/jackson) - Jackson-datatype-Joda (from http://wiki.fasterxml.com/JacksonModuleJoda) - Jackson-datatype-jdk8 (from ) +- Jackson-datatype-jdk8 (from ) +- Jackson-module-Afterburner (from http://wiki.fasterxml.com/JacksonHome) - Jackson-module-JAXB-annotations (from http://wiki.fasterxml.com/JacksonJAXBAnnotations) +- Jackson-module-JAXB-annotations (from http://wiki.fasterxml.com/JacksonJAXBAnnotations) +- Jackson-module-parameter-names (from ) - Jackson-module-parameter-names (from ) - Java Libraries for Amazon Simple WorkFlow (from https://aws.amazon.com/sdkforjava) - Java Native Access (from https://github.com/java-native-access/jna) - Java Native Access Platform (from https://github.com/java-native-access/jna) - Java Servlet API (from http://servlet-spec.java.net) -- Java UUID Generator (from http://wiki.fasterxml.com/JugHome) - Javassist (from http://www.javassist.org/) - Javassist (from http://www.javassist.org/) - Jetty Server (from ) - Jetty Utilities (from ) - Joda-Time (from http://www.joda.org/joda-time/) - Json Path (from https://github.com/jayway/JsonPath) +- KeePassJava2 :: All (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2) +- KeePassJava2 :: DOM (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-dom) +- KeePassJava2 :: JAXB (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-jaxb) +- KeePassJava2 :: KDB (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-kdb) +- KeePassJava2 :: KDBX (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-kdbx) +- KeePassJava2 :: Simple (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/KeePassJava2-simple) - Lucene Common Analyzers (from ) - Lucene Core (from ) - Lucene Grouping (from ) @@ -384,25 +395,33 @@ The following software have components provided under the terms of this license: - Microsoft Application Insights Java SDK Web Module (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Application Insights Log4j 2 Appender (from https://github.com/Microsoft/ApplicationInsights-Java) - Microsoft Azure Netty HTTP Client Library (from https://github.com/Azure/azure-sdk-for-java) +- Microsoft Azure SDK for SQL API of Azure Cosmos DB Service (from https://github.com/Azure/azure-sdk-for-java) - Mockito (from http://www.mockito.org) - Mockito (from http://mockito.org) - Mockito (from http://mockito.org) - Mojo's Maven plugin for Cobertura (from http://mojo.codehaus.org/cobertura-maven-plugin/) - Netty Reactive Streams Implementation (from ) - Netty/Buffer (from http://netty.io/) +- Netty/Buffer (from http://netty.io/) +- Netty/Codec (from ) - Netty/Codec (from ) -- Netty/Codec/DNS (from ) +- Netty/Codec/HTTP (from ) - Netty/Codec/HTTP (from ) - Netty/Codec/HTTP2 (from ) - Netty/Codec/Socks (from ) - Netty/Common (from ) +- Netty/Common (from ) +- Netty/Handler (from ) - Netty/Handler (from ) - Netty/Handler/Proxy (from ) - Netty/Resolver (from ) -- Netty/Resolver/DNS (from ) +- Netty/Resolver (from ) - Netty/TomcatNative [BoringSSL - Static] (from ) - Netty/Transport (from http://netty.io/) +- Netty/Transport (from http://netty.io/) - Netty/Transport/Native/Unix/Common (from ) +- Netty/Transport/Native/Unix/Common (from ) +- Nimbus JOSE+JWT (from https://bitbucket.org/connect2id/nimbus-jose-jwt) - Nimbus JOSE+JWT (from https://bitbucket.org/connect2id/nimbus-jose-jwt) - Nimbus LangTag (from https://bitbucket.org/connect2id/nimbus-language-tags) - Non-Blocking Reactive Foundation for the JVM (from https://github.com/reactor/reactor) @@ -417,6 +436,7 @@ The following software have components provided under the terms of this license: - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) - OpenCensus (from https://github.com/census-instrumentation/opencensus-java) +- PWDB :: Database (from https://repo1.maven.org/maven2/org/linguafranca/pwdb/database) - Plexus :: Default Container (from ) - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) - Plexus Default Interactivity Handler (from ) @@ -425,10 +445,10 @@ The following software have components provided under the terms of this license: - PowerMock (from http://www.powermock.org) - Protocol Buffer extensions to the Google HTTP Client Library for Java. (from ) - QpidJMS Client (from ) -- Reactive Object Pool (from https://github.com/reactor/reactor-pool) - Reactive Streams Netty driver (from https://github.com/reactor/reactor-netty) - Retrofit (from ) - Servlet Specification 2.5 API (from ) +- Simple XML (from http://simple.sourceforge.net) - SnakeYAML (from http://www.snakeyaml.org) - Spring AOP (from https://github.com/spring-projects/spring-framework) - Spring Beans (from https://github.com/spring-projects/spring-framework) @@ -453,6 +473,7 @@ The following software have components provided under the terms of this license: - Spring Commons Logging Bridge (from https://github.com/spring-projects/spring-framework) - Spring Context (from https://github.com/spring-projects/spring-framework) - Spring Core (from https://github.com/spring-projects/spring-framework) +- Spring Data Core (from ) - Spring Expression Language (SpEL) (from https://github.com/spring-projects/spring-framework) - Spring JMS (from https://github.com/spring-projects/spring-framework) - Spring Messaging (from https://github.com/spring-projects/spring-framework) @@ -462,11 +483,14 @@ The following software have components provided under the terms of this license: - Spring Transaction (from https://github.com/spring-projects/spring-framework) - Spring Web (from https://github.com/spring-projects/spring-framework) - Spring Web MVC (from https://github.com/spring-projects/spring-framework) +- StAX (from http://stax.codehaus.org/) +- StAX API (from http://stax.codehaus.org/) - T-Digest (from https://github.com/tdunning/t-digest) - Vavr (from http://vavr.io) - Vavr Match (from http://vavr.io) - Woodstox (from https://github.com/FasterXML/woodstox) - Xerces2-j (from https://xerces.apache.org/xerces2-j/) +- aalto-xml (from ) - aggs-matrix-stats (from https://github.com/elastic/elasticsearch) - cli (from https://github.com/elastic/elasticsearch) - com.google.api.grpc:grpc-google-cloud-pubsub-v1 (from https://github.com/googleapis/googleapis) @@ -475,7 +499,6 @@ The following software have components provided under the terms of this license: - com.google.api.grpc:proto-google-common-protos (from https://github.com/googleapis/googleapis) - com.google.api.grpc:proto-google-iam-v1 (from https://github.com/googleapis/googleapis) - commons-collections (from ) -- commons-collections (from ) - compiler (from http://github.com/spullara/mustache.java) - datastore-v1-proto-client (from ) - elasticsearch-core (from https://github.com/elastic/elasticsearch) @@ -495,8 +518,10 @@ The following software have components provided under the terms of this license: - ion-java (from https://github.com/amznlabs/ion-java/) - jackson-databind (from http://github.com/FasterXML/jackson) - jackson-databind (from http://github.com/FasterXML/jackson) +- jackson-databind (from http://github.com/FasterXML/jackson) - java-cloudant (from https://cloudant.com) - java-cloudant (from https://cloudant.com) +- javatuples (from http://www.javatuples.org) - javax.inject (from http://code.google.com/p/atinject/) - javax.ws.rs-api (from http://jax-rs-spec.java.net) - jersey-container-servlet (from git://java.net/jersey~code/project/jersey-container-servlet) @@ -525,7 +550,6 @@ The following software have components provided under the terms of this license: - powermock-reflect (from ) - proto-google-cloud-datastore-v1 (from https://github.com/googleapis/api-client-staging) - proton-j (from ) -- proton-j (from ) - rank-eval (from https://github.com/elastic/elasticsearch) - resilience4j (from https://github.com/resilience4j/resilience4j) - resilience4j (from https://github.com/resilience4j/resilience4j) @@ -533,7 +557,6 @@ The following software have components provided under the terms of this license: - rest (from https://github.com/elastic/elasticsearch) - rest-high-level (from https://github.com/elastic/elasticsearch) - rxjava (from https://github.com/ReactiveX/RxJava) -- rxjava (from https://github.com/ReactiveX/RxJava) - secure-sm (from https://github.com/elastic/elasticsearch) - spring-security-config (from http://spring.io/spring-security) - spring-security-core (from http://spring.io/spring-security) @@ -575,6 +598,8 @@ The following software have components provided under the terms of this license: - Lucene Common Analyzers (from ) - Plexus :: Default Container (from ) - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) +- StAX (from http://stax.codehaus.org/) +- Stax2 API (from http://github.com/FasterXML/stax2-api) - jersey-ext-bean-validation (from ) - jersey-spring4 (from ) - oro (from ) @@ -604,6 +629,7 @@ The following software have components provided under the terms of this license: - Hamcrest library (from ) - JDOM (from http://www.jdom.org) - JSch (from http://www.jcraft.com/jsch/) +- JavaBeans Activation Framework API jar (from ) - Lucene Common Analyzers (from ) - Lucene Core (from ) - Lucene Suggest (from ) @@ -614,6 +640,7 @@ The following software have components provided under the terms of this license: - Mockito (from http://www.mockito.org) - NanoHttpd-Core (from ) - Netty/Codec/HTTP (from ) +- Netty/Codec/HTTP (from ) - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) - Protocol Buffer Java API (from https://developers.google.com/protocol-buffers/) - Protocol Buffers [Util] (from ) @@ -623,6 +650,7 @@ The following software have components provided under the terms of this license: - Stax2 API (from http://github.com/FasterXML/stax2-api) - ThreeTen backport (from https://www.threeten.org/threetenbp) - classworlds (from http://classworlds.codehaus.org/) +- jakarta.xml.bind-api (from ) - jaxen (from http://jaxen.codehaus.org/) - jersey-container-servlet (from git://java.net/jersey~code/project/jersey-container-servlet) - jersey-container-servlet-core (from git://java.net/jersey~code/project/jersey-container-servlet-core) @@ -875,7 +903,6 @@ The following software have components provided under the terms of this license: - Azure Java Client Runtime for AutoRest (from https://github.com/Azure/autorest-clientruntime-for-java) - Azure Metrics Spring Boot Starter (from https://github.com/Microsoft/azure-spring-boot) - Azure Spring Boot AutoConfigure (from https://github.com/Microsoft/azure-spring-boot) -- Azure Spring Boot Starter (from https://github.com/Microsoft/azure-spring-boot) - Checker Qual (from https://checkerframework.org) - Checker Qual (from https://checkerframework.org) - Extensions on Apache Proton-J library (from https://github.com/Azure/qpid-proton-j-extensions) @@ -897,17 +924,23 @@ The following software have components provided under the terms of this license: - Microsoft Azure client library for Identity (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure client library for KeyVault Secrets (from https://github.com/Azure/azure-sdk-for-java) - Microsoft Azure common module for Storage (from https://github.com/Azure/azure-sdk-for-java) +- Microsoft Azure internal Avro module for Storage (from https://github.com/Azure/azure-sdk-for-java) +- Mockito (from http://www.mockito.org) - Mockito (from http://mockito.org) - Mockito (from http://mockito.org) -- Mockito (from http://www.mockito.org) - Netty/Codec/HTTP (from ) +- Netty/Codec/HTTP (from ) +- Netty/Common (from ) - Netty/Common (from ) - Plexus :: Default Container (from ) - Plexus Default Interactivity Handler (from ) - Project Lombok (from https://projectlombok.org) - SLF4J API Module (from http://www.slf4j.org) +- Spongy Castle (from http://rtyley.github.io/spongycastle/) +- Spring Data for Azure Cosmos DB SQL API (from https://github.com/Azure/azure-sdk-for-java/tree/master/sdk/cosmos/azure-spring-data-cosmos) - adal4j (from https://github.com/AzureAD/azure-activedirectory-library-for-java) - msal4j (from https://github.com/AzureAD/microsoft-authentication-library-for-java) +- msal4j-persistence-extension (from https://github.com/AzureAD/microsoft-authentication-extensions-for-java) - spring-security-core (from http://spring.io/spring-security) ======================================================================== @@ -927,6 +960,14 @@ The following software have components provided under the terms of this license: - Javassist (from http://www.javassist.org/) - Javassist (from http://www.javassist.org/) +======================================================================== +PHP-3.01 +======================================================================== +The following software have components provided under the terms of this license: + +- JavaBeans Activation Framework API jar (from ) +- jakarta.xml.bind-api (from ) + ======================================================================== Public-Domain ======================================================================== @@ -936,6 +977,7 @@ The following software have components provided under the terms of this license: - JTidy (from http://jtidy.sourceforge.net) - LatencyUtils (from http://latencyutils.github.io/LatencyUtils/) - Plexus Common Utilities (from http://plexus.codehaus.org/plexus-utils) +- Spongy Castle (from http://rtyley.github.io/spongycastle/) - jersey-core-common (from ) - jersey-core-server (from git://java.net/jersey~code/jersey-server) - reactive-streams (from http://www.reactive-streams.org/) @@ -992,6 +1034,7 @@ The following software have components provided under the terms of this license: - Microsoft Azure client library for Blob Storage (from https://github.com/Azure/azure-sdk-for-java) - Project Lombok (from https://projectlombok.org) - Spring Web (from https://github.com/spring-projects/spring-framework) +- msal4j (from https://github.com/AzureAD/microsoft-authentication-library-for-java) ======================================================================== unknown @@ -999,8 +1042,11 @@ unknown The following software have components provided under the terms of this license: - Byte Buddy (without dependencies) (from ) +- JavaBeans Activation Framework API jar (from ) - Servlet Specification 2.5 API (from ) +- Spongy Castle (from http://rtyley.github.io/spongycastle/) - System Rules (from http://stefanbirkner.github.io/system-rules/) +- jakarta.xml.bind-api (from ) - jaxen (from http://jaxen.codehaus.org/) - jersey-container-servlet (from git://java.net/jersey~code/project/jersey-container-servlet) - jersey-container-servlet-core (from git://java.net/jersey~code/project/jersey-container-servlet-core) diff --git a/provider/legal-azure/pom.xml b/provider/legal-azure/pom.xml index 4ce85e34a07db2cf545faf83d351452654f12ee9..74abade369a365346bc7ed96fe8d448dd6862978 100644 --- a/provider/legal-azure/pom.xml +++ b/provider/legal-azure/pom.xml @@ -29,18 +29,35 @@ <artifactId>legal-azure</artifactId> <packaging>jar</packaging> <properties> - <azure.version>2.1.7</azure.version> <azure.appservice.resourcegroup></azure.appservice.resourcegroup> <azure.appservice.plan></azure.appservice.plan> <azure.appservice.appname></azure.appservice.appname> <azure.appservice.subscription></azure.appservice.subscription> + <osdu.corelibazure.version>0.0.42</osdu.corelibazure.version> + <osdu.oscorecommon.version>0.3.12</osdu.oscorecommon.version> + <osdu.legal-core.version>0.0.5-SNAPSHOT</osdu.legal-core.version> + <javax.inject.version>1</javax.inject.version> + <javax.servlet-api.version>4.0.1</javax.servlet-api.version> </properties> + <dependencyManagement> + <dependencies> + <!-- Inherit managed dependencies from core-lib-azure --> + <dependency> + <groupId>org.opengroup.osdu</groupId> + <artifactId>core-lib-azure</artifactId> + <version>${osdu.corelibazure.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + <dependencies> <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>os-core-common</artifactId> - <version>0.3.12</version> + <version>${osdu.oscorecommon.version}</version> <exclusions> <exclusion> <groupId>org.elasticsearch</groupId> @@ -59,24 +76,29 @@ <dependency> <groupId>org.opengroup.osdu.legal</groupId> <artifactId>legal-core</artifactId> - <version>0.0.5-SNAPSHOT</version> + <version>${osdu.legal-core.version}</version> </dependency> <dependency> <groupId>javax.inject</groupId> <artifactId>javax.inject</artifactId> - <version>1</version> + <version>${javax.inject.version}</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> - <version>4.0.1</version> + <version>${javax.servlet-api.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.microsoft.azure</groupId> <artifactId>azure-active-directory-spring-boot-starter</artifactId> - <version>${azure.version}</version> + <exclusions> + <exclusion> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-logging</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -103,7 +125,7 @@ <dependency> <groupId>org.opengroup.osdu</groupId> <artifactId>core-lib-azure</artifactId> - <version>0.0.33</version> + <version>${osdu.corelibazure.version}</version> </dependency> <dependency> <groupId>org.projectlombok</groupId> @@ -116,22 +138,6 @@ <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> - - <!-- - Override the spring-boot version of these dependencies to the ones - required by the azure-core library. This needs to be done for each - app that depends on this library - --> - <dependency> - <groupId>io.projectreactor.netty</groupId> - <artifactId>reactor-netty</artifactId> - <version>0.9.0.RELEASE</version> - </dependency> - <dependency> - <groupId>io.projectreactor</groupId> - <artifactId>reactor-core</artifactId> - <version>3.3.0.RELEASE</version> - </dependency> </dependencies> <build> diff --git a/provider/legal-azure/src/main/java/org/opengroup/osdu/legal/azure/tags/dataaccess/LegalTagRepositoryImpl.java b/provider/legal-azure/src/main/java/org/opengroup/osdu/legal/azure/tags/dataaccess/LegalTagRepositoryImpl.java index bc88dc043541cf22ae1143702b04301284aa1fdd..e560cfb5f72decc863c1b0e8037d4eef54e4c0bd 100644 --- a/provider/legal-azure/src/main/java/org/opengroup/osdu/legal/azure/tags/dataaccess/LegalTagRepositoryImpl.java +++ b/provider/legal-azure/src/main/java/org/opengroup/osdu/legal/azure/tags/dataaccess/LegalTagRepositoryImpl.java @@ -14,10 +14,9 @@ package org.opengroup.osdu.legal.azure.tags.dataaccess; -import com.azure.cosmos.FeedOptions; -import com.azure.cosmos.SqlParameter; -import com.azure.cosmos.SqlParameterList; -import com.azure.cosmos.SqlQuerySpec; +import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.SqlParameter; +import com.azure.cosmos.models.SqlQuerySpec; import org.opengroup.osdu.azure.cosmosdb.CosmosStore; import org.opengroup.osdu.common.Validators; import org.opengroup.osdu.core.common.model.http.DpsHeaders; @@ -60,7 +59,7 @@ public class LegalTagRepositoryImpl implements ILegalTagRepository { if (existingDoc.isPresent()) { throw AppException.legalTagAlreadyExistsError(legalTag.getName()); } - cosmosStore.createItem(headers.getPartitionId(), cosmosDBName, legalTagsContainer, legalTagDoc); + cosmosStore.createItem(headers.getPartitionId(), cosmosDBName, legalTagsContainer, legalTagDoc.getId(), legalTagDoc); return id; } @@ -102,18 +101,20 @@ public class LegalTagRepositoryImpl implements ILegalTagRepository { if (!exists) throw AppException.legalTagDoesNotExistError(newLegalTag.getName()); - cosmosStore.upsertItem(headers.getPartitionId(), cosmosDBName, legalTagsContainer, new LegalTagDoc(strId, newLegalTag)); + cosmosStore.upsertItem(headers.getPartitionId(), cosmosDBName, legalTagsContainer, strId, new LegalTagDoc(strId, newLegalTag)); return newLegalTag; } @Override public Collection<LegalTag> list(ListLegalTagArgs args) { + List<SqlParameter> parameterList = new ArrayList<SqlParameter>(); + parameterList.add(new SqlParameter("@isValid", args.getIsValid())); SqlQuerySpec query = new SqlQuerySpec() .setQueryText("SELECT * FROM c WHERE c.legalTag.isValid = @isValid") - .setParameters(new SqlParameterList(new SqlParameter("@isValid", args.getIsValid()))); + .setParameters(parameterList); - FeedOptions options = new FeedOptions().setEnableCrossPartitionQuery(true); + CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); return cosmosStore.queryItems(headers.getPartitionId(), cosmosDBName, legalTagsContainer, query, options, LegalTagDoc.class) .stream() .map(LegalTagDoc::getLegalTag) diff --git a/provider/legal-azure/src/main/resources/application.properties b/provider/legal-azure/src/main/resources/application.properties index f5ab69d34e0b4ff727b08862b8185c1e18e3e1e6..f5d8e74e2ac2386f0fab9a9d85374e0dc4485e09 100644 --- a/provider/legal-azure/src/main/resources/application.properties +++ b/provider/legal-azure/src/main/resources/application.properties @@ -62,3 +62,5 @@ logging.mdccontext.enabled=true tenantFactoryImpl.required=true tenantInfo.container.name=TenantInfo +# Disable keyVault for actuator health check +management.health.azure-key-vault.enabled=false \ No newline at end of file diff --git a/provider/legal-azure/src/test/java/org/opengroup/osdu/legal/azure/tags/dataaccess/LegalTagRepositoryImplTest.java b/provider/legal-azure/src/test/java/org/opengroup/osdu/legal/azure/tags/dataaccess/LegalTagRepositoryImplTest.java index 8162d1f5f481e853427501914ad1df798b92d444..4a182238850e58c7c8ae4029d19fe8e0a8896d86 100644 --- a/provider/legal-azure/src/test/java/org/opengroup/osdu/legal/azure/tags/dataaccess/LegalTagRepositoryImplTest.java +++ b/provider/legal-azure/src/test/java/org/opengroup/osdu/legal/azure/tags/dataaccess/LegalTagRepositoryImplTest.java @@ -14,10 +14,9 @@ package org.opengroup.osdu.legal.azure.tags.dataaccess; -import com.azure.cosmos.FeedOptions; -import com.azure.cosmos.SqlParameter; -import com.azure.cosmos.SqlParameterList; -import com.azure.cosmos.SqlQuerySpec; +import com.azure.cosmos.models.CosmosQueryRequestOptions; +import com.azure.cosmos.models.SqlParameter; +import com.azure.cosmos.models.SqlQuerySpec; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -86,7 +85,7 @@ public class LegalTagRepositoryImplTest { long obtainedId = sut.create(legalTag); ArgumentCaptor<LegalTagDoc> arg = ArgumentCaptor.forClass(LegalTagDoc.class); - verify(cosmosStore).createItem(eq(dataPartitionId), any(), any(), arg.capture()); + verify(cosmosStore).createItem(eq(dataPartitionId), any(), any(), any(), arg.capture()); assertEquals(arg.getValue().getId(), strId); assertEquals(obtainedId, id); @@ -172,7 +171,7 @@ public class LegalTagRepositoryImplTest { LegalTag obtainedLegalTag = sut.update(legalTag); ArgumentCaptor<LegalTagDoc> arg = ArgumentCaptor.forClass(LegalTagDoc.class); - verify(cosmosStore).upsertItem(eq(dataPartitionId), any(), any(), arg.capture()); + verify(cosmosStore).upsertItem(eq(dataPartitionId), any(), any(), any(), arg.capture()); assertEquals(arg.getValue().getId(), strId); assertEquals(obtainedLegalTag.getId().longValue(), id); @@ -185,7 +184,7 @@ public class LegalTagRepositoryImplTest { List<LegalTagDoc> legalTagDocs = Arrays.asList(new LegalTagDoc(strIds[0], getLegalTagWithId(ids[0])), new LegalTagDoc(strIds[1], getLegalTagWithId(ids[1]))); ArgumentCaptor<SqlQuerySpec> query = ArgumentCaptor.forClass(SqlQuerySpec.class); - ArgumentCaptor<FeedOptions> feedOptions = ArgumentCaptor.forClass(FeedOptions.class); + ArgumentCaptor<CosmosQueryRequestOptions> feedOptions = ArgumentCaptor.forClass(CosmosQueryRequestOptions.class); doReturn(legalTagDocs).when(cosmosStore).queryItems(eq(dataPartitionId), any(), any(), any(), any(), any()); ListLegalTagArgs legalTagArgs = new ListLegalTagArgs(); @@ -198,10 +197,8 @@ public class LegalTagRepositoryImplTest { verify(cosmosStore).queryItems(eq(dataPartitionId), any(), any(), query.capture(), feedOptions.capture(), any()); assertEquals(query.getValue().getQueryText(), "SELECT * FROM c WHERE c.legalTag.isValid = @isValid"); - assertTrue(feedOptions.getValue().getEnableCrossPartitionQuery()); - SqlParameterList parameters = query.getValue().getParameters(); - SqlParameter isValid = parameters.get(0); + SqlParameter isValid = query.getValue().getParameters().get(0); assertEquals(isValid.getName(), "@isValid"); assertEquals(isValid.getValue(Boolean.class), true);