|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.millscript.millscript.conf.AbstractConfiguration
public abstract class AbstractConfiguration
This class is a starting point for implementing a configuration object. You will still need to implement several methods, but basic properties and print methods are handled.
| Field Summary | |
|---|---|
protected org.millscript.commons.vfs.VFolder |
cwd
The current working direcotry. |
protected CharacterEntity |
htmlCharacterEntities
Holds the HTML character entities configuration. |
protected LoaderBuilder |
loaderBuilder
Holds the configured loaders for this MillScript configuration. |
protected Logger |
logger
Holds the logger for this MillScript configuration |
protected java.nio.charset.Charset |
outputCharset
The current output character set. |
protected org.millscript.commons.util.EMap<java.lang.String,java.lang.Object> |
properties
Holds the basic properties defined in the configuration files. |
protected org.millscript.commons.vfs.VFS |
vfs
Holds the VFS for this configuration. |
protected CharacterEntity |
xmlCharacterEntities
Holds the XML character entities configuration. |
| Fields inherited from interface org.millscript.millscript.conf.Configuration |
|---|
CACHE_NAME, CONF_NAME, DOT_WEBSITE_NAME, INVENTORY_NAME, LIB_NAME, OUTPUT_NAME, PACKAGE_CONF_FILE, USER_CONF_FILE, VAR_NAME, WEBSITE_CONF_FILE, WEBSITE_FAILURE_FILE, WEBSITE_LOCK_FILE, WEBSITE_SUCCESSS_FILE |
| Constructor Summary | |
|---|---|
AbstractConfiguration()
|
|
| 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. |
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. |
Engine |
getStandardEngine()
Returns the standard engine for this configuration. |
Package |
getStandardPackage(Engine engine)
Returns the standard package for this configuration. |
org.millscript.commons.vfs.VFS |
getVFS()
Returns the VFS this configuration is using. |
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 l)
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.millscript.millscript.conf.Configuration |
|---|
getInteractivePrompt, getStandardConfFolder, getStandardConfigurationFile, getStandardInventoryFolder, getStandardLibFolder, getWebsiteCacheFolder, getWebsiteConfFolder, getWebsiteConfigurationFile, getWebsiteFailureFile, getWebsiteInventoryFolder, getWebsiteLibFolder, getWebsiteLockFile, getWebsiteOutputFolder, getWebsiteSuccessFile, getWebsiteVarFolder |
| Field Detail |
|---|
protected final org.millscript.commons.vfs.VFS vfs
protected final org.millscript.commons.vfs.VFolder cwd
protected final CharacterEntity htmlCharacterEntities
protected final LoaderBuilder loaderBuilder
protected Logger logger
protected java.nio.charset.Charset outputCharset
protected final org.millscript.commons.util.EMap<java.lang.String,java.lang.Object> properties
protected final CharacterEntity xmlCharacterEntities
| Constructor Detail |
|---|
public AbstractConfiguration()
| Method Detail |
|---|
public boolean getBooleanProperty(java.lang.String key)
Configuration
getBooleanProperty in interface Configurationkey - the key to retrieve a value for
Configuration.getBooleanProperty(java.lang.String)public final org.millscript.commons.vfs.VFolder getCurrentWorkingFolder()
Configuration
getCurrentWorkingFolder in interface ConfigurationConfiguration.getCurrentWorkingFolder()public CharacterEntity getHTMLCharacterEntity()
Configuration
getHTMLCharacterEntity in interface ConfigurationConfiguration.getHTMLCharacterEntity()public LoaderBuilder getLoaderBuilder()
Configuration
getLoaderBuilder in interface ConfigurationConfiguration.getLoaderBuilder()public Logger getLogger()
Configuration
getLogger in interface ConfigurationConfiguration.getLogger()public java.nio.charset.Charset getOutputCharset()
Configuration
getOutputCharset in interface ConfigurationConfiguration.getOutputCharset()public org.millscript.commons.vfs.VFile getPackageConfFile(org.millscript.commons.vfs.VFolder packageDir)
Configuration
getPackageConfFile in interface ConfigurationpackageDir - the location of a package
Configuration.getPackageConfFile(org.millscript.commons.vfs.VFolder)public java.lang.String getProperty(java.lang.String key)
Configuration
getProperty in interface Configurationkey - the key to retrieve a value for
Configuration.getProperty(java.lang.String)public Engine getStandardEngine()
ConfigurationPackage.
getStandardEngine in interface ConfigurationEngine for this configurationConfiguration.getStandardEngine()public Package getStandardPackage(Engine engine)
Configuration
getStandardPackage in interface Configurationengine - the engine this package is associated with
Package for this configurationConfiguration.getStandardPackage(org.millscript.millscript.vm.Engine)public org.millscript.commons.vfs.VFS getVFS()
Configuration
getVFS in interface ConfigurationConfiguration.getVFS()public CharacterEntity getXMLCharacterEntity()
Configuration
getXMLCharacterEntity in interface ConfigurationConfiguration.getXMLCharacterEntity()public void reportAlertAsMishap(org.millscript.commons.alert.Alert alert)
Configuration
reportAlertAsMishap in interface Configurationalert - the Alert to report as a mishapConfiguration.reportAlertAsMishap(org.millscript.commons.alert.Alert)public void reportAlertAsWarning(org.millscript.commons.alert.Alert alert)
ConfigurationConfiguration.reportAlertAsMishap(Alert).
reportAlertAsWarning in interface Configurationalert - the Alert to report as a warningConfiguration.reportAlertAsWarning(org.millscript.commons.alert.Alert)public void reportException(java.lang.Exception exception)
Configuration
reportException in interface Configurationexception - the Exception to reportConfiguration.reportException(java.lang.Exception)public void setLogger(Logger l)
Configuration
setLogger in interface Configurationl - the new logger for this configurationConfiguration.setLogger(org.millscript.millscript.conf.logging.Logger)public void setOutputCharset(java.nio.charset.Charset cs)
Configuration
setOutputCharset in interface Configurationcs - the Charset to use for outputConfiguration.setOutputCharset(java.nio.charset.Charset)
public void setProperty(java.lang.String key,
java.lang.Object value)
Configuration
setProperty in interface Configurationkey - the key to associate a value withvalue - the value to associate with the keyConfiguration.setProperty(java.lang.String, java.lang.Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||