Class: setToCompatibilityMode3Extension

setToCompatibilityMode3Extension

new mmir.Core.setToCompatibilityMode3Extension(mmir)

Set to "backwards compatibility mode v3" (for pre version 4.0) for module names and method names. This function adds old names/synonyms for modules names (on mmir object/namespace): In addition, old method names will be added as synonyms: Methods with changed signature will be re-mapped to match their old signature
  • mmir.ConfigurationManager
    • map get(propertyName, defaultValue, useSafeAccess) back to
      get(propertyName, useSafeAccess, defaultValue)
      the original function will be available via _get(propertyName, useSafeAccess, defaultValue)
    • map getBoolean(propertyName, defaultValue, useSafeAccess) back to
      getBoolean(propertyName, useSafeAccess, defaultValue)
      the original function will be available via _getBoolean(propertyName, useSafeAccess, defaultValue)
    • map getString(propertyName, defaultValue, useSafeAccess) back to
      getString(propertyName, useSafeAccess, defaultValue)
      the original function will be available via _getString(propertyName, useSafeAccess, defaultValue)
Lastly, removed methods will be added:
Name Type Description
mmir mmir the (core) instance/namespace for MMIR
Example
mmir.require(['mmirf/core3Compatibility', 'mmirf/core'], function(setCompatibility, mmir){
		setCompatibility(mmir);
});

//OR: if mmir-lib modules were require'd in application code, add v3 module-ID aliases first:
mmir.require(['mmirf/core3ModuleIdCompatibility', 'mmirf/core3Compatibility', 'mmirf/core'], function(core3ModuleIdCompatibility, setCompatibility, mmir){
		core3ModuleIdCompatibility(mmir.require, window);
		setCompatibility(mmir);
});

Requires

  • module:SemanticInterpreterCompatibility

Methods

async,staticmmir.Core.setToCompatibilityMode3Extension.commonUtils.loadAllCordovaPlugins(pluginsPath, cbFunction){Promise}

Load all plugins (i.e. JavaScript interfaces for Cordova v2 / JavaScript-impl. plugins).
Name Type Description
pluginsPath String optional OPTIONAL Path of the plugins which should be loaded, e.g. mmirf/plugins/ If omitted: the default plugin-path is used (see mmir.Core.setToCompatibilityMode3Extension#getPluginsPath)
cbFunction function optional OPTIONAL The function that should be executed after the plugins are loaded. If the execution of following functions is dependent on the present of plugins, they should be triggered from inside the callback-function
Returns:
Deferred.promise (see loadImpl())

async,staticmmir.Core.setToCompatibilityMode3Extension.commonUtils.setToCompatibilityMode(success, requireFunction){Promise}

Set to "backwards compatibility mode" (for pre version 2.0). This function re-adds deprecated and removed functions and properties to the CommonUtils instance. NOTE that once set to compatibility mode, it cannot be reset to non-compatibility mode. NOTE: Requires jQuery to be present.
Name Type Description
success function optional a callback function that is invoked, after compatibility mode was set (alternatively the returned promise can be used).
requireFunction function optional the require-function that is configured for loading the compatibility module/file. Normally, this would be the function mmir.require. If omitted, the default (local dependency) require function will be used. NOTE: this argument is positional, i.e. argument success must be present, if you want to specify this argument
Deprecated
  • use only for backwards compatibility
    Returns:
    deferred promise that is resolved, after compatibility mode was set

    staticmmir.Core.setToCompatibilityMode3Extension.constants.getPluginsPath(){String}

    Returns a string with the path to the (Cordova v2.x) plugins directory.
    Returns:
    directory path

    staticmmir.Core.setToCompatibilityMode3Extension.languageManager.setNextLanguage(){String}

    Cycles through the available languages.
    Returns:
    (new) current language

    async,staticmmir.Core.setToCompatibilityMode3Extension.languageManager.setToCompatibilityMode(success, requireFunction){Promise}

    Set to "backwards compatibility mode" (for pre version 2.0). This function re-adds deprecated and removed functions and properties to the CommonUtils instance. NOTE that once set to compatibility mode, it cannot be reset to non-compatibility mode. NOTE: Requires jQuery to be present.
    Name Type Description
    success function optional a callback function that is invoked, after compatibility mode was set (alternatively the returned promise can be used).
    requireFunction function optional the require-function that is configured for loading the compatibility module/file. Normally, this would be the function mmir.require. If omitted, the global require function will be used. NOTE: this argument is positional, i.e. argument success must be present, if you want to specify this argument
    Deprecated
    • use only for backwards compatibility
      Returns:
      deferred promise that is resolved, after compatibility mode was set