TROIKA.ASP - the MVC framework

ApplicationAdapter.js

Summary

Contains ApplicationAdapter class.

This is part of Troika.ASP Framework - web development MVC framework for ASP 3.0. Please visit www.troika-asp.com for more details.



Version: $Revision: 1.3 $

Author: Pavel Chuchev pav@troika-asp.com


Class Summary
ApplicationAdapter This is ApplicationAdapter class the base class for all user defined commands.

/**
* @fileoverview Contains <tt>ApplicationAdapter</tt> class.
*
* <p>
* This is part of Troika.ASP Framework - web development MVC framework for ASP 3.0.
* Please visit {@link http://www.troika-asp.com www.troika-asp.com} for more details.
* </p>
*
* @author Pavel Chuchev pav@troika-asp.com
* @version $Revision: 1.3 $
*/
ApplicationAdapter.APP_ROOT = "root";

/**
* Constructs a new instance of ApplicationAdapter class.
*
* @class This is <tt>ApplicationAdapter</tt> class the base class for all user defined commands.
*
* @constructor
*/
function ApplicationAdapter() {

}
/**
* Sets session key/value pair.
*
* @param {String} key The key of the new session variable.
* @param {String} value The value.
*/
ApplicationAdapter.prototype.put = function (key, value) {

    Application.Lock();
    if (value) {

        Application.Contents(key) = "" + value;///jslint:ignore
    }
    else {

        Application.Contents.Remove(key);
    }
    Application.UnLock();
};
/**
* Returns value by key.
*
* @param {String} key The key to look up.
* @return The value for the key.
* @type String
*/
ApplicationAdapter.prototype.get = function (key) {

    return Application.Contents(key);
};
/**
* Returns application root directory.
*
* @return The application root directory.
* @type String
*/
ApplicationAdapter.prototype.getAppRoot = function () {

    return this.get(ApplicationAdapter.APP_ROOT);
};
/**
* Removes application variable by key.
*
* @param {String} key The key to remove.
*/
ApplicationAdapter.prototype.remove = function (key) {

    Session.Contents.Remove(key);
};

TROIKA.ASP - the MVC framework

www.troika-asp.com
Documentation generated on Sun Jun 15 17:59:32 2008