com.ibm.mashups.enabler.widget
Interface EventProvider


public EventProvider

Interface for a widget event provider.

Since:
2.4

Method Summary
 Event[] getEvents(JSON filter)
           Returns an array of wigdet events, never null.
 Event getEvent(String name)
           Returns the event identified by name or null if the event doesn't exist in this provider.
 Event getEventByID(Identifiable id)
           Returns the event identified by id or null if the event doesn't exist in this provider.
 

Method Detail

getEvents

Event[] getEvents(JSON filter)
Returns an array of wigdet events, never null.

Parameters:
filter - filter to limit the result to handled or published events; optional, must not be null. Accepted names are:
  FILTER_HANDLED_EVENTS, as defined in  Constants ; must be true to have handled events returned.
  FILTER_PUBLISHED_EVENTS, as defined in  Constants ; must be true to have published events returned.
If no filter is set, both handled and published events are returned.

For example, use the following code to get only the handled events:
  var filter = { };
  filter[com.ibm.mashups.enabler.widget.Constants.FILTER_HANDLED_EVENTS] = true;
  getEvents(filter);

Note: Modifying the array does not change the widget events.
Returns:
widget events

getEvent

Event getEvent(String name)
Returns the event identified by name or null if the event doesn't exist in this provider.

Parameters:
name - the name of the Event .
Returns:
the event identified by name or null.

getEventByID

Event getEventByID(Identifiable id)
Returns the event identified by id or null if the event doesn't exist in this provider.

Parameters:
id - identifiable or string id of the  Event .
Returns:
the event or null.


Copyright IBM Corp. 2010 All Rights Reserved.