rem: dojo.storage.manager = new function(){ this.currentProvider = null; this.available = false; this.initialized = false; this.providers = [];   this["namespace"] = "dojo.storage";  this.initialize = function(){    this.autodetect(); };  /**  */ this.register = function(/*string*/ name, /*Object*/ instance) {          this.providers[this.providers.length] = instance; this.providers[name] = instance; };  /**  */ this.setProvider = function(storageClass){         };  this.autodetect = function(){    if(this.initialized == true) return;   var providerToUse = null; for(var i = 0; i < this.providers.length; i++) { providerToUse = this.providers[i]; if(providerToUse.isAvailable()){ break; } }  if(providerToUse == null){ this.initialized = true; this.available = false; this.currentProvider = null; dojo.raise("No storage provider found for this platform"); }   this.currentProvider = providerToUse; for(var i in providerToUse){ dojo.storage[i] = providerToUse[i]; } dojo.storage.manager = this;   dojo.storage.initialize();  this.initialized = true; this.available = true; };  this.isAvailable = function(){ /*Boolean*/  return this.available; };  this.isInitialized = function(){ /*Boolean*/      if(dojo.flash.ready == false){ return false; }else{ return this.initialized; } };  this.supportsProvider = function(/*string*/ storageClass){        try{   var provider = eval("new " + storageClass + "()"); var results = provider.isAvailable(); if(results == null || typeof results == "undefined") return false; return results; }catch (exception){ dojo.debug("exception="+exception); return false; } };  /** Gets the current provider. */ this.getProvider = function(){ return this.currentProvider; };  this.loaded = function(){      }; }; 
add: dojo.storage = new function(){                  } 
context: dojo.storage.manager = new function(){	this.currentProvider = null;	this.available = false;	this.initialized = false;	this.providers = [];		// TODO: Provide a way for applications to override the default namespace	this["namespace"] = "dojo.storage";		this.initialize = function(){		// summary: 		//		Initializes the storage system and autodetects the best storage		//		provider we can provide on this platform		this.autodetect();	};		/**		*/	this.register = function(/*string*/ name, /*Object*/ instance) {		// summary:		//		Registers the existence of a new storage provider; used by		//		subclasses to inform the manager of their existence. 		// name:		//		The full class name of this provider, such as		//		"dojo.storage.browser.Flash6StorageProvider".		// instance:		//		An instance of this provider, which we will use to call		//		isAvailable() on. 		this.providers[this.providers.length] = instance;		this.providers[name] = instance;	};		/**	    	*/	this.setProvider = function(storageClass){		// summary:		//		Instructs the storageManager to use the given storage class for		//		all storage requests.		// description:		//		Example:		//			dojo.storage.setProvider(		//				dojo.storage.browser.IEStorageProvider)		};		this.autodetect = function(){		// summary:		//		Autodetects the best possible persistent storage provider		//		available on this platform. 		if(this.initialized == true) // already finished			return;					// go through each provider, seeing if it can be used		var providerToUse = null;		for(var i = 0; i < this.providers.length; i++) {			providerToUse = this.providers[i];			if(providerToUse.isAvailable()){				break;			}		}					if(providerToUse == null){ // no provider available			this.initialized = true;			this.available = false;			this.currentProvider = null;			dojo.raise("No storage provider found for this platform");		}					// create this provider and copy over it's properties		this.currentProvider = providerToUse;	  	for(var i in providerToUse){	  		dojo.storage[i] = providerToUse[i];		}		dojo.storage.manager = this;				// have the provider initialize itself		dojo.storage.initialize();				this.initialized = true;		this.available = true;	};		this.isAvailable = function(){ /*Boolean*/		// summary: Returns whether any storage options are available.		return this.available;	};		this.isInitialized = function(){ /*Boolean*/	 	// summary:		//		Returns whether the storage system is initialized and ready to		//		be used. 		// FIXME: This should _really_ not be in here, but it fixes a bug		if(dojo.flash.ready == false){			return false;		}else{			return this.initialized;		}	};	this.supportsProvider = function(/*string*/ storageClass){		// summary: Determines if this platform supports the given storage provider.		// description:		//		Example:		//			dojo.storage.manager.supportsProvider(		//				"dojo.storage.browser.InternetExplorerStorageProvider");		// construct this class dynamically		try{			// dynamically call the given providers class level isAvailable()			// method			var provider = eval("new " + storageClass + "()");			var results = provider.isAvailable();			if(results == null || typeof results == "undefined")				return false;			return results;		}catch (exception){			dojo.debug("exception="+exception);			return false;		}	};	/** Gets the current provider. */	this.getProvider = function(){		return this.currentProvider;	};		this.loaded = function(){		// summary:		//		The storage provider should call this method when it is loaded		//		and ready to be used. Clients who will use the provider will		//		connect to this method to know when they can use the storage		//		system:	};};
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/storage.js/clean/www/resources/dojo-ajax/src/storage.js