summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/plugin_loader.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-09-06 15:27:06 +0200
committerPetr Vobornik <pvoborni@redhat.com>2013-10-16 18:08:17 +0200
commitefafd7fe871bc368b91db78bb132abb027141a24 (patch)
treef6d71bae937e31c7090828382af8b404b1ce7e1f /install/ui/src/freeipa/plugin_loader.js
parent3fa304d95ec59efe0eb1cb8241d88a173802b172 (diff)
downloadfreeipa-efafd7fe871bc368b91db78bb132abb027141a24.tar.gz
freeipa-efafd7fe871bc368b91db78bb132abb027141a24.tar.xz
freeipa-efafd7fe871bc368b91db78bb132abb027141a24.zip
Web UI source code annotation
Part of ongoing Web UI documentation effort. Source code is annotated in a way that it can be processed by documentation generator.
Diffstat (limited to 'install/ui/src/freeipa/plugin_loader.js')
-rw-r--r--install/ui/src/freeipa/plugin_loader.js23
1 files changed, 20 insertions, 3 deletions
diff --git a/install/ui/src/freeipa/plugin_loader.js b/install/ui/src/freeipa/plugin_loader.js
index ce545301b..de3bc4357 100644
--- a/install/ui/src/freeipa/plugin_loader.js
+++ b/install/ui/src/freeipa/plugin_loader.js
@@ -18,9 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/**
- * Plugin loader
- */
define([
'dojo/_base/array',
'dojo/_base/lang',
@@ -28,8 +25,17 @@ define([
'dojo/promise/all'
],function(array, lang, Deferred, all) {
+ /**
+ * Plugin loader
+ * @class
+ * @singleton
+ */
var plugin_loader = {
+ /**
+ * Register plugins
+ * @param {Array.<string>} plugins
+ */
register_plugins: function(plugins) {
var packages = [];
@@ -44,6 +50,11 @@ define([
require({ packages: packages});
},
+ /**
+ * Load plugin
+ * @param {string} name
+ * @return {Promise}
+ */
load_plugin: function(name) {
var plugin_loaded = new Deferred();
@@ -56,6 +67,12 @@ define([
return plugin_loaded.promise;
},
+ /**
+ * Load plugins
+ *
+ * - loads plugin list from `freeipa/plugins` module.
+ * @return {Promise}
+ */
load_plugins: function() {
var plugins_loaded = new Deferred();