diff --git a/src/main/java/com/odysseusinc/athena/api/v1/controller/VocabularyController.java b/src/main/java/com/odysseusinc/athena/api/v1/controller/VocabularyController.java index 49181534..6dad5dcc 100644 --- a/src/main/java/com/odysseusinc/athena/api/v1/controller/VocabularyController.java +++ b/src/main/java/com/odysseusinc/athena/api/v1/controller/VocabularyController.java @@ -51,6 +51,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.convert.support.GenericConversionService; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.http.MediaType; @@ -71,8 +72,8 @@ import javax.validation.Valid; import java.io.IOException; import java.security.Principal; -import java.util.List; -import java.util.Objects; +import java.util.*; +import java.util.stream.Collectors; import static com.odysseusinc.athena.util.CDMVersion.getByValue; import static com.odysseusinc.athena.util.CDMVersion.notExist; @@ -93,9 +94,10 @@ public class VocabularyController { private final VocabularyService vocabularyService; private final LicenseService licenseService; private final VocabularyServiceV5 vocabularyServiceV5; + private final GenericConversionService conversionService; @Autowired - public VocabularyController(ConverterUtils converterUtils, DownloadBundleService downloadBundleService, DownloadShareService downloadShareService, LicenseService licenseService, UserService userService, VocabularyConversionService vocabularyConversionService, VocabularyService vocabularyService, VocabularyServiceV5 vocabularyServiceV5) { + public VocabularyController(ConverterUtils converterUtils, DownloadBundleService downloadBundleService, DownloadShareService downloadShareService, LicenseService licenseService, UserService userService, VocabularyConversionService vocabularyConversionService, VocabularyService vocabularyService, VocabularyServiceV5 vocabularyServiceV5, GenericConversionService conversionService) { this.converterUtils = converterUtils; this.downloadBundleService = downloadBundleService; this.downloadShareService = downloadShareService; @@ -104,6 +106,7 @@ public VocabularyController(ConverterUtils converterUtils, DownloadBundleService this.vocabularyService = vocabularyService; this.licenseService = licenseService; this.vocabularyServiceV5 = vocabularyServiceV5; + this.conversionService = conversionService; } @Operation(summary = "Get vocabularies.") @@ -200,6 +203,17 @@ public Page getLicenses( final Page users = userService.getUsersWithLicenses(pageRequest, query, pendingOnly); List dtos = converterUtils.convertList(users.getContent(), UserLicensesDTO.class); + users.getContent().forEach(athenaUser -> { + athenaUser.getLicenses().forEach(license -> { + dtos.forEach(userLicensesDTO -> { + userLicensesDTO.getVocabularyDTOs().forEach(a -> { + if (a.getId() == license.getId().intValue()) a.setExpiredDate(license.getExpiredDate()); + }); + }); + }); + + }); + return new CustomPageImpl(dtos, pageRequest, users.getTotalElements()); } @@ -218,7 +232,7 @@ public List suggestLicenses(@RequestParam("userId") Long userId) public ResponseEntity saveLicenses(@RequestBody @Valid AddingUserLicensesDTO dto) { final AthenaUser user = userService.get(dto.getUserId()); - vocabularyService.grantLicenses(user, dto.getVocabularyV4Ids()); + vocabularyService.grantLicenses(user, dto.getVocabularyV4Ids(), dto.getExpiredDate()); return ResponseEntity.ok().build(); } @@ -235,7 +249,15 @@ public ResponseEntity removeLicenses(@PathVariable("id") Long licenseId) { @PostMapping("licenses/request") public ResponseEntity requestLicense(Principal principal, @Valid @RequestBody LicenseRequestDTO dto) { - licenseService.requestLicense(principal, dto.getVocabularyId()); + Date expiredDate; + if(dto.getExpiredDate() == null){ + Calendar cal = Calendar.getInstance(); + cal.set(Calendar.YEAR, cal.get(Calendar.YEAR) + 2); + expiredDate = cal.getTime(); + }else{ + expiredDate = dto.getExpiredDate(); + } + licenseService.requestLicense(principal, dto.getVocabularyId(), expiredDate); return ResponseEntity.ok().build(); } @@ -245,7 +267,7 @@ public ResponseEntity requestLicense(Principal principal, @Valid @RequestB public ResponseEntity acceptLicense(@Valid @RequestBody AcceptDTO acceptDTO) { licenseService.checkLicense(acceptDTO.getId()); - vocabularyService.acceptLicense(acceptDTO.getId(), acceptDTO.getAccepted()); + vocabularyService.acceptLicense(acceptDTO.getId(), acceptDTO.getAccepted(), acceptDTO.getExpiredDate()); return ResponseEntity.ok().build(); } @@ -254,10 +276,11 @@ public ResponseEntity acceptLicense(@Valid @RequestBody AcceptDTO acceptDT public void acceptLicenseViaMail(@RequestParam("id") Long id, @RequestParam("accepted") Boolean accepted, @RequestParam("token") String token, + @RequestParam("expiredDate") Date expiredDate, HttpServletResponse response) throws IOException { licenseService.checkLicense(id, token); - vocabularyService.acceptLicense(id, accepted); + vocabularyService.acceptLicense(id, accepted, expiredDate); response.sendRedirect("/admin/licenses"); } diff --git a/src/main/java/com/odysseusinc/athena/api/v1/controller/converter/ConceptSearchDTOToSolrQuery.java b/src/main/java/com/odysseusinc/athena/api/v1/controller/converter/ConceptSearchDTOToSolrQuery.java index 53252fe1..29534cab 100644 --- a/src/main/java/com/odysseusinc/athena/api/v1/controller/converter/ConceptSearchDTOToSolrQuery.java +++ b/src/main/java/com/odysseusinc/athena/api/v1/controller/converter/ConceptSearchDTOToSolrQuery.java @@ -168,7 +168,7 @@ private void putIntoJsonFacet(JSONObject jsonFacet, String facetField) { jsonFacet.put(getFacetLabel(facetField), new JSONObject() .put("type", "terms") .put("field", facetField) - .put("limit", -1) + .put("limit", 100) .put("missing", true) .put("mincount", 0) .put("domain", diff --git a/src/main/java/com/odysseusinc/athena/api/v1/controller/converter/vocabulary/VocabularyToUserVocabularyDTO.java b/src/main/java/com/odysseusinc/athena/api/v1/controller/converter/vocabulary/VocabularyToUserVocabularyDTO.java index 099bd9ee..8455a49b 100644 --- a/src/main/java/com/odysseusinc/athena/api/v1/controller/converter/vocabulary/VocabularyToUserVocabularyDTO.java +++ b/src/main/java/com/odysseusinc/athena/api/v1/controller/converter/vocabulary/VocabularyToUserVocabularyDTO.java @@ -61,6 +61,7 @@ public List convert(@NotNull List vocabularyDT License license = map.get(each.getId()); if (license != null) { res.setStatus(license.getStatus()); + res.setExpiredDate(license.getExpiredDate()); } res.setAvailable( isEmpty(each.getRequired()) || (availableIdV4s.contains(each.getId()) && each.getUrl() != null)); diff --git a/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/AcceptDTO.java b/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/AcceptDTO.java index 529bb033..a891e79e 100644 --- a/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/AcceptDTO.java +++ b/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/AcceptDTO.java @@ -23,6 +23,7 @@ package com.odysseusinc.athena.api.v1.controller.dto.vocabulary; import javax.validation.constraints.NotNull; +import java.util.Date; public class AcceptDTO { @NotNull @@ -30,6 +31,8 @@ public class AcceptDTO { @NotNull private Boolean accepted; + private Date expiredDate; + public Long getId() { return id; @@ -40,6 +43,16 @@ public void setId(Long id) { this.id = id; } + public Date getExpiredDate() { + + return expiredDate; + } + + public void setExpiredDate(Date expiredDate) { + + this.expiredDate = expiredDate; + } + public Boolean getAccepted() { return accepted; diff --git a/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/AddingUserLicensesDTO.java b/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/AddingUserLicensesDTO.java index 277ecfad..897b3ea1 100644 --- a/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/AddingUserLicensesDTO.java +++ b/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/AddingUserLicensesDTO.java @@ -22,6 +22,7 @@ package com.odysseusinc.athena.api.v1.controller.dto.vocabulary; +import java.util.Date; import java.util.List; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @@ -35,6 +36,8 @@ public class AddingUserLicensesDTO { @Size(min = 1) private List vocabularyV4Ids; + private Date expiredDate; + public Long getUserId() { return userId; @@ -54,4 +57,14 @@ public void setVocabularyV4Ids(List vocabularyV4Ids) { this.vocabularyV4Ids = vocabularyV4Ids; } + + public Date getExpiredDate() { + + return expiredDate; + } + + public void setVocabularyV4Ids(Date expiredDate) { + + this.expiredDate = expiredDate; + } } diff --git a/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/LicenseRequestDTO.java b/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/LicenseRequestDTO.java index 536f9ef0..5c2b95a0 100644 --- a/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/LicenseRequestDTO.java +++ b/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/LicenseRequestDTO.java @@ -23,6 +23,7 @@ package com.odysseusinc.athena.api.v1.controller.dto.vocabulary; import javax.validation.constraints.NotNull; +import java.util.Date; public class LicenseRequestDTO { @NotNull @@ -37,4 +38,16 @@ public void setVocabularyId(Integer vocabularyId) { this.vocabularyId = vocabularyId; } + + private Date expiredDate; + + public Date getExpiredDate() { + + return expiredDate; + } + + public void setExpiredDate(Date expiredDate) { + + this.expiredDate = expiredDate; + } } diff --git a/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/VocabularyDTO.java b/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/VocabularyDTO.java index e3a4b56f..a9da6653 100644 --- a/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/VocabularyDTO.java +++ b/src/main/java/com/odysseusinc/athena/api/v1/controller/dto/vocabulary/VocabularyDTO.java @@ -33,6 +33,8 @@ public class VocabularyDTO { private boolean clickDefault; private boolean omopReq; private String url; + private Date expiredDate; + private String statusLicense; public VocabularyDTO() { @@ -48,6 +50,8 @@ public VocabularyDTO(VocabularyDTO other) { this.clickDefault = other.clickDefault; this.omopReq = other.omopReq; this.url = other.url; + this.expiredDate = other.expiredDate; + this.statusLicense = other.statusLicense; } public static VocabularyDTO.VocabularyDTOBuilder builder() { @@ -135,6 +139,25 @@ public void setUrl(String url) { this.url = url; } + public Date getExpiredDate() { + + return expiredDate; + } + + public void setExpiredDate(Date expiredDate) { + + this.expiredDate = expiredDate; + } + public String getStatusLicense() { + + return statusLicense; + } + + public void setStatusLicense(String statusLicense) { + + this.statusLicense = statusLicense; + } + public class VocabularyDTOBuilder { private Integer id; private String code; @@ -144,6 +167,9 @@ public class VocabularyDTOBuilder { private boolean clickDefault; private boolean omopReq; private String url; + private Date expiredDate; + private String statusLicense; + private VocabularyDTOBuilder() { @@ -207,6 +233,18 @@ public VocabularyDTOBuilder setUrl(String url) { return this; } + public VocabularyDTOBuilder setExpiredDate(Date expiredDate) { + + VocabularyDTO.this.expiredDate = expiredDate; + return this; + } + + public VocabularyDTOBuilder setStatusLicense(String statusLicense) { + + VocabularyDTO.this.statusLicense = statusLicense; + return this; + } + } } diff --git a/src/main/java/com/odysseusinc/athena/config/WebApplicationStarter.java b/src/main/java/com/odysseusinc/athena/config/WebApplicationStarter.java index 922e85d8..c18f8372 100644 --- a/src/main/java/com/odysseusinc/athena/config/WebApplicationStarter.java +++ b/src/main/java/com/odysseusinc/athena/config/WebApplicationStarter.java @@ -64,4 +64,10 @@ public Executor emailsExecutor() { return Executors.newSingleThreadExecutor(); } + + @Bean(name = "emailSenderExecutor") + public Executor checkDownloadHistory() { + + return Executors.newSingleThreadExecutor(); + } } diff --git a/src/main/java/com/odysseusinc/athena/model/athena/License.java b/src/main/java/com/odysseusinc/athena/model/athena/License.java index ec4096ee..a46a43f3 100644 --- a/src/main/java/com/odysseusinc/athena/model/athena/License.java +++ b/src/main/java/com/odysseusinc/athena/model/athena/License.java @@ -48,12 +48,13 @@ public License() { } - public License(AthenaUser user, VocabularyConversion vocabularyConversion, LicenseStatus status) { + public License(AthenaUser user, VocabularyConversion vocabularyConversion, LicenseStatus status, Date expirationDate) { this.user = user; this.vocabularyConversion = vocabularyConversion; this.status = status; this.token = UUID.randomUUID().toString().replace("-", ""); + this.expiredDate = expiredDate; } @Id @@ -81,6 +82,9 @@ public License(AthenaUser user, VocabularyConversion vocabularyConversion, Licen @Column(name = "request_date") private Date requestDate; + @Column(name = "expired_date") + private Date expiredDate; + public Long getId() { return id; @@ -140,4 +144,14 @@ public void setRequestDate(Date requestDate) { this.requestDate = requestDate; } + + public Date getExpiredDate() { + + return expiredDate; + } + + public void setExpiredDate(Date expiredDate) { + + this.expiredDate = expiredDate; + } } diff --git a/src/main/java/com/odysseusinc/athena/repositories/athena/AthenaUserRepository.java b/src/main/java/com/odysseusinc/athena/repositories/athena/AthenaUserRepository.java index df95307e..5ad4d15f 100644 --- a/src/main/java/com/odysseusinc/athena/repositories/athena/AthenaUserRepository.java +++ b/src/main/java/com/odysseusinc/athena/repositories/athena/AthenaUserRepository.java @@ -34,7 +34,7 @@ public interface AthenaUserRepository extends PagingAndSortingRepository { String GET_USERS_WITH_LICENSES = " FROM users us WHERE " - + "id IN (SELECT DISTINCT user_id FROM licenses where status IN ('PENDING') OR :pendingOnly IS FALSE) " + + "id IN (SELECT DISTINCT user_id FROM licenses where status IN ('PENDING') OR :pendingOnly IS FALSE AND expired_date > CURRENT_DATE) " + "AND (lower(firstname) SIMILAR TO :suggestRequest " + "OR lower(lastname) SIMILAR TO :suggestRequest " + "OR lower(middlename) SIMILAR TO :suggestRequest) "; diff --git a/src/main/java/com/odysseusinc/athena/service/LicenseService.java b/src/main/java/com/odysseusinc/athena/service/LicenseService.java index 14da69c7..cd5cbdd2 100644 --- a/src/main/java/com/odysseusinc/athena/service/LicenseService.java +++ b/src/main/java/com/odysseusinc/athena/service/LicenseService.java @@ -3,6 +3,7 @@ import com.odysseusinc.athena.api.v1.controller.dto.LicenseExceptionDTO; import java.security.Principal; +import java.util.Date; public interface LicenseService { @@ -12,5 +13,5 @@ public interface LicenseService { void checkLicense(Long id); - Long requestLicense(Principal principal, Integer vocabularyId); + Long requestLicense(Principal principal, Integer vocabularyId, Date expirationDate); } diff --git a/src/main/java/com/odysseusinc/athena/service/VocabularyService.java b/src/main/java/com/odysseusinc/athena/service/VocabularyService.java index 61d83d57..58c27512 100644 --- a/src/main/java/com/odysseusinc/athena/service/VocabularyService.java +++ b/src/main/java/com/odysseusinc/athena/service/VocabularyService.java @@ -29,9 +29,13 @@ import com.odysseusinc.athena.model.athena.Notification; import com.odysseusinc.athena.model.security.AthenaUser; import com.odysseusinc.athena.util.CDMVersion; +import org.springframework.stereotype.Service; + +import java.util.Date; import java.util.List; import java.util.Optional; +@Service public interface VocabularyService { List getAllForCurrentUser(); @@ -52,13 +56,13 @@ public interface VocabularyService { void checkBundleAndSharedUser(AthenaUser user, DownloadBundle bundle); - Iterable grantLicenses(AthenaUser user, List vocabularyV4Ids); + Iterable grantLicenses(AthenaUser user, List vocabularyV4Ids, Date expiredDate); - Long requestLicense(AthenaUser user, Integer vocabularyV4Id); + Long requestLicense(AthenaUser user, Integer vocabularyV4Id, Date expiredDate); void deleteLicense(Long licenseId); - void acceptLicense(Long id, boolean accepted); + void acceptLicense(Long id, boolean accepted, Date expiredDate); License get(AthenaUser user, Integer vocabularyId); diff --git a/src/main/java/com/odysseusinc/athena/service/impl/LicenseServiceImpl.java b/src/main/java/com/odysseusinc/athena/service/impl/LicenseServiceImpl.java index 56133206..055af9c2 100644 --- a/src/main/java/com/odysseusinc/athena/service/impl/LicenseServiceImpl.java +++ b/src/main/java/com/odysseusinc/athena/service/impl/LicenseServiceImpl.java @@ -16,6 +16,7 @@ import org.springframework.transaction.annotation.Transactional; import java.security.Principal; +import java.util.Date; import java.util.Optional; @Service @@ -61,14 +62,14 @@ public void checkLicense(Long licenseId) { } @Override - public Long requestLicense(Principal principal, Integer vocabularyId) { + public Long requestLicense(Principal principal, Integer vocabularyId, Date expiredDate) { AthenaUser user = userService.getUser(principal); License license = vocabularyService.get(user, vocabularyId); - if (license != null) { + if (license != null && license.getExpiredDate().after(new Date())) { throw new AlreadyExistException("License already exists"); } - Long licenseId = vocabularyService.requestLicense(user, vocabularyId); + Long licenseId = vocabularyService.requestLicense(user, vocabularyId, expiredDate); emailService.sendLicenseRequestToAdmins(vocabularyService.get(licenseId).get()); return licenseId; } @@ -76,7 +77,7 @@ public Long requestLicense(Principal principal, Integer vocabularyId) { private void check(Optional license) { if (license == null || !license.isPresent()) { throw new NotExistException("License does not exist or has already been declined", License.class); - } else if (LicenseStatus.APPROVED == license.get().getStatus()) { + } else if (LicenseStatus.APPROVED == license.get().getStatus() && license.get().getExpiredDate().after(new Date())) { throw new AlreadyExistException("License has already been approved"); } } diff --git a/src/main/java/com/odysseusinc/athena/service/impl/VocabularyServiceImpl.java b/src/main/java/com/odysseusinc/athena/service/impl/VocabularyServiceImpl.java index 1a20c5f6..4816dca1 100644 --- a/src/main/java/com/odysseusinc/athena/service/impl/VocabularyServiceImpl.java +++ b/src/main/java/com/odysseusinc/athena/service/impl/VocabularyServiceImpl.java @@ -125,7 +125,20 @@ public List getAllForCurrentUser() { List vocabularyDTOs = converterUtils.convertList( vocabularyConversionService.findByOmopReqIsNull(sort), VocabularyDTO.class); - return new VocabularyToUserVocabularyDTO(user.getLicenses()).convert(vocabularyDTOs); + VocabularyToUserVocabularyDTO vocabularyToUserVocabularyDTO = new VocabularyToUserVocabularyDTO(user.getLicenses()); + + user.getLicenses().forEach(license -> { + vocabularyDTOs.forEach( vocabularyDTO -> { + if(license.getVocabularyConversion() != null){ + if(vocabularyDTO.getId() == license.getVocabularyConversion().getIdV4()){ + vocabularyDTO.setExpiredDate(license.getExpiredDate()); + } + } + }); + }); + List vocabularyDTOS = vocabularyToUserVocabularyDTO.convert(vocabularyDTOs); + + return vocabularyDTOS; } @Override @@ -187,14 +200,26 @@ public List getDownloadHistory(AthenaUser user) { // add shared bundles to list of available downloads if (!shares.isEmpty()) { for(DownloadShare share: shares) { - DownloadBundleDTO bundleDTO = conversionService.convert(share.getBundle(), DownloadBundleDTO.class); + DownloadBundle bundle = share.getBundle(); + DownloadBundleDTO bundleDTO = conversionService.convert(bundle, DownloadBundleDTO.class); + List vocaDTOS = new ArrayList<>(); + bundle.getVocabularies().forEach(downloadItem -> vocaDTOS.add(conversionService.convert(bundle.getVocabularies(), VocabularyDTO.class))); + List vocabularyDTOS = new ArrayList<>(); + for(VocabularyDTO item : vocaDTOS){ + License license = licenseRepository.findByUserIdAndVocabularyIdV4(user.getId(), item.getId()); + item.setExpiredDate(license!=null ? license.getExpiredDate() : null); + item.setStatusLicense(license!=null ? license.getStatus().toString() : ""); + vocabularyDTOS.add(item); + } + assert bundleDTO != null; + bundleDTO.setVocabularies(vocabularyDTOS); // remove from shares all references to shares with other users List filteredShares = bundleDTO.getDownloadShareDTOs().stream() .filter(s -> s.getEmail().equals(user.getEmail())) .collect(toList()); bundleDTO.setDownloadShareDTOs(filteredShares); try { - checkBundleVocabularies(share.getBundle().getId(), user.getId()); + checkBundleVocabularies(bundle.getId(), user.getId()); } catch (LicenseException e) { // if some vocabularies require licence and current user does not have it - // clear link to zip file @@ -256,10 +281,10 @@ public void checkBundleAndSharedUser(AthenaUser user, DownloadBundle bundle){ } @Override - public List grantLicenses(AthenaUser user, List vocabularyV4Ids) { + public List grantLicenses(AthenaUser user, List vocabularyV4Ids, Date expirationDate) { final List newLicenses = vocabularyV4Ids.stream() - .map(v4Id -> buildLicense(user, v4Id, APPROVED)) + .map(v4Id -> buildLicense(user, v4Id, APPROVED, expirationDate)) .collect(toList()); final List savedLicenses = licenseRepository.saveAll(newLicenses); @@ -268,10 +293,11 @@ public List grantLicenses(AthenaUser user, List vocabularyV4Id } @Override - public Long requestLicense(AthenaUser user, Integer vocabularyV4Id) { + public Long requestLicense(AthenaUser user, Integer vocabularyV4Id, Date expiredDate) { - final License requestedLicense = buildLicense(user, vocabularyV4Id, PENDING); + final License requestedLicense = buildLicense(user, vocabularyV4Id, PENDING, expiredDate); requestedLicense.setRequestDate(new Date()); + requestedLicense.setExpiredDate(expiredDate); final License savedLicense = licenseRepository.save(requestedLicense); conceptService.invalidateGraphCache(user.getId()); return savedLicense.getId(); @@ -286,13 +312,14 @@ public void deleteLicense(Long licenseId) { } @Override - public void acceptLicense(Long id, boolean accepted) { + public void acceptLicense(Long id, boolean accepted, Date expirationDate) { License userLicense = licenseRepository.getOne(id); String vocabularyName = userLicense.getVocabularyConversion().getName(); AthenaUser user = userLicense.getUser(); if (accepted) { userLicense.setStatus(LicenseStatus.APPROVED); + userLicense.setExpiredDate(expirationDate); licenseRepository.save(userLicense); } else { licenseRepository.deleteById(id); @@ -338,10 +365,10 @@ private DownloadBundle buildDownloadBundle(CDMVersion version, String uuid, Stri return bundle; } - private License buildLicense(AthenaUser user, Integer vocabularyV4Id, LicenseStatus status) { + private License buildLicense(AthenaUser user, Integer vocabularyV4Id, LicenseStatus status, Date expirationDate) { VocabularyConversion vocabularyConversion = vocabularyConversionService.findByVocabularyV4Id(vocabularyV4Id); - return new License(user, vocabularyConversion, status); + return new License(user, vocabularyConversion, status, expirationDate); } private void checkBundleVocabularies(List bundleVocabularyIdV4s, Long userId) { diff --git a/src/main/resources/solr/solrconfig.xml b/src/main/resources/solr/solrconfig.xml index 7da57d7d..eeb08010 100644 --- a/src/main/resources/solr/solrconfig.xml +++ b/src/main/resources/solr/solrconfig.xml @@ -35,7 +35,7 @@ that you fully re-index after changing this setting as it can affect both how text is indexed and queried. --> - 8.11.1 + 8.8.1