|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portlet.notice.response.NotificationResponse
public class NotificationResponse
This class contains all the categories and errors retrieved by an INotificationService. It is also used to aggregate all the NotificationResponses from various services into a single NotificationResponse. The data from the overall NotificationResponse instance is returned to the portlet to be rendered.
| Constructor Summary | |
|---|---|
NotificationResponse()
|
|
NotificationResponse(List<NotificationCategory> categories,
List<NotificationError> errors)
|
|
| Method Summary | |
|---|---|
void |
addCategories(List<NotificationCategory> newCategories)
Insert the given categories and their entries into the any existing categories of the same title. |
void |
addErrors(List<NotificationError> newErrors)
|
void |
addResponseData(NotificationResponse response)
Extract the category and error data from the given response and add it to this instance's data. |
void |
clearCategories()
|
void |
clearErrors()
|
void |
filterErrors(Set<Integer> filterErrors)
|
static NotificationResponse |
fromJson(String data)
Write the instance data to a JSON data file. |
List<NotificationCategory> |
getCategories()
|
List<NotificationError> |
getErrors()
|
void |
setCategories(List<NotificationCategory> categories)
|
void |
setErrors(List<NotificationError> errors)
|
void |
setSource(String source)
Set the source of the data. |
String |
toJson()
Write the instance data to a JSON data String. |
static String |
toJson(NotificationResponse request)
Write the instance data to a JSON data String. |
Map<String,Object> |
toMap()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NotificationResponse()
public NotificationResponse(List<NotificationCategory> categories,
List<NotificationError> errors)
| Method Detail |
|---|
public void setSource(String source)
source - is the source of the data.public String toJson()
public static String toJson(NotificationResponse request)
public static NotificationResponse fromJson(String data)
data - the JSON data string.
public Map<String,Object> toMap()
public void addResponseData(NotificationResponse response)
response - the source of datapublic List<NotificationCategory> getCategories()
public void setCategories(List<NotificationCategory> categories)
public void addCategories(List<NotificationCategory> newCategories)
newCategories - collection of new categories and their entries.public void clearCategories()
public List<NotificationError> getErrors()
public void setErrors(List<NotificationError> errors)
public void addErrors(List<NotificationError> newErrors)
public void filterErrors(Set<Integer> filterErrors)
public void clearErrors()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||