social-service-model/src/main/java/org/gcube/social_networking/socialnetworking/model/beans/workspace/AddedItemEvent.java

57 lines
1.4 KiB
Java
Raw Normal View History

2022-05-04 11:26:41 +02:00
package org.gcube.social_networking.socialnetworking.model.beans.workspace;
import javax.validation.constraints.NotNull;
2022-04-29 14:52:03 +02:00
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
2022-04-29 14:52:03 +02:00
import com.fasterxml.jackson.annotation.JsonTypeName;
2022-04-29 14:52:03 +02:00
@JsonIgnoreProperties(ignoreUnknown=true)
2022-05-02 18:46:40 +02:00
@JsonTypeName("ITEM_NEW")
2022-05-04 11:26:41 +02:00
public class AddedItemEvent extends WorkspaceEvent {
/**
* 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")
2022-05-04 11:26:41 +02:00
private FileItemBean item;
2022-05-04 11:26:41 +02:00
public AddedItemEvent() {
super(WorkspaceEventType.ITEM_NEW);
2022-04-29 14:52:03 +02:00
// TODO Auto-generated constructor stub
}
2022-05-04 11:26:41 +02:00
public AddedItemEvent(String userIdToNotify, FileItemBean item) {
super(WorkspaceEventType.ITEM_NEW);
this.userIdToNotify = userIdToNotify;
this.item = item;
}
public String getUserIdToNotify() {
return userIdToNotify;
}
public void setUserIdToNotify(String userIdToNotify) {
this.userIdToNotify = userIdToNotify;
}
2022-05-04 11:26:41 +02:00
public FileItemBean getItem() {
return item;
}
2022-05-04 11:26:41 +02:00
public void setItem(FileItemBean item) {
this.item = item;
}
@Override
public String toString() {
2022-05-04 11:26:41 +02:00
return "AddedItemEvent [userIdToNotify=" + userIdToNotify + ", item=" + item + "]";
2022-05-04 10:43:26 +02:00
}
}