#8834: Home page: Drafts query for both Datasets and DMPs.

1. RecentActivityCriteria.java: Added in RecentActivityCriteria field "private Integer status;", to be able to get only drafts.
2. DashBoardManager.java: In method "getNewRecentActivity()", add in Dataset and DMP requests status in criteria.
This commit is contained in:
Konstantina Galouni 2023-07-17 18:10:49 +03:00
parent e4af3bcbe9
commit e878310b72
2 changed files with 15 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package eu.eudat.criteria;
public class RecentActivityCriteria {
private String like;
private String order;
private Integer status;
public String getLike() {
return like;
@ -19,4 +20,12 @@ public class RecentActivityCriteria {
public void setOrder(String order) {
this.order = order;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
}

View File

@ -221,11 +221,17 @@ public class DashBoardManager {
}
DatasetCriteria datasetCriteria = new DatasetCriteria();
datasetCriteria.setLike(tableRequest.getCriteria().getLike());
if(tableRequest.getCriteria().getStatus() != null) {
datasetCriteria.setStatus(tableRequest.getCriteria().getStatus());
}
datasetCriteria.setAllVersions(false);
datasetCriteria.setIsPublic(!isAuthenticated);
DataManagementPlanCriteria dataManagementPlanCriteria = new DataManagementPlanCriteria();
dataManagementPlanCriteria.setAllVersions(false);
dataManagementPlanCriteria.setLike(tableRequest.getCriteria().getLike());
if(tableRequest.getCriteria().getStatus() != null) {
dataManagementPlanCriteria.setStatus(tableRequest.getCriteria().getStatus());
}
dataManagementPlanCriteria.setIsPublic(!isAuthenticated);
dataManagementPlanCriteria.setOnlyPublic(!isAuthenticated);