com.sap.sl.sdk.framework.cms
Interface CmsSessionService


public interface CmsSessionService

Provides a session access to the other services.

The service does not own the session. The SlContext.close() method does not close the session.

The following code can be used to create an enterprise session:
 String user = "";
 String password = "";
 String server = "myCms:6400";
 String authentication = "secEnterprise";
 
 IEnterpriseSession session = CrystalEnterprise.getSessionMgr().logon(user, password, server, authentication);
 SlContext context = SlContext.create();
 context.getService(CmsSessionService.class).setSession(session);
 
             ...
 
 context.close();
 session.logoff();
 

See Also:
SlContext

Method Summary
 com.crystaldecisions.sdk.framework.IEnterpriseSession getSession()
          Returns the session.
 void setSession(com.crystaldecisions.sdk.framework.IEnterpriseSession session)
          Sets a session.
 

Method Detail

getSession

com.crystaldecisions.sdk.framework.IEnterpriseSession getSession()
Returns the session.

If the context is not attached to the session, the method returns null.

Returns:
An IEnterpriseSession object

setSession

void setSession(com.crystaldecisions.sdk.framework.IEnterpriseSession session)
Sets a session.

The session can only be set once. A second method call throws an exception.

Parameters:
session - The session, which cannot be null


© Copyright 2016 SAP SE or an SAP affiliate company. All rights reserved.