lib/xp/repo

Node repository related functions.

Example
var repoLib = require('/lib/xp/repo');

Methods

(static) refresh(params)

Refresh the data for the given index-type in the current repository.

Parameters:
Name Type Description
params object

JSON with the parameters.

Properties
Name Type Attributes Default Description
mode string <optional>
'all'

Index type to be refreshed. Possible values: 'all' | 'search' | 'storage'.

repo string <optional>
'cms-repo'

Repository id: 'cms-repo' | 'system-repo'. Default is the current repository set in portal.

Examples
// Refresh all for default repository
repoLib.refresh();
// Refresh storage for default repository
repoLib.refresh({mode: 'storage'});
// Refresh search for 'system-repo' repository
repoLib.refresh({
    mode: 'search',
    repo: 'system-repo'
});