Author: erinnp
Date: Wed Jul 17 20:28:35 2013
New Revision: 1504268

URL: http://svn.apache.org/r1504268
Log:
document more core modules with jsdoc comments

Modified:
    rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/main.js
    
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_ajax.js
    
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_api.js
    
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_event_manager.js
    
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_log.js
    
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_openajax_hub.js
    
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_opensocial.js
    
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_providers.js
    
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_state_manager.js

Modified: 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/main.js
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/main.js?rev=1504268&r1=1504267&r2=1504268&view=diff
==============================================================================
--- rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/main.js 
(original)
+++ rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/main.js 
Wed Jul 17 20:28:35 2013
@@ -17,18 +17,30 @@
  * under the License.
  */
 
+/**
+ * @namespace rave
+ */
 define(['underscore', 'core/rave_widget_manager', 'core/rave_api', 
'core/rave_widget', 'core/rave_log',
     'core/rave_event_manager', 'core/rave_view_manager', 
'core/rave_state_manager'],
     function (_, widgetManager, api, RegionWidget, log, eventManager, 
viewManager, stateManager) {
 
         var rave = {};
 
+        /**
+         * @
+         */
         rave.api = api;
         rave.RegionWidget = RegionWidget;
         rave.log = log;
+
+
         _.extend(rave, eventManager);
         _.extend(rave, viewManager);
         _.extend(rave, widgetManager);
+
+        /**
+         * @mixes rave_state_manager
+         */
         _.extend(rave, stateManager);
 
         return rave;

Modified: 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_ajax.js
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_ajax.js?rev=1504268&r1=1504267&r2=1504268&view=diff
==============================================================================
--- 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_ajax.js
 (original)
+++ 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_ajax.js
 Wed Jul 17 20:28:35 2013
@@ -17,21 +17,19 @@
  * under the License.
  */
 
-
-/*
-
- */
-
-/**
- Wraps the rave client's ajax functionality.
- By default rave uses jquery as its ajax library. If you want to use another 
ajax library overlay this file
- and return a function that conforms with the api of jquery's ajax() function 
- http://api.jquery.com/jQuery.ajax/
- @module rave_ajax
- */
-define(['jquery'], function($){
+define(['jquery'], function ($) {
+    /**
+     * @external $
+     * @see {@link http://api.jquery.com/jQuery.ajax/ $.ajax}
+     */
 
     /**
-    Function ajax
+     * Wraps the rave client's ajax functionality.
+     * By default rave uses jquery as its ajax library. If you want to use 
another ajax library overlay this file
+     * and return a function that conforms with the api of jquery's ajax() 
function.
+     * @exports rave_ajax
+     * @borrows $.ajax as rave_ajax
+     * @see {@link http://api.jquery.com/jQuery.ajax/ $.ajax}
      */
     var ajax = $.ajax;
 

Modified: 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_api.js
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_api.js?rev=1504268&r1=1504267&r2=1504268&view=diff
==============================================================================
--- 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_api.js 
(original)
+++ 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_api.js 
Wed Jul 17 20:28:35 2013
@@ -17,9 +17,16 @@
  * under the License.
  */
 
+/**
+ * Helper functions for interacting with the rave rpc and rest apis.
+ *
+ * @module rave_api
+ * @requires rave_ajax
+ * @requires rave_state_manager
+ * @requires rave_event_manager
+ */
 define(['underscore', 'core/rave_ajax', 'core/rave_state_manager', 
'core/rave_event_manager'],
     function (_, ajax, stateManager, eventManager) {
-        //stores virtual host context of application execution
 
         var context = '';
         eventManager.registerOnInitHandler(function () {
@@ -828,7 +835,9 @@ define(['underscore', 'core/rave_ajax', 
             };
 
         })();
-
+        /**
+         * @exports rave_api
+         */
         return {
             rest: restApi,
             rpc: rpcApi

Modified: 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_event_manager.js
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_event_manager.js?rev=1504268&r1=1504267&r2=1504268&view=diff
==============================================================================
--- 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_event_manager.js
 (original)
+++ 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_event_manager.js
 Wed Jul 17 20:28:35 2013
@@ -17,6 +17,10 @@
  * under the License.
  */
 
+/**
+ * Manages the registering and execution of initialization handlers
+ * @module rave_event_manager
+ */
 define(['underscore'], function(_){
 
     var INITIALIZED = false,
@@ -24,6 +28,10 @@ define(['underscore'], function(_){
 
     var exports = {}
 
+    /**
+     * Registers a callback function to be executed at the time that rave is 
initialized.
+     * @param {function} handler
+     */
     exports.registerOnInitHandler = function (handler) {
         if (!(_.isFunction(handler))) {
             throw new Error('Init event handler must be a function');
@@ -34,6 +42,9 @@ define(['underscore'], function(_){
         initHandlers.push(handler);
     }
 
+    /**
+     * Executes all registered init handlers in the order they were registered.
+     */
     exports.init = function () {
         INITIALIZED = true;
         _.each(initHandlers, function (fn) {

Modified: 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_log.js
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_log.js?rev=1504268&r1=1504267&r2=1504268&view=diff
==============================================================================
--- 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_log.js 
(original)
+++ 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_log.js 
Wed Jul 17 20:28:35 2013
@@ -17,7 +17,15 @@
  * under the License.
  */
 
+/**
+ * @module rave_log
+ */
 define([], function(){
+
+    /**
+     * Safely wraps console.log to prevent errors on browsers without console 
support.
+     * @exports rave_log
+     */
     return function(msg){
         if  (console && console.log) {
             console.log(msg);

Modified: 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_openajax_hub.js
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_openajax_hub.js?rev=1504268&r1=1504267&r2=1504268&view=diff
==============================================================================
--- 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_openajax_hub.js
 (original)
+++ 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_openajax_hub.js
 Wed Jul 17 20:28:35 2013
@@ -17,7 +17,16 @@
  * under the License.
  */
 
+/**
+ * @module rave_openajax_hub
+ * @requires rave_log
+ */
 define(['underscore', 'core/rave_log', 'osapi'], function(_, log){
+    /**
+     * Returns an OpenAjax.hub.ManagedHub instance.w
+     * @exports rave_openajax_hub
+     * @see 
http://www.openajax.org/member/wiki/OpenAjax_Hub_2.0_Specification_Managed_Hub_APIs
+     */
     var openAjaxHub;
 
     if (!openAjaxHub) {

Modified: 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_opensocial.js
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_opensocial.js?rev=1504268&r1=1504267&r2=1504268&view=diff
==============================================================================
--- 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_opensocial.js
 (original)
+++ 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_opensocial.js
 Wed Jul 17 20:28:35 2013
@@ -17,6 +17,15 @@
  * under the License.
  */
 
+/**
+ * Implements opensocial specific features of the rave_widget interface
+ * @module rave_opensocial
+ * @requires rave_view_manager
+ * @requires rave_api
+ * @requires rave_openajax_hub
+ * @requires rave_log
+ * @requires rave_state_manager
+ */
 define(['underscore', 'core/rave_view_manager', 'core/rave_api', 
'core/rave_openajax_hub', 'core/rave_log', 'core/rave_state_manager', 'osapi'],
     function (_, viewManager, api, managedHub, log, stateManager) {
         var exports = {};
@@ -142,6 +151,10 @@ define(['underscore', 'core/rave_view_ma
             }
         }
 
+        /**
+         *
+         * @param widget
+         */
         exports.initWidget = function (widget) {
             widget.error = getMetadataErrors(widget.metadata);
             if (!widget.error) {

Modified: 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_providers.js
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_providers.js?rev=1504268&r1=1504267&r2=1504268&view=diff
==============================================================================
--- 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_providers.js
 (original)
+++ 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_providers.js
 Wed Jul 17 20:28:35 2013
@@ -18,11 +18,19 @@
  */
 
 
-/*
-    This determines which providers the client supports. If you need only os 
or wookie, overlay this file.
-    Providers should be registered with ALL LOWERCASE keys
+/**
+ * Exports the providers that the rave client will support. If your 
implementation does
+ * not need to support both opensocial and wookie providers, overlay this file 
to
+ * export only the providers you will support. This reduces the amount of 
script that will
+ * be downloaded and parsed by the client.
+ * @module rave_providers
+ * @requires rave_wookie
+ * @requires rave_opensocial
  */
 define(['core/rave_wookie', 'core/rave_opensocial'], function(wookie, os){
+    /**
+     * @exports rave_providers
+     */
     return{
         w3c:wookie,
         opensocial:os

Modified: 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_state_manager.js
URL: 
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_state_manager.js?rev=1504268&r1=1504267&r2=1504268&view=diff
==============================================================================
--- 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_state_manager.js
 (original)
+++ 
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_state_manager.js
 Wed Jul 17 20:28:35 2013
@@ -20,7 +20,7 @@
 
 /**
  * Manages the state of page-level variables.
- * @module rave
+ * @module rave_state_manager
  */
 define([], function () {
 


Reply via email to