Package org.apache.tapestry5.alerts
Class AlertStorage
- java.lang.Object
-
- org.apache.tapestry5.commons.internal.util.LockSupport
-
- org.apache.tapestry5.alerts.AlertStorage
-
- All Implemented Interfaces:
java.io.Serializable
,OptimizedSessionPersistedObject
public class AlertStorage extends LockSupport implements java.io.Serializable, OptimizedSessionPersistedObject
A stateless session object used to store Alerts between requests.- Since:
- 5.3
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AlertStorage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Alert alert)
boolean
checkAndResetDirtyMarker()
void
dismiss(long alertId)
Dismisses a single Alert, if present.void
dismissAll()
Dismisses all Alerts.void
dismissNonPersistent()
Dismisses non-persistent Alerts; this is useful after rendering theAlerts
component.java.util.List<Alert>
getAlerts()
Returns all stored alerts.-
Methods inherited from class org.apache.tapestry5.commons.internal.util.LockSupport
acquireReadLock, downgradeWriteLockToReadLock, releaseReadLock, releaseWriteLock, takeWriteLock, upgradeReadLockToWriteLock
-
-
-
-
Constructor Detail
-
AlertStorage
public AlertStorage()
-
-
Method Detail
-
checkAndResetDirtyMarker
public boolean checkAndResetDirtyMarker()
- Specified by:
checkAndResetDirtyMarker
in interfaceOptimizedSessionPersistedObject
- Returns:
- true if the object has in-memory changes since the last time this method was called.
-
dismissAll
public void dismissAll()
Dismisses all Alerts.
-
dismissNonPersistent
public void dismissNonPersistent()
Dismisses non-persistent Alerts; this is useful after rendering theAlerts
component.
-
dismiss
public void dismiss(long alertId)
Dismisses a single Alert, if present.
-
-