entityService
Summary
Defines an entity service to create / update or remove an entity.
Item Index
Methods
deleteCache
Syntax
deleteCache
(
-
[entityType]
-
[pluginName]
Summary
Deletes cache of the given entity type.
getAllEntities
Syntax
Summary
Gets all entities of a specific type.
Parameters:
Returns:
Promise:
The HTTP promise
getEntities
Syntax
Summary
Get all entities filtered by param.
Parameters:
-
entityType
StringType of entity
-
[pluginName]
String optionalPlugin name the entity belongs to, null for core
-
param
ObjectRequest parameters with a property "filter" with a MongoDB criteria as value, a property "count" with a MongoDB count as value, a property "page" with the expected page as value and a property "sort" with a MongoDB sort object as value
-
[canceller]
Promise optionalThe HTTP promise to cancel request if needed, reject the promise to cancel the request
Returns:
Promise:
The HTTP promise
Example:
// Get the first page of Web Service applications sorted by name with 10 applications per page
var params = {
count: 10,
page: 1,
sort: {
name: 1
}
};
getEntities('applications', params);