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

## org.apache.tapestry5.alerts
Class Alert

    java.lang.Object
      org.apache.tapestry5.alerts.Alert

All Implemented Interfaces:
  java.io.Serializable

    public class Alert

extends java.lang.Object
implements java.io.Serializable

An Alert that may be presented to the user. The Alert has a message, but also includes a severity (that controls how it is presented to the user), and a duration (that controls how long it is presented to the user).

Since:
  5.3
See Also:
  Serialized Form

Field Summary
`Duration` | `duration`
`long` | `id` A unique id (unique within this JVM and execution), used to identify an alert (used primarily when individually dismissing an alert).
`java.lang.String` | `message`
`Severity` | `severity`

Constructor Summary
`Alert(Duration duration, Severity severity, java.lang.String message)`
`Alert(Severity severity, java.lang.String message)` Alert with default duration of `Duration.SINGLE`.
`Alert(java.lang.String message)` Alert with default duration of `Duration.SINGLE` and default severity of `Severity.INFO`.

Method Summary
`JSONObject` | `toJSON()`
`java.lang.String` | `toString()`

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

Field Detail

### id

    public final long id

  A unique id (unique within this JVM and execution), used to identify an alert (used primarily when individually dismissing an alert).

### duration

    public final Duration duration

### severity

    public final Severity severity

### message

    public final java.lang.String message

Constructor Detail

### Alert

    public Alert(java.lang.String message)

  Alert with default duration of `Duration.SINGLE` and default severity of `Severity.INFO`.

### Alert

    public Alert(Severity severity,
                 java.lang.String message)

  Alert with default duration of `Duration.SINGLE`.

### Alert

    public Alert(Duration duration,
                 Severity severity,
                 java.lang.String message)

Method Detail

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### toJSON

    public JSONObject toJSON()

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

Copyright © 2003-2012 The Apache Software Foundation.