Add isPublic on DtasetListingModel
This commit is contained in:
parent
f1644d1fa0
commit
1cec40a4da
|
@ -32,6 +32,7 @@ public class DatasetListingModel implements DataModel<Dataset, DatasetListingMod
|
||||||
private Date dmpPublishedAt;
|
private Date dmpPublishedAt;
|
||||||
private int version;
|
private int version;
|
||||||
private List<UserInfoListingModel> users;
|
private List<UserInfoListingModel> users;
|
||||||
|
private Boolean isPublic;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -167,6 +168,14 @@ public class DatasetListingModel implements DataModel<Dataset, DatasetListingMod
|
||||||
this.users = users;
|
this.users = users;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Boolean getPublic() {
|
||||||
|
return isPublic;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPublic(Boolean aPublic) {
|
||||||
|
isPublic = aPublic;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DatasetListingModel fromDataModel(Dataset entity) {
|
public DatasetListingModel fromDataModel(Dataset entity) {
|
||||||
this.id = entity.getId() != null ? entity.getId().toString() : "";
|
this.id = entity.getId() != null ? entity.getId().toString() : "";
|
||||||
|
@ -188,6 +197,7 @@ public class DatasetListingModel implements DataModel<Dataset, DatasetListingMod
|
||||||
this.dmpPublishedAt = entity.getDmp().getPublishedAt();
|
this.dmpPublishedAt = entity.getDmp().getPublishedAt();
|
||||||
this.version = entity.getDmp().getVersion();
|
this.version = entity.getDmp().getVersion();
|
||||||
this.users = entity.getDmp() != null ? entity.getDmp().getUsers().stream().map(x -> new UserInfoListingModel().fromDataModel(x)).collect(Collectors.toList()) : new ArrayList<>();
|
this.users = entity.getDmp() != null ? entity.getDmp().getUsers().stream().map(x -> new UserInfoListingModel().fromDataModel(x)).collect(Collectors.toList()) : new ArrayList<>();
|
||||||
|
this.isPublic = entity.getDmp() != null ? entity.getDmp().isPublic() : false;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue