fixed bug
This commit is contained in:
parent
e4f320f39c
commit
9f77b168aa
|
@ -1,6 +1,9 @@
|
|||
package org.gcube.social_networking.socialnetworking.model.beans;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
|
||||
|
@ -16,11 +19,13 @@ include = As.PROPERTY, property = "type") @JsonSubTypes({
|
|||
@JsonSubTypes.Type(value = WorkspaceNotificationAddedItem.class, name = "ITEM_NEW")
|
||||
})
|
||||
public abstract class WorkspaceNotification {
|
||||
WorkspaceNotificationType type;
|
||||
protected final WorkspaceNotificationType TYPE;
|
||||
|
||||
public WorkspaceNotificationType getType() {
|
||||
return type;
|
||||
WorkspaceNotification(WorkspaceNotificationType TYPE) {
|
||||
this.TYPE = TYPE;
|
||||
}
|
||||
|
||||
|
||||
public WorkspaceNotificationType TYPE() {
|
||||
return TYPE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,16 +25,15 @@ public class WorkspaceNotificationAddedItem extends WorkspaceNotification {
|
|||
private WorkspaceFolderBean folder;
|
||||
|
||||
public WorkspaceNotificationAddedItem() {
|
||||
super();
|
||||
super(WorkspaceNotificationType.ITEM_NEW);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public WorkspaceNotificationAddedItem(String userIdToNotify, WorkspaceFileItemBean item, WorkspaceFolderBean folder) {
|
||||
super();
|
||||
super(WorkspaceNotificationType.ITEM_NEW);
|
||||
this.userIdToNotify = userIdToNotify;
|
||||
this.item = item;
|
||||
this.folder = folder;
|
||||
this.type = WorkspaceNotificationType.ITEM_NEW;
|
||||
}
|
||||
|
||||
public String getUserIdToNotify() {
|
||||
|
|
|
@ -22,11 +22,15 @@ public class WorkspaceNotificationSharedFolder extends WorkspaceNotification {
|
|||
@NotNull(message="folderItem cannot be missing")
|
||||
private WorkspaceFolderBean folder;
|
||||
|
||||
|
||||
public WorkspaceNotificationSharedFolder(WorkspaceNotificationType TYPE) {
|
||||
super(WorkspaceNotificationType.FOLDER_SHARE);
|
||||
}
|
||||
|
||||
public WorkspaceNotificationSharedFolder(String userIdToNotify, WorkspaceFolderBean folder) {
|
||||
super();
|
||||
super(WorkspaceNotificationType.FOLDER_SHARE);
|
||||
this.userIdToNotify = userIdToNotify;
|
||||
this.folder = folder;
|
||||
this.type = WorkspaceNotificationType.FOLDER_SHARE;
|
||||
}
|
||||
|
||||
public String getUserIdToNotify() {
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.fasterxml.jackson.annotation.JsonTypeName;
|
|||
@JsonTypeName("UNSHARED_FOLDER")
|
||||
public class WorkspaceNotificationUnsharedFolder extends WorkspaceNotification {
|
||||
|
||||
|
||||
/**
|
||||
* the username of the user you wish to notify
|
||||
*/
|
||||
|
@ -26,23 +27,27 @@ public class WorkspaceNotificationUnsharedFolder extends WorkspaceNotification {
|
|||
private String unsharedFolderName;
|
||||
|
||||
|
||||
|
||||
public WorkspaceNotificationUnsharedFolder() {
|
||||
super();
|
||||
super(WorkspaceNotificationType.FOLDER_UNSHARE);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
public WorkspaceNotificationUnsharedFolder(String userIdToNotify, String unsharedFolderId, String unsharedFolderName) {
|
||||
super();
|
||||
super(WorkspaceNotificationType.FOLDER_UNSHARE);
|
||||
this.userIdToNotify = userIdToNotify;
|
||||
this.unsharedFolderId = unsharedFolderId;
|
||||
this.unsharedFolderName = unsharedFolderName;
|
||||
this.type = WorkspaceNotificationType.FOLDER_UNSHARE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "WorkspaceNotificationUnsharedFolder [userIdToNotify=" + userIdToNotify + ", unsharedFolderId="
|
||||
+ unsharedFolderId + ", unsharedFolderName=" + unsharedFolderName + "]";
|
||||
+ unsharedFolderId + ", unsharedFolderName=" + unsharedFolderName + ", Type=" + TYPE + "]";
|
||||
}
|
||||
|
||||
public String getUserIdToNotify() {
|
||||
|
|
Loading…
Reference in New Issue