Home Reference Source
import {Plugin} from '@fnndsc/chrisapi'
public class | source

Plugin

Extends:

ResourceItemResource → Plugin

Plugin item resource object representing a plugin.

Method Summary

Public Methods
public

Fetch a list of compute resources registered with this plugin from the REST API.

public

Fetch a list of plugin instances associated to this plugin from the REST API.

public

Fetch the plugin meta associated to this plugin from the REST API.

public

Fetch a list of plugin parameters associated to this plugin from the REST API.

Inherited Summary

From class Resource
public static

cloneObj(obj: Object): *

Helper method to make a deep copy clone of the passed object resource.

public get

Return true if the resource object contains any data.

public
public
public
public
public

Make a deep copy clone of this object resource.

From class ItemResource
public get

Get the item's data object (REST API descriptors).

public
public

get(timeout: number): Promise<this>

Fetch this item resource from the REST API.

public

Get an array of parameter names that can be used as properties of the data object in PUT requests.

private

_delete(timeout: number): Promise

Internal helper method to make a DELETE request to this item resource through the REST API.

private

_getResource(linkRelation: string, ResourceClass: Object, searchParams: Object, timeout: number): Promise<ResourceClass>

Internal method to fetch a related resource from the REST API that is referenced by a link relation within the item object.

private

_put(data: Object, uploadFileObj: Object, timeout: number): Promise<this>

Internal helper method to make a PUT request to this item resource through the REST API.

Public Methods

public getPluginComputeResources(params: Object, timeout: number): Promise<PluginComputeResourceList> source

Fetch a list of compute resources registered with this plugin from the REST API.

Params:

NameTypeAttributeDescription
params Object
  • optional
  • default: null

page parameters object

params.limit number
  • optional

page limit

params.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PluginComputeResourceList>

JS Promise, resolves to a PluginComputeResourceList object

public getPluginInstances(params: Object, timeout: number): Promise<PluginInstanceList> source

Fetch a list of plugin instances associated to this plugin from the REST API.

Params:

NameTypeAttributeDescription
params Object
  • optional
  • default: null

page parameters object

params.limit number
  • optional

page limit

params.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PluginInstanceList>

JS Promise, resolves to a PluginInstanceList object

public getPluginMeta(timeout: number): Promise<PluginMeta> source

Fetch the plugin meta associated to this plugin from the REST API.

Params:

NameTypeAttributeDescription
timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PluginMeta>

JS Promise, resolves to a PluginMeta object

public getPluginParameters(params: Object, timeout: number): Promise<PluginParameterList> source

Fetch a list of plugin parameters associated to this plugin from the REST API.

Params:

NameTypeAttributeDescription
params Object
  • optional
  • default: null

page parameters object

params.limit number
  • optional

page limit

params.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PluginParameterList>

JS Promise, resolves to a PluginParameterList object