Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.apps.groupspace.notification
Class GroupSpaceNotification

    java.lang.Object
      com.bea.apps.groupspace.notification.GroupSpaceNotification

Direct Known Subclasses:
  CommunityNotification, InvitationNotification

    public abstract class GroupSpaceNotification

extends Object

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

### SEVERITY_SEV_NORMAL

    public static final String SEVERITY_SEV_NORMAL

See Also
  Constants Summary

### SEVERITY_SEV_HIGH

    public static final String SEVERITY_SEV_HIGH

See Also
  Constants Summary

### GROUPSPACE_NOTIFICATION_NAMESPACE

    public static final String GROUPSPACE_NOTIFICATION_NAMESPACE

  Represents the base namespace of all groupspace notifications.

  See Also
    Constants Summary

### PROP_SEVERITY_KEY

    protected static final String PROP_SEVERITY_KEY

  Defines the property key used to identify the severity.

  See Also
    Constants Summary

### PROP_SUBJECT_KEY

    protected static final String PROP_SUBJECT_KEY

  Defines the property key used to identify the payload.

  See Also
    Constants Summary

### PROP_IMPLEMENTATION_KEY

    protected static final String PROP_IMPLEMENTATION_KEY

  Puts the implementation of the notification in the properties (payload) of the notification.

  See Also
    Constants Summary

### debug

    protected static Debug debug

  Debug output

### notification

    protected Notification notification

  Can be used to retrieve the original notification payload.

### notificationProps

    protected Properties notificationProps

  Internal storage of properties.

### expirationDate

    protected Date expirationDate

  Expiration date used for notification. Default: two weeks from now.

Constructor Detail

### GroupSpaceNotification

    public GroupSpaceNotification(Notification notification)

  Constructs a GroupSpaceNotification based on the notification payload from the notification framework.

  Parameters
    `payload` -

### GroupSpaceNotification

    public GroupSpaceNotification()

  This constructor should be used to create a brand new notification, rather than be used for construction from a NotificationPayload.

Method Detail

### getNotificationNamespace

    protected String getNotificationNamespace()

  Must be implemented by concrete implementation so that we can construct the NotificationPayloadInfo. Override if you have a different namespace than this.

### getNotificationName

    protected abstract String getNotificationName()

### validateOnSend

    protected abstract void validateOnSend()
                                    throws MissingDataException

  Throws
    `MissingDataException`

### getNotification

    public Notification getNotification()

  Retrieves the original `NotificationPayload`

  Returns

### getNotificationSubject

    public String getNotificationSubject()

  Returns the additional payload of the notification.

  Returns

### setNotificationSubject

    public void setNotificationSubject(String payload)

  Sets the additional payload of the notification.

### getNotificationSeverity

    public String getNotificationSeverity()

  Returns the Severity of the notification.

  Returns
    The severity.

### setNotificationSeverity

    public void setNotificationSeverity(String severity)

  Sets the severity of the notification.

  Should only be used for construction of notification and not construction from a NotificationPayload.

  Parameters
    `severity` -

### getExpirationDate

    public Date getExpirationDate()

  Returns the expiration date of the notification

  Returns
    The expiration date.

### setExpirationDate

    public void setExpirationDate(Date date)

  Sets the expiration date of the notification.

  Parameters
    `date` - the expiration date. Must be greater than the current time.

### getNotificationAttribute

    protected String getNotificationAttribute(String key)

  Retrieves the value of a notification specific property.

  Parameters
    `key` - The key of the property to retrieve.
  Returns
    The value of the property, if it exists or null otherwise.

### getNotificationAttribute

    protected String getNotificationAttribute(String key,
                                              String defaultValue)

  Retrieves the value of a notification specific property.

  Parameters
    `key` - The key of the property to retrieve.
    `defaultValue` - The default value if the key does not exist.
  Returns
    The value of the property defined by 'key'. If the property does not exist, the defaultValue is returned.

### setNotificationAttribute

    protected void setNotificationAttribute(String key,
                                            String value)

  Sets a header attribute for a notification. This *should* be used when creating a notification and not when a notification is received by the notification framework.

  Parameters
    `key` - The key of the property
    `value` - The value of the property

### toNotificationPayloadInfo

    protected NotificationPayloadInfo toNotificationPayloadInfo(CommunityDefinition cdef)
                                                         throws Exception

  Constructs a NotificationPayloadInfo based on the contents of this instance of groupspace notification.

  Parameters
    `cdef` - - The community definition used to create the notification.
  Returns
  Throws
    `Exception`

### toNotificationPayloadInfo

    protected NotificationPayloadInfo toNotificationPayloadInfo(String webAppName)
                                                         throws Exception

  Constructs a NotificationPayloadInfo based on the contents of this instance of groupspace notification.

  Parameters
    `webAppName` - - The name of the current/target web application.
  Returns
  Throws
    `Exception`

### isValidNotification

    public boolean isValidNotification()

### toString

    public String toString()

  Convenience method

  Overrides:
    `toString` in class `Object`

### getIsHighSeverity

    public boolean getIsHighSeverity()

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 BEA Systems, Inc. All Rights Reserved