public class Alert
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BUNDLE_ID
Constant defining bundle id of the alert source bundle.
|
static java.lang.String |
BUNDLE_LOCATION
Constant defining bundle location of the alert source bundle.
|
static java.lang.String |
BUNDLE_NAME
Constant defining bundle name of the alert source bundle.
|
protected int |
code |
static int |
CODE_UNKNOWN
Unknown code for the alert.
|
static int |
CRITICAL_LEVEL_ERROR
Constant defining critical level alert.
|
static java.lang.String |
HOST_ID
Constant defining the id of backend host on which the alert is raised.
|
static java.lang.String |
HOST_ROLE
Constant defining the host role on which the alert is raised.
|
protected int |
level |
static int |
LOW_LEVEL_ERROR
Constant defining low level alert.
|
protected java.lang.String |
message |
static int |
MIDDLE_LEVEL_ERROR
Constant defining middle level alert.
|
static java.lang.String |
PARTICIPANT_ID
|
protected java.util.Dictionary |
source |
protected java.lang.String[] |
targetUsers |
protected long |
time |
protected java.lang.String |
type |
| Constructor and Description |
|---|
Alert(int level,
java.lang.String message)
Creates an Alert object with given attributes
|
Alert(int level,
java.lang.String[] targetUsers,
java.lang.String message)
Creates an Alert object with given attributes
|
Alert(int level,
java.lang.String[] targetUsers,
java.lang.String message,
java.util.Dictionary source)
Creates an Alert object with given attributes
|
Alert(int level,
java.lang.String[] targetUsers,
java.lang.String message,
java.util.Dictionary source,
int code,
java.lang.String type)
Creates an Alert object with given attributes
|
Alert(int level,
java.lang.String message,
int code,
java.lang.String type)
Creates an Alert object with given attributes
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
int |
getCode()
Returns the code of the alert.
|
int |
getLevel()
Returns the alert level.
|
java.lang.String |
getMessage()
Returns the alert message.
|
java.util.Dictionary |
getSource()
Returns info about the alert source.
|
java.lang.String[] |
getTargetUsers()
Returns the users that this alert is targeted to.
|
long |
getTime()
Returns the time of raising the alert.
|
java.lang.String |
getType()
Returns the alert type.
|
void |
setCode(int code)
Sets the alert code.
|
void |
setLevel(int level)
Sets the alert level of this alert.
|
void |
setMessage(java.lang.String message)
Sets the alert message.
|
void |
setSource(java.util.Dictionary sourceProps)
Sets the source info the alert is generated from.
|
void |
setTargetUsers(java.lang.String[] users)
Specifies the users, that this alert is targeted to.
|
void |
setTime()
Automatically invoked when the alert is raised.
|
void |
setTime(long time)
Used when deserializing alert objects on the front end.
|
void |
setType(java.lang.String type)
Sets the alert type.
|
java.lang.String |
toString() |
protected java.util.Dictionary source
protected int level
protected java.lang.String[] targetUsers
protected java.lang.String message
protected long time
protected java.lang.String type
protected int code
public static final int LOW_LEVEL_ERROR
public static final int MIDDLE_LEVEL_ERROR
public static final int CRITICAL_LEVEL_ERROR
public static final int CODE_UNKNOWN
public static final java.lang.String BUNDLE_LOCATION
public static final java.lang.String BUNDLE_ID
public static final java.lang.String BUNDLE_NAME
public static final java.lang.String HOST_ID
public static final java.lang.String HOST_ROLE
Roles.CC,
Roles.RAS or
Roles.MS
if the alert is backend-system alert,
public static final java.lang.String PARTICIPANT_ID
HOST_ROLE is Roles.MS, or
id of device of this is device alert.public Alert(int level,
java.lang.String message)
level - the alert levelmessage - the alert message
If not specified it will be automatically set while raising the alert.public Alert(int level,
java.lang.String message,
int code,
java.lang.String type)
level - the alert levelmessage - the alert messagecode - code for the alert. Might be used for localization and classification purposes.type - the type of the alert.
If not specified it will be automatically set while raising the alert.public Alert(int level,
java.lang.String[] targetUsers,
java.lang.String message)
level - the alert leveltargetUsers - users the users that the created alert will be targeted to.message - the alert message
If not specified it will be automatically set while raising the alert.public Alert(int level,
java.lang.String[] targetUsers,
java.lang.String message,
java.util.Dictionary source)
level - the alert leveltargetUsers - users the users that the created alert will be targeted to.message - the alert messagesource - a dictionary that specifies the source of created alert.
If not specified it will be automatically set while raising the alert.public Alert(int level,
java.lang.String[] targetUsers,
java.lang.String message,
java.util.Dictionary source,
int code,
java.lang.String type)
level - the alert leveltargetUsers - users the users that the created alert will be targeted to.message - the alert messagesource - a dictionary that specifies the source of created alert.code - code for the alert. Might be used for localization and classification purposes.type - the type of the alert.
If not specified it will be automatically set while raising the alert.public void setLevel(int level)
public void setSource(java.util.Dictionary sourceProps)
public void setMessage(java.lang.String message)
public void setType(java.lang.String type)
public void setCode(int code)
public void setTargetUsers(java.lang.String[] users)
public void setTime()
public void setTime(long time)
public java.util.Dictionary getSource()
public int getLevel()
public int getCode()
public java.lang.String[] getTargetUsers()
public java.lang.String getMessage()
public java.lang.String getType()
public long getTime()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.