Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


oracle.dss.appmodule.client
Class BISession

java.lang.Object
  |
  +--oracle.dss.appmodule.client.BISession
All Implemented Interfaces:
ErrorHandlerCallback
Direct Known Subclasses:
oracle.dss.addins.thin.common.BaseThinSession

public class BISession
extends java.lang.Object
implements ErrorHandlerCallback

The BISession bean class. Every BI Beans program must instantiate a BISession. The BISession creates an application module and connects to it.

The BISession also keeps track of user information. The BISession can read an XML configuration file that contains information such as deployment information and user information.

To use the BISession, you instantiate the BISession and call its connect method.

As a Java bean, BISession exposes its properties so that you can see and set them in a Java Development Environment.


Constructor Summary
BISession()
          Constructor.
BISession(java.lang.String configXML)
          Constructor that specifies the name of the configuration file.
BISession(java.lang.String configXML, java.lang.Class configLoader)
          Constructor that specifies the name of the configuration file a class loader to load the configuration file.

 

Method Summary
 void addErrorHandler(ErrorHandler handler)
          Adds a single error handler to this BISession.
 void connect()
          Creates an application module and connects to it.
 void disconnect()
          Disconnects the application module.
 BIUser getBIUser()
          Retrieves the application user for this session.
 java.lang.String getConfigFileName()
          Retrieves the name of the configuration file that contains information about the properties of this session, the application user, and the security configuration entries.
 int getDebugMode()
          Retrieve the debug mode specified in the configuration file.
 ErrorHandler getErrorHandler()
          Retrieves the error handler from this BISession.
 java.util.Locale getLocale()
          Retrieves the locale used by this BISession.
 ManagerFactory getManagerFactory()
          Creates and returns a ManagerFactory that uses information from the configuration file.
 ManagerFactory getManagerFactory(javax.naming.directory.InitialDirContext initPM)
          Retrieves a ManagerFactory that uses information stored from a JNDI source.
 java.lang.Object getProperty(java.lang.String name)
          Retrieves the value of a property in the session object.
 boolean isConfigFileSpecified()
          Indicates whether a configuration file has been specified.
 void removeErrorHandler()
          Removes a customized error handler for this BISession.
 void removeProperty(java.lang.String name)
          Removes a property from the session object.
 void setAuthenticationProvider(java.lang.String level, java.lang.String className, boolean required)
          Specifies an authentication provider for this BISession.
 void setBIUser(BIUser user)
          Specifies the application user for this session.
 void setConfigFileName(java.lang.String configFile)
          Specifies the configuration file that contains information about the properties of this session, the application user, and the security configuration entries.
 void setConnectionProvider(java.lang.String level, java.lang.String className, boolean required)
          Specifies a connection provider for this BISession.
 void setLocale(java.util.Locale locale)
          Specifies the locale to use by this BISession.
 void setProperty(java.lang.String name, java.lang.Object value)
          Specifies additional properties of this session object.
 void setSecurityConfigEntries(java.util.Vector entries)
          Deprecated. As of 2.7
 void setSecurityConfigFileName(java.lang.String fileName)
          Deprecated. As of 2.7
 void setUserCommunityProvider(java.lang.String level, java.lang.String className, boolean required)
          Specifies a user community provider for this BISession.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

BISession

public BISession()
Constructor. Call the setConfigFileName to specify a configuration file.
See Also:
setConfigFileName(java.lang.String), connect()

BISession

public BISession(java.lang.String configXML)
Constructor that specifies the name of the configuration file.

The configuration file can be used to specify the following information:

Parameters:
configXML - The configuration file that contains information for this BISession to use.
See Also:
connect()

BISession

public BISession(java.lang.String configXML,
                 java.lang.Class configLoader)
Constructor that specifies the name of the configuration file a class loader to load the configuration file.

The configuration file can be used to specify the following information:

Parameters:
configXML - The configuration file that contains information for this BISession to use.
configLoader - The class in which its class loader is used to load the configuration file. If you pass null, then the default class loader is used to load the configuration file.
See Also:
connect()
Method Detail

connect

public void connect()
             throws BISessionException
Creates an application module and connects to it.
Throws:
BISessionException - If one of the following occurs:
  • The configuration file cannot be found or open
  • An error occurs in parsing the configuration file
  • An error occurs while locating the ApplicationModuleHome
See Also:
BISession(String)

disconnect

public void disconnect()
                throws BISessionException
Disconnects the application module. This method removes the application module, releases all manager objects that the ManagerFactory maintains, and releases all other resources that this session holds.
Throws:
BISessionException - If an error occurs while releasing the manager objects held by the ManagerFactory.

addErrorHandler

public void addErrorHandler(ErrorHandler handler)
Adds a single error handler to this BISession. The error handler is called whenever this BISession traps an error from another part of the system.

This error handler is also used by other beans in this BISession.

Use this method to install your own error handler.

Specified by:
addErrorHandler in interface ErrorHandlerCallback
Parameters:
handler - The error handler to use.

removeErrorHandler

public void removeErrorHandler()
Removes a customized error handler for this BISession. This method replaces the current error handler with a default error handler. The default error handler prints information to the console.
Specified by:
removeErrorHandler in interface ErrorHandlerCallback

getErrorHandler

public ErrorHandler getErrorHandler()
Retrieves the error handler from this BISession. This method is called by other beans, so they can use the same error handler.
Returns:
the error handler registered with this BISession. If no custom error handler has been registered, then this method returns the default error handler.

getDebugMode

public int getDebugMode()
Retrieve the debug mode specified in the configuration file. A BISessionRuntimeException will be thrown if an error occurs while parsing the configuration file.
Returns:
the debug mode specified in the configuration file. Returns -1 if the debug mode is not available or if the configuration file is not specified.

setLocale

public void setLocale(java.util.Locale locale)
Specifies the locale to use by this BISession.

getLocale

public java.util.Locale getLocale()
Retrieves the locale used by this BISession. Other beans call this method to use the same locale.
Returns:
the locale set on this BISession.

setConfigFileName

public void setConfigFileName(java.lang.String configFile)
Specifies the configuration file that contains information about the properties of this session, the application user, and the security configuration entries. The configuration file can also include information about how this BISession should create Connection objects, MetadataManager objects, and the InitialPersistenceManager.
Parameters:
configFile - The full path name of the configuration file.
See Also:
Connection, MetadataManager, InitialPersistenceManager

getConfigFileName

public java.lang.String getConfigFileName()
Retrieves the name of the configuration file that contains information about the properties of this session, the application user, and the security configuration entries.
Returns:
The full path name of the configuration file.

isConfigFileSpecified

public boolean isConfigFileSpecified()
Indicates whether a configuration file has been specified.
Returns:
true if a configuration file has been specified, false if no file has been specified.

getManagerFactory

public ManagerFactory getManagerFactory()
                                 throws BISessionException
Creates and returns a ManagerFactory that uses information from the configuration file.

You can use the ManagerFactory to create the InitialPersistenceManager, the QueryManager, and the MetadataManager.

Returns:
A ManagerFactory that uses configuration information.
Throws:
BISessionException - If an error occurs in parsing the configuration file, or if an error occurs in the creation of the ManagerFactory.
See Also:
InitialPersistenceManager, QueryManager, MetadataManager

getManagerFactory

public ManagerFactory getManagerFactory(javax.naming.directory.InitialDirContext initPM)
                                 throws BISessionException
Retrieves a ManagerFactory that uses information stored from a JNDI source.

You can use the ManagerFactory to create the InitialPersistenceManager, the QueryManager, and the MetadataManager.

Returns:
A ManagerFactory that uses JNDI information.
Throws:
BISessionException - If an error occurs in the creation of the ManagerFactory.
See Also:
InitialPersistenceManager, QueryManager, MetadataManager

getBIUser

public BIUser getBIUser()
Retrieves the application user for this session.
Returns:
the application user for this session.

setBIUser

public void setBIUser(BIUser user)
Specifies the application user for this session. This user will be authenticated by the application system, and would be used by the beans to identify who the user of the current session is.
Parameters:
user - the BIUser for this session.

setSecurityConfigEntries

public void setSecurityConfigEntries(java.util.Vector entries)
Deprecated. As of 2.7
Specifies the security configuration entries that contain information about the ConnectionProvider, AuthenticationProvider, and UserCommunityProvider to use for the session. This method overrides the settings in the setSecurityConfigFileName method.
Parameters:
entries - A list of ConfigEntry objects.
See Also:
setSecurityConfigFileName(java.lang.String), AuthenticationProvider, ConnectionProvider, UserCommunityProvider

setSecurityConfigFileName

public void setSecurityConfigFileName(java.lang.String fileName)
Deprecated. As of 2.7
Specifies the name of the security configuration file that contains information about the ConnectionProvider, AuthenticationProvider, and UserCommunityProvider to use for this session.

This method overrides the default configuration file (config.xml), which is in the oracle.dss.security package.

Parameters:
fileName - The name of the security configuration file to use.

setAuthenticationProvider

public void setAuthenticationProvider(java.lang.String level,
                                      java.lang.String className,
                                      boolean required)
Specifies an authentication provider for this BISession.

This method overrides the authentication provider information that is specified in the BI Beans configuration file.

Parameters:
level - The invocation level in which this authentication provider is applied. Valid values are listed in the See Also section.
className - The class name of the authentication provider.
required - true if the authentication provider should be loaded, false if it should not be loaded.
See Also:
AuthenticationProvider, BISecurityConstants.OLAP, BISecurityConstants.BICATALOG

setConnectionProvider

public void setConnectionProvider(java.lang.String level,
                                  java.lang.String className,
                                  boolean required)
Specifies a connection provider for this BISession.

This method overrides the connection provider information that is specified in the BI Beans configuration file.

Parameters:
level - The invocation level in which this connection provider is applied. Valid values are listed in the See Also section.
className - The class name of the connection provider.
required - true if the connection provider should be loaded, false if it should not be loaded.
See Also:
ConnectionProvider, BISecurityConstants.OLAP, BISecurityConstants.BICATALOG

setUserCommunityProvider

public void setUserCommunityProvider(java.lang.String level,
                                     java.lang.String className,
                                     boolean required)
Specifies a user community provider for this BISession.

This method overrides the user community provider information that is specified in the BI Beans configuration file.

Parameters:
level - The invocation level in which this user community provider is applied. The valid value is listed in the See Also section.
className - The class name of the user community provider.
required - true if the user community provider should be loaded, false if it should not be loaded.
See Also:
UserCommunityProvider, BISecurityConstants.SESSION

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Specifies additional properties of this session object.
Parameters:
name - The name of the property.
value - The value of the property.
See Also:
PSRConstants.Login, MDU.DRIVER_TYPE

getProperty

public java.lang.Object getProperty(java.lang.String name)
Retrieves the value of a property in the session object.
Parameters:
name - The name of the property.
Returns:
The value of the property.

removeProperty

public void removeProperty(java.lang.String name)
Removes a property from the session object.
Parameters:
name - The name of the property to remove.

Oracle™ Business Intelligence Beans Java API Reference
Release 10
g (9.0.4)
Part number B12159_01


Copyright © 2003, Oracle. All Rights Reserved.