Class: Constants

mmir. Constants

new mmir.Constants()

A Utility class that provides various constants.

Note that the actual values depend on the execution environment (e.g. ANDROID vs. BROWSER). As a consequence the constants object has 2 modes, that can be switched via the init -method, e.g. init(false).

Example
var appBase = mmir.const.getBasePath();

Requires

  • module:org.apache.cordova.device:

Methods

Returns a string with the base path.
Returns:
path
Returns a string with the path to the beep audio-file.
Returns:
to beep wav file

getCompiledLayoutPath()

getCompiledViewPath()

getConfigurationFileUrl(){String}

Returns a string with the path to the configuration file.
Returns:
to configuration file

getControllerPath(){String}

Returns a string with the path to the controllers.
Returns:
path

getDictionaryFileName(){String}

Returns the name of the dictionary filename as string
Returns:
filename

getDirectoriesFileUrl(){String}

Returns a string with the path to the directories file (directory-strucure / file-list).
Returns:
to directories file

getEnvPlatform(){String}

getExtensionsPath(){String}

Returns a string with the path to the extensions.
Returns:
path

getGeneratedGrammarsPath(){String}

Returns a string with the path to the directory that contains the generated/executable grammars.
Returns:
for generated grammars (JavaScript files)

getGrammarFileName(){String}

Returns the name of the grammar filename as string
Returns:
filename

getGrammarPluginPath(){String}

Returns a string with the path to the Grammar-Plugins (ie. engines for grammar generation).
Returns:
Plugin path

getHelperPath(){String}

Returns a string with the path to the helpers.
Returns:
path

getHelperSuffix(){String}

Returns the suffix for helper filenames as string. A helpers filename looks like: "ControllerName"+"Helper"+".js"
Returns:
for helper filenames
Returns default language as string.
Returns:
language

getLanguagePath(){String}

Returns a string with the path to the languages.
Returns:
path

getLayoutPath(){String}

Returns a string with the path to the layouts.
Returns:
path

getMediaPluginPath(){String}

Returns a string with the path to the Media-Plugins.
Returns:
path
Returns a string with the path to the models.
Returns:
path

getPartialsPrefix(){String}

Returns the prefix for partial filenames as string
Returns:
for partial filenames

getSpeechConfigFileName(){String}

Returns the name of the filename for the speech configuration as string
Returns:
filename
Returns a string with the path to the views.
Returns:
path

getWorkerPath(){String}

Returns a string with the path to the workers.
Returns:
path

init(forBrowserParameter){Object}

Initialize the Constants singleton.
Name Type Description
forBrowserParameter Boolean true for browser-environment, if false ANDROID environment
Returns:
containing the instance of the class mmir.Constants

isBrowserEnv(){Boolean}

isCordovaEnv(){Boolean}