Skip to content

Commit

Permalink
Merge pull request #32 from KPMP/KPMP-5202_add_release_date_info
Browse files Browse the repository at this point in the history
KPMP-5202: added recently released date info
  • Loading branch information
rlreamy authored Mar 14, 2024
2 parents 441012c + f281f6c commit 25fb98e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public class SpatialViewerDatasetService {
private String enterpriseSearchEngineName;
private SpatialViewerExternalLinkRepository externalLinkRepo;
private SpatialViewerFileDatasetRepository fileRepo;
@Value("${recently-released-date}")
private String recentlyReleasedDate;

private RestTemplate restTemplate;
private Environment env;
Expand Down Expand Up @@ -73,7 +75,7 @@ public List<SpatialViewerDataset> getSpatialViewerDataset() throws Exception {
for (SpatialViewerFileDataset spatialViewerFileDataset : datasets){
if(spatialViewerFileDataset.getReleaseVersion() != null){
if (Double.compare(spatialViewerFileDataset.getReleaseVersion(), maxReleaseVersion) == EQUALITY_OPERATOR){
spatialViewerFileDataset.setReleaseVersionDisplay("Recently Released");
spatialViewerFileDataset.setReleaseVersionDisplay("Recently Released - " + recentlyReleasedDate);
}
}else{
spatialViewerFileDataset.setReleaseVersionDisplay(null);
Expand All @@ -84,7 +86,7 @@ public List<SpatialViewerDataset> getSpatialViewerDataset() throws Exception {
for(SpatialViewerExternalLinkDataset externalLinkDataset : externalLinkList){
if(externalLinkDataset.getReleaseVersion() != null){
if(Double.compare(externalLinkDataset.getReleaseVersion(), maxReleaseVersion) == EQUALITY_OPERATOR){
externalLinkDataset.setReleaseVersionDisplay("Recently Released");
externalLinkDataset.setReleaseVersionDisplay("Recently Released - " + recentlyReleasedDate);
}
}else{
externalLinkDataset.setReleaseVersionDisplay(null);
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
server.port=3030
spring.main.allow-bean-definition-overriding=true
enterprise-search.host=http://enterprisesearch:3002
enterprise-search.engine.name=spatial-viewer
enterprise-search.engine.name=spatial-viewer
recently-released-date=${RECENTLY_RELEASED_DATE}

0 comments on commit 25fb98e

Please sign in to comment.