com.sapportals.wcm.service.ice

Class EventLog

java.lang.Object
  extended by com.sapportals.wcm.service.ice.EventLog
All Implemented Interfaces:
IDOMStorable

public class EventLog
extends Object
implements IDOMStorable

Represent a log of ICE events that are associated with certain actions like requesting a catalog of offers or establishing subscriptions.

The log contains zero or more ICE events which can be of type ICEEventMsg or ICEEventInfo. The event log can be stored into or read from a DOM. Thus, it is possible to store the log persistenly to a file or read it from that file. Copyright (c) SAP AG

See Also:
ICEEvents

Constructor Summary
EventLog()
          Creates a new (empty) event log.
EventLog(Document document)
          Creates a new event log and initializes it with the ICE events stored in the specified DOM document.
 
Method Summary
 void addEvent(ICEEventInfo event)
          Adds an event to the event log.
 void addEvent(ICEEventMsg event)
          Adds an event to the event log.
 void addEvents(Document document)
          Adds ICE events specified in a DOM document to this event log.
 Collection getEvents()
          Gets all ICE events in the event log.
 ICEEventLog getICEEventLog()
          Gets an ICEEventLog representation of this event log for sending to another ICE server.
 Node store(Document document)
          Stores this event log into the specified DOM document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventLog

public EventLog()
Creates a new (empty) event log.


EventLog

public EventLog(Document document)
Creates a new event log and initializes it with the ICE events stored in the specified DOM document. Passing null as an argument for document will cause an exception.

Parameters:
document - the DOM document containing the events to read in
Method Detail

getEvents

public Collection getEvents()
Gets all ICE events in the event log.

Returns:
a Collection containing all events (objects of type ICEEventMsg, ICEEventInfo or mixed)

getICEEventLog

public ICEEventLog getICEEventLog()
Gets an ICEEventLog representation of this event log for sending to another ICE server.

Returns:
an ICEEventLog representing this event log

addEvents

public void addEvents(Document document)
Adds ICE events specified in a DOM document to this event log. Passing null as an argument for document will cause an exception.

Parameters:
document - the DOM document containing the events (objects of type ICEEventMsg, ICEEventInfo or mixed)

addEvent

public void addEvent(ICEEventMsg event)
Adds an event to the event log. Passing null as an argument for event will cause an exception.

Parameters:
event - an ICEEventMsg event that should be added to the event log

addEvent

public void addEvent(ICEEventInfo event)
Adds an event to the event log. Passing null as an argument for event will cause an exception.

Parameters:
event - an ICEEventInfo event that should be added to the event log

store

public Node store(Document document)
Stores this event log into the specified DOM document.

This method will create an event-log node on the root level and add all events as child nodes. The document need not be empty when calling this method. Passing null as an argument for will cause an exception.

Specified by:
store in interface IDOMStorable
Parameters:
document - the DOM document to store this event log to
Returns:
the event-log node created on the root level of the DOM document and containing all ICE events as child nodes
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice