mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 07:08:12 +00:00
[JSDoc] Add annotations
Bulk-add JSDoc annotations, WTD-1482.
This commit is contained in:
@ -33,6 +33,7 @@ define(
|
||||
* metadata field which contains a subset of information found
|
||||
* in the model itself (to support search optimization with
|
||||
* CouchDB views.)
|
||||
* @memberof platform/persistence/couch
|
||||
* @constructor
|
||||
* @param {string} id the id under which to store this mode
|
||||
* @param {object} model the model to store
|
||||
@ -59,4 +60,4 @@ define(
|
||||
|
||||
return CouchDocument;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -55,6 +55,8 @@ define(
|
||||
* Indicator for the current CouchDB connection. Polls CouchDB
|
||||
* at a regular interval (defined by bundle constants) to ensure
|
||||
* that the database is available.
|
||||
* @constructor
|
||||
* @memberof platform/persistence/couch
|
||||
*/
|
||||
function CouchIndicator($http, $interval, PATH, INTERVAL) {
|
||||
// Track the current connection state
|
||||
@ -87,6 +89,7 @@ define(
|
||||
* to display in this indicator. This will return "D",
|
||||
* which should appear as a database icon.
|
||||
* @returns {string} the character of the database icon
|
||||
* @memberof platform/persistence/couch.CouchIndicator#
|
||||
*/
|
||||
getGlyph: function () {
|
||||
return "D";
|
||||
@ -96,6 +99,7 @@ define(
|
||||
* This is used to color the glyph to match its
|
||||
* state (one of ok, caution or err)
|
||||
* @returns {string} the CSS class to apply to this glyph
|
||||
* @memberof platform/persistence/couch.CouchIndicator#
|
||||
*/
|
||||
getGlyphClass: function () {
|
||||
return state.glyphClass;
|
||||
@ -103,6 +107,7 @@ define(
|
||||
/**
|
||||
* Get the text that should appear in the indicator.
|
||||
* @returns {string} brief summary of connection status
|
||||
* @memberof platform/persistence/couch.CouchIndicator#
|
||||
*/
|
||||
getText: function () {
|
||||
return state.text;
|
||||
@ -111,6 +116,7 @@ define(
|
||||
* Get a longer-form description of the current connection
|
||||
* space, suitable for display in a tooltip
|
||||
* @returns {string} longer summary of connection status
|
||||
* @memberof platform/persistence/couch.CouchIndicator#
|
||||
*/
|
||||
getDescription: function () {
|
||||
return state.description;
|
||||
@ -121,4 +127,4 @@ define(
|
||||
|
||||
return CouchIndicator;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -35,6 +35,7 @@ define(
|
||||
* The CouchPersistenceProvider reads and writes JSON documents
|
||||
* (more specifically, domain object models) to/from a CouchDB
|
||||
* instance.
|
||||
* @memberof platform/persistence/couch
|
||||
* @constructor
|
||||
*/
|
||||
function CouchPersistenceProvider($http, $q, SPACE, PATH) {
|
||||
@ -104,6 +105,7 @@ define(
|
||||
*
|
||||
* @returns {Promise.<string[]>} a promise for a list of
|
||||
* spaces supported by this provider
|
||||
* @memberof platform/persistence/couch.CouchPersistenceProvider#
|
||||
*/
|
||||
listSpaces: function () {
|
||||
return $q.when(spaces);
|
||||
@ -114,6 +116,7 @@ define(
|
||||
* @param {string} space the space to check
|
||||
* @returns {Promise.<string[]>} a promise for the list of
|
||||
* identifiers
|
||||
* @memberof platform/persistence/couch.CouchPersistenceProvider#
|
||||
*/
|
||||
listObjects: function (space) {
|
||||
return get("_all_docs").then(getIdsFromAllDocs);
|
||||
@ -127,6 +130,7 @@ define(
|
||||
* @returns {Promise.<boolean>} a promise for an indication
|
||||
* of the success (true) or failure (false) of this
|
||||
* operation
|
||||
* @memberof platform/persistence/couch.CouchPersistenceProvider#
|
||||
*/
|
||||
createObject: function (space, key, value) {
|
||||
return put(key, new CouchDocument(key, value))
|
||||
@ -141,6 +145,7 @@ define(
|
||||
* @returns {Promise.<object>} a promise for the stored
|
||||
* object; this will resolve to undefined if no such
|
||||
* object is found.
|
||||
* @memberof platform/persistence/couch.CouchPersistenceProvider#
|
||||
*/
|
||||
readObject: function (space, key) {
|
||||
return get(key).then(getModel);
|
||||
@ -154,6 +159,7 @@ define(
|
||||
* @returns {Promise.<boolean>} a promise for an indication
|
||||
* of the success (true) or failure (false) of this
|
||||
* operation
|
||||
* @memberof platform/persistence/couch.CouchPersistenceProvider#
|
||||
*/
|
||||
updateObject: function (space, key, value) {
|
||||
return put(key, new CouchDocument(key, value, revs[key]))
|
||||
@ -169,6 +175,7 @@ define(
|
||||
* @returns {Promise.<boolean>} a promise for an indication
|
||||
* of the success (true) or failure (false) of this
|
||||
* operation
|
||||
* @memberof platform/persistence/couch.CouchPersistenceProvider#
|
||||
*/
|
||||
deleteObject: function (space, key, value) {
|
||||
return put(key, new CouchDocument(key, value, revs[key], true))
|
||||
@ -180,4 +187,4 @@ define(
|
||||
|
||||
return CouchPersistenceProvider;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
Reference in New Issue
Block a user