Package com.highdeal.notification
Class Notification
java.lang.Object
com.highdeal.notification.InternalNotification
com.highdeal.notification.Notification
- All Implemented Interfaces:
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 descriptionrelated 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>
-
Nested Class Summary
Nested classes/interfaces inherited from class com.highdeal.notification.InternalNotification
InternalNotification.ArgListType, InternalNotification.ArgType -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructorNotification(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, apredefined descriptionof what happened and a list of arguments to provide specific complementary information about the event. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.String[]getArgs()Returns the arguments of this notificationvoidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidsetAttributes(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
-
Field Details
-
TAG_NAME
The XML tag of the object.- See Also:
-
-
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, apredefined descriptionof 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 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 (seeNotificationDescription.getAdditionalInfoKeys())- Throws:
AssertionError- If desc is null
-
-
Method Details
-
getArgs
Returns the arguments of this notification- Returns:
- An array of string that can be empty but not null
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-