OpenVeo server API for plugins

API Docs for: 3.0.0
Show:

applicationStorage

Summary

Application storage is a global storage for core and plugins, to be able to share information between both core and plugins.

Information stored in the application storage must be limited.

Methods

getAnonymousUserId

Syntax

getAnonymousUserId

() String

Summary

Gets the id of the anonymous user.

Returns:

String:

The super administrator id

Example:

var api = require('@openveo/api');
api.applicationStorage.getAnonymousUserId();

getDatabase

Syntax

getDatabase

() Database

Summary

Gets the current database instance.

Returns:

Database:

A Database object

Example:

var api = require('@openveo/api');
api.applicationStorage.getDatabase();

getEntities

Syntax

getEntities

() Object

Summary

Gets the list of entities defined by both core and loaded plugins.

Returns:

Object:

entities

Example:

var api = require('@openveo/api');
api.applicationStorage.getEntities();

getMenu

Syntax

getMenu

() Array

Summary

Gets the computed back office menu with all links.

Returns:

Array:

The list of back office links

Example:

var api = require('@openveo/api');
api.applicationStorage.getMenu();

getPermissions

Syntax

getPermissions

() Object

Summary

Gets the list of permissions defined by core and plugins.

Returns:

Object:

permissions

Example:

var api = require('@openveo/api');
api.applicationStorage.getPermissions();

getPlugins

Syntax

getPlugins

() Array

Summary

Gets the list of loaded openveo plugins.

Returns:

Array:

The list of loaded plugins

Example:

var api = require('@openveo/api');
api.applicationStorage.getPlugins();

getSuperAdminId

Syntax

getSuperAdminId

() String

Summary

Gets the id of the super administrator.

Returns:

String:

The super administrator id

Example:

var api = require('@openveo/api');
api.applicationStorage.getSuperAdminId();

getWebServiceScopes

Syntax

getWebServiceScopes

() Object

Summary

Gets the list of web service scopes defined by core and plugins.

Returns:

Object:

scopes

Example:

var api = require('@openveo/api');
api.applicationStorage.getWebServiceScopes();

setAnonymousUserId

Syntax

setAnonymousUserId

(
  • id
)

Summary

Sets the id of the anonymous user.

It can be set only once.

Parameters:

  • id String

    The id of the anonymous user

setDatabase

Syntax

setDatabase

(
  • newDatabase
)

Summary

Sets a new database instance as the current database.

Parameters:

  • newDatabase Database

    The new database of the application

setEntities

Syntax

setEntities

(
  • newEntities
)

Summary

Sets the list of entities.

Parameters:

  • newEntities Object

    The list of entities

setMenu

Syntax

setMenu

(
  • newMenu
)

Summary

Sets the back office menu list of links.

Parameters:

  • newMenu Array

    The list of back office menu links

setPermissions

Syntax

setPermissions

(
  • permissions
)

Summary

Sets the list of permissions.

Parameters:

  • permissions Object

    The new list of permissions

setPlugins

Syntax

setPlugins

(
  • subPlugins
)

Summary

Sets the list of openveo plugins.

Parameters:

  • subPlugins Array

    The list of plugins

setSuperAdminId

Syntax

setSuperAdminId

(
  • id
)

Summary

Sets the id of the super administrator.

It can be set only once.

Parameters:

  • id String

    The id of the super administrator

setWebServiceScopes

Syntax

setWebServiceScopes

(
  • newScopes
)

Summary

Sets the web service list of scopes.

Parameters:

  • newScopes Object

    The new list of scopes of the web service