[OLINGO-408] docu: class to module assignment
diff --git a/datajs/Gruntfile.js b/datajs/Gruntfile.js
index 5f09b66..0a2ac06 100644
--- a/datajs/Gruntfile.js
+++ b/datajs/Gruntfile.js
@@ -126,7 +126,8 @@
dist : {
src: ['src/**/*.js'],
options: {
- destination: 'build/doc'
+ destination: 'build/doc',
+ verbose : false
}
}
}
diff --git a/datajs/src/lib/store/dom.js b/datajs/src/lib/store/dom.js
index 27c8e4e..740b1ba 100644
--- a/datajs/src/lib/store/dom.js
+++ b/datajs/src/lib/store/dom.js
@@ -82,6 +82,7 @@
/** Constructor for store objects that use DOM storage as the underlying mechanism.
* @class DomStore
+ * @constructor
* @param {String} name - Store name.
*/
function DomStore(name) {
@@ -89,7 +90,7 @@
}
/** Creates a store object that uses DOM Storage as its underlying mechanism.
- * @method DomStore.create
+ * @method module:store/dom~DomStore.create
* @param {String} name - Store name.
* @returns {Object} Store object.
*/
@@ -112,7 +113,7 @@
};
/** Adds a new value identified by a key to the store.
- * @method DomStore#add
+ * @method module:store/dom~DomStore#add
* @param {String} key - Key string.
* @param value - Value that is going to be added to the store.
* @param {Funcktion} success - Callback for a successful add operation.</param>
@@ -133,7 +134,7 @@
/** This method will overwrite the key's current value if it already exists in the store; otherwise it simply adds the new key and value.
* @summary Adds or updates a value identified by a key to the store.
- * @method DomStore#addOrUpdate
+ * @method module:store/dom~DomStore#addOrUpdate
* @param {String} key - Key string.
* @param value - Value that is going to be added or updated to the store.
* @param {Function} success - Callback for a successful add or update operation.</param>
@@ -173,7 +174,7 @@
/** In case of an error, this method will not restore any keys that might have been deleted at that point.
* @summary Removes all the data associated with this store object.
- * @method DomStore#clear
+ * @method module:store/dom~DomStore#clear
* @param {Function} success - Callback for a successful clear operation.</param>
* @param {Function} [error] - Callback for handling errors. If not specified then store.defaultError is invoked.</param>
*/
@@ -200,13 +201,13 @@
};
/** This function does nothing in DomStore as it does not have a connection model
- * @method DomStore#close
+ * @method module:store/dom~DomStore#close
*/
DomStore.prototype.close = function () {
};
/** Checks whether a key exists in the store.
- * @method DomStore#contains
+ * @method module:store/dom~DomStore#contains
* @param {String} key - Key string.
* @param {Function} success - Callback indicating whether the store contains the key or not.</param>
* @param {Function} [error] - Callback for handling errors. If not specified then store.defaultError is invoked.</param>
@@ -225,7 +226,7 @@
DomStore.prototype.defaultError = throwErrorCallback;
/** Gets all the keys that exist in the store.
- * @method DomStore#getAllKeys
+ * @method module:store/dom~DomStore#getAllKeys
* @param {Function} success - Callback for a successful get operation.</param>
* @param {Function} [error] - Callback for handling errors. If not specified then store.defaultError is invoked.</param>
*/
@@ -255,7 +256,7 @@
DomStore.prototype.mechanism = "dom";
/** Reads the value associated to a key in the store.
- * @method DomStore#read
+ * @method module:store/dom~DomStore#read
* @param {String} key - Key string.
* @param {Function} success - Callback for a successful reads operation.
* @param {Function} [error] - Callback for handling errors. If not specified then store.defaultError is invoked.
@@ -285,7 +286,7 @@
};
/** Removes a key and its value from the store.
- * @method DomStore#remove
+ * @method module:store/dom~DomStore#remove
* @param {String} key - Key string.
* @param {Funtion} success - Callback for a successful remove operation.</param>
* @param {Funtion} [error] - Callback for handling errors. If not specified then store.defaultError is invoked.</param>
@@ -307,7 +308,7 @@
};
/** Updates the value associated to a key in the store.
- * @method DomStore#update
+ * @method module:store/dom~DomStore#update
* @param {String} key - Key string.
* @param value - New value.
* @param {Function} success - Callback for a successful update operation.
@@ -326,7 +327,4 @@
}, error);
};
-
-
-/** DomStore (see {@link DomStore}) */
module.exports = DomStore;
\ No newline at end of file
diff --git a/datajs/src/lib/store/indexeddb.js b/datajs/src/lib/store/indexeddb.js
index e63567c..1dc4047 100644
--- a/datajs/src/lib/store/indexeddb.js
+++ b/datajs/src/lib/store/indexeddb.js
@@ -147,6 +147,7 @@
/** Creates a new IndexedDBStore.
* @class IndexedDBStore
+ * @constructor
* @param {String} name - The name of the store.
* @returns {Object} The new IndexedDBStore.
*/
@@ -155,7 +156,7 @@
}
/** Creates a new IndexedDBStore.
- * @method IndexedDBStore.create
+ * @method module:store/indexeddb~IndexedDBStore.create
* @param {String} name - The name of the store.
* @returns {Object} The new IndexedDBStore.
*/
@@ -168,7 +169,7 @@
};
/** Returns whether IndexedDB is supported.
- * @method IndexedDBStore.isSupported
+ * @method module:store/indexeddb~IndexedDBStore.isSupported
* @returns {Boolean} True if IndexedDB is supported, false otherwise.
*/
IndexedDBStore.isSupported = function () {
@@ -176,7 +177,7 @@
};
/** Adds a key/value pair to the store
- * @method IndexedDBStore#add
+ * @method module:store/indexeddb~IndexedDBStore#add
* @param {String} key - The key
* @param {Object} value - The value
* @param {Function} success - The success callback
@@ -213,7 +214,7 @@
};
/** Adds or updates a key/value pair in the store
- * @method IndexedDBStore#addOrUpdate
+ * @method module:store/indexeddb~IndexedDBStore#addOrUpdate
* @param {String} key - The key
* @param {Object} value - The value
* @param {Function} success - The success callback
@@ -251,7 +252,7 @@
};
/** Clears the store
- * @method IndexedDBStore#clear
+ * @method module:store/indexeddb~IndexedDBStore#clear
* @param {Function} success - The success callback
* @param {Function} error - The error callback
*/
@@ -268,7 +269,7 @@
}, error);
};
/** Closes the connection to the database
- * @method IndexedDBStore#close
+ * @method module:store/indexeddb~IndexedDBStore#close
*/
IndexedDBStore.prototype.close = function () {
@@ -279,7 +280,7 @@
};
/** Returns whether the store contains a key
- * @method IndexedDBStore#contains
+ * @method module:store/indexeddb~IndexedDBStore#contains
* @param {String} key - The key
* @param {Function} success - The success callback
* @param {Function} error - The error callback
@@ -301,7 +302,7 @@
IndexedDBStore.prototype.defaultError = throwErrorCallback;
/** Gets all the keys from the store
- * @method IndexedDBStore#getAllKeys
+ * @method module:store/indexeddb~IndexedDBStore#getAllKeys
* @param {Function} success - The success callback
* @param {Function} error - The error callback
*/
@@ -334,7 +335,7 @@
IndexedDBStore.prototype.mechanism = "indexeddb";
/** Reads the value for the specified key
- * @method IndexedDBStore#read
+ * @method module:store/indexeddb~IndexedDBStore#read
* @param {String} key - The key
* @param {Function} success - The success callback
* @param {Function} error - The error callback
@@ -370,7 +371,7 @@
};
/** Removes the specified key from the store
- * @method IndexedDBStore#remove
+ * @method module:store/indexeddb~IndexedDBStore#remove
* @param {String} key - The key
* @param {Function} success - The success callback
* @param {Function} error - The error callback
@@ -396,7 +397,7 @@
};
/** Updates a key/value pair in the store
- * @method IndexedDBStore#update
+ * @method module:store/indexeddb~IndexedDBStore#update
* @param {String} key - The key
* @param {Object} value - The value
* @param {Function} success - The success callback
@@ -443,5 +444,4 @@
};
-/** IndexedDBStore (see {@link IndexedDBStore}) */
module.exports = IndexedDBStore;
\ No newline at end of file
diff --git a/datajs/src/lib/store/memory.js b/datajs/src/lib/store/memory.js
index dabe929..7203c46 100644
--- a/datajs/src/lib/store/memory.js
+++ b/datajs/src/lib/store/memory.js
@@ -17,8 +17,7 @@
* under the License.
*/
- /** @module store/memory */
-
+/** @module store/memory */
var utils = require('./../datajs.js').utils;
@@ -29,6 +28,7 @@
/** Constructor for store objects that use a sorted array as the underlying mechanism.
* @class MemoryStore
+ * @constructor
* @param {String} name - Store name.
*/
function MemoryStore(name) {
@@ -69,7 +69,7 @@
/** This method errors out if the store already contains the specified key.
* @summery Adds a new value identified by a key to the store.
- * @method MemoryStore#add
+ * @method module:store/memory~MemoryStore#add
* @param {String} key - Key string.
* @param value - Value that is going to be added to the store.
* @param {Function} success - Callback for a successful add operation.</param>
@@ -89,7 +89,7 @@
/** This method will overwrite the key's current value if it already exists in the store; otherwise it simply adds the new key and value.
* @summary Adds or updates a value identified by a key to the store.
- * @method MemoryStore#addOrUpdate
+ * @method module:store/memory~MemoryStore#addOrUpdate
* @param {String} key - Key string.
* @param value - Value that is going to be added or updated to the store.
* @param {Function} success - Callback for a successful add or update operation.</param>
@@ -115,7 +115,7 @@
};
/** Removes all the data associated with this store object.
- * @method MemoryStore#clear
+ * @method module:store/memory~MemoryStore#clear
* @param {Function} success>Callback for a successful clear operation.
*/
this.clear = function (success) {
@@ -126,7 +126,7 @@
};
/** Checks whether a key exists in the store.
- * @method MemoryStore#contains
+ * @method module:store/memory~MemoryStore#contains
* @param {String} key - Key string.
* @param {Funktion} success - Callback indicating whether the store contains the key or not.</param>
*/
@@ -136,7 +136,7 @@
};
/** Gets all the keys that exist in the store.
- * @method MemoryStore#getAllKeys
+ * @method module:store/memory~MemoryStore#getAllKeys
* @param {Function} success - Callback for a successful get operation.</param>
*/
this.getAllKeys = function (success) {
@@ -149,7 +149,7 @@
};
/** Reads the value associated to a key in the store.
- * @method MemoryStore#read
+ * @method module:store/memory~MemoryStore#read
* @param {String} key - Key string.
* @param {Function} Function - Callback for a successful reads operation.</param>
* @param {Function{}Function - Callback for handling errors. If not specified then store.defaultError is invoked.</param>
@@ -164,7 +164,7 @@
};
/** Removes a key and its value from the store.
- * @method MemoryStore#remove
+ * @method module:store/memory~MemoryStore#remove
* @param {String} key - Key string.
* @param {Function} success - Callback for a successful remove operation.</param>
* @param {Function} [error] - Callback for handling errors. If not specified then store.defaultError is invoked.</param>
@@ -194,7 +194,7 @@
};
/** Updates the value associated to a key in the store.
- * @method MemoryStore#update
+ * @method module:store/memory~MemoryStore#update
* @param {String} key - Key string.
* @param value - New value.
* @param {Function} success - Callback for a successful update operation.</param>