com.crystaldecisions.sdk.framework
Interface IEnterpriseSession


public interface IEnterpriseSession

IEnterpriseSession is created when a user logs on to the application. It provides access to user information and client-side security objects. It also provides access to services hosted on the CMS, including the InfoStore and the PSReportFactory services (see IEnterpriseSession.getServiceNames(java.lang.String, int), IEnterpriseSession.getService(String), and IEnterpriseSession.getService(String,String)).

Note: This object is serializable and can be used in environments that support fail-over. To ensure the object can be recreated in the event of an application server failure, use a session variable to persist the object across pages. The object can then be retrieved from the session variable from any server in the cluster.


Nested Class Summary
static interface IEnterpriseSession.CeEnterpriseVersion
          Constants for the BusinessObjects Enterprise Version
 
Field Summary
static int CE_APS_VERSION_850
          Deprecated. should use IEnterpriseSession.CeEnterpriseVersion.VERSION8_5 instead.
static int CE_SERVICE_ADMIN_SERVICES
           Return only administration services.
static int CE_SERVICE_ALL_SERVICES
           Return all available services.
 
Method Summary
 java.lang.String[] getActiveClusterMembers()
           Returns a list of active CMS machines in the cluster.
 java.lang.String getAPSName()
          Deprecated. should use IEnterpriseSession.getCMSName() instead.
 int getAPSVersion()
          Deprecated. should use IEnterpriseSession.getEnterpriseVersionEx() instead.
 IClusterInformation getClusterInformation()
          Retrieve information about the CMS cluster this session is connected to.
 java.lang.String[] getClusterMembers()
           Returns a list of CMS machines in the cluster.
 java.lang.String getClusterName()
           Name of the cluster to which the user is connected.
 java.lang.String getCMSName()
           Returns the name of the CMS machine to which a connection is currently made.
 java.util.Locale getEffectivePreferredViewingLocale()
           Returns the Effective Preferred Viewing Locale of the enterprise session.
 int getEnterpriseVersion()
          Deprecated. should use IEnterpriseSession.getEnterpriseVersionEx() instead
 EnterpriseVersion getEnterpriseVersionEx()
           Returns the version information of the BusinessObjects Enterprise system to which a connection is currently made.
 java.util.Locale getLocale()
           Returns the Product Locale used by the enterprise session.
 ILogonTokenMgr getLogonTokenMgr()
           Retrieves the LogonTokenMgr object.
 IPluginMgr getPluginManager()
           Retrieves the PluginManager object.
 ISecurityInfoMgr getSecurityInfoMgr()
           Retrieves the SecurityInfoMgr object.
 java.lang.String getSerializedSession()
           Returns a serialized session string.
 java.lang.String[] getServerNames()
           Returns a list of available servers.
 java.lang.Object getService(java.lang.String ServiceName)
           Returns an object to use a specific service exposed by the enterprise framework.
 java.lang.Object getService(java.lang.String ServerName, java.lang.String ServiceName)
           Returns an object to use a specific service exposed by a server.
 java.lang.String[] getServiceNames(java.lang.String ServerName, int type)
           Returns a list of available services on a particular server.
 java.lang.String getSessionCUID()
          Returns the session object CUID
 IProperties getSystemInfoProperties()
           Returns a list of properties that describe the capabilities of the system you have installed.
 java.util.Locale getSystemLocale()
           Returns the Preferred Viewing Locale used by the enterprise session.
 IUserInfo getUserInfo()
           Retrieves the UserInfo object, which has information about the user who created the session.
 boolean isUserDefaultLocale()
          Returns a boolean that determines whether the Locale is a userDefaultLocale.
 void logoff()
           Logs the user off this current session.
 void setLocale(java.util.Locale locale)
           Sets the Product Locale to be used by the enterprise session.
 void setSystemLocale(java.util.Locale value)
           Sets the Preferred Viewing Locale to be used by the enterprise session.
 void setUserDefaultLocale()
           Sets the current user's locale to the default locale.
 

Field Detail

CE_SERVICE_ALL_SERVICES

static final int CE_SERVICE_ALL_SERVICES

Return all available services.

See Also:
Constant Field Values

CE_SERVICE_ADMIN_SERVICES

static final int CE_SERVICE_ADMIN_SERVICES

Return only administration services.

See Also:
Constant Field Values

CE_APS_VERSION_850

static final int CE_APS_VERSION_850
Deprecated. should use IEnterpriseSession.CeEnterpriseVersion.VERSION8_5 instead.

CMS Version 8.5.

See Also:
Constant Field Values
Method Detail

getAPSName

java.lang.String getAPSName()
Deprecated. should use IEnterpriseSession.getCMSName() instead.

Returns the name of the CMS machine to which a connection is currently made.

Returns:
A String containing the CMS name.

getCMSName

java.lang.String getCMSName()

Returns the name of the CMS machine to which a connection is currently made.

Returns:
A String containing the CMS name.

getEnterpriseVersion

int getEnterpriseVersion()
                         throws SDKException
Deprecated. should use IEnterpriseSession.getEnterpriseVersionEx() instead

Returns the version number of the BusinessObjects Enterprise system to which a connection is currently made.

Returns:
An int containing the Enterprise version.
Throws:
SDKException

getEnterpriseVersionEx

EnterpriseVersion getEnterpriseVersionEx()
                                         throws SDKException

Returns the version information of the BusinessObjects Enterprise system to which a connection is currently made.

Returns:
A IEnterpriseSession.CeEnterpriseVersion object containing the Enterprise version.
Throws:
SDKException
Since:
4.2

getAPSVersion

int getAPSVersion()
                  throws SDKException
Deprecated. should use IEnterpriseSession.getEnterpriseVersionEx() instead.

Returns the version number of the CMS machine to which a connection is currently made.

Returns:
An int containing the CMS version.
Throws:
SDKException

getClusterMembers

java.lang.String[] getClusterMembers()
                                     throws SDKException

Returns a list of CMS machines in the cluster.

Returns:
An array of String objects containing the CMS machines in the cluster.
Throws:
SDKException

getActiveClusterMembers

java.lang.String[] getActiveClusterMembers()
                                           throws SDKException

Returns a list of active CMS machines in the cluster.

Returns:
An array of String objects containing the active CMS machines in the cluster.
Throws:
SDKException

getClusterName

java.lang.String getClusterName()

Name of the cluster to which the user is connected.

Returns:
A String containing the name of the cluster to which the user is connected.

getLogonTokenMgr

ILogonTokenMgr getLogonTokenMgr()
                                throws SDKException

Retrieves the LogonTokenMgr object.

Returns:
The ILogonTokenMgr object.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getPluginManager

IPluginMgr getPluginManager()
                            throws SDKException

Retrieves the PluginManager object.

Returns:
The IPluginMgr object.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getClusterInformation

IClusterInformation getClusterInformation()
                                          throws SDKException
Retrieve information about the CMS cluster this session is connected to.

Returns:
The IClusterInformationobject
Throws:
SDKException
Since:
14.1

getServerNames

java.lang.String[] getServerNames()
                                  throws SDKException

Returns a list of available servers.

Returns:
An array of String objects containing a list of available servers.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getServiceNames

java.lang.String[] getServiceNames(java.lang.String ServerName,
                                   int type)
                                   throws SDKException

Returns a list of available services on a particular server.

Parameters:
ServerName - A String containing the name of the server to retrieve the information from.
type - This value should be either 0 or 1. 0 denotes that all available services will be returned, while 1 denotes that only administrative services will be returned.
Returns:
An array of String objects containing a list of available services.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getService

java.lang.Object getService(java.lang.String ServerName,
                            java.lang.String ServiceName)
                            throws SDKException

Returns an object to use a specific service exposed by a server. If ServerName is empty, the current CMS will be used. This is currently implemented only for InfoStore service.

Parameters:
ServerName - A String specifying the name of the CMS server to connect to.
ServiceName - A String specifying the type of service to retrieve. Currently this can be "InfoStore", "ReportEngine", "WebiReportEngine", etc.
Returns:
An Object containing the requested service. For "InfoStore", this would be of type IInfoStore.
Throws:
SDKException - This is thrown if the process is unsuccessful.


getService

java.lang.Object getService(java.lang.String ServiceName)
                            throws SDKException

Returns an object to use a specific service exposed by the enterprise framework. The services that can be retrieved by this overload are the ones exposed by the CMS server or available as global services.

Parameters:
ServiceName - A String specifying the type of service to retrieve. Currently this can be "InfoStore", "ReportEngine", "WebiReportEngine", etc.
Returns:
An Object containing the requested service. For "InfoStore", this would be of type IInfoStore.
Throws:
SDKException - This is thrown if the process is unsuccessful.


getSystemInfoProperties

IProperties getSystemInfoProperties()
                                    throws SDKException

Returns a list of properties that describe the capabilities of the system you have installed.

Returns:
An IProperties object containing a list of properties that describe the capabilities of the system you have installed.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getUserInfo

IUserInfo getUserInfo()
                      throws SDKException

Retrieves the UserInfo object, which has information about the user who created the session.

Returns:
The IUserInfo object.
Throws:
SDKException - This is thrown if the process is unsuccessful.

logoff

void logoff()

Logs the user off this current session. This must be called once the session will no longer be used, otherwise, system resources will stay in use and the license use count on the CMS cluster will not be updated properly.


getSerializedSession

java.lang.String getSerializedSession()
                                      throws SDKException

Returns a serialized session string. String can create a reference to an existing user session without prompting the user for credentials. Does not create a new user session. Use with IEnterpriseSession ses = CrystalEnterprise.getSessionMgr().getSession(serializedSession);

For alternate methods of session management, see ILogonTokenMgr.

Returns:
a string of a serialized session.
Throws:
SDKException - This is thrown if the process is unsuccessful.

getSecurityInfoMgr

ISecurityInfoMgr getSecurityInfoMgr()
                                    throws SDKException

Retrieves the SecurityInfoMgr object.

Returns:
The ISecurityInfoMgr object.
Throws:
SDKException - This is thrown if the process is unsuccessful.

isUserDefaultLocale

boolean isUserDefaultLocale()
                            throws SDKException
Returns a boolean that determines whether the Locale is a userDefaultLocale.

Returns:
true if the current user's locale is the default locale, and false otherwise.
Throws:
SDKException - This is thrown if the process is unsuccessful.

setUserDefaultLocale

void setUserDefaultLocale()
                          throws SDKException

Sets the current user's locale to the default locale.

Throws:
SDKException - This is thrown if the process is unsuccessful.

getLocale

java.util.Locale getLocale()
                           throws SDKException

Returns the Product Locale used by the enterprise session.

Returns:
The Product Locale used by the enterprise session.
Throws:
SDKException - Indicates that the operation was unsuccessful.

getSystemLocale

java.util.Locale getSystemLocale()
                                 throws SDKException

Returns the Preferred Viewing Locale used by the enterprise session.

Returns:
The Preferred Viewing Locale used by the enterprise session.
Throws:
SDKException - Indicates that the operation was unsuccessful.

setLocale

void setLocale(java.util.Locale locale)
               throws SDKException

Sets the Product Locale to be used by the enterprise session.

Parameters:
locale - The Product Locale to be used by the enterprise session.
Throws:
SDKException - Indicates that the operation was unsuccessful.

setSystemLocale

void setSystemLocale(java.util.Locale value)
                     throws SDKException

Sets the Preferred Viewing Locale to be used by the enterprise session.

Parameters:
locale - The Preferred Viewing Locale to be used by the enterprise session.
Throws:
SDKException - Indicates that the operation was unsuccessful.

getEffectivePreferredViewingLocale

java.util.Locale getEffectivePreferredViewingLocale()
                                                    throws SDKException

Returns the Effective Preferred Viewing Locale of the enterprise session.
Usage:
Check the userinfo for the Preferred Viewing Locale.
If found, the Preferred Viewing Locale is returned.
If not found, check the enterprise session Preferred Viewing Locale.
If found, the Preferred Viewing Locale is returned.
If the returned value is null, the Product Locale will be returned

Returns:
The Locale is the Effective Preferred Viewing Locale of the enterprise session.
Throws:
SDKException - Indicates that the operation was unsuccessful.

getSessionCUID

java.lang.String getSessionCUID()
                                throws SDKException
Returns the session object CUID

Returns:
the sesion object CUID
Throws:
SDKException