Adds the project Id on DMP listing model.

This commit is contained in:
gkolokythas 2019-05-14 14:04:43 +03:00
parent c8844fba08
commit 3905f68121
1 changed files with 9 additions and 0 deletions

View File

@ -35,6 +35,7 @@ public class DataManagementPlanListingModel implements DataModel<DMP, DataManage
private List<UserInfoListingModel> users;
private String description;
private String projectAbbreviation;
private String projectId;
public String getId() {
@ -142,6 +143,13 @@ public class DataManagementPlanListingModel implements DataModel<DMP, DataManage
this.projectAbbreviation = projectAbbreviation;
}
public String getProjectId() {
return projectId;
}
public void setProjectId(String projectId) {
this.projectId = projectId;
}
@Override
public DataManagementPlanListingModel fromDataModel(DMP entity) {
this.id = entity.getId().toString();
@ -163,6 +171,7 @@ public class DataManagementPlanListingModel implements DataModel<DMP, DataManage
this.users = entity.getUsers().stream().map(x -> new UserInfoListingModel().fromDataModel(x)).collect(Collectors.toList());
this.description = entity.getDescription();
this.projectAbbreviation = entity.getProject().getAbbreviation();
this.projectId = entity.getProject().getId().toString();
if (entity.getAssociatedDmps() != null && !entity.getAssociatedDmps().isEmpty()) {
Document viewStyleDoc = XmlBuilder.fromXml(entity.getAssociatedDmps());