@Entity public class AlertTargetEntity extends Object
AlertTargetEntity
class represents audience that will receive
dispatches when an alert is triggered.Constructor and Description |
---|
AlertTargetEntity() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAlertGroup(AlertGroupEntity alertGroup)
Adds the specified alert group to the groups that this target is associated
with.
|
protected void |
addAlertNotice(AlertNoticeEntity notice)
Adds the specified notice to the notices that have been sent out for this
target.
|
boolean |
equals(Object object) |
Set<AlertGroupEntity> |
getAlertGroups()
Gets an immutable set of the alert groups that this target is associated
with.
|
List<AlertNoticeEntity> |
getAlertNotices() |
Set<AlertState> |
getAlertStates()
Gets the alert states that will cause a triggered alert to be sent to this
target.
|
String |
getDescription()
Gets the description of this alert target.
|
String |
getNotificationType() |
String |
getProperties() |
Long |
getTargetId()
Gets the unique ID of this alert target.
|
String |
getTargetName()
Gets the name of this alert target.
|
int |
hashCode() |
boolean |
isEnabled()
Gets whether the alert target is enabled.
|
boolean |
isGlobal()
Gets whether the alert target is a global target and will receive
notifications triggered for any alert group.
|
void |
preRemove()
Called before
EntityManager.remove(Object) for this entity, removes
the non-owning relationship between targets and groups. |
protected void |
removeAlertGroup(AlertGroupEntity alertGroup)
Removes the specified alert group to the groups that this target is
associated with.
|
void |
setAlertGroups(Set<AlertGroupEntity> alertGroups)
Sets all of the groups that are associated with this target.
|
void |
setAlertNotices(List<AlertNoticeEntity> alertNotices) |
void |
setAlertStates(Set<AlertState> alertStates)
Sets the alert states that will cause a triggered alert to be sent to this
target.
|
void |
setDescription(String description)
Sets the description for this alert target.
|
void |
setEnabled(boolean isEnabled)
Sets whether the alert target is enabled.
|
void |
setGlobal(boolean isGlobal)
Sets whether the alert target is a global target and will receive
notifications triggered for any alert group.
|
void |
setNotificationType(String notificationType) |
void |
setProperties(String properties) |
void |
setTargetId(Long targetId)
Sets the unique ID of this alert target.
|
void |
setTargetName(String targetName)
Sets the name of this alert target.
|
String |
toString() |
public Long getTargetId()
null
).public void setTargetId(Long targetId)
targetId
- the ID of the alert target (not null
).public String getDescription()
null
if none.public void setDescription(String description)
description
- the description or null
for none.public String getNotificationType()
public void setNotificationType(String notificationType)
notificationType
- public String getProperties()
public void setProperties(String properties)
properties
- public String getTargetName()
null
).public boolean isGlobal()
public void setGlobal(boolean isGlobal)
isGlobal
- if the target is global.public boolean isEnabled()
true
if the target is enabled.public void setEnabled(boolean isEnabled)
isEnabled
- if the target is enabled.public Set<AlertState> getAlertStates()
null
or empty to imply all.public void setAlertStates(Set<AlertState> alertStates)
alertStates
- the set of alert states or null
or empty to imply all.public void setTargetName(String targetName)
targetName
- the name (not null
).public Set<AlertGroupEntity> getAlertGroups()
public void setAlertGroups(Set<AlertGroupEntity> alertGroups)
alertGroups
- the groups, or null
if there are none.protected void addAlertGroup(AlertGroupEntity alertGroup)
alertGroup
- protected void removeAlertGroup(AlertGroupEntity alertGroup)
alertGroup
- protected void addAlertNotice(AlertNoticeEntity notice)
notice
- the notice.public List<AlertNoticeEntity> getAlertNotices()
public void setAlertNotices(List<AlertNoticeEntity> alertNotices)
public void preRemove()
EntityManager.remove(Object)
for this entity, removes
the non-owning relationship between targets and groups.Copyright © 2022 Apache Software Foundation. All rights reserved.