Class Notification
- java.lang.Object
-
- com.insightful.splusserver.notification.Notification
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
NotificationMessage,NotificationRequest
public abstract class Notification extends java.lang.Object implements java.io.SerializableA base class for both notification request and result objects.- Author:
- TIBCO Spotfire
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTR_CLIENT_IPNotification attribute name: client IP.static java.lang.StringATTR_DATANotification attribute name: notification data.static java.lang.StringATTR_DATENotification attribute name: notification date.static java.lang.StringATTR_EMAILNotification attribute name: e-mail.static java.lang.StringATTR_EMAIL_ON_TYPENotification attribute name: notification e-mail on type.static java.lang.StringATTR_JOB_IDNotification attribute name: job ID.static java.lang.StringATTR_NOTIFICATION_IDNotification attribute name: notification ID.static java.lang.StringATTR_NOTIFICATION_MESSAGE_TYPENotification attribute name: notification message type.static java.lang.StringATTR_NOTIFICATION_TYPENotification attribute name: notification type.static java.lang.StringATTR_PORTNotification attribute name: port number.static java.lang.StringATTR_SERVER_IDNotification attribute name: server ID.static java.lang.StringATTR_VALUE_EMAIL_ON_ALLNotification attribute name: email on all.static java.lang.StringATTR_VALUE_EMAIL_ON_DONENotification attribute name: email on job done.static java.lang.StringATTR_VALUE_EMAIL_ON_FAILEDNotification attribute name: email on job failure.static java.lang.StringATTR_VALUE_EMAIL_ON_INTERRUPTEDNotification attribute name: email on job interrupted.static charNotificationAttributeSeparatorThe character that separates the attribute value from the attribute name.static charNotificationDataSeparatorThe character that separates notification data.static charNotificationObjectSeparatorThe character that separates notification objects.static java.lang.StringNotificationPrefixThe prefix for every notification.static charNotificationSeparatorThe separator character used between notification strings.
-
Constructor Summary
Constructors Constructor Description Notification()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>getAttributeList()Retrieves the attribute list of the notification.java.lang.StringgetAttributeValue(java.lang.String attr)Retrieves the named attribute value from the notification.java.lang.StringgetAttributeValuePair(java.lang.String attr)Retrieves the named attribute name/value pair from the notification.java.lang.StringgetCanonicalString()Retrieves the string representation of the notification.java.lang.StringgetClientIP()Retrieves the client IP.java.lang.StringgetJobId()Retrieves the job ID.java.lang.StringgetNotificationId()Retrieves the notification ID.static eNotificationMessageTypegetNotificationMessageType(java.lang.String val)Retrieves the enum type of the corresponding notification type string.java.lang.StringgetNotificationMessageTypeValue()Retrieves the value of the type attribute of the notification.static java.lang.StringgetNotificationMessageTypeValue(eNotificationMessageType type)Retrieves the value of the type attribute of the notification.NotificationTypegetNotificationType()intgetPort()Retrieves the port.java.util.DategetTime()Retrieves the time.eNotificationMessageTypegetType()Retrieves the type.booleanhasAllRequiredAttributesSpecified()Checks whether all required attributes are specified.booleanisJobStatusNotification()Checks whether the notification is for job status change.voidsetAttributeValue(java.lang.String attr, java.lang.String value)Sets an attribute value.voidsetClientIP(java.lang.String clientIP)Sets the client IP.voidsetJobId(java.lang.String jobId)Sets the job ID.voidsetNotificationId(java.lang.String notificationId)Sets the notification ID.voidsetNotificationType(NotificationType notificationType)voidsetPort(int port)Sets the port.voidsetTime(java.util.Date time)Sets the time attribute.voidsetType(eNotificationMessageType type)Sets the notification type.java.lang.StringtoString()Retrieves the string representation of the notification message.
-
-
-
Field Detail
-
NotificationPrefix
public static final java.lang.String NotificationPrefix
The prefix for every notification.- See Also:
- Constant Field Values
-
NotificationSeparator
public static final char NotificationSeparator
The separator character used between notification strings.- See Also:
- Constant Field Values
-
NotificationAttributeSeparator
public static final char NotificationAttributeSeparator
The character that separates the attribute value from the attribute name.- See Also:
- Constant Field Values
-
NotificationDataSeparator
public static final char NotificationDataSeparator
The character that separates notification data.- See Also:
- Constant Field Values
-
NotificationObjectSeparator
public static final char NotificationObjectSeparator
The character that separates notification objects.- See Also:
- Constant Field Values
-
ATTR_JOB_ID
public static final java.lang.String ATTR_JOB_ID
Notification attribute name: job ID.- See Also:
- Constant Field Values
-
ATTR_NOTIFICATION_ID
public static final java.lang.String ATTR_NOTIFICATION_ID
Notification attribute name: notification ID.- See Also:
- Constant Field Values
-
ATTR_CLIENT_IP
public static final java.lang.String ATTR_CLIENT_IP
Notification attribute name: client IP.- See Also:
- Constant Field Values
-
ATTR_PORT
public static final java.lang.String ATTR_PORT
Notification attribute name: port number.- See Also:
- Constant Field Values
-
ATTR_SERVER_ID
public static final java.lang.String ATTR_SERVER_ID
Notification attribute name: server ID.- See Also:
- Constant Field Values
-
ATTR_NOTIFICATION_MESSAGE_TYPE
public static final java.lang.String ATTR_NOTIFICATION_MESSAGE_TYPE
Notification attribute name: notification message type.- See Also:
- Constant Field Values
-
ATTR_NOTIFICATION_TYPE
public static final java.lang.String ATTR_NOTIFICATION_TYPE
Notification attribute name: notification type.- See Also:
- Constant Field Values
-
ATTR_DATE
public static final java.lang.String ATTR_DATE
Notification attribute name: notification date.- See Also:
- Constant Field Values
-
ATTR_DATA
public static final java.lang.String ATTR_DATA
Notification attribute name: notification data.- See Also:
- Constant Field Values
-
ATTR_EMAIL
public static final java.lang.String ATTR_EMAIL
Notification attribute name: e-mail.- See Also:
- Constant Field Values
-
ATTR_EMAIL_ON_TYPE
public static final java.lang.String ATTR_EMAIL_ON_TYPE
Notification attribute name: notification e-mail on type.- See Also:
- Constant Field Values
-
ATTR_VALUE_EMAIL_ON_ALL
public static final java.lang.String ATTR_VALUE_EMAIL_ON_ALL
Notification attribute name: email on all.- See Also:
- Constant Field Values
-
ATTR_VALUE_EMAIL_ON_DONE
public static final java.lang.String ATTR_VALUE_EMAIL_ON_DONE
Notification attribute name: email on job done.- See Also:
- Constant Field Values
-
ATTR_VALUE_EMAIL_ON_FAILED
public static final java.lang.String ATTR_VALUE_EMAIL_ON_FAILED
Notification attribute name: email on job failure.- See Also:
- Constant Field Values
-
ATTR_VALUE_EMAIL_ON_INTERRUPTED
public static final java.lang.String ATTR_VALUE_EMAIL_ON_INTERRUPTED
Notification attribute name: email on job interrupted.- See Also:
- Constant Field Values
-
-
Method Detail
-
getAttributeValue
public java.lang.String getAttributeValue(java.lang.String attr)
Retrieves the named attribute value from the notification.- Parameters:
attr- The name of a notification attribute.- Returns:
- The value of the attribute.
-
getAttributeValuePair
public java.lang.String getAttributeValuePair(java.lang.String attr)
Retrieves the named attribute name/value pair from the notification.- Parameters:
attr- The name of a notification attribute.- Returns:
- The value of the attribute.
-
setAttributeValue
public void setAttributeValue(java.lang.String attr, java.lang.String value)Sets an attribute value.- Parameters:
attr- The name of the attribute to be set.value- The value of the attribute to be set.
-
getAttributeList
public java.util.List<java.lang.String> getAttributeList()
Retrieves the attribute list of the notification.- Returns:
- A list of notification attributes.
-
hasAllRequiredAttributesSpecified
public boolean hasAllRequiredAttributesSpecified()
Checks whether all required attributes are specified.- Returns:
trueif all required attributes have been specified; otherwisefalse.
-
isJobStatusNotification
public boolean isJobStatusNotification()
Checks whether the notification is for job status change.- Returns:
trueif the notification is for job status change; otherwisefalse.
-
getNotificationMessageType
public static eNotificationMessageType getNotificationMessageType(java.lang.String val)
Retrieves the enum type of the corresponding notification type string.- Returns:
- An enum type value.
- See Also:
eNotificationMessageType
-
getNotificationMessageTypeValue
public static java.lang.String getNotificationMessageTypeValue(eNotificationMessageType type)
Retrieves the value of the type attribute of the notification.- Parameters:
type- An enum type value.- Returns:
- A string.
- See Also:
eNotificationMessageType
-
getNotificationMessageTypeValue
public java.lang.String getNotificationMessageTypeValue()
Retrieves the value of the type attribute of the notification.- Returns:
- A string.
-
setTime
public void setTime(java.util.Date time)
Sets the time attribute.- Parameters:
time- The time to set.
-
getTime
public java.util.Date getTime()
Retrieves the time.- Returns:
- The time.
-
setType
public void setType(eNotificationMessageType type)
Sets the notification type.- Parameters:
type- The type to set.- See Also:
eNotificationMessageType
-
getType
public eNotificationMessageType getType()
Retrieves the type.- Returns:
- The type.
- See Also:
eNotificationMessageType
-
setNotificationType
public void setNotificationType(NotificationType notificationType)
-
getNotificationType
public NotificationType getNotificationType()
-
setJobId
public void setJobId(java.lang.String jobId)
Sets the job ID.- Parameters:
jobId- The job ID to set.
-
getJobId
public java.lang.String getJobId()
Retrieves the job ID.- Returns:
- The job ID.
-
setClientIP
public void setClientIP(java.lang.String clientIP)
Sets the client IP.- Parameters:
clientIP- The client IP to set.
-
getClientIP
public java.lang.String getClientIP()
Retrieves the client IP.- Returns:
- The client IP.
-
setPort
public void setPort(int port)
Sets the port.- Parameters:
port- The port to set.
-
getPort
public int getPort()
Retrieves the port.- Returns:
- The port.
-
setNotificationId
public void setNotificationId(java.lang.String notificationId)
Sets the notification ID.- Parameters:
notificationId- The notification ID to set.
-
getNotificationId
public java.lang.String getNotificationId()
Retrieves the notification ID.- Returns:
- The notification ID.
-
getCanonicalString
public java.lang.String getCanonicalString()
Retrieves the string representation of the notification.- Returns:
- The string representation of the notification.
-
toString
public java.lang.String toString()
Retrieves the string representation of the notification message.- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation of the notification message.
-
-