|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.apps.groupspace.notification.GroupSpaceNotification
public abstract class GroupSpaceNotification
This base class represents the base notification type supported by the GroupSpace application. Each implementation will be specific to the type of notification sent by the GroupSpace application.
Note: The notification payload supports up to 4000 characters. Each attribute will reduce the maximum payload supported by the notification framework, so it's best to keep the number of characters for each notification to a minimum.
Field Summary | |
---|---|
protected static Debug |
debug
Debug output |
protected Date |
expirationDate
Expiration date used for notification. |
static String |
GROUPSPACE_NOTIFICATION_NAMESPACE
Represents the base namespace of all groupspace notifications. |
protected Notification |
notification
Can be used to retrieve the original notification payload. |
protected Properties |
notificationProps
Internal storage of properties. |
protected static String |
PROP_IMPLEMENTATION_KEY
Puts the implementation of the notification in the properties (payload) of the notification. |
protected static String |
PROP_SEVERITY_KEY
Defines the property key used to identify the severity. |
protected static String |
PROP_SUBJECT_KEY
Defines the property key used to identify the payload. |
static String |
SEVERITY_SEV_HIGH
|
static String |
SEVERITY_SEV_NORMAL
|
Constructor Summary | |
---|---|
GroupSpaceNotification()
This constructor should be used to create a brand new notification, rather than be used for construction from a NotificationPayload. |
|
GroupSpaceNotification(Notification notification)
Constructs a GroupSpaceNotification based on the notification payload from the notification framework. |
Method Summary | |
---|---|
Date |
getExpirationDate()
Returns the expiration date of the notification |
boolean |
getIsHighSeverity()
|
Notification |
getNotification()
Retrieves the original NotificationPayload |
protected String |
getNotificationAttribute(String key)
Retrieves the value of a notification specific property. |
protected String |
getNotificationAttribute(String key,
String defaultValue)
Retrieves the value of a notification specific property. |
protected abstract String |
getNotificationName()
|
protected String |
getNotificationNamespace()
Must be implemented by concrete implementation so that we can construct the NotificationPayloadInfo. |
String |
getNotificationSeverity()
Returns the Severity of the notification. |
String |
getNotificationSubject()
Returns the additional payload of the notification. |
boolean |
isValidNotification()
|
void |
setExpirationDate(Date date)
Sets the expiration date of the notification. |
protected void |
setNotificationAttribute(String key,
String value)
Sets a header attribute for a notification. |
void |
setNotificationSeverity(String severity)
Sets the severity of the notification. |
void |
setNotificationSubject(String payload)
Sets the additional payload of the notification. |
protected NotificationPayloadInfo |
toNotificationPayloadInfo(CommunityDefinition cdef)
Constructs a NotificationPayloadInfo based on the contents of this instance of groupspace notification. |
protected NotificationPayloadInfo |
toNotificationPayloadInfo(String webAppName)
Constructs a NotificationPayloadInfo based on the contents of this instance of groupspace notification. |
String |
toString()
Convenience method |
protected abstract void |
validateOnSend()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SEVERITY_SEV_NORMAL
public static final String SEVERITY_SEV_HIGH
public static final String GROUPSPACE_NOTIFICATION_NAMESPACE
protected static final String PROP_SEVERITY_KEY
protected static final String PROP_SUBJECT_KEY
protected static final String PROP_IMPLEMENTATION_KEY
protected static Debug debug
protected Notification notification
protected Properties notificationProps
protected Date expirationDate
Constructor Detail |
---|
public GroupSpaceNotification(Notification notification)
payload
- public GroupSpaceNotification()
Method Detail |
---|
protected String getNotificationNamespace()
protected abstract String getNotificationName()
protected abstract void validateOnSend() throws MissingDataException
MissingDataException
public Notification getNotification()
NotificationPayload
public String getNotificationSubject()
public void setNotificationSubject(String payload)
public String getNotificationSeverity()
public void setNotificationSeverity(String severity)
Should only be used for construction of notification and not construction from a NotificationPayload.
severity
- public Date getExpirationDate()
public void setExpirationDate(Date date)
date
- the expiration date. Must be greater than the current time.protected String getNotificationAttribute(String key)
key
- The key of the property to retrieve.
protected String getNotificationAttribute(String key, String defaultValue)
key
- The key of the property to retrieve.defaultValue
- The default value if the key does not exist.
protected void setNotificationAttribute(String key, String value)
key
- The key of the propertyvalue
- The value of the propertyprotected NotificationPayloadInfo toNotificationPayloadInfo(CommunityDefinition cdef) throws Exception
cdef
- - The community definition used to create the notification.
Exception
protected NotificationPayloadInfo toNotificationPayloadInfo(String webAppName) throws Exception
webAppName
- - The name of the current/target web application.
Exception
public boolean isValidNotification()
public String toString()
toString
in class Object
public boolean getIsHighSeverity()
|
Copyright © 2006 BEA Systems, Inc. All Rights Reserved | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |