com.ibm.mashups.services
Interface ServiceManager


public ServiceManager

This interface manages services that are provided to the system, i.e. to iWidgets and other components.
It provides capability to access Services in Lotus Mashups.
By default EventService and ConfigService are provided.
Page components are able to use event services by using following api:

var eventService = com.ibm.mashups.services.ServiceManager.getService(
    com.ibm.mashups.iwidget.services.EventService.SERVICE_NAME);

Configuration of services:
This section describes how each service is configured and how additional services can be added.

Through the ConfigService.properties one can define an additional property named "additionalServices" defining additional services besides EventService and ConfigService.

Each entry should have the following format.

"name": service name.
"path": url that point to the service js file.
"baseClass": the class that implements the service. one instance of this class will be generated.

Example:
   additionalServices = [
    { "name":"SecurityService",
     "path":"/mum/js/com/ibm/enabler/iw/securityservices.js",
     "baseClass":"com.ibm.mm.iwidget.services.SecurityService"}
   ]


Method Summary
 Object getService(String serviceName)
           This interface allow page components to get the required service.
 

Method Detail

getService

Object getService(String serviceName)
This interface allow page components to get the required service.

Parameters:
serviceName - required service name that's used to uniquely identify a service .
Returns:
an instance of required service. NULL if configured incorrectly.


Copyright IBM Corp. 2010 All Rights Reserved.