@Immutable public class UserNotification extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
caption |
protected String |
text |
Constructor and Description |
---|
UserNotification() |
Modifier and Type | Method and Description |
---|---|
static UserNotification |
notification()
Creates a notification with empty caption and text.
|
UserNotification |
withCaption(Class<?> bundleClass,
String resourceName,
Object... params)
Associates a caption to the notification, retrieved from a resource bundle.
|
UserNotification |
withCaption(String caption)
Associates a caption to the notification.
|
UserNotification |
withText(Class<?> bundleClass,
String resourceName,
Object... params)
Associates a text to the notification, retrieved from a resource bundle.
|
UserNotification |
withText(String text)
Associates a text to the notification.
|
@Nonnull public static UserNotification notification()
@Nonnull public UserNotification withCaption(@Nonnull String caption)
caption
- the caption@Nonnull public UserNotification withCaption(@Nonnull Class<?> bundleClass, @Nonnull String resourceName, @Nonnull Object... params)
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 UserNotification withText(@Nonnull String text)
text
- the text@Nonnull public UserNotification withText(@Nonnull Class<?> bundleClass, @Nonnull String resourceName, @Nonnull Object... params)
bundleClass
- the class where to search the resource bundle fromresourceName
- the resource name of the text in the bundleparams
- some (optional) parameters to the resourceCopyright © 2009–2016 Tidalwave s.a.s. (http://tidalwave.it). All rights reserved.