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:
unique ID and a predefined description related to 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.
NotificationDescription,
NotificationServiceClient,
NotificationHandler,
Transaction,
PurchaseOrder,
AsyncStatefulServiceClient,
StatefulServiceClientThe 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>
InternalNotification.ArgListType, InternalNotification.ArgType| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TAG_NAME
The XML tag of the object.
|
| Constructor and Description |
|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
getArgTypes, getArgValues, getDesc, getInstanceId, getSystemName, getTimestamp, setArgTypes, setArgValues, setDesc, setInstanceId, setSystemName, setTimestamp, toStringpublic static final java.lang.String TAG_NAME
public Notification()
public Notification(java.lang.String systemName,
java.lang.String instanceId,
long timestamp,
NotificationDescription desc,
java.lang.String... args)
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.systemName - The SAP System ID (SID) of the SAP CC Core Server system that sends the notificationinstanceId - The identifier of the system instance (e.g. rater#1) that sends the notificationtimestamp - Date and time of the related event signaled by the notificationdesc - The predefined description of the notificationargs - 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())java.lang.AssertionError - If desc is nullpublic java.lang.String[] getArgs()
public void setAttributes(XMLAttributes atts)
XMLMarshallablesetAttributes in interface XMLMarshallableatts - The XML attributes of the current elementpublic void addChild(java.lang.String tagName,
XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.addChild in interface XMLMarshallabletagName - The name of tag for the childchild - The child to be addedpublic void addCharacterData(java.lang.String cData)
XMLMarshallableaddCharacterData in interface XMLMarshallablecData - The character data to be addedpublic void marshal(XMLOutputter output)
XMLMarshallablemarshal in interface XMLMarshallableoutput - The XML output to marshal the object into