Skip to content

Commit

Permalink
MODTLR-22 Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrVidinieiev committed Feb 28, 2024
1 parent 1b39b5a commit 509977b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/main/java/org/folio/service/UserService.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package org.folio.service;

import org.folio.domain.dto.EcsTlr;
import org.folio.domain.dto.User;

public interface UserService {
User createShadowUser(User realUser, String tenantId);

User findUser(String userId, String tenantId);

}
9 changes: 4 additions & 5 deletions src/main/java/org/folio/service/impl/EcsTlrServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ public Optional<EcsTlr> get(UUID id) {

@Override
public EcsTlr create(EcsTlr ecsTlr) {
final String requesterId = ecsTlr.getRequesterId();
log.info("create:: creating ECS TLR {} for instance {} and requester {}", ecsTlr.getId(),
ecsTlr.getInstanceId(), requesterId);
ecsTlr.getInstanceId(), ecsTlr.getRequesterId());

String borrowingTenantId = getBorrowingTenant(ecsTlr);
Collection<String> lendingTenantIds = getLendingTenants(ecsTlr);
Expand Down Expand Up @@ -79,8 +78,8 @@ public boolean delete(UUID requestId) {

private String getBorrowingTenant(EcsTlr ecsTlr) {
log.info("getBorrowingTenant:: getting borrowing tenant");
final String borrowingTenantId = tenantService.getBorrowingTenant(ecsTlr).orElseThrow(
() -> new TenantPickingException("Failed to get borrowing tenant"));
final String borrowingTenantId = tenantService.getBorrowingTenant(ecsTlr)
.orElseThrow(() -> new TenantPickingException("Failed to get borrowing tenant"));
log.info("getBorrowingTenant:: borrowing tenant: {}", borrowingTenantId);

return borrowingTenantId;
Expand Down Expand Up @@ -130,7 +129,7 @@ private static void updateEcsTlr(EcsTlr ecsTlr, RequestWrapper primaryRequest,
.itemId(secondaryRequest.request().getItemId());

log.info("updateEcsTlr:: ECS TLR updated in memory");
log.debug("updateEcsTlr:: ECS TLR: {}", ecsTlr);
log.debug("updateEcsTlr:: ECS TLR: {}", () -> ecsTlr);
}

}

0 comments on commit 509977b

Please sign in to comment.