com.highdeal.notification
Class Notification

java.lang.Object
  extended by com.highdeal.notification.InternalNotification
      extended by com.highdeal.notification.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:

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:
NotificationDescription, NotificationServiceClient, NotificationHandler, Transaction, PurchaseOrder, AsyncStatefulServiceClient, StatefulServiceClient

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 related notification description information -->
   </xs:complexType>
 </xs:element>
 
 <xs:complexType name="arg">
   <xs:attribute name="name" type="xs:string"/>  <!-- Defined by related notification description information -->
   <xs:attribute name="value" type="xs:anySimpleType"/>
 </xs:complexType>


Nested Class Summary
 
Nested classes/interfaces inherited from class com.highdeal.notification.InternalNotification
InternalNotification.ArgListType, InternalNotification.ArgType
 
Field Summary
static java.lang.String TAG_NAME
          The XML tag of the object.
 
Constructor Summary
Notification()
          Empty constructor
Notification(java.lang.String systemName, java.lang.String instanceId, long timestamp, NotificationDescription desc, java.lang.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.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 java.lang.String[] getArgs()
          Returns the arguments of this notification
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 
Methods inherited from class com.highdeal.notification.InternalNotification
getArgTypes, getArgValues, getDesc, getInstanceId, getSystemName, getTimestamp, setArgTypes, setArgValues, setDesc, setInstanceId, setSystemName, setTimestamp, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
The XML tag of the object.

See Also:
Constant Field Values
Constructor Detail

Notification

public Notification()
Empty constructor


Notification

public Notification(java.lang.String systemName,
                    java.lang.String instanceId,
                    long timestamp,
                    NotificationDescription desc,
                    java.lang.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:
java.lang.AssertionError - If desc is null
Method Detail

getArgs

public java.lang.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(java.lang.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(java.lang.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

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)