public class AlertManager extends java.lang.Object implements AlertConstants, JPropertiesListener, DBConstants, JaliosConstants
ALERT_TRIGGER_DELETION_PROP, CTXT_DELETE_ALERT, HTML_MARKUP, MSG_PREFIX_PROP, NAME_PREFIX_PROP, TEXT_MARKUP, WIKI_MARKUP
REVISION
ALL_CATEGORIES_SET_FIELD, AUTH_GRP_SET_FIELD, AUTH_MBR_SET_FIELD, AUTHOR_ID_FIELD, CATEGORIES_SET_FIELD, CDATE_FIELD, CHANNEL_JCMSDB_PROP, DBDATA_URID, HAS_NO_READ_RIGHTS, HIBERNATE_MAPPING_ADATE, HIBERNATE_MAPPING_AUTHOR, HIBERNATE_MAPPING_CDATE, HIBERNATE_MAPPING_EDATE, HIBERNATE_MAPPING_MDATE, HIBERNATE_MAPPING_PDATE, HIBERNATE_MAPPING_PSTATUS, HIBERNATE_MAPPING_TITLE, HIBERNATE_MAPPING_WORKFLOW_ID, HIBERNATE_MAPPING_WORKSPACE_ID, MDATE_FIELD, PSTATUS_FIELD, REVISION, ROW_ID_FIELD, SCROLL_FETCH_SIZE, WORKFLOW_ID_FIELD, WORKSPACE_ID_FIELD
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR, REVISION
Modifier and Type | Method and Description |
---|---|
void |
addAlertChannel(AlertChannel alertChannel)
Adds the given AlertChannel
|
void |
deleteAlerts(Data data)
Deletes all alerts on given data
|
AlertChannel |
getAlertChannel(java.lang.String name)
Returns the AlertChannel with the given name.
|
java.util.List<AlertChannel> |
getAlertChannelList()
Returns the list of all available AlertChannel.
|
java.util.List<AlertChannel> |
getAlertChannelList(Member mbr)
Returns the list of available AlertChannel for the given member.
|
java.util.Set<AlertChannel> |
getAlertChannelSet(Alert alert)
Returns the set of AlertChannel matching the given alert.
|
int |
getAlertCount(Data data)
Returns the count of Alert on the given data
|
int |
getAlertCount(Member mbr)
Returns the count of Alert the given member is a recipient.
|
java.util.List<Alert.Level> |
getAlertLevelList()
Returns the list of Alert.Level.
|
java.util.List<Alert> |
getAlertList(Data data)
Returns the list of Alert on the given data
|
java.util.List<Alert> |
getAlertList(Member mbr)
Returns the list of Alert the given member is a recipient.
|
java.util.List<Alert> |
getAlertList(Member mbr,
Alert.Level level,
java.lang.Boolean read)
Returns the list of Alert the given member is a recipient.
|
java.util.Set<AlertChannel> |
getDefaultAlertChannelSet()
Returns the set of default AlertChannel.
|
static AlertManager |
getInstance() |
AlertChannel |
getMailAlertChannel()
Returns the MailAlertChannel
|
Alert.Level |
getMaxUnreadAlertLevel(Member mbr)
Returns the highest alert level the given member is a recipient.
|
java.util.List<Alert> |
getOldAlertList()
Returns the list of old alerts.
|
int |
getUnreadAlertCount(Member mbr)
Returns the count of unread Alert the given member is a recipient.
|
AlertChannel |
getWebAlertChannel()
Returns the WebAlertChannel
|
void |
invalidateCacheEntries(java.lang.String mid)
Invalidate the cache entries for the given member.
|
boolean |
isDeleteAlertEnabled() |
void |
markAsRead(Alert alert,
Member loggedMember)
Marks the given alert as read and updates it.
|
void |
markAsUnread(Alert alert,
Member loggedMember)
Marks the given alert as unread and updates it.
|
void |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.
|
void |
purgeAlerts()
Purge old alerts.
|
void |
removeAlertChannel(AlertChannel alertChannel)
Removes the given AlertChannel
|
void |
sendAlert(Alert alert)
Send the given alert
|
public static AlertManager getInstance()
public void propertiesChange(JProperties properties)
JPropertiesListener
You cannot alter the value received in parameters.
propertiesChange
in interface JPropertiesListener
properties
- the properties which have been modified (may not contain all JCMS properties)public void addAlertChannel(AlertChannel alertChannel)
alertChannel
- the AlertChannel to addpublic void removeAlertChannel(AlertChannel alertChannel)
alertChannel
- the AlertChannel to removepublic void sendAlert(Alert alert)
alert
- the Alertpublic java.util.List<Alert.Level> getAlertLevelList()
public AlertChannel getAlertChannel(java.lang.String name)
name
- the name of the AlertChannelpublic AlertChannel getMailAlertChannel()
public AlertChannel getWebAlertChannel()
public java.util.List<AlertChannel> getAlertChannelList()
public java.util.List<AlertChannel> getAlertChannelList(Member mbr)
mbr
- the memberpublic java.util.Set<AlertChannel> getDefaultAlertChannelSet()
public java.util.Set<AlertChannel> getAlertChannelSet(Alert alert)
alert
- the alertpublic java.util.List<Alert> getAlertList(Member mbr)
mbr
- the memberpublic java.util.List<Alert> getAlertList(Data data)
data
- the datapublic java.util.List<Alert> getAlertList(Member mbr, Alert.Level level, java.lang.Boolean read)
mbr
- the memberlevel
- the alert level. Null means any level.read
- true for read alerts, false for not read alerts, null for read or not read alerts.public int getAlertCount(Member mbr)
mbr
- the memberpublic int getAlertCount(Data data)
data
- the datapublic int getUnreadAlertCount(Member mbr)
mbr
- the memberpublic Alert.Level getMaxUnreadAlertLevel(Member mbr)
mbr
- the memberpublic void markAsRead(Alert alert, Member loggedMember)
alert
- the alertloggedMember
- the logged memberpublic void markAsUnread(Alert alert, Member loggedMember)
alert
- the alertloggedMember
- the logged memberpublic void deleteAlerts(Data data)
data
- the datapublic void purgeAlerts()
public java.util.List<Alert> getOldAlertList()
public void invalidateCacheEntries(java.lang.String mid)
mid
- the member's idpublic boolean isDeleteAlertEnabled()
Copyright © 2001-2010 Jalios SA. All Rights Reserved.