Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## org.apache.tapestry5.alerts
Enum Duration

    java.lang.Object
      java.lang.Enum<Duration>
          org.apache.tapestry5.alerts.Duration

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<Duration>

    public enum Duration

extends java.lang.Enum<Duration>

Controls how long an `Alert` is displayed to the end user.

Since:
  5.3

Enum Constant Summary
`SINGLE` The default duration; displayed to the user a single time; once the page updates, the alert will not be presented to the user.
`TRANSIENT` Transient alerts are displayed to the user, then automatically clear themselves after a few seconds.
`UNTIL_DISMISSED` For most important alerts; the alert will continue to be presented to the user until it is dismissed by the user (either by clicking on the individual alert to dismiss it, or by clicking the UI control for dismissing all alerts).

Field Summary
`boolean` | `persistent` True if the alert type should persist between requests.

Method Summary
`static Duration` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static Duration[]` | `values()` Returns an array containing the constants of this enum type, in the order they're declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### TRANSIENT

    public static final Duration TRANSIENT

  Transient alerts are displayed to the user, then automatically clear themselves after a few seconds. Transient alerts are not stored in the `AlertStorage`.

### SINGLE

    public static final Duration SINGLE

  The default duration; displayed to the user a single time; once the page updates, the alert will not be presented to the user. Single duration alerts are not stored in `AlertStorage`.

### UNTIL_DISMISSED

    public static final Duration UNTIL_DISMISSED

  For most important alerts; the alert will continue to be presented to the user until it is dismissed by the user (either by clicking on the individual alert to dismiss it, or by clicking the UI control for dismissing all alerts). Such alerts are stored persistently in `AlertStorage`.

Field Detail

### persistent

    public final boolean persistent

  True if the alert type should persist between requests. This is only true for `UNTIL_DISMISSED`.

Method Detail

### values

    public static final Duration[] values()

  Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:

      for(Duration c : Duration.values())
              System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they're declared

### valueOf

    public static Duration valueOf(java.lang.String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

Copyright © 2003-2012 The Apache Software Foundation.