Skip to content

Commit

Permalink
Merge branch 'PR-1709-dev' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
JanisSaldabols committed Sep 3, 2024
2 parents bbc2654 + 8379f1f commit c21c095
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 53 deletions.
9 changes: 2 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>17</java.version>
<org.extensiblecatalog.ncip.v2.version>1.3.0-i</org.extensiblecatalog.ncip.v2.version>
<org.extensiblecatalog.ncip.v2.version>4.1.0</org.extensiblecatalog.ncip.v2.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -72,7 +72,7 @@
<dependency>
<groupId>org.extensiblecatalog.ncip.v2</groupId>
<artifactId>binding-jar</artifactId>
<version>4.0.0</version>
<version>${org.extensiblecatalog.ncip.v2.version}</version>
</dependency>
<dependency>
<groupId>org.extensiblecatalog.ncip.v2</groupId>
Expand Down Expand Up @@ -212,11 +212,6 @@
<name>FOLIO Maven repository</name>
<url>https://repository.folio.org/repository/maven-folio</url>
</repository>
<repository>
<id>indexdata-repo</id>
<name>Indexdata reposilite</name>
<url>https://reposilite.reshare.indexdata.com/releases</url>
</repository>
</repositories>

<distributionManagement>
Expand Down

This file was deleted.

13 changes: 0 additions & 13 deletions src/main/java/org/folio/ncip/services/DeleteItemService.java

This file was deleted.

19 changes: 9 additions & 10 deletions src/main/java/org/folio/ncip/services/FolioCheckInItemService.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.extensiblecatalog.ncip.v2.service.UserId;
import org.extensiblecatalog.ncip.v2.service.UserIdentifierType;
import org.extensiblecatalog.ncip.v2.service.UserOptionalFields;
import org.extensiblecatalog.ncip.v2.service.Version2ItemIdentifierType;
import org.folio.ncip.Constants;
import org.folio.ncip.FolioRemoteServiceManager;

Expand Down Expand Up @@ -92,17 +93,15 @@ public CheckInItemResponseData performService(CheckInItemInitiationData initData
String loanUuid = checkInResponseDetails.getJsonObject("loan").getString("id");
String userUuid = checkInResponseDetails.getJsonObject("loan").getString("userId");

UserId loanId = new UserId();
loanId.setUserIdentifierValue(loanUuid);
loanId.setUserIdentifierType(new UserIdentifierType(Constants.SCHEME, "loanUuid"));
ItemId loanId = new ItemId();
loanId.setItemIdentifierValue(loanUuid);
loanId.setItemIdentifierType(Version2ItemIdentifierType.UUID);
checkInItemResponseData.setLoanUuid(loanId);

UserId userId = new UserId();
userId.setUserIdentifierValue(userUuid);
userId.setUserIdentifierType(new UserIdentifierType(Constants.SCHEME, "userUuid"));

UserOptionalFields userOptionalFields = new UserOptionalFields();
userOptionalFields.setUserIds(List.of(loanId, userId));
checkInItemResponseData.setUserOptionalFields(userOptionalFields);
UserId userUuidObject = new UserId();
userUuidObject.setUserIdentifierValue(userUuid);
userUuidObject.setUserIdentifierType(new UserIdentifierType(Constants.SCHEME, "userUuid"));
checkInItemResponseData.setUserUuid(userUuidObject);
}

checkInItemResponseData.setItemId(iId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import org.extensiblecatalog.ncip.v2.service.UserId;
import org.extensiblecatalog.ncip.v2.service.UserIdentifierType;
import org.extensiblecatalog.ncip.v2.service.UserOptionalFields;
import org.extensiblecatalog.ncip.v2.service.Version2ItemIdentifierType;
import org.folio.ncip.Constants;
import org.folio.ncip.FolioRemoteServiceManager;

Expand Down Expand Up @@ -116,12 +117,10 @@ public CheckOutItemResponseData performService(CheckOutItemInitiationData initDa
responseData.setDateDue(calendar);
responseData.setItemId(iId);
responseData.setUserId(uId);
UserId loanId = new UserId();
loanId.setUserIdentifierValue(loanUuid);
loanId.setUserIdentifierType(new UserIdentifierType(Constants.SCHEME, "loanUuid"));
UserOptionalFields userOptionalFields = new UserOptionalFields();
userOptionalFields.setUserIds(List.of(loanId));
responseData.setUserOptionalFields(userOptionalFields);
ItemId loanId = new ItemId();
loanId.setItemIdentifierValue(loanUuid);
loanId.setItemIdentifierType(Version2ItemIdentifierType.UUID);
responseData.setLoanUuid(loanId);

return responseData;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.apache.log4j.Logger;
import org.extensiblecatalog.ncip.v2.service.CreateUserFiscalTransactionInitiationData;
import org.extensiblecatalog.ncip.v2.service.CreateUserFiscalTransactionResponseData;
import org.extensiblecatalog.ncip.v2.service.CreateUserFiscalTransactionService;
import org.extensiblecatalog.ncip.v2.service.FiscalTransactionReferenceId;
import org.extensiblecatalog.ncip.v2.service.Problem;
import org.extensiblecatalog.ncip.v2.service.ProblemType;
Expand All @@ -12,13 +13,11 @@
import org.extensiblecatalog.ncip.v2.service.ServiceException;
import org.extensiblecatalog.ncip.v2.service.UserId;
import org.extensiblecatalog.ncip.v2.service.UserIdentifierType;
import org.extensiblecatalog.ncip.v2.service.UserOptionalFields;
import org.extensiblecatalog.ncip.v2.service.ValidationException;
import org.folio.ncip.Constants;
import org.folio.ncip.FolioRemoteServiceManager;

import java.util.ArrayList;
import java.util.List;

public class FolioCreateUserFiscalTransactionService extends FolioNcipService implements CreateUserFiscalTransactionService {
private static final Logger LOGGER = Logger.getLogger(FolioCreateUserFiscalTransactionService.class);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package org.folio.ncip.services;

import io.vertx.core.json.JsonObject;
import org.apache.log4j.Logger;
import org.extensiblecatalog.ncip.v2.service.CancelRequestItemResponseData;
import org.extensiblecatalog.ncip.v2.service.DeleteItemInitiationData;
import org.extensiblecatalog.ncip.v2.service.DeleteItemResponseData;
import org.extensiblecatalog.ncip.v2.service.ItemId;
Expand All @@ -12,6 +10,7 @@
import org.extensiblecatalog.ncip.v2.service.ServiceContext;
import org.extensiblecatalog.ncip.v2.service.ServiceException;
import org.extensiblecatalog.ncip.v2.service.ValidationException;
import org.extensiblecatalog.ncip.v2.service.DeleteItemService;
import org.folio.ncip.Constants;
import org.folio.ncip.FolioRemoteServiceManager;

Expand Down

0 comments on commit c21c095

Please sign in to comment.