SC Service Provider
API
The SC Service Provider API consists of a set of classes and interfaces that can be used by an SC Service Connector to interact with SCF.
Class / Interface |
Description |
SCServiceConnector |
This interface declares the main methods that SCF can call on an SC Service Connector. |
AbstractSCServiceConnector |
This abstract class defines some additional methods that are used for connector initialization and also some methods that allow the connector to communicate with SCF. Since this class extends AbstractPortalComponent it can receive http requests, which can be used by a connector to receive callbacks from an SC Provider Application. |
SCFException |
An SC Service Connector can use this class for signaling problems in its operation. |
SCSession |
SC Session class encapsulates the data necessary to conduct a synchronous collaboration session and to maintain its state. |
ProviderSession |
Used by an SC Service Connector to communicate to SCF about SC Session data an SC Provider Application is aware of. This interface exposes all relevant data needed by an SC Service Connector to prepare, schedule, start, and join an SC Session. |
UserInfo |
Exposes all relevant user data needed by an SC Service Connector for authenticating a user with an SC Provider Application. SCF manages users on behalf of the connectors. All methods on the SCServiceConnector interface contain the UserInfo class, which is the user information necessary for the connector to authenticate the user with its provider. |
In order to develop an SC Service Connector one needs to develop a portal component that contains a class, which extends AbstractSCServiceConnector class.
AbstractSCServiceConnector class implements SCServiceConnector interface and declares some methods of its own. Here are the descriptions of the methods that an SC Service Connector needs to implement.
Methods |
Description |
setupSCSession(ProviderSession, UserInfo, IPortalComponentRequest) |
This method is called by the SCF in the process of setting up (scheduling or preparing) an SC Session. The connector can use this method to schedule the session with the SC Service Provider. (Optionally, an SC Service connector can provide and empty implementation for this method) |
updateSCSession(String, ProviderSession, UserInfo, IPortalComponentRequest) |
This method is called by the SCF in the process of modifying a scheduled SC Session. The connector can use this method to notify an SC Service Provider of scheduling changes. (Optionally, an SC Service connector can provide and empty implementation for this method) |
|
This method is called by the SCF in the process of canceling a scheduled SC Session. The connector can use this method to notify the SC Service Provider that the session has been canceled. (Optionally, an SC Service connector can provide and empty implementation for this method) |
|
This method is called by the SCF in the process of starting or joining an SC Session. |
Methods |
Description |
doContent(IPortalComponentRequest, IPortalComponentResponse) |
This method is similar to service(ServletRequest, ServletResponse) method of javax.Servlet class. It is called when an http request to the connector component is made. It can be used to implement SC Service Provider to SC Service connector communication. |
commit(ProviderSession, IPortalComponentRequest) |
This method saves the provider session data in SCF Repository. |
GetProviderSession() |
This method retrieves the provider session from the SCF Repository. |
SetProviderProperties(String, String)
|
Used by SCF to set provider name and provider url. Connector itself does not use it. |
GetProviderName()
|
Returns name of the provider. This method is used by SCF. |
GetProviderUrl()
|
Returns the url of the provider. This method is used by SCF. |
getSCServiceTypeDisplayName(String key, IPortalComponentRequest arg1) |
Return the service type name for a key passed. This method should be implemented by the connector. |
Some Service Providers only allow host to start the session. The following methods can be used to determine if the user can start or join a session.
Methods |
Description |
userIsAHost(ProviderSession, IPortalComponentRequest) |
This method is used to find out if the user is a host and returns a Boolean value. |
userIsAParticipant(ProviderSession, IportalComponentRequest) |
This method is used to find out if the user is a participant and returns a Boolean value. |

Above two methods can call the following method to get logged in user.
IUser user = (com.sap.security.api.IUser)request.getUser(); |
Moreover, list of participants and hosts can be had from ProviderSession object. Id of the logged in user can besearched in the list of hosts or list of participants.
The SC Service Connectors use the ProviderSession interface for setup data, start data and to report state information to a SCSession instance.

The Service Provider server needs to call its connector at the time of successful start of meeting and at the end of meeting to let SCF know about these two times . Please note that you will need to call commit() after setting attributes to ProviderSession, but only if the code is in doContent() method. Next section explains setting up the end time.
protected void doContent(IPortalComponentRequest request, IPortalComponentResponse response) { ProviderSession providerSession = (ProviderSession) session.getAttribute(“providerSession”); // this parameter (service providers identifier) is set by the connector at session start.
String action= request.getParameter(“action”); String scSessionId= request.getParameter(“scSessionId”); String providerSessionId= request.getParameter(“providerSessionId”); //to be set by the service provider … … if (action.equals(“sessionstart”) // just to illustrate, the connector needs to use its own parameters { providerSession = getSCFRepository().getProviderSession(scSessionId, request); providerSession.setProviderSessionId(providerSessionId); providerSession.setTimeSessionStarted(new Date()); commit(providerSession, request); actionUrl = getStartMeetingUrl(request, providerSessionId, scSessionId); request.getServletResponse(true).sendRedirect(actionUrl);
} if (action.equals(“sessionend”) //just to illustrate {
providerSession.setTimeSessionEnded(new Date()); commit(providerSession, request);
//close the window, do clean up… }
… …
}
|
Type of operation |
Description |
Setup Data |
The setup data is used to provide the SC Service Connector with the information necessary to setup a session. One of the properties available to the SC Service Connector through this interface is SCServiceTypeId. This property allows a connector to provide more than one service type. For example, RTC provides chat and application sharing services. If the value for SCServiceTypeId is application sharing, the RTC Connector would setup an application sharing session. If the value is chat, it can setup a chat session. Please refer to the SCF Javadocs for details on this interface. |
Start Data |
|
State Data |
The properties that make up the state data are used to keep state information about an SC Session once it has been setup. The ProviderSession interface has setters for the following properties: ·
timeSessionStarted ·
timeSessionEnded ·
providerSessionId |
The connector implementation may require its own URL to pass on to the service provider so that the service provider may call back the connector. Here is how the URL can be constructed:
protected String calculateCallbackURL( ProviderSession session, IPortalComponentRequest request) { String callbackURL = getFullComponentUrl(request, getProviderComponentName(request)); // Append action parameters to callback URL. // These are later parsed in doContent callbackURL = callbackURL + "?action=" //connector specific parameter(s) + END_SESSION + "&sessionid=" + session.getSCSessionId(); return callbackURL; } |
