Skip to content

Commit

Permalink
CIRC-2050 incorporating review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-barannyk committed Apr 2, 2024
1 parent 4ede011 commit d22d472
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class AllowedServicePointsRequest {
public boolean isForTitleLevelRequest() {
return instanceId != null;
}

public boolean isForItemLevelRequest() {
return itemId != null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ public CompletableFuture<Result<Map<RequestPolicy, Set<Item>>>> lookupRequestPol
}

public CompletableFuture<Result<RequestPolicy>> lookupRequestPolicy(User user) {
// Circulation rules need to be executed with the patron group parameter only.
// All the item-related parameters should be random UUIDs.
return lookupRequestPolicyId(UUID.randomUUID().toString(), user.getPatronGroupId(),
UUID.randomUUID().toString(), UUID.randomUUID().toString())
.thenCompose(r -> r.after(this::lookupRequestPolicy))
Expand Down

0 comments on commit d22d472

Please sign in to comment.