Package com.crystaldecisions.sdk.framework

This package implements the highest object model that branches off to the individual library implementations.

See:
          Description

Interface Summary
CeEnterpriseContext This interface specifies the system properties that BusinessObjects Enterprise expects to be set.
IEnterpriseSession IEnterpriseSession is the first object to be acquired.
IEnterpriseSession.CeEnterpriseVersion Constants for the BusinessObjects Enterprise Version
ISessionMgr This is the basic, top level client side object.
 

Class Summary
CrystalEnterprise The CrystalEnterprise class is the starting point for BusinessObjects Enterprise.
 

Package com.crystaldecisions.sdk.framework Description

This package implements the highest object model that branches off to the individual library implementations. It also contains the client-side security proxy code to deal with the CMS. This package is hierarchically the highest-level package in the BusinessObjects Enterprise SDK. It provides you with the primary entry point into BusinessObjects Enterprise. The CrystalEnterprise class is the starting point, allowing you to get a session and log on to the system.

All the methods throw an exception if they fail. See com.crystaldecisions.sdk.exception for a list of errors and their descriptions.

View the Object Model Diagram.

Note: The only object that can be created dynamically is the ISessionMgr. This is done through calling the CrystalEnterprise object's static method getSessionMgr(). All other objects must be accessed through another object's methods or properties. In other words, the ISessionMgr is the source from which all other objects are eventually created.

Logging on and retrieving an Enterprise session

Before anything can be done within BusinessObjects Enterprise, you must first log on and retrieve an Enterprise session. The following example demonstrates how to log on to an CMS using preset properties using the secEnterprise authentication method:

  1. Set the user name and password for the Administrator account. This uses the default values that were created when BusinessObjects Enterprise was installed.
        String user = "Administrator";
        String password = "";
        
  2. Set the name of the CMS to log on to.
        String cmsName = "CMS";
        
  3. Set the authentication method to be used and initialize a variable to store any exceptions thrown.
        String cmsAuthType = "secEnterprise";    
        SDKException failure = null;   
    	
  4. Log on to the CMS using the specified values. If the logon is successful, the Enterprise session will be retrieved.
        try
        {
            es = CrystalEnterprise.getSessionMgr().logon(
                    user,
                    password,
                    cmsName,
                    cmsAuthType);
        }
    	
  5. Catch the exception thrown if the logon process failed.
        catch (SDKException error)
        {
            failure = error;
        }
        
  6. Display an error message if the logon failed.
        if (failure != null)
        {        
            out.println(failure);
        }
    	
  7. Otherwise, if the logon was successful, set the enterprise session so that it can be retrieved later.
        else
        {
            session.setAttribute("CE_Session", es);
        }
        
  8. Retrieve the InfoStore from the Enterprise session.
        IInfoStore iStore = (IInfoStore) es.getService("", "InfoStore"); 
    	

Related Documentation