com.ibm.mashups.iwidget
Interface IEventDescription


public IEventDescription

It contains various pieces of information describing an event.


Field Summary
 String alias
           The alias of the event.
 String name
           The name of the event.
 String type
           The type of any payload.
 String handlingFn
           This provides the name of a callback function with the following signature and no return value.
 String lang
           This provides the default language of all the localized attributes within this event description.
 Boolean isHandled
           This indicates if an event is a handled event or not.
 Boolean isPublished
           This indicates if an event is a published event or not.
 
Constructor Summary
constructor()
           
 
Method Summary
 String getDescription(String locale)
          Deprecated.  please use getAttribute("description",locale) instead
 String getAttribute(String attributeName, String locale)
           This method returns the asking value of an attribute of the event description.
 IEventDescription setAttribute(String attributeName, String attributeValue, String locale)
           The method set the value for a given event description attribute.It returns a handle of this eventdescription, return null upon failure.
 

Field Detail

alias

String alias
The alias of the event.


name

String name
The name of the event.


type

String type
The type of any payload. If this is set to null, no information is being provided.


handlingFn

String handlingFn
This provides the name of a callback function with the following signature and no return value.       function(ievent)


lang

String lang
This provides the default language of all the localized attributes within this event description.


isHandled

Boolean isHandled
This indicates if an event is a handled event or not. Default value is false.


isPublished

Boolean isPublished
This indicates if an event is a published event or not. Default value is false.

Constructor Detail

constructor

public constructor()
Method Detail

getDescription

String getDescription(String locale)
Deprecated.  please use getAttribute("description",locale) instead

it returns a user-oriented description (markup allowed) of the event in the requested locale. If no locale is supplied, the default locale of the iWidget is used (with "en" being the default iWidget locale). The description is likely to be displayed when a user is wiring event flow between iWidgets.

Parameters:
locale - required locale. Can be NULL. If no locale is supplied, the default locale of the iWidget is used (with "en" being the default iWidget locale).
Returns:
Return the description of a given locale,if no locale is provided, then the default locale of the iWidget is used.
Since:
Deprecated since Version 2.0

getAttribute

String getAttribute(String attributeName,
                    String locale)
This method returns the asking value of an attribute of the event description. Each event description should have title and description . Normally title and description should be globalized, default locale should be specified by using the iso language code, if missing, the value for the default locale will be en.

Parameters:
attributeName - name of attribute. Can Not be NULL.
locale - required locale. Can be NULL. If no locale is supplied, the default locale of the iWidget is used (with "en" being the default iWidget locale).
Returns:
Return the value of the required attribute,if locale is provided, it returns locale specific value.

setAttribute

IEventDescription setAttribute(String attributeName,
                               String attributeValue,
                               String locale)
The method set the value for a given event description attribute.It returns a handle of this eventdescription, return null upon failure. If the locale parameter is absent, then the given attribute won't be locale specific.

Parameters:
attributeName - name of attribute. Can Not be NULL.
attributeValue - value of attribute. Can Not be NULL.
locale - optional, locale. Can be NULL.
Returns:
return a handle of this eventdescription, return null upon failure..


Copyright IBM Corp. 2010 All Rights Reserved.