com.ibm.commerce.messaging.notification
Class NotificationConfigurationHelper

java.lang.Object
  |
  +--com.ibm.commerce.messaging.notification.NotificationConfigurationHelper

public class NotificationConfigurationHelper
extends java.lang.Object

This is the interface we expose to clients. The methods are all static.


Field Summary
static java.lang.String COPYRIGHT
          IBM Copyright field
 
Method Summary
static java.lang.Long addTransportOverride(java.lang.Long notificationId, TransportOverride transportOverride)
          Add a transport override to a notification object.
static java.lang.Long createNotificationObject( TransportOverride[] transportOverrides)
          Creates a new notification object.
static void deleteNotificationObject(java.lang.Long notificationId)
          Deletes a notification object.
static void deleteTransportOverride(java.lang.Long notificationId, java.lang.String transportName, java.lang.String msgTypeName)
          Delete a transport override entry from a notification object.
static  TypedProperty getAttributesForTransport(java.lang.String transportName)
          Returns the over-rideable attributes for a particular transport.
static  Notification getNotificationObject(java.lang.Long notificationId)
          Gets a notification object by id.
static java.lang.String[] getTransportsForMsgTypeName(java.lang.String msgTypeName, java.lang.Integer storeId)
          Returns the transports supported for this message type.
static void replaceTransportOverride(java.lang.Long notificationId, TransportOverride transportOverride)
          Replaces a transport override for a notification object.
static void updateTransportOverride(java.lang.Long notificationId, TransportOverride transportOverride)
          Updates a transport override for a notification object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM Copyright field
See Also:
Constant Field Values
Method Detail

getTransportsForMsgTypeName

public static java.lang.String[] getTransportsForMsgTypeName(java.lang.String msgTypeName,
                                                             java.lang.Integer storeId)
                                                      throws ECException
Returns the transports supported for this message type. Values are fetched from the Profiles table.
Parameters:
msgTypeName - the name of the msgtype; not null
storeId - the id of the store; not null
Returns:
an array containing the transport names supported for this msgtype; null if none found or if msgTypeName or storeId are undefined
Throws:
ECException

getAttributesForTransport

public static TypedProperty getAttributesForTransport(java.lang.String transportName)
                                               throws ECException
Returns the over-rideable attributes for a particular transport. Values are fetched from the WC internal representation of the demo.xml file. Attribute names only are returned, not their values.
Parameters:
transportName - the name of the transport
Returns:
the attribute names that the customer can override; null if none found
Throws:
ECException

createNotificationObject

public static java.lang.Long createNotificationObject(TransportOverride[] transportOverrides)
                                               throws ECException
Creates a new notification object. Note that the notificationId will be ignored if it is set.
Returns:
notification identifier; null if invalid input parameters
Throws:
ECException

getNotificationObject

public static Notification getNotificationObject(java.lang.Long notificationId)
                                          throws ECException
Gets a notification object by id.
Parameters:
notificationId - notification identifier; not null
Returns:
notification value object; null if no notification object found
Throws:
ECException

deleteNotificationObject

public static void deleteNotificationObject(java.lang.Long notificationId)
                                     throws ECException
Deletes a notification object.
Parameters:
notificationId - the notification identifier; if null then method no-ops
Throws:
ECException

addTransportOverride

public static java.lang.Long addTransportOverride(java.lang.Long notificationId,
TransportOverride transportOverride)
                                           throws ECException
Add a transport override to a notification object. If notificationId is null, then a new notificationObject is created and the notificationId is assigned.
Parameters:
notificationId - the notification id; may be null; if not null, then record with notificationId, msgTypeId, transportId must not exist already.
transportOverride - the details about the transport to override; not null; transportName must be defined
Returns:
the notification Id; null notificationId was null and no transports overriden
Throws:
ECException

deleteTransportOverride

public static void deleteTransportOverride(java.lang.Long notificationId,
                                           java.lang.String transportName,
                                           java.lang.String msgTypeName)
                                    throws ECException
Delete a transport override entry from a notification object.
Parameters:
notificationId - the notification id
transportName - the transport name
msgTypeName - the msgTypeName
Throws:
ECException

updateTransportOverride

public static void updateTransportOverride(java.lang.Long notificationId,
TransportOverride transportOverride)
                                    throws ECException
Updates a transport override for a notification object. Behaviour is that if the attribute is defined, its value will be replaced. If it's value is not defined, it will be created. If the attribute is previously defined but not included with the new object, then it will remain unchanged.
Parameters:
notificationId - the notification id; not null
transportOverride - the transport override details; not null; transportid not null; attributes not null
Throws:
ECException

replaceTransportOverride

public static void replaceTransportOverride(java.lang.Long notificationId,
TransportOverride transportOverride)
                                     throws ECException
Replaces a transport override for a notification object.
Parameters:
notificationId - the notification id
transportOverride - the transport override details
Throws:
ECException