Commit 63b587ae authored by neelesh thakur's avatar neelesh thakur
Browse files

Merge branch 'lazy-event' into 'master'

Add configuration properties for event-grid & cryptography factories, partition service initialization fails otherwise

See merge request !92
parents afac2399 88bfe517
Pipeline #39157 passed with stages
in 5 minutes and 24 seconds
......@@ -5,6 +5,7 @@ import org.opengroup.osdu.azure.partition.PartitionInfoAzure;
import org.opengroup.osdu.azure.partition.PartitionServiceClient;
import org.opengroup.osdu.common.Validators;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
import com.azure.identity.DefaultAzureCredentialBuilder;
......@@ -15,6 +16,7 @@ import com.azure.security.keyvault.keys.cryptography.CryptographyClientBuilder;
* Implementation for CryptographyClientFactory.
*/
@Component
@ConditionalOnProperty(value = "azure.cryptography.enabled", havingValue = "true", matchIfMissing = true)
public class CryptographyClientFactoryImpl implements CryptographyClientFactory {
@Autowired
......
......@@ -25,12 +25,14 @@ import org.opengroup.osdu.core.common.partition.PartitionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
/**
* Implementation for IEventGridTopicClientFactory.
*/
@Component
@ConditionalOnProperty(value = "azure.eventgrid.topic.enabled", havingValue = "true", matchIfMissing = true)
public class EventGridTopicClientFactoryImpl implements IEventGridTopicClientFactory {
private static final Logger LOGGER = LoggerFactory.getLogger(EventGridTopicClientFactoryImpl.class.getName());
......
......@@ -25,6 +25,7 @@ import org.opengroup.osdu.core.common.model.http.AppException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
import java.net.URI;
......@@ -57,6 +58,7 @@ import java.util.List;
* </pre>
*/
@Component
@ConditionalOnProperty(value = "azure.eventgrid.topic.enabled", havingValue = "true", matchIfMissing = true)
public class EventGridTopicStore {
private static final Logger LOGGER = LoggerFactory.getLogger(CosmosStoreBulkOperations.class.getName());
......
......@@ -6,6 +6,7 @@ import org.opengroup.osdu.azure.partition.PartitionServiceClient;
import org.opengroup.osdu.azure.util.AzureTokenCredentialsService;
import org.opengroup.osdu.common.Validators;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
import com.microsoft.azure.credentials.AzureTokenCredentials;
......@@ -16,6 +17,7 @@ import com.microsoft.rest.LogLevel;
* Interface for Event Grid Manager Factory to return appropriate EventGridManager based on the data partition id.
*/
@Component
@ConditionalOnProperty(value = "azure.eventgrid.manager.enabled", havingValue = "true", matchIfMissing = true)
public class EventGridManagerFactoryImpl implements EventGridManagerFactory {
@Autowired
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment