-
Notifications
You must be signed in to change notification settings - Fork 1
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 #38 from folio-org/bugfix-release-b1.0.2
MCBFF-31: Bugfix release b1.0.2
- Loading branch information
Showing
19 changed files
with
457 additions
and
150 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
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
8 changes: 8 additions & 0 deletions
8
src/main/java/org/folio/circulationbff/service/EcsRequestExternalService.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,8 @@ | ||
package org.folio.circulationbff.service; | ||
|
||
import org.folio.circulationbff.domain.dto.EcsRequestExternal; | ||
import org.folio.circulationbff.domain.dto.EcsTlr; | ||
|
||
public interface EcsRequestExternalService { | ||
EcsTlr createEcsRequestExternal(EcsRequestExternal ecsRequestExternal); | ||
} |
32 changes: 32 additions & 0 deletions
32
src/main/java/org/folio/circulationbff/service/impl/EcsRequestExternalServiceImpl.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,32 @@ | ||
package org.folio.circulationbff.service.impl; | ||
|
||
import org.folio.circulationbff.client.feign.EcsTlrClient; | ||
import org.folio.circulationbff.domain.dto.EcsRequestExternal; | ||
import org.folio.circulationbff.domain.dto.EcsTlr; | ||
import org.folio.circulationbff.service.EcsRequestExternalService; | ||
import org.folio.circulationbff.service.UserTenantsService; | ||
import org.folio.spring.service.SystemUserScopedExecutionService; | ||
import org.springframework.stereotype.Service; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.log4j.Log4j2; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
@Log4j2 | ||
public class EcsRequestExternalServiceImpl implements EcsRequestExternalService { | ||
|
||
private final SystemUserScopedExecutionService systemUserScopedExecutionService; | ||
private final EcsTlrClient ecsTlrClient; | ||
private final UserTenantsService userTenantsService; | ||
|
||
|
||
@Override | ||
public EcsTlr createEcsRequestExternal(EcsRequestExternal ecsRequestExternal) { | ||
String centralTenantId = userTenantsService.getCentralTenant(); | ||
log.info("createEcsRequestExternal:: centralTenantId={}", centralTenantId); | ||
|
||
return systemUserScopedExecutionService.executeSystemUserScoped(centralTenantId, | ||
() -> ecsTlrClient.createEcsExternalRequest(ecsRequestExternal)); | ||
} | ||
} |
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
22 changes: 22 additions & 0 deletions
22
src/main/resources/swagger.api/paths/ecsRequestExternal/ecsRequestExternal.yaml
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,22 @@ | ||
post: | ||
description: Create ECS request external | ||
operationId: postEcsRequestExternal | ||
tags: | ||
- ecsRequestExternal | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../schemas/dto/ecsRequestExternal/ecsRequestExternal.yaml' | ||
required: true | ||
responses: | ||
'201': | ||
description: Ecs external request has been created | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../../schemas/dto/ecs-tlr/EcsTlr.yaml#/EcsTlr' | ||
'400': | ||
$ref: '../../responses/badRequestResponse.yaml' | ||
'500': | ||
$ref: '../../responses/internalServerErrorResponse.yaml' |
65 changes: 65 additions & 0 deletions
65
src/main/resources/swagger.api/schemas/dto/ecsRequestExternal/ecsRequestExternal.yaml
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,65 @@ | ||
description: ECS Request External - title level requests in a multi-tenant environment with Сonsortia support enabled | ||
type: object | ||
properties: | ||
id: | ||
description: ID of the ECS TLR | ||
$ref: '../common/uuid.yaml' | ||
instanceId: | ||
description: ID of the instance being requested | ||
$ref: '../common/uuid.yaml' | ||
requesterId: | ||
description: ID of the requesting patron (user) | ||
$ref: '../common/uuid.yaml' | ||
requestLevel: | ||
description: Level of the request - Item or Title | ||
type: string | ||
enum: [ "Item", "Title" ] | ||
requestExpirationDate: | ||
description: Date when the request expires | ||
type: string | ||
format: date-time | ||
requestDate: | ||
description: Date when the request was placed | ||
type: string | ||
format: date-time | ||
patronComments: | ||
description: Comments made by the patron | ||
type: string | ||
fulfillmentPreference: | ||
description: How should the request be fulfilled (whether the item should be kept on the hold shelf for collection or delivered to the requester) | ||
type: string | ||
enum: ["Hold Shelf", "Delivery"] | ||
pickupServicePointId: | ||
description: The ID of the Service Point where this request can be picked up | ||
$ref: '../common/uuid.yaml' | ||
itemId: | ||
description: ID of the item being requested | ||
$ref: '../common/uuid.yaml' | ||
holdingsRecordId: | ||
description: ID of the holdings record being requested | ||
$ref: '../common/uuid.yaml' | ||
primaryRequestId: | ||
description: Primary request ID | ||
$ref: '../common/uuid.yaml' | ||
primaryRequestDcbTransactionId: | ||
description: ID of DCB transaction created for primary request | ||
$ref: '../common/uuid.yaml' | ||
primaryRequestTenantId: | ||
description: ID of the tenant primary request was created in | ||
type: string | ||
secondaryRequestId: | ||
description: "Secondary request ID" | ||
$ref: '../common/uuid.yaml' | ||
secondaryRequestDcbTransactionId: | ||
description: ID of DCB transaction created for secondary request | ||
$ref: '../common/uuid.yaml' | ||
secondaryRequestTenantId: | ||
description: ID of the tenant secondary request was created in | ||
type: string | ||
|
||
required: | ||
- instanceId | ||
- requesterId | ||
- requestLevel | ||
- fulfillmentPreference | ||
- requestDate |
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.