X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=aai-schema-ingest%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fsetup%2FSchemaServiceTranslator.java;h=ec6e41a75bfa406e87ebd1494b99c5ff5ada7a3a;hb=b7ad55e5d91527b259cb9189237b3f01915c31f8;hp=680bdd12932a6a3c2e947bbbbdba6eda1eb0b12e;hpb=e190b0b67803241ad3a94a6c6396fc47a94e7fac;p=aai%2Faai-common.git diff --git a/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java b/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java index 680bdd12..ec6e41a7 100644 --- a/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java +++ b/aai-schema-ingest/src/main/java/org/onap/aai/setup/SchemaServiceTranslator.java @@ -22,7 +22,6 @@ package org.onap.aai.setup; import java.io.IOException; import java.io.InputStream; -import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; import java.util.List; @@ -32,19 +31,22 @@ import org.onap.aai.restclient.RestClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.core.io.Resource; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Component; /** * AAIConfigTranslator is responsible for looking at the schema files and * edge files based on the available versions Also has the ability to exclude * them based on the node.exclusion.pattern */ +@Component +@ConditionalOnProperty(name = "schema.translator.list", havingValue = "schema-service", matchIfMissing = false) public class SchemaServiceTranslator extends Translator { private static final Logger LOGGER = LoggerFactory.getLogger(SchemaServiceTranslator.class);