@Immutable public class UserNotificationWithFeedback extends UserNotification
Modifier and Type | Class and Description |
---|---|
static class |
UserNotificationWithFeedback.Feedback
This class provides a few callback methods to notify a choice from the user.
|
Modifier and Type | Field and Description |
---|---|
protected UserNotificationWithFeedback.Feedback |
feedback |
caption, text
Modifier | Constructor and Description |
---|---|
protected |
UserNotificationWithFeedback(String text,
String caption,
UserNotificationWithFeedback.Feedback feedback) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Notifies a cancellation to the user notification.
|
void |
confirm()
Notifies a confirmation to the user notification.
|
static UserNotificationWithFeedback |
notificationWithFeedback()
Creates a notification with empty caption and text.
|
UserNotificationWithFeedback |
withCaption(Class<?> bundleClass,
String resourceName,
Object... params)
Associates a caption to the notification, retrieved from a resource bundle.
|
UserNotificationWithFeedback |
withCaption(String caption)
Associates a caption to the notification.
|
UserNotificationWithFeedback |
withFeedback(UserNotificationWithFeedback.Feedback feedback)
Associates a
UserNotificationWithFeedback.Feedback to the notification. |
UserNotificationWithFeedback |
withText(Class<?> bundleClass,
String resourceName,
Object... params)
Associates a text to the notification, retrieved from a resource bundle.
|
UserNotificationWithFeedback |
withText(String text)
Associates a text to the notification.
|
notification
protected final UserNotificationWithFeedback.Feedback feedback
@Nonnull public static UserNotificationWithFeedback notificationWithFeedback()
@Nonnull public UserNotificationWithFeedback withCaption(@Nonnull String caption)
withCaption
in class UserNotification
caption
- the caption@Nonnull public UserNotificationWithFeedback withCaption(@Nonnull Class<?> bundleClass, @Nonnull String resourceName, @Nonnull Object... params)
withCaption
in class UserNotification
bundleClass
- the class where to search the resource bundle fromresourceName
- the resource name of the caption in the bundleparams
- some (optional) parameters to the resource@Nonnull public UserNotificationWithFeedback withText(@Nonnull String text)
withText
in class UserNotification
text
- the text@Nonnull public UserNotificationWithFeedback withText(@Nonnull Class<?> bundleClass, @Nonnull String resourceName, @Nonnull Object... params)
withText
in class UserNotification
bundleClass
- the class where to search the resource bundle fromresourceName
- the resource name of the text in the bundleparams
- some (optional) parameters to the resource@Nonnull public UserNotificationWithFeedback withFeedback(@Nonnull UserNotificationWithFeedback.Feedback feedback)
UserNotificationWithFeedback.Feedback
to the notification.feedback
- the Feedback
to associatepublic void confirm() throws Exception
Exception
- in cases of errorCopyright © 2009–2015 Tidalwave s.a.s. (http://tidalwave.it). All rights reserved.