2022-04-21 16:25:03 +02:00
|
|
|
package org.gcube.social_networking.socialnetworking.model.beans;
|
|
|
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
|
2022-04-29 14:52:03 +02:00
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
2022-04-21 16:25:03 +02:00
|
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
2022-04-29 14:52:03 +02:00
|
|
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
2022-04-21 16:25:03 +02:00
|
|
|
|
2022-04-29 14:52:03 +02:00
|
|
|
@JsonIgnoreProperties(ignoreUnknown=true)
|
2022-05-02 18:46:40 +02:00
|
|
|
@JsonTypeName("ITEM_NEW")
|
|
|
|
public class WorkspaceNotificationAddedItem extends WorkspaceNotification {
|
2022-04-21 16:25:03 +02:00
|
|
|
/**
|
|
|
|
* the username of the user you wish to notify
|
|
|
|
*/
|
|
|
|
@JsonProperty("userIdToNotify")
|
|
|
|
@NotNull(message="recipient cannot be missing")
|
|
|
|
private String userIdToNotify;
|
|
|
|
|
|
|
|
@JsonProperty("fileItem")
|
|
|
|
@NotNull(message="fileItem cannot be missing")
|
|
|
|
private WorkspaceFileItemBean item;
|
|
|
|
|
2022-05-02 17:54:29 +02:00
|
|
|
public WorkspaceNotificationAddedItem() {
|
2022-05-03 16:42:30 +02:00
|
|
|
super(WorkspaceNotificationType.ITEM_NEW);
|
2022-04-29 14:52:03 +02:00
|
|
|
// TODO Auto-generated constructor stub
|
|
|
|
}
|
2022-04-21 16:25:03 +02:00
|
|
|
|
2022-05-04 10:43:26 +02:00
|
|
|
public WorkspaceNotificationAddedItem(String userIdToNotify, WorkspaceFileItemBean item) {
|
2022-05-03 16:42:30 +02:00
|
|
|
super(WorkspaceNotificationType.ITEM_NEW);
|
2022-04-21 16:25:03 +02:00
|
|
|
this.userIdToNotify = userIdToNotify;
|
|
|
|
this.item = item;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getUserIdToNotify() {
|
|
|
|
return userIdToNotify;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setUserIdToNotify(String userIdToNotify) {
|
|
|
|
this.userIdToNotify = userIdToNotify;
|
|
|
|
}
|
|
|
|
|
|
|
|
public WorkspaceFileItemBean getItem() {
|
|
|
|
return item;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setItem(WorkspaceFileItemBean item) {
|
|
|
|
this.item = item;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
2022-05-04 10:43:26 +02:00
|
|
|
return "WorkspaceNotificationAddedItem [userIdToNotify=" + userIdToNotify + ", item=" + item + "]";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-04-21 16:25:03 +02:00
|
|
|
}
|