org.alicebot.server.core
Class Globals

java.lang.Object
  extended by org.alicebot.server.core.Globals

public class Globals
extends java.lang.Object

Globals gives access to the server properties used when starting the bot.

Version:
4.1.3
Author:
Richard Wallace, Jon Baer, Thomas Ringate/Pedro Colla

Method Summary
static java.lang.String getBotNamePredicate()
          Returns the predicate name with which the bot's name is associated.
static int getCategoryLoadNotifyInterval()
           
static java.lang.String getClientNamePredicate()
          Returns the predicate name with which the client's name is associated.
static java.lang.String getHostName()
          Returns the host name.
static int getHttpPort()
          Returns the http port number.
static java.lang.String getInfiniteLoopInput()
          Returns the input to match if an infinite loop exception is thrown.
static java.lang.String getMergePolicy()
          Returns the merge policy.
static java.lang.String getPredicateEmptyDefault()
          Returns the default value for undefined predicate values.
static java.util.Properties getProperties()
           
static java.lang.String getProperty(java.lang.String propertyName)
          Returns the value of a property string.
static java.lang.String getProperty(java.lang.String propertyName, java.lang.String defaultValue)
          Returns the value of a property string (allows specifying a default).
static int getResponseTimeout()
          Returns the response timeout.
static java.lang.String getStartupFilePath()
          Returns the startup file path.
static java.lang.String getSystemDirectory()
          Returns the directory in which to run system commands.
static java.lang.String getSystemPrefix()
          Returns the prefix for system commands.
static java.lang.String getTargetsAIMLPath()
          Returns the path to the targets file for dumping generated AIML.
static java.lang.String getTargetsDataPath()
          Returns the path to the data file for dumping targeting data.
static int getTargetSkip()
          Returns the response period for invoking targeting.
static java.lang.String getVersion()
          Returns the version string.
static boolean isLoaded()
          Returns whether Globals is loaded.
static boolean isWatcherActive()
          Returns whether the AIML Watcher is active.
static java.lang.String javaScriptInterpreter()
          Returns the fully-qualified class name of the JavaScript interpteter (if any).
static boolean jsAccessAllowed()
          Returns whether the javascript tag is allowed.
static void load(java.lang.String path)
          Loads properties from a path.
static void loadProperties()
          Loads some global values from a properties object.
static boolean nonAIMLRequireNamespaceQualification()
          Returns whether to require namespace qualifiers on non-AIML tags.
static boolean osAccessAllowed()
          Returns whether the system tag is allowed.
static int predicateValueCacheMax()
          Returns the number of predicate values to cache.
static void setHttpPort(int port)
          Sets the http port number.
static boolean showConsole()
          Returns whether to show the console.
static boolean showMatchTrace()
          Returns whether to show match trace messages on the console.
static boolean supportDeprecatedTags()
          Returns whether to support deprecated "AIML 0.9" tags.
static boolean useHeart()
          Returns whether to use the Heart.
static boolean useShell()
          Returns whether to use the command-line shell.
static boolean useTargeting()
          Returns whether to use targeting.
static boolean warnAboutDeprecatedTags()
          Returns whether to warn about deprecated "AIML 0.9" tags.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

load

public static void load(java.lang.String path)
Loads properties from a path.

Parameters:
path -

loadProperties

public static void loadProperties()
Loads some global values from a properties object.


isLoaded

public static boolean isLoaded()
Returns whether Globals is loaded.

Returns:
whether Globals is loaded

getVersion

public static java.lang.String getVersion()
Returns the version string.

Returns:
the version string

getStartupFilePath

public static java.lang.String getStartupFilePath()
Returns the startup file path.

Returns:
the startup file path

getClientNamePredicate

public static java.lang.String getClientNamePredicate()
Returns the predicate name with which the client's name is associated.

Returns:
the predicate name with which the client's name is associated

getBotNamePredicate

public static java.lang.String getBotNamePredicate()
Returns the predicate name with which the bot's name is associated.

Returns:
the predicate name with which the bot's name is associated

getPredicateEmptyDefault

public static java.lang.String getPredicateEmptyDefault()
Returns the default value for undefined predicate values.

Returns:
the default value for undefined predicate values

getInfiniteLoopInput

public static java.lang.String getInfiniteLoopInput()
Returns the input to match if an infinite loop exception is thrown.

Returns:
the input to match if an infinite loop exception is thrown

showConsole

public static boolean showConsole()
Returns whether to show the console.

Returns:
whether to show the console

showMatchTrace

public static boolean showMatchTrace()
Returns whether to show match trace messages on the console.

Returns:
whether to show trace messages on console

isWatcherActive

public static boolean isWatcherActive()
Returns whether the AIML Watcher is active.

Returns:
whether the AIML Watcher is active

useHeart

public static boolean useHeart()
Returns whether to use the Heart.

Returns:
whether to use the Heart

useShell

public static boolean useShell()
Returns whether to use the command-line shell.

Returns:
whether to use the command-line shell

getMergePolicy

public static java.lang.String getMergePolicy()
Returns the merge policy.

Returns:
the merge policy String

useTargeting

public static boolean useTargeting()
Returns whether to use targeting.

Returns:
whether to use targeting

getTargetsAIMLPath

public static java.lang.String getTargetsAIMLPath()
Returns the path to the targets file for dumping generated AIML.

Returns:
the path to the targets file for dumping generated AIML

getTargetsDataPath

public static java.lang.String getTargetsDataPath()
Returns the path to the data file for dumping targeting data.

Returns:
the path to the data file for dumping targeting data

getTargetSkip

public static int getTargetSkip()
Returns the response period for invoking targeting.

Returns:
the response period for invoking targeting

getCategoryLoadNotifyInterval

public static int getCategoryLoadNotifyInterval()
Returns:
the category load notify interval

setHttpPort

public static void setHttpPort(int port)
Sets the http port number.

Parameters:
port - the port number

getHttpPort

public static int getHttpPort()
Returns the http port number.

Returns:
http port number

getResponseTimeout

public static int getResponseTimeout()
Returns the response timeout.

Returns:
response timeout

getHostName

public static java.lang.String getHostName()
Returns the host name.

Returns:
the host name

supportDeprecatedTags

public static boolean supportDeprecatedTags()
Returns whether to support deprecated "AIML 0.9" tags.

Returns:
whether to support deprecated "AIML 0.9" tags

warnAboutDeprecatedTags

public static boolean warnAboutDeprecatedTags()
Returns whether to warn about deprecated "AIML 0.9" tags.

Returns:
whether to warn about deprecated "AIML 0.9" tags

nonAIMLRequireNamespaceQualification

public static boolean nonAIMLRequireNamespaceQualification()
Returns whether to require namespace qualifiers on non-AIML tags.

Returns:
whether to require namespace qualifiers on non-AIML tags

predicateValueCacheMax

public static int predicateValueCacheMax()
Returns the number of predicate values to cache.

Returns:
the number of predicate values to cache

osAccessAllowed

public static boolean osAccessAllowed()
Returns whether the system tag is allowed.

Returns:
whether the system tag is allowed

jsAccessAllowed

public static boolean jsAccessAllowed()
Returns whether the javascript tag is allowed.

Returns:
whether the javascript tag is allowed

javaScriptInterpreter

public static java.lang.String javaScriptInterpreter()
Returns the fully-qualified class name of the JavaScript interpteter (if any).

Returns:
the fully-qualified class name of the JavaScript interpteter (if any)

getSystemDirectory

public static java.lang.String getSystemDirectory()
Returns the directory in which to run system commands.

Returns:
the directory in which to run system commands

getSystemPrefix

public static java.lang.String getSystemPrefix()
Returns the prefix for system commands.

Returns:
the prefix for system commands

getProperty

public static java.lang.String getProperty(java.lang.String propertyName)
Returns the value of a property string.

Parameters:
propertyName - the name of the property whose value is wanted
Returns:
the value of the named property

getProperty

public static java.lang.String getProperty(java.lang.String propertyName,
                                           java.lang.String defaultValue)
Returns the value of a property string (allows specifying a default).

Parameters:
propertyName - the name of the property whose value is wanted
the - default if no value is defined for the property
Returns:
the value of the named property

getProperties

public static java.util.Properties getProperties()