Skip to content

Commit

Permalink
Merge branch 'master' into CIRC-2136-floating-collections
Browse files Browse the repository at this point in the history
  • Loading branch information
nielserik authored Oct 30, 2024
2 parents e98235b + f13ace9 commit a2d1546
Show file tree
Hide file tree
Showing 47 changed files with 717 additions and 565 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 24.3.0

* [CIRC-2156](https://folio-org.atlassian.net/browse/CIRC-2156) Upgrade "holdings-storage" to 8.0

## 24.2.0 2024-03-21

* Update `feesfines` interface version to 19.0 (CIRC-1914)
Expand Down
42 changes: 25 additions & 17 deletions descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,8 @@
"accounts.item.post",
"feefineactions.item.post",
"circulation-storage.loans-history.collection.get",
"calendar.endpoint.dates.get"
"calendar.endpoint.calendars.surroundingOpenings.get",
"calendar.endpoint.calendars.allOpenings.get"
],
"schedule": {
"cron": "1 0 * * *",
Expand Down Expand Up @@ -1214,15 +1215,15 @@
},
{
"id": "instance-storage",
"version": "4.0 5.0 6.0 7.0 8.0 9.0 10.0"
"version": "4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0"
},
{
"id": "holdings-storage",
"version": "1.3 2.0 3.0 4.0 5.0 6.0 7.0"
"version": "1.3 2.0 3.0 4.0 5.0 6.0 7.0 8.0"
},
{
"id": "request-storage",
"version": "6.0"
"version": "6.1"
},
{
"id": "request-storage-batch",
Expand Down Expand Up @@ -1322,7 +1323,7 @@
},
{
"id": "notes",
"version": "1.0 2.0 3.0"
"version": "4.0"
},
{
"id": "actual-cost-record-storage",
Expand Down Expand Up @@ -1773,7 +1774,8 @@
"proxiesfor.collection.get",
"patron-notice.post",
"configuration.entries.collection.get",
"calendar.endpoint.dates.get",
"calendar.endpoint.calendars.surroundingOpenings.get",
"calendar.endpoint.calendars.allOpenings.get",
"pubsub.publish.post",
"circulation-storage.loans-history.collection.get"
],
Expand All @@ -1784,7 +1786,8 @@
"displayName" : "module permissions for one op",
"description" : "to reduce X-Okapi-Token size",
"subPermissions": [
"calendar.endpoint.dates.get",
"calendar.endpoint.calendars.surroundingOpenings.get",
"calendar.endpoint.calendars.allOpenings.get",
"circulation-storage.loans.item.post",
"circulation-storage.loans.item.get",
"circulation-storage.loans.collection.get",
Expand Down Expand Up @@ -1881,7 +1884,8 @@
"accounts.refund.post",
"accounts.cancel.post",
"configuration.entries.collection.get",
"calendar.endpoint.dates.get",
"calendar.endpoint.calendars.surroundingOpenings.get",
"calendar.endpoint.calendars.allOpenings.get",
"actual-cost-record-storage.actual-cost-records.collection.get",
"actual-cost-record-storage.actual-cost-records.item.get",
"actual-cost-fee-fine-cancel.post",
Expand Down Expand Up @@ -1917,7 +1921,8 @@
"users.collection.get",
"addresstypes.collection.get",
"proxiesfor.collection.get",
"calendar.endpoint.dates.get",
"calendar.endpoint.calendars.surroundingOpenings.get",
"calendar.endpoint.calendars.allOpenings.get",
"configuration.entries.collection.get",
"scheduled-notice-storage.scheduled-notices.collection.delete",
"scheduled-notice-storage.scheduled-notices.item.post",
Expand Down Expand Up @@ -2065,9 +2070,7 @@
"users.collection.get",
"addresstypes.collection.get",
"usergroups.collection.get",
"usergroups.item.get",
"print-events-storage.print-events-status.item.post",
"circulation-storage.circulation-settings.collection.get"
"usergroups.item.get"
],
"visible": false
},
Expand Down Expand Up @@ -2101,7 +2104,8 @@
"usergroups.item.get",
"proxiesfor.collection.get",
"patron-notice.post",
"calendar.endpoint.dates.get",
"calendar.endpoint.calendars.surroundingOpenings.get",
"calendar.endpoint.calendars.allOpenings.get",
"scheduled-notice-storage.scheduled-notices.collection.delete",
"scheduled-notice-storage.scheduled-notices.item.post",
"configuration.entries.collection.get",
Expand Down Expand Up @@ -2157,7 +2161,8 @@
"displayName": "module permissions for one op",
"description": "to reduce X-Okapi-Token size",
"subPermissions": [
"calendar.endpoint.dates.get",
"calendar.endpoint.calendars.surroundingOpenings.get",
"calendar.endpoint.calendars.allOpenings.get",
"circulation-storage.loan-policies.item.get",
"circulation-storage.loans.item.get",
"circulation-storage.loans.item.put",
Expand Down Expand Up @@ -2261,7 +2266,8 @@
"usergroups.item.get",
"proxiesfor.collection.get",
"patron-notice.post",
"calendar.endpoint.dates.get",
"calendar.endpoint.calendars.surroundingOpenings.get",
"calendar.endpoint.calendars.allOpenings.get",
"configuration.entries.collection.get",
"scheduled-notice-storage.scheduled-notices.collection.delete",
"scheduled-notice-storage.scheduled-notices.item.post",
Expand Down Expand Up @@ -2294,7 +2300,6 @@
"pubsub.publish.post",
"note.types.collection.get",
"notes.item.post",
"notes.domain.all",
"actual-cost-record-storage.actual-cost-records.item.post",
"actual-cost-record-storage.actual-cost-records.collection.get",
"actual-cost-record-storage.actual-cost-records.item.get",
Expand Down Expand Up @@ -2370,7 +2375,6 @@
"addresstypes.collection.get",
"notes.item.post",
"note.types.collection.get",
"notes.domain.all",
"pubsub.publish.post"
],
"visible": false
Expand Down Expand Up @@ -2447,6 +2451,10 @@
"circulation.internal.fetch-items",
"circulation-storage.requests.item.get",
"circulation-storage.requests.collection.get",
"inventory-storage.holdings.item.get",
"inventory-storage.holdings.collection.get",
"inventory-storage.instances.item.get",
"inventory-storage.instances.collection.get",
"users.item.get",
"users.collection.get",
"addresstypes.item.get",
Expand Down
9 changes: 7 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<properties>
<antlr4.version>4.11.1</antlr4.version>
<drools.version>7.74.1.Final</drools.version>
<rmb.version>35.2.0</rmb.version>
<rmb.version>35.3.0</rmb.version>
<vertx.version>4.5.5</vertx.version>
<log4j2.version>2.23.1</log4j2.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -106,7 +106,12 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<version>3.17.0</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
3 changes: 0 additions & 3 deletions ramls/circulation-rules.raml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ types:
error: !include raml-util/schemas/error.schema
errors: !include raml-util/schemas/errors.schema

traits:
language: !include raml-util/traits/language.raml

/circulation:
/rules:
displayName: Circulation rules
Expand Down
1 change: 0 additions & 1 deletion ramls/circulation-settings.raml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ documentation:
content: <b>API for circulation settings</b>

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
Expand Down
8 changes: 1 addition & 7 deletions ramls/circulation.raml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ types:
errors: !include extended-errors.json

traits:
language: !include raml-util/traits/language.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
Expand All @@ -34,7 +33,6 @@ resourceTypes:
post:
description: Creates a loan by checking out an item to a loanee
is: [
language,
validate
]
body:
Expand All @@ -58,7 +56,6 @@ resourceTypes:
post:
description: Updates the due date of an existing loan
is: [
language,
validate
]
body:
Expand Down Expand Up @@ -86,7 +83,6 @@ resourceTypes:
post:
description: Updates the due date of an existing loan
is: [
language,
validate
]
body:
Expand Down Expand Up @@ -114,7 +110,6 @@ resourceTypes:
post:
description: Updates the status of an existing loan
is: [
language,
validate
]
body:
Expand Down Expand Up @@ -296,7 +291,6 @@ resourceTypes:
post:
description: Creates a request for any item from the given instance ID
is: [
language,
validate
]
body:
Expand Down Expand Up @@ -364,4 +358,4 @@ resourceTypes:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
example: "Internal server error"
8 changes: 5 additions & 3 deletions ramls/examples/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@
"pickupServicePointName": "Circ Desk 1"
},
"printDetails": {
"count": 4,
"lastPrintedDate": "2024-07-29T11:54:07.000Z",
"printCount": 32,
"requesterId": "21457ab5-4635-4e56-906a-908f05e9233b",
"isPrinted": true,
"printEventDate": "2024-09-13T06:34:16.035+00:00",
"lastPrintRequester": {
"lastName": "lastName",
"firstName": "firstName",
"lastName": "lastName",
"middleName": "middleName"
}
}
Expand Down
3 changes: 0 additions & 3 deletions ramls/inventory-reports.raml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ documentation:
types:
items: !include items-in-transit.json

traits:
language: !include raml-util/traits/language.raml

resourceTypes:
collection-get: !include raml-util/rtypes/collection-get.raml

Expand Down
2 changes: 1 addition & 1 deletion ramls/raml-util
Submodule raml-util updated 54 files
+89 −0 .github/workflows/api-doc.yml
+59 −0 .github/workflows/api-lint.yml
+40 −0 .github/workflows/api-schema-lint.yml
+0 −65 Jenkinsfile
+2 −3 README.md
+25 −16 examples/codex/packageCollection.sample
+0 −169 examples/mod-users/userdata.json.sample
+0 −53 examples/mod-users/users.raml.sample
+0 −7 examples/moduleInfo.sample
+0 −23 examples/tagged-record-example/user.sample
+7 −0 examples/tenantAttributes.sample
+17 −0 examples/tenantJob.sample
+14 −0 library/ramltojaxrs.raml
+0 −3 ramls/codex/codex-instances-sources.raml
+0 −1 ramls/codex/codex-packages.raml
+0 −1 ramls/codex/codex.raml
+1 −2 ramls/jsonSchemas.raml
+1 −2 ramls/ramls.raml
+0 −53 ramls/tagged-record-example/users.raml
+62 −46 ramls/tenant.raml
+0 −1 rtypes/attachments.raml
+0 −1 rtypes/collection-get-with-json-response.raml
+0 −1 rtypes/collection-get.raml
+1 −2 rtypes/collection-stream.raml
+0 −1 rtypes/collection-with-json-response.raml
+0 −1 rtypes/collection.raml
+0 −1 rtypes/get-delete-with-json-response.raml
+0 −1 rtypes/get-delete.raml
+0 −1 rtypes/get-only-with-json-response.raml
+0 −1 rtypes/get-only.raml
+0 −1 rtypes/item-collection-get-with-json-response.raml
+0 −1 rtypes/item-collection-get.raml
+5 −1 rtypes/item-collection-with-json-response.raml
+5 −2 rtypes/item-collection.raml
+0 −1 rtypes/post-empty-body.raml
+1 −0 schemas/codex/codex_instance_cqlschema-ext.json
+1 −0 schemas/codex/codex_instance_cqlschema.json
+1 −0 schemas/codex/codex_package_cqlschema-ext.json
+1 −0 schemas/codex/codex_package_cqlschema.json
+3 −1 schemas/codex/packageType.json
+2 −2 schemas/codex/source.json
+1 −1 schemas/error.schema
+1 −0 schemas/errors.schema
+1 −0 schemas/metadata.schema
+0 −24 schemas/moduleInfo.schema
+1 −0 schemas/parameters.schema
+10 −1 schemas/resultInfo.schema
+1 −0 schemas/tags.schema
+24 −0 schemas/tenantAttributes.schema
+36 −0 schemas/tenantJob.schema
+1 −0 schemas/uuid.schema
+8 −0 traits/internal-error.raml
+0 −9 traits/language.raml
+9 −1 traits/pageable.raml
20 changes: 17 additions & 3 deletions ramls/request.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"requestLevel": {
"description": "Level of the request - Item or Title",
"type": "string",
"enum": ["Item"]
"enum": ["Item", "Title"]
},
"requestDate": {
"description": "Date the request was made",
Expand Down Expand Up @@ -363,12 +363,22 @@
"type": "object",
"readonly": true,
"properties": {
"count": {
"printCount": {
"description": "Total no of times the request is printed",
"type": "integer",
"readOnly": true
},
"lastPrintedDate": {
"requesterId": {
"description": "User uuid of last print requester",
"type": "string",
"readOnly": true
},
"isPrinted": {
"description": "Whether the request is ever printed",
"type": "boolean",
"readOnly": true
},
"printEventDate": {
"description": "Recent printed time of the request",
"type": "string",
"format": "date-time",
Expand Down Expand Up @@ -423,6 +433,10 @@
"description": "Request fields used for search",
"type": "object",
"$ref": "request-search-index.json"
},
"itemLocationCode": {
"description": "Allow specifying item location when creating title-level requests",
"type": "string"
}
},
"additionalProperties": false,
Expand Down
3 changes: 0 additions & 3 deletions ramls/requests-reports.raml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ documentation:
types:
requests: !include requests.json

traits:
language: !include raml-util/traits/language.raml

resourceTypes:
collection-get: !include raml-util/rtypes/collection-get.raml

Expand Down
3 changes: 0 additions & 3 deletions ramls/staff-slips.raml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ documentation:
types:
staff-slips: !include staff-slips-response.json

traits:
language: !include raml-util/traits/language.raml

resourceTypes:
collection-get: !include raml-util/rtypes/collection-get.raml

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/folio/circulation/domain/Campus.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ public static Campus unknown() {
}

public static Campus unknown(String id) {
return new Campus(id, null);
return new Campus(id, null, null);
}

String id;
String name;
String code;
}
3 changes: 2 additions & 1 deletion src/main/java/org/folio/circulation/domain/Holdings.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@Value
public class Holdings {
public static Holdings unknown(String id) {
return new Holdings(id, null, null, null);
return new Holdings(id, null, null, null, null);
}

public static Holdings unknown() {
Expand All @@ -16,4 +16,5 @@ public static Holdings unknown() {
String instanceId;
String copyNumber;
String permanentLocationId;
String effectiveLocationId;
}
3 changes: 2 additions & 1 deletion src/main/java/org/folio/circulation/domain/Institution.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ public static Institution unknown() {
}

public static Institution unknown(String id) {
return new Institution(id, null);
return new Institution(id, null, null);
}

String id;
String name;
String code;
}
8 changes: 8 additions & 0 deletions src/main/java/org/folio/circulation/domain/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -446,4 +446,12 @@ public String getLendingLibraryCode() {
public String getDcbItemTitle() {
return getProperty(itemRepresentation, "instanceTitle");
}

public boolean isAtLocation(String locationCode) {
return locationCode != null && getLocation() != null && (
locationCode.equals(getLocation().getCode()) ||
locationCode.equals(getLocation().getLibrary().getCode()) ||
locationCode.equals(getLocation().getCampus().getCode()) ||
locationCode.equals(getLocation().getInstitution().getCode()));
}
}
Loading

0 comments on commit a2d1546

Please sign in to comment.