Constructor
new assetgroups(alogger)
Parameters:
Name |
Type |
Description |
alogger |
object
|
Logger to be used by class methods (usually req.app.logger) |
- Source:
Methods
addAssetsGroup(reqBody, callback)
Adds a new assets group to core database if not existing for the given organization id with given name
Parameters:
Name |
Type |
Description |
reqBody |
object
|
form body containing the form fields data (usually req.body) |
callback |
function
|
success (true or false) |
- Source:
deleteGroup(id, callback)
deletes an assets group from database
Parameters:
Name |
Type |
Description |
id |
integer
|
|
callback |
function
|
success (true / false) |
- Source:
doesGroupExistForOrganization(groupname, organizationId, callback)
Checks if an asset group name for organization given in organizationId exists in core database
Parameters:
Name |
Type |
Description |
groupname |
string
|
name of group to check |
organizationId |
integer
|
id of organization to check for |
callback |
function
|
success (true = exists, false = does not exist) |
- Source:
editAssetsGroup(reqBody, aId, callback)
Parameters:
Name |
Type |
Description |
reqBody |
object
|
form body containing the form fields data (usually req.body) |
aId |
integer
|
id of assets group to be updated |
callback |
function
|
success (true or false) |
- Source:
getAssetGroup(aId, callback)
Returns asset group as row from core database
Parameters:
Name |
Type |
Description |
aId |
integer
|
|
callback |
function
|
row or null |
- Source:
getListOfAssetGroups(callback)
Returns rows for all existing asset groups in core database
Parameters:
Name |
Type |
Description |
callback |
function
|
rows or null |
- Source:
getListOfAssetGroupsForOrganization(orgId, callback)
Returns assets groups limited to a singel organization
Parameters:
Name |
Type |
Description |
orgId |
integer
|
id of organization assets groups shall be returned |
callback |
function
|
rows or null |
- Source: