Author: erinnp
Date: Thu Jul 18 18:32:13 2013
New Revision: 1504588
URL: http://svn.apache.org/r1504588
Log:
Finalizing core jsdocs
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_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_widget.js
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_widget_manager.js
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_wookie.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=1504588&r1=1504587&r2=1504588&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
Thu Jul 18 18:32:13 2013
@@ -18,13 +18,27 @@
*/
/**
- * The rave core module.
+ * The rave core module. This file assembles the dependency tree onto one
namespace and presents a consolidated api.
+ * In virtually all cases, you will not need to require the individual
modules. Instead, you can require 'rave' to
+ * access the rave api object. The rave api is extended by the api of each of
the mixin modules. In addition it attaches
+ * rave_api to rave.api, rave_widget onto rave.RegionWidget, and rave_log onto
rave.log.
*
* @module rave
* @mixes module:rave_event_manager
* @mixes module:rave_widget_manager
* @mixes module:rave_state_manager
* @mixes module:rave_view_manager
+ * @example
+ *
+ * require(['rave'], function(rave){
+ *
+ * rave.registerWidget('1', {id: 9});
+ *
+ * rave.registerOnInitHandler(function(){
+ * rave.api.rpc.getFriends({successCallback: rave.log});
+ * });
+ *
+ * });
*/
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'],
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=1504588&r1=1504587&r2=1504588&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
Thu Jul 18 18:32:13 2013
@@ -19,11 +19,6 @@
define(['jquery'], function ($) {
/**
- * @external $
- * @see {@link http://api.jquery.com/jQuery.ajax/ $.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.
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=1504588&r1=1504587&r2=1504588&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
Thu Jul 18 18:32:13 2013
@@ -837,7 +837,13 @@ define(['underscore', 'core/rave_ajax',
})();
var exports = {
+ /**
+ * Rest api namespace
+ */
rest: restApi,
+ /**
+ * Rpc namespace
+ */
rpc: rpcApi
};
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=1504588&r1=1504587&r2=1504588&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
Thu Jul 18 18:32:13 2013
@@ -18,37 +18,34 @@
*/
/**
- * @module rave_openajax_hub
* @requires rave_log
*/
-define(['underscore', 'core/rave_log', 'osapi'], function(_, log){
+define(['underscore', 'core/rave_log', 'osapi'], function (_, log) {
+
+ if (_.isUndefined(OpenAjax)) {
+ throw new Error("No implementation of OpenAjax found. " +
+ "Please ensure that an implementation has been included in the
page.");
+ }
+
/**
- * Returns an OpenAjax.hub.ManagedHub instance.w
+ * Returns an OpenAjax.hub.ManagedHub instance.
* @exports rave_openajax_hub
* @see
http://www.openajax.org/member/wiki/OpenAjax_Hub_2.0_Specification_Managed_Hub_APIs
*/
- var openAjaxHub;
-
- if (!openAjaxHub) {
- if (_.isUndefined(OpenAjax)) {
- throw new Error("No implementation of OpenAjax found. " +
- "Please ensure that an implementation has been included in the
page.");
+ var exports = new OpenAjax.hub.ManagedHub({
+ onSubscribe: function (topic, container) {
+ log((container == null ? "Container" : container.getClientID()) +
" subscribes to this topic '" + topic + "'");
+ return true;
+ },
+ onUnsubscribe: function (topic, container) {
+ log((container == null ? "Container" : container.getClientID()) +
" unsubscribes from this topic '" + topic + "'");
+ return true;
+ },
+ onPublish: function (topic, data, pcont, scont) {
+ log((pcont == null ? "Container" : pcont.getClientID()) + "
publishes '" + data + "' to topic '" + topic + "' subscribed by " + (scont ==
null ? "Container" : scont.getClientID()));
+ return true;
}
- openAjaxHub = new OpenAjax.hub.ManagedHub({
- onSubscribe:function (topic, container) {
- log((container == null ? "Container" :
container.getClientID()) + " subscribes to this topic '" + topic + "'");
- return true;
- },
- onUnsubscribe:function (topic, container) {
- log((container == null ? "Container" :
container.getClientID()) + " unsubscribes from this topic '" + topic + "'");
- return true;
- },
- onPublish:function (topic, data, pcont, scont) {
- log((pcont == null ? "Container" : pcont.getClientID()) + "
publishes '" + data + "' to topic '" + topic + "' subscribed by " + (scont ==
null ? "Container" : scont.getClientID()));
- return true;
- }
- });
- }
+ });
- return openAjaxHub;
+ return exports;
})
\ No newline at end of file
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=1504588&r1=1504587&r2=1504588&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
Thu Jul 18 18:32:13 2013
@@ -151,10 +151,6 @@ define(['underscore', 'core/rave_view_ma
}
}
- /**
- *
- * @param widget
- */
exports.initWidget = function (widget) {
widget.error = getMetadataErrors(widget.metadata);
if (!widget.error) {
@@ -162,10 +158,6 @@ define(['underscore', 'core/rave_view_ma
}
}
- /*
- Opts -
- full spectrum of allowed render options!
- */
exports.renderWidget = function (widget, el, opts) {
if (widget.error) {
widget.renderError(el, widget.error.message);
Modified:
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_widget.js
URL:
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_widget.js?rev=1504588&r1=1504587&r2=1504588&view=diff
==============================================================================
---
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_widget.js
(original)
+++
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_widget.js
Thu Jul 18 18:32:13 2013
@@ -57,8 +57,8 @@ define(['underscore', 'core/rave_api', '
}
/**
- * Extends the regionWidget's prototype. Convenience function for
adding functionality
- * to the regionWidget interface
+ * Extends the RegionWidget's prototype. Convenience function for
adding functionality
+ * to the RegionWidget interface
* @param mixin {object}
*/
Widget.extend = function (mixin) {
Modified:
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_widget_manager.js
URL:
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_widget_manager.js?rev=1504588&r1=1504587&r2=1504588&view=diff
==============================================================================
---
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_widget_manager.js
(original)
+++
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_widget_manager.js
Thu Jul 18 18:32:13 2013
@@ -89,8 +89,8 @@ define(['underscore', 'core/rave_widget'
* @return {Array.<RegionWidget>}
* @example
*
- * registerWidget({id: '1', regionId: '1'});
- * registerWidget({id: '2', regionId: '2'});
+ * registerWidget('1', {id: '1', regionId: '1'});
+ * registerWidget('2', {id: '2', regionId: '2'});
*
* getWidgets(); //returns both regionWidgets
* getWidgets({regionId: '2'}); //returns only the second regionWidget
Modified:
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_wookie.js
URL:
http://svn.apache.org/viewvc/rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_wookie.js?rev=1504588&r1=1504587&r2=1504588&view=diff
==============================================================================
---
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_wookie.js
(original)
+++
rave/trunk/rave-portal-resources/src/main/webapp/static/script/core/rave_wookie.js
Thu Jul 18 18:32:13 2013
@@ -17,6 +17,12 @@
* under the License.
*/
+/**
+ * Implements wookie specific features of the rave_widget interface
+ * @module rave_wookie
+ * @requires rave_openajax_hub
+ * @requires rave_state_manager
+ */
define(['core/rave_openajax_hub', 'core/rave_state_manager'],
function(managedHub, stateManager){
var exports = {}