com.ibm.commerce.messaging.notification

Class NotificationConfigurationHelper

  • java.lang.Object
    • com.ibm.commerce.messaging.notification.NotificationConfigurationHelper


  • public class NotificationConfigurationHelper
    extends java.lang.Object
    This class handles order-related notifications. The methods are all static.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright field
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.Long addTransportOverride(java.lang.Long notificationId, TransportOverride transportOverride)
      This method adds a TransportOverride to a Notification object.
      static java.lang.Long createNotificationObject(TransportOverride[] transportOverrides)
      This method creates a new notification object.
      static void deleteNotificationObject(java.lang.Long notificationId)
      This method deletes a notification object by the notification identifier.
      static void deleteTransportOverride(java.lang.Long notificationId, java.lang.String transportName, java.lang.String msgTypeName)
      This method deletes a TransportOverride entry from a notification object.
      static TypedProperty getAttributesForTransport(java.lang.String transportName)
      This method returns the names of over-rideable attributes for a particular transport.
      static Notification getNotificationObject(java.lang.Long notificationId)
      This method gets the notification object by the notification identifier.
      static java.lang.String[] getTransportsForMsgTypeName(java.lang.String msgTypeName, java.lang.Integer storeId)
      This method returns the transports supported for this message type.
      static void replaceTransportOverride(java.lang.Long notificationId, TransportOverride transportOverride)
      This method replaces a TransportOverride for a notification object.
      static void updateTransportOverride(java.lang.Long notificationId, TransportOverride transportOverride)
      This method updates the TransportOverride for a notification object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        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
        This method returns the transports supported for this message type. Values are fetched from the PROFILES table.
        Parameters:
        msgTypeName - the name of the message type; not null
        storeId - the ID of the store; not null
        Returns:
        an array containing the transport names supported for this message type; null if none found or if msgTypeName or storeId is undefined
        Throws:
        ECException - Raised when there is an error retrieving a profile based on the msgTypeName and storeId.
      • getAttributesForTransport

        public static TypedProperty getAttributesForTransport(java.lang.String transportName)
                                                       throws ECException
        This method returns the names of over-rideable attributes for a particular transport. Attribute names are based the WebSphere Commerce instance file.
        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
        This method creates a new notification object. Note that the notificationId will be ignored if it is set.
        Parameters:
        notificationValueObject - notification value object; must not be null.
        Returns:
        notification identifier; null if invalid input parameters
        Throws:
        ECException
      • getNotificationObject

        public static Notification getNotificationObject(java.lang.Long notificationId)
                                                  throws ECException
        This method gets the notification object by the notification identifier.
        Parameters:
        notificationId - notification identifier; not null
        Returns:
        notification value object; null if no notification object found
        Throws:
        ECException - Raised if the notification object is not found with the notificationID.
      • deleteNotificationObject

        public static void deleteNotificationObject(java.lang.Long notificationId)
                                             throws ECException
        This method deletes a notification object by the notification identifier.
        Parameters:
        notificationId - the notification identifier; if null, no action is taken.
        Throws:
        ECException - Raised if an error occurs while trying to delete the notification object.
      • addTransportOverride

        public static java.lang.Long addTransportOverride(java.lang.Long notificationId,
                                                          TransportOverride transportOverride)
                                                   throws ECException
        This method adds a TransportOverride to a Notification object. If the notification identifier is null, a new Notification object is created and the notification identifier is assigned.
        Parameters:
        notificationId - the notification identifier which may be null. If it is not null, the record with notificationId, msgTypeId, transportId must not already exist.
        transportOverride - the details about the transport to override; not null; transportName must be defined
        Returns:
        the notification identifier. It is null if the notificationId is null and no transports are overridden.
        Throws:
        ECException
      • deleteTransportOverride

        public static void deleteTransportOverride(java.lang.Long notificationId,
                                                   java.lang.String transportName,
                                                   java.lang.String msgTypeName)
                                            throws ECException
        This method deletes a TransportOverride entry from a notification object.
        Parameters:
        notificationId - the notification identifier
        transportName - the transport name
        msgTypeName - the message type name
        Throws:
        ECException
      • updateTransportOverride

        public static void updateTransportOverride(java.lang.Long notificationId,
                                                   TransportOverride transportOverride)
                                            throws ECException
        This method updates the TransportOverride for a notification object. The behaviour is that if the attribute is defined, its value will be replaced. If this value is not defined, it will be created. If the attribute is previously defined but not included with the new object, it will remain unchanged.
        Parameters:
        notificationId - the notification identifier; not null
        transportOverride - the overriding transport details which cannot be null; the transport ID of the transport name cannot be null; the attributes cannot be null
        Throws:
        ECException
      • replaceTransportOverride

        public static void replaceTransportOverride(java.lang.Long notificationId,
                                                    TransportOverride transportOverride)
                                             throws ECException
        This method replaces a TransportOverride for a notification object.
        Parameters:
        notificationId - the notification identifier
        transportOverride - the overriding transport details
        Throws:
        ECException