org.apache.tapestry5.alerts
Class AlertStorage

java.lang.Object
  extended by org.apache.tapestry5.ioc.internal.util.LockSupport
      extended by org.apache.tapestry5.alerts.AlertStorage
All Implemented Interfaces:
Serializable, OptimizedSessionPersistedObject

public class AlertStorage
extends LockSupport
implements Serializable, OptimizedSessionPersistedObject

A stateless session object used to store Alerts between requests.

Since:
5.3
See Also:
Serialized Form

Constructor Summary
AlertStorage()
           
 
Method Summary
 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 the Alerts component.
 List<Alert> getAlerts()
          Returns all stored alerts.
 
Methods inherited from class org.apache.tapestry5.ioc.internal.util.LockSupport
acquireReadLock, downgradeWriteLockToReadLock, releaseReadLock, releaseWriteLock, takeWriteLock, upgradeReadLockToWriteLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlertStorage

public AlertStorage()
Method Detail

checkAndResetDirtyMarker

public boolean checkAndResetDirtyMarker()
Specified by:
checkAndResetDirtyMarker in interface OptimizedSessionPersistedObject
Returns:
true if the object has in-memory changes since the last time this method was called.

add

public void add(Alert alert)

dismissAll

public void dismissAll()
Dismisses all Alerts.


dismissNonPersistent

public void dismissNonPersistent()
Dismisses non-persistent Alerts; this is useful after rendering the Alerts component.


dismiss

public void dismiss(long alertId)
Dismisses a single Alert, if present.


getAlerts

public List<Alert> getAlerts()
Returns all stored alerts.

Returns:
list of alerts (possibly empty)


Copyright © 2003-2012 The Apache Software Foundation.