public class NotificationResponse
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
| Modifier and Type | Field and Description |
|---|---|
static NotificationResponse |
EMPTY_RESPONSE
Useful for returning an empty set of notices.
|
| Constructor and Description |
|---|
NotificationResponse() |
NotificationResponse(java.util.List<NotificationCategory> categories,
java.util.List<NotificationError> errors) |
NotificationResponse(NotificationResponse response) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
clone()
Implements deep-copy clone.
|
NotificationResponse |
cloneIfNotCloned() |
NotificationResponse |
combine(NotificationResponse response)
Combine the contents of this response with the provided response and
return a new instance of
NotificationResponse. |
NotificationResponse |
filterErrors(java.util.Set<java.lang.Integer> hiddenErrorKeys)
Return a new instance of
NotificationResponse from which
the specified errors have been removed. |
NotificationEntry |
findNotificationEntryById(java.lang.String notificationId)
Returns the
NotificationEntry with the specified id, or null if
not present. |
java.util.List<NotificationCategory> |
getCategories() |
java.util.List<NotificationError> |
getErrors() |
void |
setCategories(java.util.List<NotificationCategory> categories) |
void |
setErrors(java.util.List<NotificationError> errors) |
java.lang.String |
toString() |
public static final NotificationResponse EMPTY_RESPONSE
public NotificationResponse()
public NotificationResponse(NotificationResponse response)
public NotificationResponse(java.util.List<NotificationCategory> categories, java.util.List<NotificationError> errors)
public java.util.List<NotificationCategory> getCategories()
public void setCategories(java.util.List<NotificationCategory> categories)
public java.util.List<NotificationError> getErrors()
public void setErrors(java.util.List<NotificationError> errors)
public NotificationEntry findNotificationEntryById(java.lang.String notificationId)
NotificationEntry with the specified id, or null if
not present.public NotificationResponse combine(NotificationResponse response)
NotificationResponse. The
original instances are unchanged.response - A new NotificationResponse that contains data from both originalspublic NotificationResponse filterErrors(java.util.Set<java.lang.Integer> hiddenErrorKeys)
NotificationResponse from which
the specified errors have been removed. The original instances are
unchanged.hiddenErrorKeys - set of error keys to exclude from resultpublic java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedException - Not really, but it's on the method
signature we're overriding.public NotificationResponse cloneIfNotCloned()
Copyright © 2018 Jasig. All Rights Reserved.