You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by li...@apache.org on 2010/01/13 21:57:34 UTC
svn commit: r898941 [1/2] - in
/incubator/shindig/trunk/features/src/main/javascript/features: core.auth/
core.config/ core.io/ core.json/ core.legacy/ core.log/ core.prefs/
core.util/ dynamic-height.util/ dynamic-height/ flash/ i18n/ minimessage/
oaut...
Author: lindner
Date: Wed Jan 13 20:57:30 2010
New Revision: 898941
URL: http://svn.apache.org/viewvc?rev=898941&view=rev
Log:
SHINDIG-1264 - jsdoc fixes for closure compiler
Modified:
incubator/shindig/trunk/features/src/main/javascript/features/core.auth/auth.js
incubator/shindig/trunk/features/src/main/javascript/features/core.config/config.js
incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js
incubator/shindig/trunk/features/src/main/javascript/features/core.json/json.js
incubator/shindig/trunk/features/src/main/javascript/features/core.legacy/legacy.js
incubator/shindig/trunk/features/src/main/javascript/features/core.log/log.js
incubator/shindig/trunk/features/src/main/javascript/features/core.prefs/prefs.js
incubator/shindig/trunk/features/src/main/javascript/features/core.util/util.js
incubator/shindig/trunk/features/src/main/javascript/features/dynamic-height.util/dynamic-height-util.js
incubator/shindig/trunk/features/src/main/javascript/features/dynamic-height/dynamic-height.js
incubator/shindig/trunk/features/src/main/javascript/features/flash/flash.js
incubator/shindig/trunk/features/src/main/javascript/features/i18n/formatting.js
incubator/shindig/trunk/features/src/main/javascript/features/i18n/numberformat.js
incubator/shindig/trunk/features/src/main/javascript/features/minimessage/minimessage.js
incubator/shindig/trunk/features/src/main/javascript/features/oauthpopup/oauthpopup.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-data-context/datacontext.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-data/data.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/activity.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/address.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/bodytype.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/collection.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/container.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/datarequest.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/dataresponse.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/email.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/enum.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/environment.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/idspec.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/mediaitem.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/message.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/messagecollection.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/name.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/navigationparameters.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/opensocial.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/organization.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/person.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/phone.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/responseitem.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/url.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-templates/base.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-templates/compiler.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-templates/container.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-templates/jsTemplate/jsevalcontext.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-templates/jsTemplate/jstemplate.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-templates/jsTemplate/util.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-templates/os.js
incubator/shindig/trunk/features/src/main/javascript/features/opensocial-templates/template.js
incubator/shindig/trunk/features/src/main/javascript/features/osapi/batch.js
incubator/shindig/trunk/features/src/main/javascript/features/osapi/gadgetsrpctransport.js
incubator/shindig/trunk/features/src/main/javascript/features/osapi/jsonrpctransport.js
incubator/shindig/trunk/features/src/main/javascript/features/osapi/osapi.js
incubator/shindig/trunk/features/src/main/javascript/features/pubsub/pubsub-router.js
incubator/shindig/trunk/features/src/main/javascript/features/pubsub/pubsub.js
incubator/shindig/trunk/features/src/main/javascript/features/rpc/ifpc.transport.js
incubator/shindig/trunk/features/src/main/javascript/features/rpc/rmr.transport.js
incubator/shindig/trunk/features/src/main/javascript/features/rpc/rpc.js
incubator/shindig/trunk/features/src/main/javascript/features/setprefs/setprefs.js
incubator/shindig/trunk/features/src/main/javascript/features/settitle/settitle.js
incubator/shindig/trunk/features/src/main/javascript/features/skins/skins.js
incubator/shindig/trunk/features/src/main/javascript/features/tabs/tabs.js
incubator/shindig/trunk/features/src/main/javascript/features/views/views.js
incubator/shindig/trunk/features/src/main/javascript/features/xmlutil/xmlutil.js
Modified: incubator/shindig/trunk/features/src/main/javascript/features/core.auth/auth.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/core.auth/auth.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/core.auth/auth.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/core.auth/auth.js Wed Jan 13 20:57:30 2010
@@ -117,6 +117,7 @@
* We send the expanded auth token in the body of post requests, so we
* don't run into problems with length there. (But people who put
* several hundred characters in their gadget URLs are still lame.)
+ * @param {string} urlParams
*/
function addParamsToToken(urlParams) {
var args = authToken.split('&');
@@ -163,7 +164,7 @@
/**
* Gets the auth token.
*
- * @return {String} the gadget authentication token
+ * @return {string} the gadget authentication token
*
* @member shindig.auth
*/
@@ -174,7 +175,7 @@
/**
* Updates the security token with new data from the gadget server.
*
- * @param {String} newToken the new auth token data.
+ * @param {string} newToken the new auth token data.
*
* @member shindig.auth
*/
@@ -185,6 +186,7 @@
/**
* Quickly retrieves data that is known to have been injected by
* a trusted container server.
+ * @return {Object}
*/
getTrustedData : function() {
return trusted;
Modified: incubator/shindig/trunk/features/src/main/javascript/features/core.config/config.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/core.config/config.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/core.config/config.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/core.config/config.js Wed Jan 13 20:57:30 2010
@@ -68,13 +68,13 @@
* Registers a configurable component and its configuration parameters.
* Multiple callbacks may be registered for a single component if needed.
*
- * @param {String} component The name of the component to register. Should
+ * @param {string} component The name of the component to register. Should
* be the same as the fully qualified name of the <Require> feature or
* the name of a fully qualified javascript object reference
* (e.g. "gadgets.io").
- * @param {Object} opt_validators Mapping of option name to validation
+ * @param {Object=} opt_validators Mapping of option name to validation
* functions that take the form function(data) {return isValid(data);}
- * @param {Function} opt_callback A function to be invoked when a
+ * @param {function(Object)=} opt_callback A function to be invoked when a
* configuration is registered. If passed, this function will be invoked
* immediately after a call to init has been made. Do not assume that
* dependent libraries have been configured until after init is
@@ -100,7 +100,7 @@
/**
* Retrieves configuration data on demand.
*
- * @param {String} opt_component The component to fetch. If not provided
+ * @param {string=} opt_component The component to fetch. If not provided
* all configuration will be returned.
* @return {Object} The requested configuration, or an empty object if no
* configuration has been registered for that component.
@@ -116,7 +116,7 @@
* Initializes the configuration.
*
* @param {Object} config The full set of configuration data.
- * @param {Boolean} opt_noValidation True if you want to skip validation.
+ * @param {boolean=} opt_noValidation True if you want to skip validation.
* @throws {Error} If there is a configuration error.
*/
init: function(config, opt_noValidation) {
@@ -153,7 +153,7 @@
/**
* Ensures that data is one of a fixed set of items.
- * @param {Array.<String>} list The list of valid values.
+ * @param {Array.<string>} list The list of valid values.
* Also supports argument sytax: EnumValidator("Dog", "Cat", "Fish");
*/
EnumValidator: function(list) {
Modified: incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/core.io/io.js Wed Jan 13 20:57:30 2010
@@ -46,6 +46,7 @@
/**
* Internal facility to create an xhr request.
+ * @nosideeffects
*/
function makeXhr() {
var x;
@@ -66,8 +67,8 @@
* if the error is fatal.
*
* @param {Object} xobj The XHR object to check
- * @param {Function} callback The callback to call if the error is fatal
- * @return true if the xobj is not ready to be processed
+ * @param {function(Object)} callback The callback to call if the error is fatal
+ * @return {boolean} true if the xobj is not ready to be processed
*/
function hadError(xobj, callback) {
if (xobj.readyState !== 4) {
@@ -100,8 +101,8 @@
/**
* Handles non-proxied XHR callback processing.
*
- * @param {String} url
- * @param {Function} callback
+ * @param {string} url
+ * @param {function(Object)} callback
* @param {Object} params
* @param {Object} xobj
*/
@@ -120,11 +121,11 @@
/**
* Handles XHR callback processing.
*
- * @param {String} url
- * @param {Function} callback
+ * @param {string} url
+ * @param {function(Object)} callback
* @param {Object} params
* @param {Object} xobj
- */
+ */
function processResponse(url, callback, params, xobj) {
if (hadError(xobj, callback)) {
return;
@@ -147,6 +148,12 @@
callback(transformResponseData(params, data));
}
+ /**
+ * @param {Object} params
+ * @param {Object} data
+ * @return {Object}
+ */
+
function transformResponseData(params, data) {
// Sometimes rc is not present, generally when used
// by jsonrpccontainer, so assume 200 in its absence.
@@ -214,13 +221,15 @@
/**
* Sends an XHR post or get request
*
- * @param realUrl The url to fetch data from that was requested by the gadget
- * @param proxyUrl The url to proxy through
- * @param callback The function to call once the data is fetched
- * @param postData The data to post to the proxyUrl
- * @param params The params to use when processing the response
- * @param processResponseFunction The function that should process the
+ * @param {string} realUrl The url to fetch data from that was requested by the gadget
+ * @param {string} proxyUrl The url to proxy through
+ * @param {function()} callback The function to call once the data is fetched
+ * @param {Object} paramData The params to use when processing the response
+ * @param {function(string,function(Object),Object,Object)}
+ * processResponseFunction The function that should process the
* response from the sever before calling the callback
+ * @param {string=} opt_contentType - Optional content type defaults to
+ * 'application/x-www-form-urlencoded'
*/
function makeXhrRequest(realUrl, proxyUrl, callback, paramData, method,
params, processResponseFunction, opt_contentType) {
@@ -250,11 +259,11 @@
* directive. The preloader will only satisfy a request for a specific piece
* of content once.
*
- * @param postData The definition of the request to be executed by the proxy
- * @param params The params to use when processing the response
- * @param callback The function to call once the data is fetched
- * @return true if the request can be satisfied by the preloaded content
- * false otherwise
+ * @param {Object} postData The definition of the request to be executed by the proxy
+ * @param {Object} params The params to use when processing the response
+ * @param {function(Object)} callback The function to call once the data is fetched
+ * @return {boolean} true if the request can be satisfied by the preloaded
+ * content false otherwise
*/
function respondWithPreload(postData, params, callback) {
if (gadgets.io.preloaded_ && postData.httpMethod === "GET") {
@@ -313,10 +322,10 @@
* {contentType: gadgets.io.ContentType.FEED});
* </pre>
*
- * @param {String} url The URL where the content is located
- * @param {Function} callback The function to call with the data from the
- * URL once it is fetched
- * @param {Map.<gadgets.io.RequestParameters, Object>} opt_params
+ * @param {string} url The URL where the content is located
+ * @param {function(Object)} callback The function to call with the data from
+ * the URL once it is fetched
+ * @param {Object.<gadgets.io.RequestParameters, Object>=} opt_params
* Additional
* <a href="gadgets.io.RequestParameters.html">parameters</a>
* to pass to the request
@@ -389,7 +398,7 @@
}
paramData.oauthState = oauthState || "";
// Just copy the OAuth parameters into the req to the server
- for (opt in params) {
+ for (var opt in params) {
if (params.hasOwnProperty(opt)) {
if (opt.indexOf("OAUTH_") === 0) {
paramData[opt] = params[opt];
@@ -400,6 +409,7 @@
var proxyUrl = config.jsonProxyUrl.replace("%host%", document.location.host);
+ // FIXME -- processResponse is not used in call
if (!respondWithPreload(paramData, params, callback, processResponse)) {
if (httpMethod === "GET" && refreshInterval > 0) {
// this content should be cached
@@ -441,9 +451,9 @@
* (key=value&...)
*
* @param {Object} fields The post fields you wish to encode
- * @param {Boolean} opt_noEscaping An optional parameter specifying whether
+ * @param {boolean=} opt_noEscaping An optional parameter specifying whether
* to turn off escaping of the parameters. Defaults to false.
- * @return {String} The processed post data in www-form-urlencoded format.
+ * @return {string} The processed post data in www-form-urlencoded format.
*
* @member gadgets.io
*/
@@ -470,14 +480,14 @@
/**
* Gets the proxy version of the passed-in URL.
*
- * @param {String} url The URL to get the proxy URL for
- * @param {Object} opt_params Optional Parameter Object.
+ * @param {string} url The URL to get the proxy URL for
+ * @param {Object.<gadgets.io.RequestParameters, Object>=} opt_params Optional Parameter Object.
* The following properties are supported:
* .REFRESH_INTERVAL The number of seconds that this
* content should be cached. Defaults to 3600.
*
- * @return {String} The proxied version of the URL
- *
+ * @return {string} The proxied version of the URL
+ * @nosideeffects
* @member gadgets.io
*/
getProxyUrl : function (url, opt_params) {
@@ -519,14 +529,23 @@
"OAUTH_RECEIVED_CALLBACK"
]);
+/**
+ * @const
+ */
gadgets.io.MethodType = gadgets.util.makeEnum([
"GET", "POST", "PUT", "DELETE", "HEAD"
]);
+/**
+ * @const
+ */
gadgets.io.ContentType = gadgets.util.makeEnum([
"TEXT", "DOM", "JSON", "FEED"
]);
+/**
+ * @const
+ */
gadgets.io.AuthorizationType = gadgets.util.makeEnum([
"NONE", "SIGNED", "OAUTH"
]);
Modified: incubator/shindig/trunk/features/src/main/javascript/features/core.json/json.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/core.json/json.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/core.json/json.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/core.json/json.js Wed Jan 13 20:57:30 2010
@@ -65,7 +65,7 @@
/**
* Formats integers to 2 digits.
- * @param {Number} n
+ * @param {number} n
*/
function f(n) {
return n < 10 ? '0' + n : n;
@@ -93,6 +93,8 @@
/**
* Converts a json object into a string.
+ * @param {*} value
+ * @return {string}
*/
function stringify(value) {
var a, // The array holding the partial texts.
Modified: incubator/shindig/trunk/features/src/main/javascript/features/core.legacy/legacy.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/core.legacy/legacy.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/core.legacy/legacy.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/core.legacy/legacy.js Wed Jan 13 20:57:30 2010
@@ -123,6 +123,10 @@
}, params);
}
+/**
+ * @param {string} url
+ * @param {Object=} opt_params
+ */
function _IG_GetCachedUrl(url, opt_params) {
var params = opt_params || {};
params['REFRESH_INTERVAL'] = 3600;
@@ -131,9 +135,17 @@
}
return gadgets.io.getProxyUrl(url, params);
}
+/**
+ * @param {string} url
+ * @param {Object=} opt_params
+ */
function _IG_GetImageUrl(url, opt_params) {
return _IG_GetCachedUrl(url, opt_params);
}
+/**
+ * @param {string} url
+ * @return {Element}
+ */
function _IG_GetImage(url) {
var img = document.createElement('img');
img.src = _IG_GetCachedUrl(url);
@@ -163,7 +175,7 @@
/**
* Fetches an object by document id.
*
- * @param {String | Object} el The element you wish to fetch. You may pass
+ * @param {string | Object} el The element you wish to fetch. You may pass
* an object in which allows this to be called regardless of whether or
* not the type of the input is known.
* @return {HTMLElement} The element, if it exists in the document, or null.
@@ -176,7 +188,7 @@
* Fetches elements by tag name.
* This is functionally identical to document.getElementsByTagName()
*
- * @param {String} tag The tag to match elements against.
+ * @param {string} tag The tag to match elements against.
* @return {Array.<HTMLElement>} All elements of this tag type.
*/
function _gelstn(tag) {
@@ -190,7 +202,7 @@
/**
* Fetches elements with ids matching a given regular expression.
*
- * @param {tagName} tag The tag to match elements against.
+ * @param {string} tagName The tag to match elements against.
* @param {RegEx} regex The expression to match.
* @return {Array.<HTMLElement>} All elements of this tag type that match
* regex.
@@ -208,8 +220,8 @@
/**
* URI escapes the given string.
- * @param {String} str The string to escape.
- * @return {String} The escaped string.
+ * @param {string} str The string to escape.
+ * @return {string} The escaped string.
*/
function _esc(str) {
return window.encodeURIComponent ? encodeURIComponent(str) : escape(str);
@@ -217,8 +229,8 @@
/**
* URI unescapes the given string.
- * @param {String} str The string to unescape.
- * @return {String} The unescaped string.
+ * @param {string} str The string to unescape.
+ * @return {string} The unescaped string.
*/
function _unesc(str) {
return window.decodeURIComponent ? decodeURIComponent(str) : unescape(str);
@@ -227,8 +239,8 @@
/**
* Encodes HTML entities such as <, " and >.
*
- * @param {String} str The string to escape.
- * @return The escaped string.
+ * @param {string} str The string to escape.
+ * @return {string} The escaped string.
*/
function _hesc(str) {
return gadgets.util.escapeString(str);
@@ -237,8 +249,8 @@
/**
* Removes HTML tags from the given input string.
*
- * @param {String} str The string to strip.
- * @return The stripped string.
+ * @param {string} str The string to strip.
+ * @return {string} The stripped string.
*/
function _striptags(str) {
return str.replace(/<\/?[^>]+>/g, "");
@@ -247,8 +259,8 @@
/**
* Trims leading & trailing whitespace from the given string.
*
- * @param {String} str The string to trim.
- * @return {String} The trimmed string.
+ * @param {string} str The string to trim.
+ * @return {string} The trimmed string.
*/
function _trim(str) {
return str.replace(/^\s+|\s+$/g, "");
@@ -257,7 +269,7 @@
/**
* Toggles the given element between being shown and block-style display.
*
- * @param {String | HTMLElement} el The element to toggle.
+ * @param {string | HTMLElement} el The element to toggle.
*/
function _toggle(el) {
el = (typeof el === "string") ? _gel(el) : el;
@@ -271,38 +283,38 @@
}
/**
- * {Number} A counter used by uniqueId().
+ * @type {number} A counter used by uniqueId().
*/
var _global_legacy_uidCounter = 0;
/**
- * @return a unique number.
+ * @return {number} a unique number.
*/
function _uid() {
return _global_legacy_uidCounter++;
}
/**
- * @param {Number} a
- * @param {Number} b
- * @return The lesser of a or b.
+ * @param {number} a
+ * @param {number} b
+ * @return {number} The lesser of a or b.
*/
function _min(a, b) {
return (a < b ? a : b);
}
/**
- * @param {Number} a
- * @param {Number} b
- * @return The greater of a or b.
+ * @param {number} a
+ * @param {number} b
+ * @return {number} The greater of a or b.
*/
function _max(a, b) {
return (a > b ? a : b);
}
/**
- * @param {String} name
- * @param {Array.<String | Object>} sym
+ * @param {string} name
+ * @param {Array.<string | Object>} sym
*/
function _exportSymbols(name, sym) {
var attach = window;
Modified: incubator/shindig/trunk/features/src/main/javascript/features/core.log/log.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/core.log/log.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/core.log/log.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/core.log/log.js Wed Jan 13 20:57:30 2010
@@ -34,6 +34,7 @@
/**
* Log an informational message
+ * @param {Object} message - the message to log
*/
gadgets.log = function(message) {
gadgets.log.logAtLevel(gadgets.log.INFO, message);
@@ -42,6 +43,7 @@
/**
* Log a warning
+ * @param {Object} message - the message to log
*/
gadgets.warn = function(message) {
gadgets.log.logAtLevel(gadgets.log.WARNING, message);
@@ -49,6 +51,7 @@
/**
* Log an error
+ * @param {Object} message - The message to log
*/
gadgets.error = function(message) {
gadgets.log.logAtLevel(gadgets.log.ERROR, message);
@@ -56,7 +59,7 @@
/**
* Sets the log level threshold.
- * @param {Number} logLevel - New log level threshold.
+ * @param {number} logLevel - New log level threshold.
* @static
*/
gadgets.setLogLevel = function(logLevel) {
@@ -65,9 +68,8 @@
/**
* Logs a log message if output console is available, and log threshold is met.
- * @param {Number} level - the level to log with. Optional, defaults to
+ * @param {number} level - the level to log with. Optional, defaults to gadgets.log.INFO.
* @param {Object} message - The message to log
- * gadgets.log.INFO.
* @static
*/
gadgets.log.logAtLevel = function(level, message) {
@@ -90,29 +92,27 @@
/**
* Log level for informational logging.
* @static
+ * @const
*/
gadgets.log.INFO = 1;
/**
* Log level for warning logging.
* @static
+ * @const
*/
gadgets.log.WARNING = 2;
/**
- * Log level for error logging.
- * @static
- */
-
-/**
* Log level for no logging
* @static
+ * @const
*/
gadgets.log.NONE = 4;
/**
* Current log level threshold.
- * @type Number
+ * @type number
* @private
* @static
*/
Modified: incubator/shindig/trunk/features/src/main/javascript/features/core.prefs/prefs.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/core.prefs/prefs.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/core.prefs/prefs.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/core.prefs/prefs.js Wed Jan 13 20:57:30 2010
@@ -115,7 +115,7 @@
/**
* Sets internal values
- * @return {Boolean} True if the prefs is modified.
+ * @return {boolean} True if the prefs is modified.
*/
gadgets.Prefs.setInternal_ = function(key, value) {
var wasModified = false;
@@ -156,8 +156,8 @@
* Retrieves a preference as a string.
* Returned value will be html entity escaped.
*
- * @param {String} key The preference to fetch
- * @return {String} The preference; if not set, an empty string
+ * @param {string} key The preference to fetch
+ * @return {string} The preference; if not set, an empty string
*/
gadgets.Prefs.prototype.getString = function(key) {
if (key === ".lang") { key = "lang"; }
@@ -174,8 +174,8 @@
/**
* Retrieves a preference as an integer.
- * @param {String} key The preference to fetch
- * @return {Number} The preference; if not set, 0
+ * @param {string} key The preference to fetch
+ * @return {number} The preference; if not set, 0
*/
gadgets.Prefs.prototype.getInt = function(key) {
var val = parseInt(prefs[key], 10);
@@ -184,8 +184,8 @@
/**
* Retrieves a preference as a floating-point value.
- * @param {String} key The preference to fetch
- * @return {Number} The preference; if not set, 0
+ * @param {string} key The preference to fetch
+ * @return {number} The preference; if not set, 0
*/
gadgets.Prefs.prototype.getFloat = function(key) {
var val = parseFloat(prefs[key]);
@@ -194,8 +194,8 @@
/**
* Retrieves a preference as a boolean.
- * @param {String} key The preference to fetch
- * @return {Boolean} The preference; if not set, false
+ * @param {string} key The preference to fetch
+ * @return {boolean} The preference; if not set, false
*/
gadgets.Prefs.prototype.getBool = function(key) {
var val = prefs[key];
@@ -216,7 +216,7 @@
* this call.
* </p>
*
- * @param {String} key The pref to store
+ * @param {string} key The pref to store
* @param {Object} val The values to store
*/
gadgets.Prefs.prototype.set = function(key, value) {
@@ -228,8 +228,8 @@
* UserPref values that were not declared as lists are treated as
* one-element arrays.
*
- * @param {String} key The preference to fetch
- * @return {Array.<String>} The preference; if not set, an empty array
+ * @param {string} key The preference to fetch
+ * @return {Array.<string>} The preference; if not set, an empty array
*/
gadgets.Prefs.prototype.getArray = function(key) {
var val = prefs[key];
@@ -249,7 +249,7 @@
* To use this call,
* the gadget must require the feature setprefs.
*
- * @param {String} key The pref to store
+ * @param {string} key The pref to store
* @param {Array} val The values to store
*/
gadgets.Prefs.prototype.setArray = function(key, val) {
@@ -258,8 +258,8 @@
/**
* Fetches an unformatted message.
- * @param {String} key The message to fetch
- * @return {String} The message
+ * @param {string} key The message to fetch
+ * @return {string} The message
*/
gadgets.Prefs.prototype.getMsg = function(key) {
return messages[key] || "";
@@ -268,7 +268,7 @@
/**
* Gets the current country, returned as ISO 3166-1 alpha-2 code.
*
- * @return {String} The country for this module instance
+ * @return {string} The country for this module instance
*/
gadgets.Prefs.prototype.getCountry = function() {
return country;
@@ -278,7 +278,7 @@
* Gets the current language the gadget should use when rendering, returned as a
* ISO 639-1 language code.
*
- * @return {String} The language for this module instance
+ * @return {string} The language for this module instance
*/
gadgets.Prefs.prototype.getLang = function() {
return language;
@@ -287,7 +287,7 @@
/**
* Gets the module id for the current instance.
*
- * @return {String | Number} The module id for this module instance
+ * @return {string | number} The module id for this module instance
*/
gadgets.Prefs.prototype.getModuleId = function() {
return moduleId;
Modified: incubator/shindig/trunk/features/src/main/javascript/features/core.util/util.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/core.util/util.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/core.util/util.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/core.util/util.js Wed Jan 13 20:57:30 2010
@@ -32,7 +32,9 @@
gadgets.util = function() {
/**
* Parses URL parameters into an object.
- * @return {Array.<String>} The parameters
+ * @param {string} url - the url parameters to parse
+ * @return {Array.<string>} The parameters as an array
+ * @nosideeffects
*/
function parseUrlParams(url) {
// Get settings from url, 'hash' takes precedence over 'search' component
@@ -56,9 +58,14 @@
var services = {};
var onLoadHandlers = [];
- // Maps code points to the value to replace them with.
- // If the value is "false", the character is removed entirely, otherwise
- // it will be replaced with an html entity.
+ /**
+ * @enum {boolean}
+ * @private
+ * Maps code points to the value to replace them with.
+ * If the value is "false", the character is removed entirely, otherwise
+ * it will be replaced with an html entity.
+ */
+
var escapeCodePoints = {
// nul; most browsers truncate because they use c strings under the covers.
0 : false,
@@ -86,8 +93,9 @@
* Regular expression callback that returns strings from unicode code points.
*
* @param {Array} match Ignored
- * @param {String} value The codepoint value to convert
- * @return {String} The character corresponding to value.
+ * @param {number} value The codepoint value to convert
+ * @return {string} The character corresponding to value.
+ * @nosideeffects
*/
function unescapeEntity(match, value) {
return String.fromCharCode(value);
@@ -108,7 +116,7 @@
/**
* Gets the URL parameters.
*
- * @param {String} opt_url Optional URL whose parameters to parse.
+ * @param {string=} opt_url Optional URL whose parameters to parse.
* Defaults to window's current URL.
* @return {Object} Parameters passed into the query string
* @member gadgets.util
@@ -152,7 +160,7 @@
* @param {Object} scope The execution scope; may be null if there is no
* need to associate a specific instance of an object with this
* callback
- * @param {Function} callback The callback to invoke when this is run;
+ * @param {function(Object,Object)} callback The callback to invoke when this is run;
* any arguments passed in will be passed after your initial arguments
* @param {Object} var_args Initial arguments to be passed to the callback
*
@@ -178,11 +186,12 @@
/**
* Utility function for generating an "enum" from an array.
*
- * @param {Array.<String>} values The values to generate.
- * @return {Map<String,String>} An object with member fields to handle
+ * @param {Array.<string>} values The values to generate.
+ * @return {Object.<string,string>} An object with member fields to handle
* the enum.
*
* @private Implementation detail.
+ * @nosideeffects
*/
makeEnum : function (values) {
var obj = {};
@@ -195,10 +204,11 @@
/**
* Gets the feature parameters.
*
- * @param {String} feature The feature to get parameters for
+ * @param {string} feature The feature to get parameters for
* @return {Object} The parameters for the given feature, or null
*
* @member gadgets.util
+ * @nosideeffects
*/
getFeatureParameters : function (feature) {
return typeof features[feature] === "undefined" ? null : features[feature];
@@ -207,10 +217,11 @@
/**
* Returns whether the current feature is supported.
*
- * @param {String} feature The feature to test for
- * @return {Boolean} True if the feature is supported
+ * @param {string} feature The feature to test for
+ * @return {boolean} True if the feature is supported
*
* @member gadgets.util
+ * @nosideeffects
*/
hasFeature : function (feature) {
return typeof features[feature] !== "undefined";
@@ -223,6 +234,7 @@
* @return {Object} List of Services that enumerate their methods
*
* @member gadgets.util
+ * @nosideeffects
*/
getServices : function () {
return services;
@@ -230,7 +242,7 @@
/**
* Registers an onload handler.
- * @param {Function} callback The handler to run
+ * @param {function()} callback The handler to run
*
* @member gadgets.util
*/
@@ -260,9 +272,10 @@
* Otherwise, does not attempt to modify the input.
*
* @param {Object} input The object to escape
- * @param {Boolean} opt_escapeObjects Whether to escape objects.
+ * @param {boolean=} opt_escapeObjects Whether to escape objects.
* @return {Object} The escaped object
* @private Only to be used by the container, not gadgets.
+ * @nosideeffects
*/
escape : function(input, opt_escapeObjects) {
if (!input) {
@@ -294,8 +307,9 @@
* TODO: Parsing the string would probably be more accurate and faster than
* a bunch of regular expressions.
*
- * @param {String} str The string to escape
- * @return {String} The escaped string
+ * @param {string} str The string to escape
+ * @return {string} The escaped string
+ * @nosideeffects
*/
escapeString : function(str) {
if (!str) return str;
@@ -316,7 +330,9 @@
/**
* Reverses escapeString
*
- * @param {String} str The string to unescape.
+ * @param {string} str The string to unescape.
+ * @return {string}
+ * @nosideeffects
*/
unescapeString : function(str) {
if (!str) return str;
Modified: incubator/shindig/trunk/features/src/main/javascript/features/dynamic-height.util/dynamic-height-util.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/dynamic-height.util/dynamic-height-util.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/dynamic-height.util/dynamic-height-util.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/dynamic-height.util/dynamic-height-util.js Wed Jan 13 20:57:30 2010
@@ -23,12 +23,6 @@
var gadgets = gadgets || {};
-/**
- * @static
- * @class Provides operations for getting information about and modifying the
- * window the gadget is placed in.
- * @name gadgets.window
- */
gadgets.window = gadgets.window || {};
// we wrap these in an anonymous function to avoid storing private data
@@ -42,7 +36,6 @@
* @member gadgets.window
*/
gadgets.window.getViewportDimensions = function() {
- var x,y;
if (self.innerHeight) {
// all except Explorer
x = self.innerWidth;
Modified: incubator/shindig/trunk/features/src/main/javascript/features/dynamic-height/dynamic-height.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/dynamic-height/dynamic-height.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/dynamic-height/dynamic-height.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/dynamic-height/dynamic-height.js Wed Jan 13 20:57:30 2010
@@ -40,9 +40,10 @@
/**
* Parse out the value (specified in px) for a CSS attribute of an element.
*
- * @param {Object} elem the element with the attribute to look for.
- * @param {String} attr the CSS attribute name of interest.
- * @returns {int} the value of the px attr of the elem.
+ * @param {Element} elem the element with the attribute to look for.
+ * @param {string} attr the CSS attribute name of interest.
+ * @returns {number} the value of the px attr of the elem.
+ * @private
*/
function parseIntFromElemPxAttribute(elem, attr) {
var style = window.getComputedStyle(elem, "");
@@ -59,7 +60,8 @@
* containing parent element. Not counting "float" elements may lead to
* undercounting.
*
- * @returns {int} the height of the gadget.
+ * @returns {number} the height of the gadget.
+ * @private
*/
function getHeightForWebkit() {
var result = 0;
@@ -91,7 +93,7 @@
/**
* Adjusts the gadget height
- * @param {Number} opt_height An optional preferred height in pixels. If not
+ * @param {number=} opt_height An optional preferred height in pixels. If not
* specified, will attempt to fit the gadget to its content.
* @member gadgets.window
*/
@@ -171,7 +173,9 @@
};
}());
-// Alias for legacy code
+/**
+ * @see gadgets.window#adjustHeight
+ */
var _IG_AdjustIFrameHeight = gadgets.window.adjustHeight;
// TODO Attach gadgets.window.adjustHeight to the onresize event
Modified: incubator/shindig/trunk/features/src/main/javascript/features/flash/flash.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/flash/flash.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/flash/flash.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/flash/flash.js Wed Jan 13 20:57:30 2010
@@ -34,7 +34,7 @@
/**
* Detects Flash Player and its major version.
- * @return {Number} The major version of Flash Player
+ * @return {number} The major version of Flash Player
* or 0 if Flash is not supported.
*
* @member gadgets.flash
@@ -66,19 +66,18 @@
/**
* Injects a Flash file into the DOM tree.
- * @param {String} swfUrl SWF URL.
- * @param {String | Object} swfContainer The id or object reference of an
+ * @param {string} swfUrl SWF URL.
+ * @param {string | Object} swfContainer The id or object reference of an
* existing html container element.
- * @param {Number} swfVersion Minimal Flash Player version required.
- * @param {Object} opt_params An optional object that may contain any valid html
+ * @param {number} swfVersion Minimal Flash Player version required.
+ * @param {Object=} opt_params An optional object that may contain any valid html
* parameter. All attributes will be passed through to the flash movie on
* creation.
- * @return {Boolean} Whether the function call completes successfully.
+ * @return {boolean} Whether the function call completes successfully.
*
* @member gadgets.flash
*/
-gadgets.flash.embedFlash = function(swfUrl, swfContainer, swfVersion,
- opt_params) {
+gadgets.flash.embedFlash = function(swfUrl, swfContainer, swfVersion, opt_params) {
switch (typeof swfContainer) {
case 'string':
swfContainer = document.getElementById(swfContainer);
@@ -206,7 +205,7 @@
/**
* Injects a cached Flash file into the DOM tree.
* Accepts the same parameters as gadgets.flash.embedFlash does.
- * @return {Boolean} Whether the function call completes successfully.
+ * @return {boolean} Whether the function call completes successfully.
*
* @member gadgets.flash
*/
Modified: incubator/shindig/trunk/features/src/main/javascript/features/i18n/formatting.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/i18n/formatting.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/i18n/formatting.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/i18n/formatting.js Wed Jan 13 20:57:30 2010
@@ -41,7 +41,7 @@
/**
* Format the given date object into a string representation using pattern
* specified.
- * @param {string/number} pattern String to specify patterns or Number used to reference predefined
+ * @param {string|number} pattern String to specify patterns or Number used to reference predefined
* pattern that a date should be formatted into.
* @param {Date} date Date object being formatted.
*
@@ -68,7 +68,7 @@
* Parse a string using the format as specified in pattern string, and
* return date in the passed "date" parameter.
*
- * @param {string/number} pattern String to specify patterns or Number used to
+ * @param {string|number} pattern String to specify patterns or Number used to
* reference predefined
* pattern that a date should be parsed from.
* @param {string} text The string that need to be parsed.
@@ -96,11 +96,11 @@
/**
* Format the number using given pattern.
- * @param {string/number} pattern String to specify patterns or Number used to
+ * @param {string|number} pattern String to specify patterns or Number used to
* reference predefined
* pattern that a number should be formatted into.
* @param {number} value The number being formatted.
- * @param {string} opt_currencyCode optional international currency code, it
+ * @param {string=} opt_currencyCode optional international currency code, it
* determines the currency code/symbol should be used in format/parse. If
* not given, the currency code for current locale will be used.
* @return {string} The formatted string.
@@ -128,14 +128,14 @@
/**
* Parse the given text using specified pattern to get a number.
- * @param {string/number} pattern String to specify patterns or Number used
+ * @param {string|number} pattern String to specify patterns or Number used
* to reference predefined
* pattern that a number should be parsed from.
* @param {string} text input text being parsed.
- * @param {Array} opt_pos optional one element array that holds position
+ * @param {Array=} opt_pos optional one element array that holds position
* information. It tells from where parse should begin. Upon return, it
* holds parse stop position.
- * @param {string} opt_currencyCode optional international currency code, it
+ * @param {string=} opt_currencyCode optional international currency code, it
* determines the currency code/symbol should be used in format/parse. If
* not given, the currency code for current locale will be used.
* @return {number} Parsed number, 0 if in error.
Modified: incubator/shindig/trunk/features/src/main/javascript/features/i18n/numberformat.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/i18n/numberformat.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/i18n/numberformat.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/i18n/numberformat.js Wed Jan 13 20:57:30 2010
@@ -39,7 +39,7 @@
* Apply a predefined pattern to NumberFormat object.
* @param {number} patternType The number that indicates a predefined number
* format pattern.
- * @param {string} opt_currency Optional international currency code. This
+ * @param {string=} opt_currency Optional international currency code. This
* determines the currency code/symbol used in format/parse. If not given,
* the currency code for current locale will be used.
*/
@@ -67,7 +67,7 @@
/**
* Apply a pattern to NumberFormat object.
* @param {string} pattern The number format pattern string.
- * @param {string} opt_currency Optional international currency code. This
+ * @param {string=} opt_currency Optional international currency code. This
* determines the currency code/symbol used in format/parse. If not given,
* the currency code for current locale will be used.
*/
@@ -108,7 +108,7 @@
* parsing stops after the call. If an error occurs, opt_pos won't be updated.
*
* @param {string} text the string to be parsed.
- * @param {Array} opt_pos position to pass in and get back.
+ * @param {Array=} opt_pos position to pass in and get back.
* @return {number} Parsed number, or 0 if the parse fails.
*/
gadgets.i18n.NumberFormat.prototype.parse = function(text, opt_pos) {
Modified: incubator/shindig/trunk/features/src/main/javascript/features/minimessage/minimessage.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/minimessage/minimessage.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/minimessage/minimessage.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/minimessage/minimessage.js Wed Jan 13 20:57:30 2010
@@ -33,8 +33,8 @@
*
* @description Used to create messages that will appear to the user within the
* gadget.
- * @param {String} opt_moduleId Optional module Id
- * @param {Element} opt_container Optional HTML container element where
+ * @param {string=} opt_moduleId Optional module Id
+ * @param {Element=} opt_container Optional HTML container element where
* mini-messages will appear.
*/
gadgets.MiniMessage = function(opt_moduleId, opt_container) {
@@ -66,7 +66,7 @@
/**
* Helper function that dynamically inserts CSS rules to the page.
- * @param {String} cssText CSS rules to inject
+ * @param {string} cssText CSS rules to inject
* @private
*/
gadgets.MiniMessage.addCSS_ = function(cssText) {
@@ -85,8 +85,8 @@
/**
* Helper function that expands a class name into two class names.
- * @param {String} label The CSS class name
- * @return {String} "X Xn", with n is the ID of this module
+ * @param {string} label The CSS class name
+ * @return {string} "X Xn", with n is the ID of this module
* @private
*/
gadgets.MiniMessage.prototype.cascade_ = function(label) {
@@ -98,9 +98,9 @@
* the message table element from the DOM. The action is cancelled if the
* callback function returns false.
* @param {Element} element HTML element to remove
- * @param {Function} opt_callback Optional callback function to be called when
+ * @param {function()=} opt_callback Optional callback function to be called when
* the message is dismissed.
- * @return {Function} A function that dismisses the specified message
+ * @return {function()} A function that dismisses the specified message
* @private
*/
gadgets.MiniMessage.prototype.dismissFunction_ = function(element, opt_callback) {
@@ -120,8 +120,8 @@
* Creates a dismissible message with an [[]x] icon that allows users to dismiss
* the message. When the message is dismissed, it is removed from the DOM
* and the optional callback function, if defined, is called.
- * @param {String | Object} message The message as an HTML string or DOM element
- * @param {Function} opt_callback Optional callback function to be called when
+ * @param {string | Object} message The message as an HTML string or DOM element
+ * @param {function()=} opt_callback Optional callback function to be called when
* the message is dismissed
* @return {Element} HTML element of the created message
*/
@@ -145,10 +145,10 @@
* Creates a message that displays for the specified number of seconds.
* When the timer expires,
* the message is dismissed and the optional callback function is executed.
- * @param {String | Object} message The message as an HTML string or DOM element
+ * @param {string | Object} message The message as an HTML string or DOM element
* @param {number} seconds Number of seconds to wait before dismissing
* the message
- * @param {Function} opt_callback Optional callback function to be called when
+ * @param {function()=} opt_callback Optional callback function to be called when
* the message is dismissed
* @return {Element} HTML element of the created message
*/
@@ -162,7 +162,7 @@
/**
* Creates a static message that can only be dismissed programmatically
* (by calling dismissMessage()).
- * @param {String | Object} message The message as an HTML string or DOM element
+ * @param {string | Object} message The message as an HTML string or DOM element
* @return {Element} HTML element of the created message
*/
gadgets.MiniMessage.prototype.createStaticMessage = function(message) {
Modified: incubator/shindig/trunk/features/src/main/javascript/features/oauthpopup/oauthpopup.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/oauthpopup/oauthpopup.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/oauthpopup/oauthpopup.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/oauthpopup/oauthpopup.js Wed Jan 13 20:57:30 2010
@@ -109,11 +109,11 @@
*
* @description used to create a new OAuth popup window manager.
*
- * @param {String} destination Target URL for the popup window.
- * @param {String} windowOptions Options for window.open, used to specify
+ * @param {string} destination Target URL for the popup window.
+ * @param {string} windowOptions Options for window.open, used to specify
* look and feel of the window.
- * @param {function} openCallback Function to call when the window is opened.
- * @param {function} closeCallback Function to call when the window is closed.
+ * @param {function()} openCallback Function to call when the window is opened.
+ * @param {function()} closeCallback Function to call when the window is closed.
*/
gadgets.oauth.Popup = function(destination, windowOptions, openCallback,
closeCallback) {
@@ -125,8 +125,7 @@
};
/**
- * @return an onclick handler for the "open the approval window" link
- * @type function
+ * @return {function()} an onclick handler for the "open the approval window" link
*/
gadgets.oauth.Popup.prototype.createOpenerOnClick = function() {
var self = this;
@@ -189,10 +188,9 @@
};
/**
- * @return an onclick handler for the "I've approved" link. This may not
+ * @return {function()} an onclick handler for the "I've approved" link. This may not
* ever be called. If we successfully detect that the window was closed,
* this link is unnecessary.
- * @type function
*/
gadgets.oauth.Popup.prototype.createApprovedOnClick = function() {
var self = this;
Modified: incubator/shindig/trunk/features/src/main/javascript/features/opensocial-data-context/datacontext.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/opensocial-data-context/datacontext.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/opensocial-data-context/datacontext.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/opensocial-data-context/datacontext.js Wed Jan 13 20:57:30 2010
@@ -41,7 +41,7 @@
*
* @param {string} key The key to associate with this object.
* @param {ResponseItem|Object} obj The data object.
- * @param {boolean} opt_fireListeners Default true.
+ * @param {boolean=} opt_fireListeners Default true.
*/
var putDataSet = function(key, obj, opt_fireListeners) {
if (typeof obj === 'undefined' || obj === null) {
@@ -57,7 +57,7 @@
/**
* Registers a callback listener for a given set of keys.
* @param {string|Array.<string>} keys Key or set of keys to listen on.
- * @param {Function(Array.<string>)} callback Function to call when a
+ * @param {function(Array.<string>)} callback Function to call when a
* listener is fired.
* @param {booelan} oneTimeListener Remove this listener after first callback?
* @param {boolean} fireIfReady Instantly fire this if all data is available?
@@ -89,7 +89,7 @@
/**
* Checks if the data for a map of keys is available.
- * @param {Object<string, ?>} An map of keys to check.
+ * @param {Object.<string, *>} keys An map of keys to check.
* @return {boolean} Data for all the keys is present.
*/
var isDataReady = function(keys) {
@@ -136,7 +136,7 @@
/**
* Scans all active listeners and fires off any callbacks that inserting this
* key or list of keys satisfies.
- * @param {string|Array<string>} keys The key that was updated.
+ * @param {string|Array.<string>} keys The key that was updated.
* @private
*/
var fireCallbacks = function(keys) {
@@ -176,7 +176,7 @@
/**
* Registers a callback listener for a given set of keys.
* @param {string|Array.<string>} keys Key or set of keys to listen on.
- * @param {Function(Array.<string>)} callback Function to call when a
+ * @param {function(Array.<string>)} callback Function to call when a
* listener is fired.
*/
registerListener : function(keys, callback) {
@@ -188,7 +188,7 @@
* be registered. Not part of the spec. Exposed because needed by
* opensocial-templates.
* @param {string|Array.<string>} keys Key or set of keys to listen on.
- * @param {Function(Array.<string>)} callback Function to call when a
+ * @param {function(Array.<string>)} callback Function to call when a
*/
registerOneTimeListener_ : function(keys, callback) {
registerListener(keys, callback, true, true);
@@ -199,7 +199,7 @@
* registered that do not fire initially, but only after a data change.
* Exposed because needed by opensocial-templates.
* @param {string|Array.<string>} keys Key or set of keys to listen on.
- * @param {Function(Array.<string>)} callback Function to call when a
+ * @param {function(Array.<string>)} callback Function to call when a
*/
registerDeferredListener_ : function(keys, callback) {
registerListener(keys, callback, false, false);
@@ -227,7 +227,7 @@
/**
* Inserts multiple data sets from a JSON object.
- * @param {Object<string, Object>} dataSets a JSON object containing Data
+ * @param {Object.<string, Object>} dataSets a JSON object containing Data
* sets keyed by Data Set Key. All the DataSets are added, before firing
* listeners.
*/
Modified: incubator/shindig/trunk/features/src/main/javascript/features/opensocial-data/data.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/opensocial-data/data.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/opensocial-data/data.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/opensocial-data/data.js Wed Jan 13 20:57:30 2010
@@ -246,14 +246,14 @@
/**
- * @type {Array<string>} An array of keys requested by the shared DataRequest.
+ * @type {Array.<string>} An array of keys requested by the shared DataRequest.
* @private
*/
opensocial.data.currentAPIRequestKeys_ = null;
/**
- * @type {Object<string, Function(Object)>} A map of custom callbacks for the
+ * @type {Object.<string, function(Object)>} A map of custom callbacks for the
* keys in the shared DataRequest.
* @private
*/
@@ -285,8 +285,8 @@
* automatically sent once the syncronous block is done executing.
* @param {Object} request Specifies data to fetch
* (constructed via DataRequest's newFetch???Request() methods)
- * @param {String} key The key to map generated response data to
- * @param {Function(string, ResponseItem)} opt_callback An optional callback
+ * @param {string} key The key to map generated response data to
+ * @param {function(string, ResponseItem)=} opt_callback An optional callback
* function to pass the returned ResponseItem to. If present, the function will
* be called with the key and ResponseItem as params. If this is omitted, the
* ResponseItem will be passed to putDataSet() with the specified key.
@@ -321,7 +321,7 @@
* Creates a callback closure for processing a DataResponse. The closure
* remembers which keys were requested, and what custom callbacks need to be
* called.
- * @return {Function(DataResponse)} a handler for DataResponse.
+ * @return {function(DataResponse)} a handler for DataResponse.
* @private
*/
opensocial.data.createSharedRequestCallback_ = function() {
@@ -336,9 +336,9 @@
/**
* Processes a response to the shared API DataRequest by looping through
* requested keys and notifying appropriate parties of the received data.
- * @param {DataResonse} data Data received from the server
- * @param {Array<string>} keys The list of keys that were requested
- * @param {Object<string, Function(string, ResponseItem)>} callbacks A map of
+ * @param {DataResonse} responseItem Data received from the server
+ * @param {Array.<string>} keys The list of keys that were requested
+ * @param {Object.<string, function(string, ResponseItem)>} callbacks A map of
* any custom callbacks by key.
*/
opensocial.data.onAPIResponse = function(responseItem, keys, callbacks) {
@@ -389,7 +389,7 @@
/**
* Registers a tag as a data request handler.
* @param {string} name Prefixed tag name.
- * @param {Function} handler Method to call when this tag is invoked.
+ * @param {function} handler Method to call when this tag is invoked.
*
* TODO: Store these tag handlers separately from the ones for UI tags.
* TODO: Formalize the callback interface.
@@ -412,7 +412,7 @@
/**
* Loads and executes all inline data request sections.
- * @param {Object} opt_doc Optional document to use instead of window.document.
+ * @param {Object=} opt_doc Optional document to use instead of window.document.
* TODO: Currently this processes all 'script' blocks together,
* instead of collecting them all and then processing together. Not sure
* which is preferred yet.
@@ -537,7 +537,7 @@
* (if any) to the params object.
* @param {object} params The params object used to construct an Opensocial
* DataRequest
- * @param {string} fieldStr A string containing comma-separated field names
+ * @param {string} fieldsStr A string containing comma-separated field names
*/
opensocial.data.addFieldsToParams_ = function(params, fieldsStr) {
if (!fieldsStr) {
Modified: incubator/shindig/trunk/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/opensocial-jsonrpc/jsonrpccontainer.js Wed Jan 13 20:57:30 2010
@@ -105,7 +105,7 @@
* Receives the returned results from the parent container.
*
* @param {boolean} success if false, the message will not be sent
- * @param {string} opt_errorCode an error code if success is false
+ * @param {string=} opt_errorCode an error code if success is false
* @param {Array.<string>?} recipientIds an array of recipient IDs,
* if success is true
* @private
Modified: incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/activity.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/activity.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/activity.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/activity.js Wed Jan 13 20:57:30 2010
@@ -146,8 +146,7 @@
*
* Private, see opensocial.createActivity() for usage.
*
- * @param {Map.<opensocial.Activity.Field, Object>} params
- * Parameters defining the activity.
+ * @param {Object.<opensocial.Activity.Field, Object>} params Parameters defining the activity.
* @private
* @constructor
*/
@@ -179,6 +178,7 @@
* </p>
*
* @name opensocial.Activity.Field
+ * @enum {string}
*/
opensocial.Activity.Field = {
/**
@@ -338,7 +338,7 @@
/**
* Gets an ID that can be permanently associated with this activity.
*
- * @return {String} The ID
+ * @return {string} The ID
* @member opensocial.Activity
*/
opensocial.Activity.prototype.getId = function() {
@@ -349,14 +349,14 @@
/**
* Gets the activity data that's associated with the specified key.
*
- * @param {String} key The key to get data for;
+ * @param {string} key The key to get data for;
* see the <a href="opensocial.Activity.Field.html">Field</a> class
* for possible values
- * @param {Map.<opensocial.DataRequest.DataRequestFields, Object>}
+ * @param {Object.<opensocial.DataRequest.DataRequestFields, Object>=}
* opt_params Additional
* <a href="opensocial.DataRequest.DataRequestFields.html">params</a>
* to pass to the request.
- * @return {String} The data
+ * @return {string} The data
* @member opensocial.Activity
*/
opensocial.Activity.prototype.getField = function(key, opt_params) {
@@ -367,8 +367,8 @@
/**
* Sets data for this activity associated with the given key.
*
- * @param {String} key The key to set data for
- * @param {String} data The data to set
+ * @param {string} key The key to set data for
+ * @param {string} data The data to set
*/
opensocial.Activity.prototype.setField = function(key, data) {
return (this.fields_[key] = data);
Modified: incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/address.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/address.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/address.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/address.js Wed Jan 13 20:57:30 2010
@@ -138,14 +138,14 @@
/**
* Gets data for this body type that is associated with the specified key.
*
- * @param {String} key The key to get data for;
+ * @param {string} key The key to get data for;
* keys are defined in <a href="opensocial.Address.Field.html"><code>
* Address.Field</code></a>
- * @param {Map.<opensocial.DataRequest.DataRequestFields, Object>}
+ * @param {Object.<opensocial.DataRequest.DataRequestFields, Object>}
* opt_params Additional
* <a href="opensocial.DataRequest.DataRequestFields.html">params</a>
* to pass to the request
- * @return {String} The data
+ * @return {string} The data
*/
opensocial.Address.prototype.getField = function(key, opt_params) {
return opensocial.Container.getField(this.fields_, key, opt_params);
Modified: incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/bodytype.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/bodytype.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/bodytype.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/bodytype.js Wed Jan 13 20:57:30 2010
@@ -93,14 +93,14 @@
/**
* Gets data for this body type that is associated with the specified key.
*
- * @param {String} key The key to get data for;
+ * @param {string} key The key to get data for;
* keys are defined in <a href="opensocial.BodyType.Field.html"><code>
* BodyType.Field</code></a>
- * @param {Map.<opensocial.DataRequest.DataRequestFields, Object>}
+ * @param {Object.<opensocial.DataRequest.DataRequestFields, Object>}
* opt_params Additional
* <a href="opensocial.DataRequest.DataRequestFields.html">params</a>
* to pass to the request.
- * @return {String} The data
+ * @return {string} The data
*/
opensocial.BodyType.prototype.getField = function(key, opt_params) {
return opensocial.Container.getField(this.fields_, key, opt_params);
Modified: incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/collection.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/collection.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/collection.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/collection.js Wed Jan 13 20:57:30 2010
@@ -53,7 +53,7 @@
/**
* Finds the entry with the given ID value, or returns null if none is found.
- * @param {String} id The ID to look for
+ * @param {string} id The ID to look for
* @return {Object?} The data
*/
opensocial.Collection.prototype.getById = function(id) {
@@ -73,7 +73,7 @@
* Gets the size of this collection,
* which is equal to or less than the
* total size of the result.
- * @return {Number} The size of this collection
+ * @return {number} The size of this collection
*/
opensocial.Collection.prototype.size = function() {
return this.array_.length;
@@ -84,7 +84,7 @@
* Executes the provided function once per member of the collection,
* with each member in turn as the
* parameter to the function.
- * @param {Function} fn The function to call with each collection entry
+ * @param {function(Object)} fn The function to call with each collection entry
*/
opensocial.Collection.prototype.each = function(fn) {
for (var i = 0; i < this.size(); i++) {
@@ -95,7 +95,7 @@
/**
* Returns an array of all the objects in this collection.
- * @return {Array.<Object>} The values in this collection
+ * @return {Array.<Object>} The values in this collection
*/
opensocial.Collection.prototype.asArray = function() {
return this.array_;
@@ -105,7 +105,7 @@
/**
* Gets the total size of the larger result set
* that this collection belongs to.
- * @return {Number} The total size of the result
+ * @return {number} The total size of the result
*/
opensocial.Collection.prototype.getTotalSize = function() {
return this.totalSize_;
@@ -114,7 +114,7 @@
/**
* Gets the offset of this collection within a larger result set.
- * @return {Number} The offset into the total collection
+ * @return {number} The offset into the total collection
*/
opensocial.Collection.prototype.getOffset = function() {
return this.offset_;
Modified: incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/container.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/container.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/container.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/container.js Wed Jan 13 20:57:30 2010
@@ -79,12 +79,12 @@
* opensocial.ResponseItem. The response item will have its error code set to
* NOT_IMPLEMENTED.
*
- * @param {Array.<String> | String} recipients An ID, array of IDs, or a
+ * @param {Array.<string> | string} recipients An ID, array of IDs, or a
* group reference; the supported keys are VIEWER, OWNER, VIEWER_FRIENDS,
* OWNER_FRIENDS, or a single ID within one of those groups
* @param {opensocial.Message} message The message to send to the specified
* users.
- * @param {Function} opt_callback The function to call once the request has been
+ * @param {function(opensocial.ResponseItem)=} opt_callback The function to call once the request has been
* processed; either this callback will be called or the gadget will be
* reloaded from scratch. This function will be passed one parameter, an
* opensocial.ResponseItem. The error code will be set to reflect whether
@@ -92,6 +92,7 @@
* message was sent. If there was an error, you can use the response item's
* getErrorCode method to determine how to proceed. The data on the response
* item will not be set.
+ * @param {Object=} opt_params TODO
*
* @member opensocial
* @private
@@ -109,13 +110,13 @@
* opensocial.ResponseItem. The response item will have its error code set to
* NOT_IMPLEMENTED.
*
- * @param {Array.<String> | String} recipients An ID, array of IDs, or a
+ * @param {Array.<string> | string} recipients An ID, array of IDs, or a
* group reference; the supported keys are VIEWER, OWNER, VIEWER_FRIENDS,
* OWNER_FRIENDS, or a single ID within one of those groups
* @param {opensocial.Message} reason The reason the user wants the gadget to
* share itself. This reason can be used by the container when prompting the
* user for permission to share the app. It may also be ignored.
- * @param {Function} opt_callback The function to call once the request has been
+ * @param {function(opensocial.ResponseItem)=} opt_callback The function to call once the request has been
* processed; either this callback will be called or the gadget will be
* reloaded from scratch. This function will be passed one parameter, an
* opensocial.ResponseItem. The error code will be set to reflect whether
@@ -123,6 +124,7 @@
* sharing request was sent. If there was an error, you can use the response
* item's getErrorCode method to determine how to proceed. The data on the
* response item will not be set.
+ * @param {Object} opt_params TODO
*
* @member opensocial
* @private
@@ -148,7 +150,7 @@
* @param {Activity} activity The activity to create. The only required field is
* title.
* @param {CreateActivityPriority} priority The priority for this request.
- * @param {Function} opt_callback Function to call once the request has been
+ * @param {function(opensocial.ResponseItem)=} opt_callback Function to call once the request has been
* processed.
* @private
*/
@@ -167,8 +169,8 @@
* Returns whether the current gadget has access to the specified
* permission.
*
- * @param {opensocial.Permission | String} permission The permission
- * @return {Boolean} Whether the gadget has access for the permission.
+ * @param {opensocial.Permission | string} permission The permission
+ * @return {boolean} Whether the gadget has access for the permission.
*
* @private
*/
@@ -182,9 +184,9 @@
*
* @param {Array.<opensocial.Permission>} permissions The permissions to request
* access to from the viewer
- * @param {String} reason Will be displayed to the user as the reason why these
+ * @param {string} reason Will be displayed to the user as the reason why these
* permissions are needed.
- * @param {Function} opt_callback The function to call once the request has been
+ * @param {function(opensocial.ResponseItem)=} opt_callback The function to call once the request has been
* processed. This callback will either be called or the gadget will be
* reloaded from scratch
*
@@ -207,7 +209,7 @@
*
* @param {opensocial.DataRequest} dataRequest Specifies which data to get from
* the server
- * @param {Function} callback Function to call after the data is fetched
+ * @param {function(opensocial.ResponseItem)} callback Function to call after the data is fetched
* @private
*/
opensocial.Container.prototype.requestData = function(dataRequest, callback) {};
@@ -217,9 +219,9 @@
* Request a profile for the specified person id.
* When processed, returns a Person object.
*
- * @param {String} id The id of the person to fetch. Can also be standard
+ * @param {string} id The id of the person to fetch. Can also be standard
* person IDs of VIEWER and OWNER.
- * @param {Map.<opensocial.DataRequest.PeopleRequestFields, Object>} opt_params
+ * @param {Object.<opensocial.DataRequest.PeopleRequestFields, Object>=} opt_params
* Additional params to pass to the request. This request supports
* PROFILE_DETAILS.
* @return {Object} a request object
@@ -235,7 +237,7 @@
*
* @param {opensocial.IdSpec} idSpec An IdSpec used to specify which people to
* fetch. See also <a href="opensocial.IdSpec.html">IdSpec</a>.
- * @param {Map.<opensocial.DataRequest.PeopleRequestFields, Object>} opt_params
+ * @param {Object.<opensocial.DataRequest.PeopleRequestFields, Object>=} opt_params
* Additional params to pass to the request. This request supports
* PROFILE_DETAILS, SORT_ORDER, FILTER, FILTER_OPTIONS, FIRST, and MAX.
* @return {Object} a request object
@@ -252,10 +254,10 @@
*
* @param {opensocial.IdSpec} idSpec An IdSpec used to specify which people to
* fetch. See also <a href="opensocial.IdSpec.html">IdSpec</a>.
- * @param {Array.<String> | String} keys The keys you want data for. This
+ * @param {Array.<string> | string} keys The keys you want data for. This
* can be an array of key names, a single key name, or "*" to mean
* "all keys".
- * @param {Map.<opensocial.DataRequest.DataRequestFields, Object>}
+ * @param {Object.<opensocial.DataRequest.DataRequestFields, Object>}
* opt_params Additional
* <a href="opensocial.DataRequest.DataRequestFields.html">params</a>
* to pass to the request
@@ -273,8 +275,8 @@
* person, per application. Containers supporting this request SHOULD provide
* at least 10KB of space per user per application for this data.
*
- * @param {String} key The name of the key
- * @param {String} value The value
+ * @param {string} key The name of the key
+ * @param {string} value The value
* @return {Object} a request object
* @private
*/
@@ -286,7 +288,7 @@
* Deletes the given keys from the datastore for the current VIEWER.
* When processed, does not return any data.
*
- * @param {Array.<String> | String} keys The keys you want to delete from
+ * @param {Array.<string> | string} keys The keys you want to delete from
* the datastore; this can be an array of key names, a single key name,
* or "*" to mean "all keys"
* @return {Object} A request object
@@ -303,7 +305,7 @@
*
* @param {opensocial.IdSpec} idSpec An IdSpec used to specify which people to
* fetch. See also <a href="opensocial.IdSpec.html">IdSpec</a>.
- * @param {Map.<opensocial.DataRequest.ActivityRequestFields, Object>} opt_params
+ * @param {Object.<opensocial.DataRequest.ActivityRequestFields, Object>=} opt_params
* Additional params to pass to the request.
* @return {Object} a request object
* @private
@@ -339,10 +341,7 @@
/**
* Get an activity object used to create activities on the server
*
- * @param {opensocial.Activity.Template || String} title The title of an
- * activity, a template is reccommended, but this field can also be a
- * string.
- * @param {Map.<opensocial.Activity.Field, Object>} opt_params Any other
+ * @param {Object.<opensocial.Activity.Field, Object>=} opt_params Any other
* fields that should be set on the activity object. All of the defined
* Fields are supported.
* @return {opensocial.Activity} the activity object
@@ -357,9 +356,9 @@
* Creates a media item. Represents images, movies, and audio.
* Used when creating activities on the server.
*
- * @param {String} mimeType of the media
- * @param {String} url where the media can be found
- * @param {Map.<opensocial.MediaItem.Field, Object>} opt_params
+ * @param {string} mimeType of the media
+ * @param {string} url where the media can be found
+ * @param {Object.<opensocial.MediaItem.Field, Object>=} opt_params
* Any other fields that should be set on the media item object.
* All of the defined Fields are supported.
*
@@ -377,8 +376,8 @@
* Represents images, movies, and audio.
* Used when creating activities on the server.
*
- * @param {String} body The main text of the message.
- * @param {Map.<opensocial.Message.Field, Object>} opt_params
+ * @param {string} body The main text of the message.
+ * @param {Object.<opensocial.Message.Field, Object>=} opt_params
* Any other fields that should be set on the message object;
* all of the defined
* <a href="opensocial.Message.Field.html">Field</a>s
@@ -396,7 +395,7 @@
/**
* Creates an IdSpec object.
*
- * @param {Map.<opensocial.IdSpec.Field, Object>} parameters
+ * @param {Object.<opensocial.IdSpec.Field, Object>} params
* Parameters defining the id spec.
* @return {opensocial.IdSpec} The new
* <a href="opensocial.IdSpec.html">IdSpec</a> object
@@ -410,7 +409,7 @@
/**
* Creates a NavigationParameters object.
*
- * @param {Map.<opensocial.NavigationParameters.Field, Object>} parameters
+ * @param {Object.<opensocial.NavigationParameters.Field, Object>} params
* Parameters defining the navigation
* @return {opensocial.NavigationParameters} The new
* <a href="opensocial.NavigationParameters.html">NavigationParameters</a>
@@ -488,13 +487,13 @@
/**
* Returns the value corresponding to the key in the fields map. Escapes
* the value appropriately.
- * @param {Map<String, Object>} fields All of the values mapped by key.
- * @param {String} key The key to get data for.
- * @param {Map.<opensocial.DataRequest.DataRequestFields, Object>}
+ * @param {Object.<string, Object>} fields All of the values mapped by key.
+ * @param {string} key The key to get data for.
+ * @param {Object.<opensocial.DataRequest.DataRequestFields, Object>}
* opt_params Additional
* <a href="opensocial.DataRequest.DataRequestFields.html">params</a>
* to pass to the request.
- * @return {String} The data
+ * @return {string} The data
* @private
*/
opensocial.Container.getField = function(fields, key, opt_params) {
@@ -508,4 +507,4 @@
} else {
return gadgets.util.escape(value, opt_escapeObjects);
}
-};
\ No newline at end of file
+};
Modified: incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/datarequest.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/datarequest.js?rev=898941&r1=898940&r2=898941&view=diff
==============================================================================
--- incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/datarequest.js (original)
+++ incubator/shindig/trunk/features/src/main/javascript/features/opensocial-reference/datarequest.js Wed Jan 13 20:57:30 2010
@@ -82,7 +82,7 @@
/**
- * {Array.<{key: string, request:opensocial.DataRequest.BaseDataRequest}>}
+ * {Array.<{key: string, request:Object}>}
* requestObjects An array of
* data requests that the container should fetch data for
* @private
@@ -93,7 +93,7 @@
/**
* Get the requested objects
*
- * @return {Array.<{key:String, request:BaseDataRequest}>}
+ * @return {Array.<{key:string, request:Object}>}
* requestObjects An array of data requests that the container should fetch
* data for
* @private
@@ -111,7 +111,7 @@
* However, items that can't collide might be executed in parallel.
*
* @param {Object} request Specifies which data to fetch or update
- * @param {String} opt_key A key to map the generated response data to
+ * @param {string} opt_key A key to map the generated response data to
*/
opensocial.DataRequest.prototype.add = function(request, opt_key) {
return this.requestObjects_.push({'key': opt_key, 'request': request});
@@ -124,7 +124,7 @@
* they will always be executed
* as though they were serial.
*
- * @param {Function} opt_callback The function to call with the
+ * @param {function(opensocial.ResponseItem)=} opt_callback The function to call with the
* <a href="opensocial.DataResponse.html">data response</a>
* generated by the server
*/
@@ -197,6 +197,7 @@
* @static
* @class
* @name opensocial.DataRequest.PeopleRequestFields
+ * @enum {string}
*/
opensocial.DataRequest.PeopleRequestFields = {
/**
@@ -277,9 +278,9 @@
/**
* If the named param does not exist sets it to the default value.
*
- * @param {Map} params Parameter map.
- * @param {String} name of the param to check
- * @param {Object} defaultValue The value to set if the param does not exist.
+ * @param {Object.<string,Object>} params Parameter map.
+ * @param {string} name of the param to check
+ * @param {*} defaultValue The value to set if the param does not exist.
* @private
*/
opensocial.DataRequest.prototype.addDefaultParam = function(params, name,
@@ -291,7 +292,7 @@
/**
* Adds the default profile fields to the desired array.
*
- * @param {Map} params Parameter map.
+ * @param {Object} params Parameter map.
* @private
*/
opensocial.DataRequest.prototype.addDefaultProfileFields = function(params) {
@@ -323,11 +324,10 @@
* When processed, returns a
* <a href="opensocial.Person.html"><code>Person</code></a> object.
*
- * @param {String} id The ID of the person to fetch; can be the standard
+ * @param {string} id The ID of the person to fetch; can be the standard
* <a href="opensocial.IdSpec.PersonId.html">person ID</a>
* of VIEWER or OWNER
- * @param {Map.<opensocial.DataRequest.PeopleRequestFields, Object>}
- * opt_params
+ * @param {Object.<opensocial.DataRequest.PeopleRequestFields, Object>=} opt_params
* Additional
* <a href="opensocial.DataRequest.PeopleRequestFields.html">parameters</a>
* to pass to the request; this request supports PROFILE_DETAILS
@@ -349,8 +349,7 @@
*
* @param {opensocial.IdSpec} idSpec An IdSpec used to specify
* which people to fetch. See also <a href="opensocial.IdSpec.html">IdSpec</a>.
- * @param {Map.<opensocial.DataRequest.PeopleRequestFields, Object>}
- * opt_params
+ * @param {Object.<opensocial.DataRequest.PeopleRequestFields, Object>=} opt_params
* Additional
* <a href="opensocial.DataRequest.PeopleRequestFields.html">params</a>
* to pass to the request
@@ -381,6 +380,7 @@
* @static
* @class
* @name opensocial.DataRequest.DataRequestFields
+ * @enum {string}
*/
opensocial.DataRequest.DataRequestFields = {
/**
@@ -411,11 +411,11 @@
* @deprecated
* @param {opensocial.IdSpec} idSpec An IdSpec used to specify which people to
* fetch. See also <a href="opensocial.IdSpec.html">IdSpec</a>.
- * @param {Array.<String> | String} keys The keys you want data for; this
+ * @param {Array.<string> | string} keys The keys you want data for; this
* can be an array of key names, a single key name, or "*" to mean
* "all keys"
- * @param {Map.<opensocial.DataRequest.DataRequestFields, Object>}
- * opt_params Additional
+ * @param {Object.<opensocial.DataRequest.DataRequestFields, Object>=} opt_params
+ * Additional
* <a href="opensocial.DataRequest.DataRequestFields.html">params</a>
* to pass to the request
* @return {Object} A request object
@@ -433,9 +433,9 @@
* App Data is stored as a series of key value pairs of strings, scoped per
* person, per application. Containers supporting this request SHOULD provide
* at least 10KB of space per user per application for this data.
- * @param {String} key The name of the key. This may only contain alphanumeric
+ * @param {string} key The name of the key. This may only contain alphanumeric
* (A-Za-z0-9) characters, underscore(_), dot(.) or dash(-).
- * @param {String} value The value, must be valid json
+ * @param {string} value The value, must be valid json
* @return {Object} A request object
*/
opensocial.DataRequest.prototype.newUpdatePersonAppDataRequest = function(
@@ -449,7 +449,7 @@
* Deletes the given keys from the datastore for the current VIEWER.
* When processed, does not return any data.
*
- * @param {Array.<String> | String} keys The keys you want to delete from
+ * @param {Array.<string> | string} keys The keys you want to delete from
* the datastore; this can be an array of key names, a single key name,
* or "*" to mean "all keys"
* @return {Object} A request object
@@ -467,10 +467,11 @@
* <code>DataRequest.newFetchActivitiesRequest()</code></a>.
* @name opensocial.DataRequest.ActivityRequestFields
* @private
+ * @enum {string}
*/
opensocial.DataRequest.ActivityRequestFields = {
/**
- * {String} If provided will filter all activities by this app Id.
+ * If provided will filter all activities by this app Id.
* @private - at the moment you can only request activities for your own app
*/
APP_ID : 'appId',
@@ -503,8 +504,7 @@
*
* @param {opensocial.IdSpec} idSpec An IdSpec used to specify which people to
* fetch. See also <a href="opensocial.IdSpec.html">IdSpec</a>.
- * @param {Map.<opensocial.DataRequest.ActivityRequestFields, Object>}
- * opt_params
+ * @param {Object.<opensocial.DataRequest.ActivityRequestFields, Object>=} opt_params
* Additional parameters
* to pass to the request; not currently used
* @return {Object} A request object
@@ -523,8 +523,7 @@
};
/**
- * Creats an item to request messages from the container.
- *
+ * Creates an item to request messages from the container.
*/
opensocial.DataRequest.prototype.newFetchMessageCollectionsRequest = function(idSpec, opt_params) {
opt_params = opt_params || {};