Skip to content

Commit

Permalink
Merge pull request #41 from indexdata/PR-2026-D
Browse files Browse the repository at this point in the history
Pr 2026 d
  • Loading branch information
JanisSaldabols authored Nov 12, 2024
2 parents 93d40e5 + 4b47b94 commit da698c4
Show file tree
Hide file tree
Showing 28 changed files with 399 additions and 251 deletions.
25 changes: 24 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
## 1.15.0 2024-06-10
## 1.15.4 2024-11-11
* Update documentation
* Clean configuration
* Fix bug in fee search

## 1.15.3 2024-10-31
* [MODNCIP-75](https://folio-org.atlassian.net/browse/MODNCIP-75) inventory API version update (13.0 to 14.0)
* [MODNCIP-76](https://folio-org.atlassian.net/browse/MODNCIP-76) Upgrade `holdings-storage` to 8.0
* Update modulePermissions for new services

## 1.15.2 2024-10-08
* Return user UUID in LookupUser call

## 1.15.1 2024-10-03
* [MODNCIP-71](https://folio-org.atlassian.net/browse/MODNCIP-71) Upgrade dependencies for Ramsons
* [MODNCIP-68](https://folio-org.atlassian.net/browse/MODNCIP-68) Add callNumber to CheckOutItem response

## 1.15.0 2024-09-04
* [MODNCIP-69](https://folio-org.atlassian.net/browse/MODNCIP-69) API version update (mod-inventory-storage)
* [MODNCIP-67](https://folio-org.atlassian.net/browse/MODNCIP-67) mod-ncip v1.14.X asserts compatibility with circulation interface v12 and 13 but actually requires v14
* [PR-1709](https://openlibraryfoundation.atlassian.net/browse/PR-1709) Implement NCIP RequestItem function in FOLIO mod-ncip
* [PR-1786](https://openlibraryfoundation.atlassian.net/browse/PR-1786) Implement NCIP CancelRequestItem
* [PR-1785](https://openlibraryfoundation.atlassian.net/browse/PR-1785) Implement NCIP DeleteItem
* [PR-1814](https://openlibraryfoundation.atlassian.net/browse/PR-1814) Check user pin
* [PR-1861](https://openlibraryfoundation.atlassian.net/browse/PR-1861) Implement CreateUserFiscalTransaction for charging fees
* [PR-1910](https://openlibraryfoundation.atlassian.net/browse/PR-1910) Add item soft delete option
## 1.14.5 2024-04-04
* [MODNCIP-65](https://folio-org.atlassian.net/browse/MODNCIP-65) if preferredFirstName is present use in lookupUserResponse
## 1.14.4 2023-10-25
Expand Down
65 changes: 37 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ NISO Circulation Interchange Protocol (NCIP) support in FOLIO
## Preparation
1. The NCIP module requires a FOLIO user with the following permissions:
```
ncip.all
inventory-storage.items.collection.get
ui-circulation.settings.overdue-fines-policies
ui-circulation.settings.lost-item-fees-policies
automated-patron-blocks.collection.get
circulation-storage.circulation-rules.get
manualblocks.collection.get
ncip.all
inventory-storage.items.collection.get
ui-circulation.settings.lost-item-fees-policies
ui-circulation.settings.overdue-fines-policies
automated-patron-blocks.collection.get
circulation-storage.circulation-rules.get
manualblocks.collection.get
```
### IMPORTANT NOTE ABOUT FOLIO USER - It has to be assigned a patron group. There is an issue with 'create item' which requires the user to be assigned a patron group.

Expand Down Expand Up @@ -48,6 +47,8 @@ NISO Circulation Interchange Protocol (NCIP) support in FOLIO
* (18) request.note.name Request note name. Default value "ILL note"
* (19) request.note.enabled Request note enabled. Will add ILL request ID to loan and ILS request. Default value `false`
* (20) item.soft.delete DeleteItem will use soft delete or delete entities. Default value `true`
* (21) request.fulfillment_preference ILS request fulfillment preference when RequestItem. Default value `Hold Shelf`
* (22) request.accept.fulfillment_preference ILS request fulfillment preference when AcceptItem. Default value `Hold Shelf`

Notes
* You can assign different values to these settings per Agency ID used in the NCIP requests. This approach lets you setup different values for different Agency IDs. For example, if Relais calls your NCIP server with the Agency ID of 'Relais' you can configure values for that agency. If ReShare calls your NCIP server using a different Agency ID, you can set up different configuration values to be used for ReShare requests. These settings have to exist for each Agency ID that will be used in the NCIP requests.
Expand Down Expand Up @@ -140,26 +141,29 @@ There are three types of settings that can exist in mod-configuration for the NC

#### NCIP Properties

| MODULE | configName (the AgencyID) | code | value (examples) |
|-----------|:-------------------------:|:-----------------------------------|-------------------:|
| NCIP | Relais | instance.type.name | RESHARE |
| NCIP | Relais | instance.source | RESHARE |
| NCIP | Relais | item.material.type.name | RESHARE |
| NCIP | Relais | item.perm.loan.type.name | RESHARE |
| NCIP | Relais | item.status.name | Available |
| NCIP | Relais | item.perm.location.code | RESHARE_DATALOGISK |
| NCIP | Relais | holdings.perm.location.code | RESHARE_DATALOGISK |
| NCIP | Relais | instance.custom.identifier.nam | ReShare Request ID |
| NCIP | Relais | checkout.service.point.code | online |
| NCIP | Relais | checkin.service.point.code | online |
| NCIP | Relais | response.includes.physical.address | false |
| NCIP | Relais | user.priv.ok.status | OK |
| NCIP | Relais | user.priv.blocked.status | BLOCKED |
| NCIP | Relais | cancel.request.reason.name | Item Not Available |
| NCIP | Relais | cancel.request.reason.patron.name | Item Not Available |
| NCIP | Relais | request.note.name | ILL note |
| NCIP | Relais | request.note.enabled | false |
| NCIP | Relais | item.soft.delete | true |
| MODULE | configName (the AgencyID) | code | value (examples) |
|-----------|:-------------------------:|:--------------------------------------|-------------------:|
| NCIP | Relais | instance.type.name | RESHARE |
| NCIP | Relais | instance.source | RESHARE |
| NCIP | Relais | item.material.type.name | RESHARE |
| NCIP | Relais | item.perm.loan.type.name | RESHARE |
| NCIP | Relais | item.status.name | Available |
| NCIP | Relais | item.perm.location.code | RESHARE_DATALOGISK |
| NCIP | Relais | holdings.perm.location.code | RESHARE_DATALOGISK |
| NCIP | Relais | instance.custom.identifier.nam | ReShare Request ID |
| NCIP | Relais | checkout.service.point.code | online |
| NCIP | Relais | checkin.service.point.code | online |
| NCIP | Relais | response.includes.physical.address | false |
| NCIP | Relais | user.priv.ok.status | OK |
| NCIP | Relais | user.priv.blocked.status | BLOCKED |
| NCIP | Relais | cancel.request.reason.name | Item Not Available |
| NCIP | Relais | cancel.request.reason.patron.name | Item Not Available |
| NCIP | Relais | request.note.name | ILL note |
| NCIP | Relais | request.note.enabled | false |
| NCIP | Relais | item.soft.delete | true |
| NCIP | Relais | user.email.type | mailto |
| NCIP | Relais | request.fulfillment_preference | Hold Shelf |
| NCIP | Relais | request.accept.fulfillment_preference | Hold Shelf |


You will need a set of these settings in mod-configuration for each individual Agency ID making NCIP requests. Example of an AgencyID in an NCIP request:
Expand Down Expand Up @@ -254,6 +258,11 @@ Sample XML Request:

https://github.com/folio-org/mod-ncip/blob/master/docs/sampleNcipMessages/checkInItem.xml

##### Delete Item
##### Request Item
##### Cancel Request Item
##### Create User Fiscal Transaction

### About the Extensible Catalog NCIP Toolkit

The eXtensible Catalog (XC) NCIP Toolkit was developed as a stand-alone Web application that would receive NCIP requests, communicate with your ILS (via a ‘connector’) and send back an XML response.
Expand Down
20 changes: 17 additions & 3 deletions descriptors/ModuleDescriptor-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"automated-patron-blocks.collection.get",
"addresstypes.collection.get",
"circulation.requests.item.post",
"circulation-storage.circulation-rules.get",
"circulation-storage.cancellation-reasons.collection.get",
"ui-circulation.settings.overdue-fines-policies",
"ui-circulation.settings.lost-item-fees-policies",
"inventory-storage.all",
Expand All @@ -29,18 +31,30 @@
"configuration.entries.item.get",
"usergroups.item.get",
"manualblocks.collection.get",
"note.types.collection.get",
"accounts.collection.get",
"circulation.check-out-by-barcode.post",
"circulation.check-in-by-barcode.post",
"circulation.loans.collection.get",
"circulation.requests.collection.get",
"inventory.instances.item.post",
"inventory.instances.item.delete",
"inventory-storage.holdings.item.delete",
"inventory.items.collection.get",
"inventory.items.item.delete",
"inventory.items.item.put",
"inventory.instances.collection.get",
"inventory.instances.item.delete",
"inventory-storage.holdings.item.post",
"inventory-storage.service-points-users.collection.get",
"inventory.items.item.post",
"inventory-storage.service-points.item.get"
"inventory-storage.service-points.item.get",
"owners.collection.get",
"feefines.collection.get",
"accounts.item.post",
"circulation.requests.item.get",
"circulation.requests.item.put",
"note.types.collection.get"
]
},
{
Expand Down Expand Up @@ -93,11 +107,11 @@
},
{
"id":"holdings-storage",
"version":"7.0"
"version":"6.0 7.0 8.0"
},
{
"id":"inventory",
"version":"10.2 11.0 12.0 13.0"
"version":"10.2 11.0 12.0 13.0 14.0"
},
{
"id":"circulation",
Expand Down
53 changes: 21 additions & 32 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.folio</groupId>
<artifactId>mod-ncip</artifactId>
<version>1.14.6-SNAPSHOT</version>
<version>1.15.5-SNAPSHOT</version>
<name>NCIP</name>
<description>NCIP responder for FOLIO (internal module)</description>

Expand All @@ -15,7 +15,7 @@
</licenses>

<properties>
<vertx.version>4.4.6</vertx.version>
<vertx.version>4.5.10</vertx.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>17</java.version>
Expand Down Expand Up @@ -45,18 +45,18 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
<version>4.5.14</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.16.0</version>
<version>1.17.1</version>
</dependency>
<!--ncip toolkit dependencies start -->
<dependency>
<groupId>net.sf.dozer</groupId>
<artifactId>dozer</artifactId>
<version>5.3.2</version>
<groupId>com.github.dozermapper</groupId>
<artifactId>dozer-core</artifactId>
<version>7.0.0</version>
<exclusions>
<exclusion>
<groupId>commons-beanutils</groupId>
Expand All @@ -67,7 +67,7 @@
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.1</version>
<version>2.3.9</version>
</dependency>
<dependency>
<groupId>org.extensiblecatalog.ncip.v2</groupId>
Expand Down Expand Up @@ -134,49 +134,44 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>2.20.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.20.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.20.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>1.7.36</version>
</dependency>
<dependency>
<groupId>org.folio</groupId>
<artifactId>util</artifactId>
<version>35.0.6</version>
<version>35.2.2</version>
</dependency>
<dependency>
<groupId>org.folio.okapi</groupId>
<artifactId>okapi-common</artifactId>
<version>5.1.1</version>
<version>6.0.2</version>
</dependency>
<!-- Test dependencies -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>1.3</version>
<artifactId>hamcrest</artifactId>
<version>3.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.1.0</version>
<version>5.13.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -193,13 +188,7 @@
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>4.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>xml-path</artifactId>
<version>2.9.0</version>
<version>5.5.0</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -252,17 +241,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<version>3.13.0</version>
<configuration>
<release>11</release>
<release>17</release>
<encoding>UTF-8</encoding>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.1</version>
<version>3.3.1</version>
<executions>
<execution>
<id>filter-descriptor-inputs</id>
Expand All @@ -287,7 +276,7 @@
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0</version>
<version>1.0.1</version>
<executions>
<execution>
<id>rename-descriptor-outputs</id>
Expand All @@ -314,7 +303,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.5.0</version>
<configuration>
<includes>
<include>**/*Test.java</include>
Expand All @@ -326,7 +315,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4</version>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -353,7 +342,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<version>3.1.1</version>
<configuration>
<preparationGoals>clean verify</preparationGoals>
<tagNameFormat>v@{project.version}</tagNameFormat>
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/org/folio/ncip/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ public class Constants {
public static final String BLOCKED = "BLOCKED";
public static final String OK = "OK";
public static final String ID = "id";
public static final String TITLE = "title";
public static final String STATUS = "status";
public static final String REQUEST_LEVEL = "requestLevel";
public static final String TOTAL_RECORDS = "totalRecords";
public static final String HOLDINGS_RECORD_ID = "holdingsRecordId";
public static final String LOCATION = "location";
public static final String AUTH_UID = "Username";
public static final String AUTH_BARCODE = "Barcode Id";
public static final String ACTIVE = "ACTIVE";
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/org/folio/ncip/FolioNcipHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.nio.charset.StandardCharsets;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
Expand Down Expand Up @@ -320,7 +317,7 @@ public void initNcipProperties(RoutingContext context) throws Exception {
}

ncipProperties.put(tenant, properties);
logger.info("Has tenant properties " + (ncipProperties.get(tenant) != null));
logger.info("Has tenant properties {}", (ncipProperties.get(tenant) != null));
}


Expand Down
Loading

0 comments on commit da698c4

Please sign in to comment.