Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
fmendezh committed Mar 26, 2024
2 parents 8f08f1a + 60c3147 commit 2c04df0
Show file tree
Hide file tree
Showing 22 changed files with 67 additions and 42 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<groupId>org.gbif.registry</groupId>
<artifactId>registry-parent</artifactId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
<name>GBIF Registry Parent</name>
<description>GBIF Registry project</description>

Expand Down Expand Up @@ -84,7 +84,7 @@
<spring-cloud-sleuth.version>2.2.8.RELEASE</spring-cloud-sleuth.version>

<!-- GBIF -->
<gbif-api.version>1.14.0</gbif-api.version>
<gbif-api.version>1.14.2</gbif-api.version>
<gbif-common.version>0.59</gbif-common.version>
<gbif-common-mybatis.version>1.3</gbif-common-mybatis.version>
<gbif-common-ws.version>1.26</gbif-common-ws.version>
Expand Down
4 changes: 2 additions & 2 deletions registry-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.gbif.registry</groupId>
<artifactId>registry-parent</artifactId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>

<artifactId>registry-cli</artifactId>
Expand All @@ -29,7 +29,7 @@
<guava.version>18.0</guava.version>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
6 changes: 2 additions & 4 deletions registry-directory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -13,9 +13,7 @@
<properties>
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions registry-doi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -15,7 +15,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions registry-domain/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -14,7 +14,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions registry-events/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -14,7 +14,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
2 changes: 1 addition & 1 deletion registry-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 2 additions & 2 deletions registry-identity/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -14,7 +14,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,12 @@ public PagingResponse<GbifUser> search(
@Override
@Nullable
public GbifUser authenticate(String username, String password) {
if (Strings.isNullOrEmpty(username) || password == null) {
if (Strings.isNullOrEmpty(username) || Strings.isNullOrEmpty(password)) {
return null;
}

// Avoid DOS route with an attacker trying extremely long passwords.
if (!PASSWORD_LENGTH_RANGE.contains(password.length())) {
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion registry-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 2 additions & 2 deletions registry-mail/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -14,7 +14,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions registry-messaging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -14,7 +14,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions registry-oaipmh/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -14,7 +14,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions registry-persistence/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -14,7 +14,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions registry-pipelines/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -14,7 +14,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions registry-search/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -15,7 +15,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions registry-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -14,7 +14,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions registry-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -14,7 +14,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions registry-surety/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -16,7 +16,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
4 changes: 2 additions & 2 deletions registry-ws-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>registry-parent</artifactId>
<groupId>org.gbif.registry</groupId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -14,7 +14,7 @@
<main.basedir>${project.parent.basedir}</main.basedir>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../registry-integration-tests/target/site/jacoco-aggregate/jacoco.xml
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

Expand Down
6 changes: 5 additions & 1 deletion registry-ws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,18 @@
<parent>
<groupId>org.gbif.registry</groupId>
<artifactId>registry-parent</artifactId>
<version>3.96.0-SNAPSHOT</version>
<version>3.96.2-SNAPSHOT</version>
</parent>
<artifactId>registry-ws</artifactId>
<name>GBIF Registry Webservices</name>

<properties>
<main.basedir>${project.parent.basedir}</main.basedir>
<start-class>org.gbif.registry.ws.RegistryWsApplication</start-class>

<sonar.coverage.jacoco.xmlReportPaths>
${project.basedir}/../target/site/jacoco-it/jacoco.xml,${project.basedir}/../target/site/jacoco-ut/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@
package org.gbif.registry.ws.resources;

import org.gbif.api.annotation.NullToNotFound;
import org.gbif.api.model.checklistbank.search.NameUsageSearchParameter;
import org.gbif.api.model.literature.LiteratureType;
import org.gbif.api.model.literature.search.LiteratureSearchParameter;
import org.gbif.api.model.occurrence.DownloadFormat;
import org.gbif.api.model.occurrence.geo.DistanceUnit;
import org.gbif.api.model.occurrence.search.OccurrenceSearchParameter;
import org.gbif.api.model.pipelines.PipelineStep;
import org.gbif.api.model.registry.EndorsementStatus;
import org.gbif.api.model.registry.search.DatasetSearchParameter;
import org.gbif.api.util.VocabularyUtils;
import org.gbif.api.vocabulary.Country;
import org.gbif.api.vocabulary.Extension;
Expand Down Expand Up @@ -188,8 +195,19 @@ private static Map<String, Enum<?>[]> enumerations() {
new CachingMetadataReaderFactory(resourcePatternResolver);

List<Class<? extends Serializable>> classes =
Arrays.asList(
Country.class, PreservationType.class, PipelineStep.class, LiteratureType.class);
Arrays.asList(
Country.class, // org.gbif.api.vocabulary
PreservationType.class, // org.gbif.api.vocabulary.collections
PipelineStep.class, // org.gbif.api.model.pipelines
LiteratureType.class, // org.gbif.api.model.literature
LiteratureSearchParameter.class, // org.gbif.api.model.literature.search
OccurrenceSearchParameter.class, // org.gbif.api.model.occurrence.search
DownloadFormat.class, // org.gbif.api.model.occurrence
DistanceUnit.class, // org.gbif.api.model.occurrence.geo
DatasetSearchParameter.class, // org.gbif.api.model.registry.search
EndorsementStatus.class, // org.gbif.api.model.registry
NameUsageSearchParameter.class // org.gbif.api.model.checklistbank.search
);

ImmutableSortedMap<String, Enum<?>[]> result;
try {
Expand Down

0 comments on commit 2c04df0

Please sign in to comment.