[Core] Add JSDoc for model components
Add JSDoc for components of modelService exposed by platform/core. Part of ongoing preparation for review and integration; WTD-573.
This commit is contained in:
@@ -9,8 +9,15 @@ define(
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* A model service which reads domain object models from an external
|
||||
* persistence service.
|
||||
*
|
||||
* @constructor
|
||||
* @param {PersistenceService} persistenceService the service in which
|
||||
* domain object models are persisted.
|
||||
* @param $q Angular's $q service, for working with promises
|
||||
* @param {string} SPACE the name of the persistence space from which
|
||||
* models should be retrieved.
|
||||
*/
|
||||
function PersistedModelProvider(persistenceService, $q, SPACE) {
|
||||
function promiseModels(ids) {
|
||||
@@ -26,6 +33,22 @@ define(
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
* Get models with the specified identifiers.
|
||||
*
|
||||
* This will invoke the underlying persistence service to
|
||||
* retrieve object models which match the provided
|
||||
* identifiers.
|
||||
*
|
||||
* Note that the returned object may contain a subset or a
|
||||
* superset of the models requested.
|
||||
*
|
||||
* @param {string[]} ids an array of domain object identifiers
|
||||
* @returns {Promise.<object>} a promise for an object
|
||||
* containing key-value pairs,
|
||||
* where keys are object identifiers and values
|
||||
* are object models.
|
||||
*/
|
||||
getModels: promiseModels
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user