public class EventResult extends Object
| Modifier and Type | Method and Description |
|---|---|
static EventResult |
error(String message)
Creates a new error event result object, that will show an error type
message to the end user.
|
static EventResult |
error(String message,
Exception exception)
Creates a new error event result object, that will show an error type
message to the end user.
|
static EventResult |
error(String message,
Exception exception,
FieldStatusInf... fields)
Creates a new error event result object, that will show an error type
message to the end user.
|
static EventResult |
error(String message,
FieldStatusInf... fields)
Creates a new error event result object, that will show an error type
message to the end user.
|
FieldStatusInf |
findFieldStatus(String name)
Gets the status information object set in this result for the given field.
|
Object |
getData()
The result object returned by the event method.
|
UIEvent |
getEvent()
The invoked event.
|
Exception |
getException()
The exception (if any) that was throw by the event method.
|
List<FieldStatusInf> |
getFields()
Gets all the fields status information objects for this result.
|
String |
getMessage()
The message to be show as the result of the event invocation.
|
EventResultType |
getType()
The type of the message that must be show to the user as the result of
the invocation.
|
boolean |
hasFieldStatus(String name)
Determines if the given field has an explicit status information object set in this result.
|
static EventResult |
info(String message)
Creates a new info event result object, that will show an information
type message to the end user.
|
static EventResult |
info(String message,
FieldStatusInf... fields)
Creates a new info event result object, that will show an information
type message to the end user.
|
static EventResult |
info(String message,
Object data)
Creates a new info event result object, that will show an information
type message to the end user.
|
static EventResult |
info(String message,
Object data,
FieldStatusInf... fields)
Creates a new info event result object, that will show an information
type message to the end user.
|
static EventResult |
none()
Creates a new event result for the EventResultType.NONE type, and sets all data to null.
|
static EventResult |
of(EventResultType type,
String message,
Object data,
Exception exception)
Creates a new event result, for the given type, that will show a message
to the end user.
|
static EventResult |
of(EventResultType type,
String message,
Object data,
Exception exception,
FieldStatusInf... fields)
Creates a new event result, for the given type, that will show a message
to the end user.
|
static EventResult |
success(String message)
Creates a new success event result object, that will show an success type
message to the end user.
|
static EventResult |
success(String message,
FieldStatusInf... fields)
Creates a new success event result object, that will show an success type
message to the end user.
|
static EventResult |
success(String message,
Object data)
Creates a new success event result object, that will show an success type
message to the end user.
|
static EventResult |
success(String message,
Object data,
FieldStatusInf... fields)
Creates a new success event result object, that will show an success type
message to the end user.
|
static EventResult |
warn(String message)
Creates a new warning event result object, that will show an warning type
message to the end user.
|
static EventResult |
warn(String message,
FieldStatusInf... fields)
Creates a new warning event result object, that will show an warning type
message to the end user.
|
static EventResult |
warn(String message,
Object data)
Creates a new warning event result object, that will show an warning type
message to the end user.
|
static EventResult |
warn(String message,
Object data,
Exception exception)
Creates a new warning event result object, that will show an warning type
message to the end user.
|
static EventResult |
warn(String message,
Object data,
Exception exception,
FieldStatusInf... fields)
Creates a new warning event result object, that will show an warning type
message to the end user.
|
static EventResult |
warn(String message,
Object data,
FieldStatusInf... fields)
Creates a new warning event result object, that will show an warning type
message to the end user.
|
public static EventResult info(String message, Object data)
message - The message to show to the user.data - The data to pass to the web view as the result of the
event.public static EventResult info(String message, Object data, FieldStatusInf... fields)
message - The message to show to the user.data - The data to pass to the web view as the result of the
event.fields - The information of the fields status after this event execution.public static EventResult info(String message)
message - The message to show to the user.public static EventResult info(String message, FieldStatusInf... fields)
message - The message to show to the user.fields - The information of the fields status after this event execution.public static EventResult success(String message, Object data)
message - The message to show to the user.data - The data to pass to the web view as the result of the
event.public static EventResult success(String message, Object data, FieldStatusInf... fields)
message - The message to show to the user.data - The data to pass to the web view as the result of the
event.fields - The information of the fields status after this event execution.public static EventResult success(String message)
message - The message to show to the user.public static EventResult success(String message, FieldStatusInf... fields)
message - The message to show to the user.fields - The information of the fields status after this event execution.public static EventResult warn(String message, Object data)
message - The message to show to the user.data - The data to pass to the web view as the result of the
event.public static EventResult warn(String message, Object data, FieldStatusInf... fields)
message - The message to show to the user.data - The data to pass to the web view as the result of the
event.fields - The information of the fields status after this event execution.public static EventResult warn(String message)
message - The message to show to the user.public static EventResult warn(String message, FieldStatusInf... fields)
message - The message to show to the user.fields - The information of the fields status after this event execution.public static EventResult warn(String message, Object data, Exception exception)
message - The message to show to the user.data - The data to pass to the web view as the result of the
event.exception - The exception responsable for this warning.public static EventResult warn(String message, Object data, Exception exception, FieldStatusInf... fields)
message - The message to show to the user.data - The data to pass to the web view as the result of the
event.exception - The exception responsable for this warning.fields - The information of the fields status after this event execution.public static EventResult error(String message, Exception exception)
message - The message to show to the user.exception - The exception responsable for this error.public static EventResult error(String message)
message - The message to show to the user.public static EventResult error(String message, Exception exception, FieldStatusInf... fields)
message - The message to show to the user.exception - The exception responsable for this error.fields - The information of the fields status after this event execution.public static EventResult error(String message, FieldStatusInf... fields)
message - The message to show to the user.fields - The information of the fields status after this event execution.public static EventResult of(EventResultType type, String message, Object data, Exception exception)
type - The type of message to show to the end user.message - The message to show to the user.data - The data to pass to the web view as the result of the
event.exception - The exception responsable for this error.public static EventResult of(EventResultType type, String message, Object data, Exception exception, FieldStatusInf... fields)
type - The type of message to show to the end user.message - The message to show to the user.data - The data to pass to the web view as the result of the
event.exception - The exception responsable for this error.fields - The information of the fields status after this event execution.public static EventResult none()
public UIEvent getEvent()
public EventResultType getType()
public String getMessage()
public Exception getException()
public Object getData()
public List<FieldStatusInf> getFields()
public boolean hasFieldStatus(String name)
name - The name of the field.public FieldStatusInf findFieldStatus(String name)
name - The full expresion for the field.Copyright © 2015–2017 Bridje Framework. All rights reserved.