Class Notification

All Implemented Interfaces:
XMLMarshallable

public class Notification extends InternalNotification implements XMLMarshallable

This class represents a notification sent by the SAP CC system.

A notification message relates to an event exceptional or not that took place in an instance of the SAP CC system and that must be handled by a mediation system (from the generated rated transactions included in the answers of the charging operation requests) or by another external system or application (by implementing a notification handler).

A notification informs about where, when and what happened. It includes:

  • The location of the related event:
    • SID of the SAP CC system
    • ID of the system instance
  • The date and time of the event
  • A unique ID and a predefined description related to the event
  • Complementary information about the event

Tip

Even if the notifications are not transmitted via the HCI technical interface, you can marshall the received notifications to convert them to XML fragments.

See Also:

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="notification">
   <xs:complexType>
     <xs:sequence>
       <xs:element name="arg" type="arg" minOccurs="0" maxOccurs="unbounded"/>
     </xs:sequence>
     <xs:attribute name="systemName" type="xs:string"/>
     <xs:attribute name="instanceId" type="xs:string"/>
     <xs:attribute name="timestamp" type="xs:long"/>
     <xs:attribute name="descUid" type="xs:string"/>  <!-- Class and predefined description of the notification -->
     <xs:attribute name="name" type="xs:string"/>  <!-- Copied from related notification description information -->
     <xs:attribute name="prettyName" type="xs:string"/>  <!-- Copied from related notification description information -->
     <xs:attribute name="severityLevel" type="xs:string"/>  <!-- Copied from {@link NotificationDescription related notification description information} -->
   </xs:complexType>
 </xs:element>
 
 <xs:complexType name="arg">
   <xs:attribute name="name" type="xs:string"/>  <!-- Defined by {@link NotificationDescription related notification description information} -->
   <xs:attribute name="value" type="xs:anySimpleType"/>
 </xs:complexType>

  • Field Details

  • Constructor Details

    • Notification

      public Notification()
      Empty constructor
    • Notification

      public Notification(String systemName, String instanceId, long timestamp, NotificationDescription desc, String... args)
      Initializes a notification with the identifier of the system instance where the event took place, the date when it occurred, a predefined description of what happened and a list of arguments to provide specific complementary information about the event. The list of arguments is specified by the predefined description.
      Parameters:
      systemName - The SAP System ID (SID) of the SAP CC Core Server system that sends the notification
      instanceId - The identifier of the system instance (e.g. rater#1) that sends the notification
      timestamp - Date and time of the related event signaled by the notification
      desc - The predefined description of the notification
      args - Specific arguments about the event (is optional and can be null); If is null, the argument list of this notification will be empty but not null. The list of expected arguments depends on the specification of the predefined description (see NotificationDescription.getAdditionalInfoKeys())
      Throws:
      AssertionError - If desc is null
  • Method Details

    • getArgs

      public String[] getArgs()
      Returns the arguments of this notification
      Returns:
      An array of string that can be empty but not null
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Specified by:
      setAttributes in interface XMLMarshallable
      Parameters:
      atts - The XML attributes of the current element
    • addChild

      public void addChild(String tagName, XMLMarshallable child)
      Description copied from interface: XMLMarshallable
      Adds a child to the object, the child representing the marshallable object which must be added to the element.
      Specified by:
      addChild in interface XMLMarshallable
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Specified by:
      addCharacterData in interface XMLMarshallable
      Parameters:
      cData - The character data to be added
    • marshal

      public void marshal(XMLOutputter output)
      Description copied from interface: XMLMarshallable
      Gives an XML representation of this object, including its children.
      Specified by:
      marshal in interface XMLMarshallable
      Parameters:
      output - The XML output to marshal the object into