-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1519 from folio-org/tmp-release-24.3.2
CIRC-2191 Release 24.3.2
- Loading branch information
Showing
89 changed files
with
2,018 additions
and
517 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
<modelVersion>4.0.0</modelVersion> | ||
<artifactId>mod-circulation</artifactId> | ||
<groupId>org.folio</groupId> | ||
<version>24.3.2-SNAPSHOT</version> | ||
<version>24.3.3-SNAPSHOT</version> | ||
<licenses> | ||
<license> | ||
<name>Apache License 2.0</name> | ||
|
@@ -33,6 +33,9 @@ | |
<lombok.version>1.18.28</lombok.version> | ||
<spring.version>6.1.5</spring.version> | ||
<maven.site.plugin.version>3.9.1</maven.site.plugin.version> | ||
|
||
<!--Folio dependencies properties--> | ||
<folio-module-descriptor-validator.version>1.0.1</folio-module-descriptor-validator.version> | ||
</properties> | ||
|
||
<dependencyManagement> | ||
|
@@ -300,7 +303,7 @@ | |
<url>https://github.com/folio-org/mod-inventory</url> | ||
<connection>scm:git:git://github.com:folio-org/mod-inventory.git</connection> | ||
<developerConnection>scm:git:[email protected]:folio-org/mod-inventory.git</developerConnection> | ||
<tag>v24.3.0</tag> | ||
<tag>HEAD</tag> | ||
</scm> | ||
|
||
<build> | ||
|
@@ -518,6 +521,21 @@ | |
<generateBackupPoms>false</generateBackupPoms> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.folio</groupId> | ||
<artifactId>folio-module-descriptor-validator</artifactId> | ||
<version>${folio-module-descriptor-validator.version}</version> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>validate</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<configuration> | ||
<failOnInvalidDescriptor>false</failOnInvalidDescriptor> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<reporting> | ||
|
@@ -529,4 +547,14 @@ | |
</plugin> | ||
</plugins> | ||
</reporting> | ||
|
||
<pluginRepositories> | ||
<pluginRepository> | ||
<id>folio-nexus</id> | ||
<name>FOLIO Maven repository</name> | ||
<url>https://repository.folio.org/repository/maven-folio</url> | ||
</pluginRepository> | ||
</pluginRepositories> | ||
|
||
</project> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
src/main/java/org/folio/circulation/domain/EcsRequestPhase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.folio.circulation.domain; | ||
|
||
import static org.apache.commons.lang3.StringUtils.equalsIgnoreCase; | ||
|
||
import java.util.Arrays; | ||
|
||
public enum EcsRequestPhase { | ||
NONE(""), | ||
PRIMARY("Primary"), | ||
SECONDARY("Secondary"); | ||
|
||
public final String value; | ||
|
||
public static EcsRequestPhase from(String value) { | ||
return Arrays.stream(values()) | ||
.filter(status -> status.nameMatches(value)) | ||
.findFirst() | ||
.orElse(NONE); | ||
} | ||
|
||
EcsRequestPhase(String value) { | ||
this.value = value; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
public boolean nameMatches(String value) { | ||
return equalsIgnoreCase(getValue(), value); | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return value; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/main/java/org/folio/circulation/domain/SearchInstance.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package org.folio.circulation.domain; | ||
|
||
import static org.folio.circulation.support.json.JsonObjectArrayPropertyFetcher.mapToList; | ||
import static org.folio.circulation.support.json.JsonPropertyWriter.write; | ||
|
||
import java.lang.invoke.MethodHandles; | ||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import org.folio.circulation.domain.representations.ItemSummaryRepresentation; | ||
import org.folio.circulation.storage.mappers.ItemMapper; | ||
|
||
import io.vertx.core.json.JsonArray; | ||
import io.vertx.core.json.JsonObject; | ||
import lombok.NonNull; | ||
import lombok.ToString; | ||
import lombok.Value; | ||
|
||
@Value | ||
@ToString(onlyExplicitlyIncluded = true) | ||
public class SearchInstance { | ||
|
||
private static final Logger log = LogManager.getLogger(MethodHandles.lookup().lookupClass()); | ||
JsonObject representation; | ||
String id; | ||
@NonNull Collection<Item> items; | ||
|
||
public static SearchInstance from(JsonObject representation) { | ||
return new SearchInstance(representation, representation.getString("id"), mapItems(representation)); | ||
} | ||
|
||
private static List<Item> mapItems(JsonObject representation) { | ||
return mapToList(representation, "items", new ItemMapper()::toDomain); | ||
} | ||
|
||
public SearchInstance changeItems(Collection<Item> items) { | ||
JsonArray itemsArray = new JsonArray(); | ||
for (Item item : items) { | ||
itemsArray.add(new ItemSummaryRepresentation().createItemSummary(item)); | ||
} | ||
write(representation, "items", itemsArray); | ||
return new SearchInstance(representation, id, items); | ||
} | ||
|
||
public JsonObject toJson() { | ||
return representation; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.