Skip to content

Commit

Permalink
Merge branch 'quiet-constructors' into 'develop'
Browse files Browse the repository at this point in the history
Quieten constructor logging

See merge request eip/catalogue!828
  • Loading branch information
MWatkeysCEH committed Feb 14, 2025
2 parents 6b22b88 + 8909371 commit c1dcb7d
Show file tree
Hide file tree
Showing 90 changed files with 104 additions and 104 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ javac-services*
.project
org.eclipse.*
DevStartupController.java
docker-compose.override.yml
*.private.env.json
/sparql.http
/oidc-roles.json
/fixtures/solr/ror/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ public DataLabsAuthenticationProvider(
@Value("${datalabs.userPermissions}") String address
) {
this.restTemplate = restTemplate;
this.address = UriComponentsBuilder.fromHttpUrl(address).build().toUri();
log.info("Creating {}", this);
this.address = UriComponentsBuilder.fromUriString(address).build().toUri();
log.info("Creating");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public DatalabsCatalogueUserProvider(
@Value("${datalabs.users}") String usersEndpoint
) {
this.restTemplate = restTemplate;
this.usersEndpoint = UriComponentsBuilder.fromHttpUrl(usersEndpoint).build().toUri();
log.info("Creating {}", this);
this.usersEndpoint = UriComponentsBuilder.fromUriString(usersEndpoint).build().toUri();
log.info("Creating");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class RememberMeServicesDataLabs implements RememberMeServices {
this.cookieName = cookieName;
this.jwtProcessor = createJwtProcessor(keySource, issuer);
this.catalogueUserProvider = catalogueUserProvider;
log.info("Creating {}", this);
log.info("Creating");
}

@SneakyThrows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public InMemoryCatalogueService(
this.catalogues.put(catalogue.getId(), catalogue);
}
this.defaultCatalogueKey = defaultCatalogueKey;
log.info("Creating {}", this);
log.info("Creating");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public CitationService(
@Value("${doi.prefix}") String nercDoiPrefix
) {
this.nercDoiPrefix = nercDoiPrefix;
log.info("Creating {}", this);
log.info("Creating");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public SolrIndexingService solrIndexingService(

IndexGeneratorRegistry<MetadataDocument, SolrIndex> indexGeneratorRegistry = new IndexGeneratorRegistry<>(mappings);
linkDocumentGenerator.setIndexGeneratorRegistry(indexGeneratorRegistry);
log.info("Set repository & registry on {}", linkDocumentGenerator);
log.debug("Set repository & registry on {}", linkDocumentGenerator);

return new SolrIndexingService(
bundledReaderService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.apache.jena.tdb.TDBFactory;
import org.apache.jena.tdb1.TDB1Factory;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.impl.HttpJdkSolrClient;
import org.springframework.beans.factory.annotation.Qualifier;
Expand Down Expand Up @@ -251,7 +251,7 @@ public org.apache.jena.query.Dataset tdbModel(
@Value("${jena.location}") String location
) {
log.info("Creating Dataset at: {}", location);
return TDBFactory.createDataset(location);
return TDB1Factory.createDataset(location);
}

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public DataciteController(
this.repo = repo;
this.identifierService = identifierService;
this.dataciteService = dataciteService;
log.info("Creating {}", this);
log.info("Creating");
}

@GetMapping(value="{file}/datacite.xml")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public DocumentController(
super(documentRepository);
this.metricsService = metricsService;
this.metricsExcludedUsers = metricExcludedUsers;
log.info("Creating {}", this);
log.info("Creating");
}

@RequestMapping (value = "documents/upload",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class DocumentPublicationController {

public DocumentPublicationController(@Qualifier("document") PublicationService publicationService) {
this.publicationService = publicationService;
log.info("Creating {}", this);
log.info("Creating");
}

@PreAuthorize("@permission.toAccess(#user, #file, 'VIEW')")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public DownloadController(
Pattern.compile(packageUrlRegex),
Pattern.compile(datastoreUrlRegex)
);
log.info("Creating {}", this);
log.info("Creating");
}

@GetMapping("download/{uuid}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class ErammpModelController extends AbstractDocumentController {

public ErammpModelController(DocumentRepository documentRepository) {
super(documentRepository);
log.info("Creating {}", this);
log.info("Creating");
}

@PreAuthorize("@permission.userCanCreate(#catalogue)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public GeminiWafController( DataRepository<CatalogueUser> repo,
MetadataListingService listing) {
this.repo = repo;
this.listing = listing;
log.info("Creating {}", this);
log.info("Creating");
}

@GetMapping("/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class MapViewerController {

public MapViewerController(@Qualifier("wms") RestTemplate rest) {
this.rest = rest;
log.info("Creating {}", this);
log.info("Creating");
}

@SuppressWarnings("SpringMVCViewInspection")
Expand Down Expand Up @@ -85,7 +85,7 @@ private boolean isLocalGetFeatureInfoRequest(MultiValueMap<String, String> param

private URI getLocalWMSRequest(String id, MultiValueMap<String, String> params) {
return UriComponentsBuilder
.fromHttpUrl(MAPSERVER)
.fromUriString(MAPSERVER)
.queryParams(params)
.buildAndExpand(id)
.toUri();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public NercWafController(
) {
this.repo = repo;
this.listing = listing;
log.info("Creating {}", this);
log.info("Creating");
}

@GetMapping("/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public OnlineResourceController(BundledReaderService<MetadataDocument> documentB
this.getCapabilitiesObtainerService = getCapabilitiesObtainerService;
this.tmsToWmsGetMapService = tmsToWmsGetMapService;
this.mapServerDetailsService = mapServerDetailsService;
log.info("Creating {}", this);
log.info("Creating");
}

@SneakyThrows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class OsdpDocumentController extends AbstractDocumentController {

public OsdpDocumentController(DocumentRepository documentRepository) {
super(documentRepository);
log.info("Creating {}", this);
log.info("Creating");
}

@PreAuthorize("@permission.userCanCreate(#catalogue)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public PermissionController(PermissionService permissionService,
{
this.permissionService = permissionService;
this.documentRepository = documentRepository;
log.info("Creating {}", this);
log.info("Creating");
}

@PreAuthorize("@permission.toAccess(#user, #file, 'VIEW')")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class SampleArchiveController extends AbstractDocumentController {

public SampleArchiveController(DocumentRepository documentRepository) {
super(documentRepository);
log.info("Creating {}", this);
log.info("Creating");
}

@PreAuthorize("@permission.userCanCreate(#catalogue)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class SparqlController {

public SparqlController(Dataset jenaTdb) {
this.jenaTdb = jenaTdb;
log.info("Creating {}", this);
log.info("Creating");
}

@GetMapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class SparqlUiController {

public SparqlUiController(@Value("${fuseki.url}") String hostname) {
this.sparqlEndpoint = hostname + "/ds/sparql";
log.info("creating {}", this);
log.info("Creating");
}

@GetMapping("sparql")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public Gml2WmsFeatureInfoMessageConverter() throws XPathExpressionException {
this.layers = xpath.compile(LAYERS);
this.features = xpath.compile(FEATURES);
this.attributes = xpath.compile(ATTRIBUTES);
log.info("Creating {}", this);
log.info("Creating");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class Jaxb2HttpMessageConverter extends Jaxb2RootElementHttpMessageConver
public Jaxb2HttpMessageConverter(String namespace, String schemaLocation) {
this.namespace = checkNotNull(emptyToNull(namespace));
this.schemaLocation = checkNotNull(emptyToNull(schemaLocation));
log.info("Creating {}", this);
log.info("Creating");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Object2TemplatedMessageConverter<T> extends AbstractHttpMessageConv
public Object2TemplatedMessageConverter(Class<T> clazz, Configuration configuration) {
this.clazz = clazz;
this.configuration = configuration;
log.info("Creating {}", this);
log.info("Creating");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class TransparentProxyMessageConverter implements HttpMessageConverter<Tr

public TransparentProxyMessageConverter(CloseableHttpClient httpClient) {
this.httpClient = httpClient;
log.info("Creating {}", this);
log.info("Creating");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
public class UkeofXml2EFDocumentMessageConverter extends Jaxb2HttpMessageConverter {
public UkeofXml2EFDocumentMessageConverter() {
super("http://www.ukeof.org.uk/schema/1","http://www.ukeof.org.uk/schema/1/UKEOF_v1.0.xsd");
log.info("Creating {}", this);
log.info("Creating");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
public class WmsFeatureInfo2XmlMessageConverter extends AbstractHttpMessageConverter<WmsFeatureInfo> {
public WmsFeatureInfo2XmlMessageConverter() {
super(MediaType.TEXT_XML);
log.info("Creating {}", this);
log.info("Creating");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public Xml2WmsCapabilitiesMessageConverter() {
this.layerConverter = new LayerConverter(xpath);
this.map = xpath.compile(MAP_URL);
this.featureInfo = xpath.compile(FEATURE_INFO_URL);
log.info("Creating {}", this);
log.info("Creating");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public LayerConverter(XPath xpath) throws XPathExpressionException {
this.name = xpath.compile("wms:Name");
this.title = xpath.compile("wms:Title");
this.legendUrl = xpath.compile("wms:Style[wms:Name = 'default']/wms:LegendURL/wms:OnlineResource/@xlink:href");
log.info("Creating {}", this);
log.info("Creating");
}

public List<Layer> convert(Document document) throws XPathExpressionException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public DataciteService(
this.identifierService = identifierService;
this.configuration = configuration;
this.restTemplate = restTemplate;
log.info("Creating {}", this);
log.info("Creating");
}

/**
Expand All @@ -89,7 +89,7 @@ public ResourceIdentifier generateDoi(GeminiDocument document) throws DataciteEx
val request = getDatacitationRequest(document);
log.info("Requesting mint of doi: {}", request);
val url = UriComponentsBuilder
.fromHttpUrl(api)
.fromUriString(api)
.toUriString();
DataciteRequest dataciteRequest = new DataciteRequest(doi, request, identifierService.generateUri(document.getId()));
try {
Expand Down Expand Up @@ -129,7 +129,7 @@ public ResourceIdentifier generateDoi(GeminiDocument document) throws DataciteEx
public String getDoiMetadata(GeminiDocument document) {
if (getDoi(document).isPresent()) {
val url = UriComponentsBuilder
.fromHttpUrl(api)
.fromUriString(api)
.pathSegment(prefix, document.getId())
.toUriString();
log.debug("Url to retrieve DOI from Datacite: {}", url);
Expand Down Expand Up @@ -165,7 +165,7 @@ public void updateDoiMetadata(GeminiDocument document) {
headers.setContentType(MediaType.valueOf("application/vnd.api+json"));
val request = getDatacitationRequest(document);
val url = UriComponentsBuilder
.fromHttpUrl(api)
.fromUriString(api)
.pathSegment(prefix, document.getId())
.toUriString();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public DeimsSolrScheduledSiteService(
this.restTemplate = restTemplate;
this.solrClient = solrClient;
this.address = address;
log.info("Creating {}", this);
log.info("Creating");
}

@Scheduled(initialDelay = TimeConstants.ONE_MINUTE, fixedDelay = TimeConstants.SEVEN_DAYS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public DocumentIdentifierService(
) {
this.baseUri = baseUri;
this.replacement = replacement;
log.info("Creating {}", this);
log.info("Creating");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class ExtensionDocumentListingService implements DocumentListingService {
private final List<String> extensions = Arrays.asList("meta", "raw");

public ExtensionDocumentListingService() {
log.info("Creating {}", this);
log.info("Creating");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class JacksonDocumentInfoMapper<T> implements DocumentInfoMapper<T> {
public JacksonDocumentInfoMapper(ObjectMapper mapper, Class<T> clazz) {
this.mapper = mapper;
this.clazz = clazz;
log.info("Creating {}", this);
log.info("Creating");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public DocumentReader(
@Value("${data.repository.location}") String datastore
) {
this.datastore = datastore;
log.info("Creating {}", this);
log.info("Creating");
}

public File read(String guid, String extension) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class HashMapDocumentTypeLookupService implements DocumentTypeLookupServi

public HashMapDocumentTypeLookupService() {
lookup = new HashMap<>();
log.info("Creating {}", this);
log.info("Creating");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public MessageConverterWritingService(
List<HttpMessageConverter<?>> messageConverters
) {
this.messageConverters = messageConverters;
log.info("Creating {}", this);
log.info("Creating");
}

public MessageConverterWritingService addMessageConverter(HttpMessageConverter<?> converter) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class IndexingFileEventListener {
public IndexingFileEventListener(DocumentIndexingService service, DocumentListingService listingService) {
this.service = service;
this.listingService = listingService;
log.info("Creating {}", this);
log.info("Creating");
}

@Subscribe
Expand Down
Loading

0 comments on commit c1dcb7d

Please sign in to comment.