registry

Registry for adding and removing extensions given documentated extension points

View all available extensions and registrations in the Admin panel inside Visallo under UI Extensions. Documentation with examples is available at docs.visallo.org.

Source:

Methods

(static) canonicalName(point) → {String}

Source:

Get the canonical name for an extension point. Some extension points have been renamed, so we translate to the current.

Parameters:
Name Type Description
point String

The extension point to transform

Returns:

The canonical name

Type
String

(static) documentExtensionPoint(extensionPoint, description, validator, optionsopt, urlopt, legacyNameopt)

Source:

Adds information in the Admin Panel -> UI Extensions list about this extension point.

Parameters:
Name Type Attributes Description
extensionPoint String

The extension point to document

description String

About this extension point / what it does

validator function

Gets any registered extensions and returns if it's valid

options String | Object <optional>

External URL to documentation if string, or options

url String <optional>

External documentation url

legacyName String <optional>

Previous extension point name to include with this. Will warn when used

(static) extensionsForPoint(extensionPoint) → {Array.<Object>}

Source:

Get all the currently registered extensions for a given extensionPoint.

Parameters:
Name Type Description
extensionPoint String

The extension point to get extensions

Returns:

List of all registered (and valid if validator exists) extension configuration values

Type
Array.<Object>

(static) registerExtension(extensionPoint, extension) → {String}

Source:

Register new functionality at the given extensionPoint. View the docs for available extension points, or in Visallo, open the Admin panel, then UI Extensions.

Example
registry.registerExtension('org.visallo.menubar', {
    title: 'New'
    identifier: 'org-visallo-example-new',
    action: {
        type: 'full',
        componentPath: 'example-new-page'
    },
    icon: '../img/new.png'
});
Parameters:
Name Type Description
extensionPoint String

string that designates the extension to extend.

extension Object

configuration object based on the extension requirements.

Returns:

extensionUuid used to unregister an extension

Type
String

(static) unregisterExtension(extensionUuid)

Source:

Remove a given extension using the value returned from registerExtension

Parameters:
Name Type Description
extensionUuid String

The extension registration to remove