org.millscript.millscript.conf
Interface Configuration

All Known Implementing Classes:
AbstractConfiguration, ApiConf, WebsiteConf

public interface Configuration

Configuration interface, to be implemented by classes wanting to configure a MillScript engine.


Field Summary
static java.lang.String CACHE_NAME
          Cache folder name.
static java.lang.String CONF_NAME
          Configuration folder name.
static java.lang.String DOT_WEBSITE_NAME
          Hidden website identification folder name.
static java.lang.String INVENTORY_NAME
          Inventory folder name.
static java.lang.String LIB_NAME
          Library folder name.
static java.lang.String OUTPUT_NAME
          Output folder name.
static java.lang.String PACKAGE_CONF_FILE
          Package configuration file name.
static java.lang.String USER_CONF_FILE
          User configuration file name.
static java.lang.String VAR_NAME
          Var folder name.
static java.lang.String WEBSITE_CONF_FILE
          Website configuration file name.
static java.lang.String WEBSITE_FAILURE_FILE
          Website failure file name.
static java.lang.String WEBSITE_LOCK_FILE
          Website lock file name.
static java.lang.String WEBSITE_SUCCESSS_FILE
          Website sucess file name.
 
Method Summary
 boolean getBooleanProperty(java.lang.String key)
          Returns the boolean configuration value associated with the specified key.
 org.millscript.commons.vfs.VFolder getCurrentWorkingFolder()
          Returns the current working folder.
 CharacterEntity getHTMLCharacterEntity()
          Returns the HTML character entity encoder/decoder object.
 java.lang.String getInteractivePrompt()
          Returns the prompt MillScript should use during a session.
 LoaderBuilder getLoaderBuilder()
          Returns the LoaderBuilder for this configuration.
 Logger getLogger()
          Returns the logger for this configuration.
 java.nio.charset.Charset getOutputCharset()
          Returns the current output character set.
 org.millscript.commons.vfs.VFile getPackageConfFile(org.millscript.commons.vfs.VFolder packageDir)
          Returns the location of the package configuration file for the specified package location.
 java.lang.String getProperty(java.lang.String key)
          Returns the configuration value associated with the specified key.
 org.millscript.commons.vfs.VFolder getStandardConfFolder()
          Returns the location of the standard configuration folder.
 org.millscript.commons.vfs.VFile getStandardConfigurationFile()
          Returns the location of the user configuration file.
 Engine getStandardEngine()
          Returns the standard engine for this configuration.
 org.millscript.commons.vfs.VFolder getStandardInventoryFolder()
          Returns the location of the standard inventory.
 org.millscript.commons.vfs.VFolder getStandardLibFolder()
          Returns the location of the standard library folder.
 Package getStandardPackage(Engine engine)
          Returns the standard package for this configuration.
 org.millscript.commons.vfs.VFS getVFS()
          Returns the VFS this configuration is using.
 org.millscript.commons.vfs.VFolder getWebsiteCacheFolder()
          Returns the location of the websites cache folder.
 org.millscript.commons.vfs.VFolder getWebsiteConfFolder()
          Returns the location of the websites configuration folder.
 org.millscript.commons.vfs.VFile getWebsiteConfigurationFile()
          Returns the location of the website configuration file.
 org.millscript.commons.vfs.VFile getWebsiteFailureFile()
          Returns the location of the website lock file.
 org.millscript.commons.vfs.VFolder getWebsiteInventoryFolder()
          Returns the location of the websites inventory.
 org.millscript.commons.vfs.VFolder getWebsiteLibFolder()
          Returns the location of the websites library folder.
 org.millscript.commons.vfs.VFile getWebsiteLockFile()
          Returns the location of the website lock file.
 org.millscript.commons.vfs.VFolder getWebsiteOutputFolder()
          Returns the location of the websites output folder.
 org.millscript.commons.vfs.VFile getWebsiteSuccessFile()
          Returns the location of the website success file.
 org.millscript.commons.vfs.VFolder getWebsiteVarFolder()
          Returns the location of the websites var folder.
 CharacterEntity getXMLCharacterEntity()
          Returns the XML character entity encoder/decoder object.
 void reportAlertAsMishap(org.millscript.commons.alert.Alert alert)
          Reports the specified Alert as a mishap.
 void reportAlertAsWarning(org.millscript.commons.alert.Alert alert)
          Reports the specified Alert as a warning.
 void reportException(java.lang.Exception exception)
          Reports the specified Exception.
 void setLogger(Logger logger)
          Sets the logger for this configuration.
 void setOutputCharset(java.nio.charset.Charset cs)
          Sets the output character set.
 void setProperty(java.lang.String key, java.lang.Object value)
          Associated the configuration value with the specified key.
 

Field Detail

CACHE_NAME

static final java.lang.String CACHE_NAME
Cache folder name.

See Also:
Constant Field Values

CONF_NAME

static final java.lang.String CONF_NAME
Configuration folder name.

See Also:
Constant Field Values

DOT_WEBSITE_NAME

static final java.lang.String DOT_WEBSITE_NAME
Hidden website identification folder name.

See Also:
Constant Field Values

USER_CONF_FILE

static final java.lang.String USER_CONF_FILE
User configuration file name.

See Also:
Constant Field Values

INVENTORY_NAME

static final java.lang.String INVENTORY_NAME
Inventory folder name.

See Also:
Constant Field Values

LIB_NAME

static final java.lang.String LIB_NAME
Library folder name.

See Also:
Constant Field Values

OUTPUT_NAME

static final java.lang.String OUTPUT_NAME
Output folder name.

See Also:
Constant Field Values

PACKAGE_CONF_FILE

static final java.lang.String PACKAGE_CONF_FILE
Package configuration file name.

See Also:
Constant Field Values

VAR_NAME

static final java.lang.String VAR_NAME
Var folder name.

See Also:
Constant Field Values

WEBSITE_CONF_FILE

static final java.lang.String WEBSITE_CONF_FILE
Website configuration file name.

See Also:
Constant Field Values

WEBSITE_FAILURE_FILE

static final java.lang.String WEBSITE_FAILURE_FILE
Website failure file name.

See Also:
Constant Field Values

WEBSITE_LOCK_FILE

static final java.lang.String WEBSITE_LOCK_FILE
Website lock file name.

See Also:
Constant Field Values

WEBSITE_SUCCESSS_FILE

static final java.lang.String WEBSITE_SUCCESSS_FILE
Website sucess file name.

See Also:
Constant Field Values
Method Detail

getBooleanProperty

boolean getBooleanProperty(java.lang.String key)
Returns the boolean configuration value associated with the specified key.

Parameters:
key - the key to retrieve a value for
Returns:
the boolean value associated with the specified key.

getHTMLCharacterEntity

CharacterEntity getHTMLCharacterEntity()
Returns the HTML character entity encoder/decoder object.

Returns:
the HTML character entity encoder/decoder.

getXMLCharacterEntity

CharacterEntity getXMLCharacterEntity()
Returns the XML character entity encoder/decoder object.

Returns:
the XML character entity encoder/decoder.

getCurrentWorkingFolder

org.millscript.commons.vfs.VFolder getCurrentWorkingFolder()
Returns the current working folder.

Returns:
a VFolder object for the current working folder.

getInteractivePrompt

java.lang.String getInteractivePrompt()
Returns the prompt MillScript should use during a session. This should be null for an batch session and whatever string the user desires for an interactive session.

Returns:
a String containing the interactive prompt

getLoaderBuilder

LoaderBuilder getLoaderBuilder()
Returns the LoaderBuilder for this configuration.

Returns:
the LoaderBuilder for this configuration

getLogger

Logger getLogger()
Returns the logger for this configuration.

Returns:
the logger for this configuration

getOutputCharset

java.nio.charset.Charset getOutputCharset()
Returns the current output character set.

Returns:
the current Charset to use for output

getPackageConfFile

org.millscript.commons.vfs.VFile getPackageConfFile(org.millscript.commons.vfs.VFolder packageDir)
Returns the location of the package configuration file for the specified package location.

Parameters:
packageDir - the location of a package
Returns:
the VFile for the package configuration file, for the specified pacakge.

getProperty

java.lang.String getProperty(java.lang.String key)
Returns the configuration value associated with the specified key.

Parameters:
key - the key to retrieve a value for
Returns:
a String holding the value associated with the specified key.

getStandardConfFolder

org.millscript.commons.vfs.VFolder getStandardConfFolder()
Returns the location of the standard configuration folder.

Returns:
a VFolder object pointing to the standard configuration folder.

getStandardConfigurationFile

org.millscript.commons.vfs.VFile getStandardConfigurationFile()
Returns the location of the user configuration file.

Returns:
a VFile object pointing to the user configuration file.

getStandardEngine

Engine getStandardEngine()
Returns the standard engine for this configuration. The standard engine may contain a number of builtin packages, e.g. the "standard" Package.

Returns:
the standard Engine for this configuration

getStandardInventoryFolder

org.millscript.commons.vfs.VFolder getStandardInventoryFolder()
Returns the location of the standard inventory.

Returns:
a VFolder object pointing to the standard inventory folder.

getStandardLibFolder

org.millscript.commons.vfs.VFolder getStandardLibFolder()
Returns the location of the standard library folder.

Returns:
a VFolder object pointing to the standard library folder.

getStandardPackage

Package getStandardPackage(Engine engine)
Returns the standard package for this configuration. This includes all the builtin variables and functions that are appropriate.

Parameters:
engine - the engine this package is associated with
Returns:
the standard Package for this configuration

getWebsiteCacheFolder

org.millscript.commons.vfs.VFolder getWebsiteCacheFolder()
Returns the location of the websites cache folder.

Returns:
a VFolder object pointing to the websites cache folder.

getWebsiteConfFolder

org.millscript.commons.vfs.VFolder getWebsiteConfFolder()
Returns the location of the websites configuration folder.

Returns:
a VFolder object pointing to the websites configuration folder.

getWebsiteConfigurationFile

org.millscript.commons.vfs.VFile getWebsiteConfigurationFile()
Returns the location of the website configuration file.

Returns:
a VFile object pointing to the website configuration file.

getWebsiteFailureFile

org.millscript.commons.vfs.VFile getWebsiteFailureFile()
Returns the location of the website lock file.

Returns:
a VFile object pointing to the website lock file.

getWebsiteInventoryFolder

org.millscript.commons.vfs.VFolder getWebsiteInventoryFolder()
Returns the location of the websites inventory. This is the inventory associated with the website script.

Returns:
a VFolder object pointing to the websites inventory folder.

getWebsiteLibFolder

org.millscript.commons.vfs.VFolder getWebsiteLibFolder()
Returns the location of the websites library folder.

Returns:
a VFolder object pointing to the websites library folder.

getWebsiteLockFile

org.millscript.commons.vfs.VFile getWebsiteLockFile()
Returns the location of the website lock file.

Returns:
a VFile object pointing to the website lock file.

getWebsiteOutputFolder

org.millscript.commons.vfs.VFolder getWebsiteOutputFolder()
Returns the location of the websites output folder.

Returns:
a VFolder object pointing to the websites output folder.

getWebsiteSuccessFile

org.millscript.commons.vfs.VFile getWebsiteSuccessFile()
Returns the location of the website success file.

Returns:
a VFile object pointing to the website success file.

getWebsiteVarFolder

org.millscript.commons.vfs.VFolder getWebsiteVarFolder()
Returns the location of the websites var folder.

Returns:
a VFolder object pointing to the websites var folder.

getVFS

org.millscript.commons.vfs.VFS getVFS()
Returns the VFS this configuration is using.

Returns:
the VFS this configuration is using

reportAlertAsMishap

void reportAlertAsMishap(org.millscript.commons.alert.Alert alert)
Reports the specified Alert as a mishap. This is the general purpose method of reporting an Alert.

Parameters:
alert - the Alert to report as a mishap

reportAlertAsWarning

void reportAlertAsWarning(org.millscript.commons.alert.Alert alert)
Reports the specified Alert as a warning. This is the method to use when reporting an Alert as a warning. For general use, use reportAlertAsMishap(Alert).

Parameters:
alert - the Alert to report as a warning

reportException

void reportException(java.lang.Exception exception)
Reports the specified Exception.

Parameters:
exception - the Exception to report

setLogger

void setLogger(Logger logger)
Sets the logger for this configuration.

Parameters:
logger - the new logger for this configuration

setOutputCharset

void setOutputCharset(java.nio.charset.Charset cs)
Sets the output character set.

Parameters:
cs - the Charset to use for output

setProperty

void setProperty(java.lang.String key,
                 java.lang.Object value)
Associated the configuration value with the specified key.

Parameters:
key - the key to associate a value with
value - the value to associate with the key


Copyright © 2001-2007 Open World Ltd. All Rights Reserved.