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

PluginInstance

Extends:

ResourceItemResource → PluginInstance

Plugin instance item resource object representing a plugin instance.

Method Summary

Public Methods
public

delete(timeout: number): Promise

Make a DELETE request to delete this plugin instance resource through the REST API.

public

Fetch the compute resource associated to this plugin instance item from the REST API.

public

Fetch a list of plugin instances that are descendents of this plugin instance from the REST API.

public

Fetch the feed associated to this plugin instance from the REST API.

public

Fetch the output folder associated to this plugin instance item from the REST API.

public

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

public

Fetch the plugin associated to this plugin instance item from the REST API.

public

Fetch the parent plugin instance of this plugin instance from the REST API (only for 'ds' and 'ts' plugins, 'fs' plugins pass null to the resultant Promise).

public

Fetch a list of output directory splits applied to this plugin instance from the REST API.

public

Fetch the workflow (if any) that created this plugin instance from the REST API.

public

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

Make a PUT request to modify this plugin instance resource through 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 delete(timeout: number): Promise source

Make a DELETE request to delete this plugin instance resource through the REST API.

Params:

NameTypeAttributeDescription
timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise

JS Promise

public getComputeResource(timeout: number): Promise<ComputeResource> source

Fetch the compute resource associated to this plugin instance item from the REST API.

Params:

NameTypeAttributeDescription
timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<ComputeResource>

JS Promise, resolves to a ComputeResource object

public getDescendantPluginInstances(params: Object, timeout: number): Promise<PluginInstanceDescendantList> source

Fetch a list of plugin instances that are descendents of this plugin instance from the REST API.

Params:

NameTypeAttributeDescription
params Object
  • optional
  • default: null

page parameters

params.limit number
  • optional

page limit

params.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PluginInstanceDescendantList>

JS Promise, resolves to a PluginInstanceDescendantList object

public getFeed(timeout: number): Promise<Feed|null> source

Fetch the feed associated to this plugin instance from the REST API.

Params:

NameTypeAttributeDescription
timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<Feed|null>

JS Promise, resolves to a Feed object or null

public getOutputFolder(timeout: number): Promise<FileBrowserFolder> source

Fetch the output folder associated to this plugin instance item from the REST API.

Params:

NameTypeAttributeDescription
timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<FileBrowserFolder>

JS Promise, resolves to a FileBrowserFolder object

public getParameters(params: Object, timeout: number): Promise<PluginInstanceParameterList> source

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

Params:

NameTypeAttributeDescription
params Object
  • optional
  • default: null

page parameters

params.limit number
  • optional

page limit

params.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PluginInstanceParameterList>

JS Promise, resolves to a PluginInstanceParameterList object

public getPlugin(timeout: number): Promise<Plugin> source

Fetch the plugin associated to this plugin instance item from the REST API.

Params:

NameTypeAttributeDescription
timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<Plugin>

JS Promise, resolves to a Plugin object

public getPreviousPluginInstance(timeout: number): Promise<PluginInstance|null> source

Fetch the parent plugin instance of this plugin instance from the REST API (only for 'ds' and 'ts' plugins, 'fs' plugins pass null to the resultant Promise).

Params:

NameTypeAttributeDescription
timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PluginInstance|null>

JS Promise, resolves to a PluginInstance object or null

public getSplits(params: Object, timeout: number): Promise<PluginInstanceSplitList> source

Fetch a list of output directory splits applied to this plugin instance from the REST API.

Params:

NameTypeAttributeDescription
params Object
  • optional
  • default: null

page parameters

params.limit number
  • optional

page limit

params.offset number
  • optional

page offset

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<PluginInstanceSplitList>

JS Promise, resolves to a PluginInstanceSplitList object

public getWorkflow(timeout: number): Promise<Workflow|null> source

Fetch the workflow (if any) that created this plugin instance from the REST API.

Params:

NameTypeAttributeDescription
timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<Workflow|null>

JS Promise, resolves to a Workflow object or null

public put(data: Object, timeout: number): Promise<this> source

Make a PUT request to modify this plugin instance resource through the REST API.

Params:

NameTypeAttributeDescription
data Object

request JSON data object

data.title string
  • optional

title of the plugin instance

data.status string
  • optional

execution status of the plugin instance (eg. cancelled)

timeout number
  • optional
  • default: 30000

request timeout

Return:

Promise<this>

JS Promise, resolves to this object