Skip to content

Commit

Permalink
feat(trustlist): added trustlist v2 generation (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
Torsten Egenolf committed May 10, 2024
1 parent 4dca96c commit 1dc68f3
Show file tree
Hide file tree
Showing 4 changed files with 698 additions and 309 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,14 @@ public interface SignerInformationRepository extends JpaRepository<SignerInforma
List<SignerInformationEntity> getAllByDeletedIs(boolean deleted);

List<SignerInformationEntity> getAllByDeletedIsAndCountryIsIn(boolean deleted, List<String> countries);

@Query("SELECT DISTINCT s.domain FROM SignerInformationEntity s WHERE s.deleted = false")
List<String> getDomainsList();


List<SignerInformationEntity> getAllByDeletedIsAndDomainIs(boolean deleted, String domain);

List<SignerInformationEntity> getAllByDeletedIsAndDomainIsAndCountryIs(boolean deleted, String domain, String country);


}
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,19 @@ private CertificatesLookupResponseItemDto map(SignerInformationEntity entity) {

return new CertificatesLookupResponseItemDto(entity.getKid(), entity.getRawData());
}


public List<SignerInformationEntity> getActiveCertificatesForFilter(String domain, String participant){
if (domain != null && participant != null){
return signerInformationRepository.getAllByDeletedIsAndDomainIsAndCountryIs(false, domain, participant);
}else if (domain != null){
return signerInformationRepository.getAllByDeletedIsAndDomainIs(false, domain);
}else{
return getActiveCertificates();
}
}

public List<String> getDomainsList() {
return signerInformationRepository.getDomainsList();
}
}
Loading

0 comments on commit 1dc68f3

Please sign in to comment.