blackboard.platform.config
Interface ConfigurationService


public interface ConfigurationService

Core platform service that provides access to file-system based configuration information. System registry configuration should be loaded through the RegistryDbLoader.

Since:
Bb 5.5
Version:
$Revision: 16 $ $Date: 4/08/03 10:55a $

Method Summary
 void addCustomProperties(java.lang.String configName, java.io.File customConfigFile, boolean mustExist)
          Provision for implementations of ApplicationLauncher to provide non-relative locations for client manipulated configuration properties.
 void configServiceInit(java.io.File blackboardRootDir, java.util.Properties bbServicesProps)
           
 java.io.File createTempFile()
          Creates a temp file in the Bb temp file space.
 java.util.Properties getBbProperties()
          Returns aggregate of bb-config.properties and properties from active service manager config.
 java.lang.String getBbProperty(java.lang.String key)
          Shortcut to return an individual property from bb-config.properties or from this service manager's config file.
 java.lang.String getBbProperty(java.lang.String key, java.lang.String defaultIfNotFound)
          Shortcut to return an individual property from bb-config.properties or from this service manager's config file.
 java.io.File getBbServicesDir()
          Deprecated.  
 java.io.File getBlackboardDir()
          getBlackboardDir
 java.io.File getConfiguredFile(java.lang.String propertyName, boolean mustExist)
          Utility for service implementations to get a file path from the configured properties.
 java.io.File[] getConfiguredFiles(java.lang.String propertyName, boolean mustExist)
          Utility for service implementations to get a file list from the configured properties.
 java.util.Properties getCustomProperties(java.lang.String configName, boolean mustExist)
          Provision for implementations of ApplicationLauncher to provide non-relative locations for client manipulated configuration properties.
 java.io.File getTempDir()
          getTempDir
 java.io.File resolveFile(java.lang.String relativePath)
          Resolves the specified file.
 java.io.File resolveFile(java.lang.String relativePath, boolean bMustExist)
          Resolves the specified file.
 

Method Detail

configServiceInit

public void configServiceInit(java.io.File blackboardRootDir,
                              java.util.Properties bbServicesProps)
                       throws InitializationException
InitializationException

getBbProperties

public java.util.Properties getBbProperties()
Returns aggregate of bb-config.properties and properties from active service manager config.


getBbProperty

public java.lang.String getBbProperty(java.lang.String key)
Shortcut to return an individual property from bb-config.properties or from this service manager's config file.


getBbProperty

public java.lang.String getBbProperty(java.lang.String key,
                                      java.lang.String defaultIfNotFound)
Shortcut to return an individual property from bb-config.properties or from this service manager's config file.


getBlackboardDir

public java.io.File getBlackboardDir()
getBlackboardDir


resolveFile

public java.io.File resolveFile(java.lang.String relativePath)
                         throws InitializationException
Resolves the specified file. Path may be use forward or back slash as separator. If not absolute, then file is resolved as relative to the blackboard directory.

Throws:
InitializationException - if file does not exist

resolveFile

public java.io.File resolveFile(java.lang.String relativePath,
                                boolean bMustExist)
                         throws InitializationException
Resolves the specified file. Path may be use forward or back slash as separator. If not absolute, then file is resolved as relative to the blackboard directory.

Throws:
InitializationException - if file does not exist

getBbServicesDir

public java.io.File getBbServicesDir()
Deprecated.  


getTempDir

public java.io.File getTempDir()
getTempDir


createTempFile

public java.io.File createTempFile()
                            throws java.io.IOException
Creates a temp file in the Bb temp file space. The file will automatically be deleted when the VM exits.

java.io.IOException

getConfiguredFile

public java.io.File getConfiguredFile(java.lang.String propertyName,
                                      boolean mustExist)
                               throws InitializationException
Utility for service implementations to get a file path from the configured properties.

Throws:
InitializationException - if the property is not found in the config file or if the requested file does not exist when required (mustExist == true ).

getConfiguredFiles

public java.io.File[] getConfiguredFiles(java.lang.String propertyName,
                                         boolean mustExist)
                                  throws InitializationException
Utility for service implementations to get a file list from the configured properties.

Throws:
InitializationException - if the property is not found in the config file or if the requested file does not exist when required (mustExist == true ).

addCustomProperties

public void addCustomProperties(java.lang.String configName,
                                java.io.File customConfigFile,
                                boolean mustExist)
                         throws InitializationException
Provision for implementations of ApplicationLauncher to provide non-relative locations for client manipulated configuration properties.

Parameters:
configName - String designating unique to identify custom property collection.
customConfigFile - File designation for location of property file.
mustExist - boolean> flag denoting if proper loading of file is required.
Throws:
InitializationException - if the requested file does not exist when required (mustExist == true ).

getCustomProperties

public java.util.Properties getCustomProperties(java.lang.String configName,
                                                boolean mustExist)
                                         throws InitializationException
Provision for implementations of ApplicationLauncher to provide non-relative locations for client manipulated configuration properties.

Parameters:
configName - String designating unique to identify custom property collection.
mustExist - boolean flag denoting if proper loading of file is required.
Returns:
Properties Custom properties relevant to Application implementation.
Throws:
InitializationException - if the requested property designation does not exist when required (mustExist == true ).


Copyright © 2003 Blackboard, Inc. All Rights Reserved.