Author: gotcha
Date: Sun Oct 26 17:59:20 2008
New Revision: 59426
Modified:
kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/registries.js
Log:
rename variable
Modified:
kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/registries.js
==============================================================================
--- kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/registries.js
(original)
+++ kukit/kukit.js/branch/ree-service-layer-and-refactoring/kukit/registries.js
Sun Oct 26 17:59:20 2008
@@ -18,7 +18,7 @@
* keyed by the action name. However in case of a service registry,
* different components may provide the requested item, and the final
* value of the method is decided at finalization and all this logic
- * is handled by the Factory. In case of service
+ * is handled by the FactoryClass. In case of service
* registries, this allows that "define service" and "provide service"
* sections can be in different javascript files (plugins), and the
* final outcome is independent of the order of their execution.
@@ -51,7 +51,7 @@
* In the initialization the registry name and the item factory
* need to be supplied as parameters.
*
- * registries.initializeRegistry('myregistry', MyFactory);
+ * registries.initializeRegistry('myregistry', MyFactoryClass);
*
* After this the registrar object can be looked up with:
*
@@ -127,11 +127,11 @@
var Registrar = function() {
- this.initialize = function(registryName, Factory) {
+ this.initialize = function(registryName, FactoryClass) {
this.registryName = registryName;
this.bound = false;
this.factories = {};
- this.Factory = Factory;
+ this.FactoryClass = FactoryClass;
};
this.getItemFactory = function(name) {
@@ -142,7 +142,7 @@
// for this method name
//
// instantiate the factory
- factory = this.factories[name] = new this.Factory(this, name);
+ factory = this.factories[name] = new this.FactoryClass(this, name);
}
return factory;
};
@@ -192,17 +192,17 @@
this.schema = {};
- this.initializeRegistry = function(registryName, Factory) {
+ this.initializeRegistry = function(registryName, FactoryClass) {
// This sets up the registry given by name with the
- // specified Factory class, or checks it.
+ // specified FactoryClass class, or checks it.
// This method needs to be called preceding the calls
// to getItemFactory on the given registrar.
// It can be called more times for the same registry.
//
;;; // Check for missing parameter; this will cause an error later anyway.
-;;; if (! Factory) {
+;;; if (! FactoryClass) {
;;; kukit.E = 'Registries.initializeRegistry() is called for
registry [';
-;;; kukit.E += registryName + '] without a Factory parameter.';
+;;; kukit.E += registryName + '] without a FactoryClass
parameter.';
;;; throw new Error(kukit.E);
;;; }
// Check prohibited names
@@ -217,13 +217,13 @@
// create the registrar on demand
if (typeof(registrar) == 'undefined') {
// create the registrar and store it on myself
- this.schema[registryName] = new Registrar(registryName, Factory);
+ this.schema[registryName] = new Registrar(registryName,
FactoryClass);
} else {
- // check that the same Factory was provided. If not,
+ // check that the same FactoryClass was provided. If not,
// it's a conflict.
- if (registrar.Factory != Factory) {
+ if (registrar.FactoryClass != FactoryClass) {
;;; kukit.E = 'Registries.initializeRegistry() is called for
registry [';
-;;; kukit.E += registryName + '] with a different Factory than
earlier.';
+;;; kukit.E += registryName + '] with a different FactoryClass
than earlier.';
throw new Error(kukit.E);
}
}
_______________________________________________
Kukit-checkins mailing list
[email protected]
http://codespeak.net/mailman/listinfo/kukit-checkins