Collaboration API Documentation

com.filenet.bso.api.util
Interface BsoConfigManager


public interface BsoConfigManager

Classes that implement the BsoConfigManager interface provide access to configuration data.

For implementations in which the configuration data is file based, you can set the filenet.bso.config.path system property (constant BsoConfigManager.BSO_CONFIG_PATH) to the path that specifies the location of the configuration file. If this property is not set, or the file couldn't be found at the specified path, a normal Java resource search is conducted for the file in the implementation's package. The name passed to the getInputStream and getMap methods must be the name of the configuration file.

For implementations in which the configuration is not file based, the system property may be ignored and you may use a configuration data retrieval mechanism of your choice, for example, you could retrieve configuration data from a database.

The BsoConfigFactory class is responsible for creating concrete classes that implement this interface.

See Also:
com.filenet.bso.api.util.BsoConfigFactory

Field Summary
static java.lang.String BSO_CONFIG_MANAGER
          Value of "filenet.bso.config.manager"; the name of the Java system property that controls which class is used for the configuration manager.
static java.lang.String BSO_CONFIG_PATH
          Value of "filenet.bso.config.path"; the name of the Java system property that specifies the path to the configuration data.
 
Method Summary
 java.io.InputStream getInputStream(java.lang.String name)
          Returns an InputStream to some specified configuration data.
 java.util.Map getMap(java.lang.String name)
          Returns a map of configuration settings.
 

Field Detail

BSO_CONFIG_MANAGER

public static final java.lang.String BSO_CONFIG_MANAGER
Value of "filenet.bso.config.manager"; the name of the Java system property that controls which class is used for the configuration manager.

BSO_CONFIG_PATH

public static final java.lang.String BSO_CONFIG_PATH
Value of "filenet.bso.config.path"; the name of the Java system property that specifies the path to the configuration data.
Method Detail

getInputStream

public java.io.InputStream getInputStream(java.lang.String name)
                                   throws java.io.IOException
Returns an InputStream to some specified configuration data.

In a file-based implementation, this method first searches for the file in the path specified by the filenet.bso.config.path system property. If the property does not define the path or the file is not found in the specified path, the method looks for the file in the classpath. Non-file-based implementions (for example, a database) may use other mechanisms to find the data.

Parameters:
name - A String containing the name of the configuration item to use.

Returns:
An InputStream for the requested configuration data. Returns null if the file cannot be found.

Throws:
java.io.IOException - Thrown if the configuration file exists, but there is some problem with it (for example, the file is corrupted or permissions are inadequate to access the file).

getMap

public java.util.Map getMap(java.lang.String name)
                     throws java.io.IOException
Returns a map of configuration settings.

In a file-based implementation, this method first searches for the file in the path specified by the filenet.bso.config.path system property. If the property does not define the path or the file is not found in the specified path, the method looks for the file in the classpath. Non-file-based implementions (for example, a database) may use other mechanisms to find the data.

Parameters:
name - A String containing the name of the configuration map to return.

Returns:
A Java Map object for the requested resource. Returns null if the resource could not be found.

Throws:
java.io.IOException - if the configuration file exists, but there is some problem with it (for example, the file is corrupted.)

Collaboration API Documentation

Copyright © 2002 - 2004 FileNet Corporation. All rights reserved.