UNPKG

webgme-engine

Version:

WebGME server and Client API without a GUI

4,161 lines (1,024 loc) 94.7 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Class: PluginBase</title> <script src="scripts/prettify/prettify.js"> </script> <script src="scripts/prettify/lang-css.js"> </script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css"> </head> <body> <div id="main"> <h1 class="page-title">Class: PluginBase</h1> <section> <header> <h2><span class="attribs"><span class="type-signature"></span></span>PluginBase<span class="signature">()</span><span class="type-signature"></span></h2> </header> <article> <div class="container-overview"> <h4 class="name" id="PluginBase"><span class="type-signature"></span>new PluginBase<span class="signature">()</span><span class="type-signature"></span></h4> <div class="description"> <p>Initializes a new instance of a plugin object, which should be a derived class.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line55">line 55</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="META"><span class="type-signature"></span>META<span class="type-signature"> :Object.&lt;<a href="global.html#string">string</a>, <a href="module-Core.html#~Node">module:Core~Node</a>></span></h4> <div class="description"> <p>The resolved META nodes based on the active namespace. Index by the fully qualified meta node names with the namespace stripped off at the start.</p> <p>For example, if a project has a library A with a library B. If the project and the libraries all have two meta nodes named a and b. Depending on the namespace the META will have the following keys:</p> <ol> <li>namespace = '' -&gt; ['a', 'b', 'A.a', 'A.b', 'A.B.a', 'A.B.b']</li> <li>namespace = 'A' -&gt; ['a', 'b', 'B.a', 'B.b']</li> <li>namespace = 'A.B' -&gt; ['a', 'b']</li> </ol> <p>(N.B. 'a' and 'b' in example 3) are pointing to the meta nodes defined in A.B.)</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Object.&lt;<a href="global.html#string">string</a>, <a href="module-Core.html#~Node">module:Core~Node</a>></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line139">line 139</a> </li></ul></dd> </dl> <h4 class="name" id="activeNode"><span class="type-signature"></span>activeNode<span class="type-signature"> :<a href="module-Core.html#~Node">module:Core~Node</a></span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="module-Core.html#~Node">module:Core~Node</a></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line108">line 108</a> </li></ul></dd> </dl> <h4 class="name" id="activeSelection"><span class="type-signature"></span>activeSelection<span class="type-signature"> :<a href="global.html#Array">Array</a>.&lt;<a href="module-Core.html#~Node">module:Core~Node</a>></span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="global.html#Array">Array</a>.&lt;<a href="module-Core.html#~Node">module:Core~Node</a>></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line113">line 113</a> </li></ul></dd> </dl> <h4 class="name" id="blobClient"><span class="type-signature"></span>blobClient<span class="type-signature"> :<a href="BlobClient.html">BlobClient</a></span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="BlobClient.html">BlobClient</a></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line76">line 76</a> </li></ul></dd> </dl> <h4 class="name" id="core"><span class="type-signature"></span>core<span class="type-signature"> :<a href="Core.html">Core</a></span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="Core.html">Core</a></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line85">line 85</a> </li></ul></dd> </dl> <h4 class="name" id="gmeConfig"><span class="type-signature"></span>gmeConfig<span class="type-signature"> :<a href="global.html#GmeConfig">GmeConfig</a></span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="global.html#GmeConfig">GmeConfig</a></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line66">line 66</a> </li></ul></dd> </dl> <h4 class="name" id="logger"><span class="type-signature"></span>logger<span class="type-signature"> :<a href="GmeLogger.html">GmeLogger</a></span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="GmeLogger.html">GmeLogger</a></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line71">line 71</a> </li></ul></dd> </dl> <h4 class="name" id="namespace"><span class="type-signature"></span>namespace<span class="type-signature"> :<a href="global.html#string">string</a></span></h4> <div class="description"> <p>The namespace the META nodes are coming from (set by invoker). The default is the full meta, i.e. the empty string namespace. For example, if a project has a library A with a library B. The possible namespaces are: '', 'A' and 'A.B'.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="global.html#string">string</a></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line122">line 122</a> </li></ul></dd> </dl> <h4 class="name" id="pluginMetadata"><span class="type-signature"></span>pluginMetadata<span class="type-signature"> :PluginMetadata</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">PluginMetadata</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line61">line 61</a> </li></ul></dd> </dl> <h4 class="name" id="project"><span class="type-signature"></span>project<span class="type-signature"> :<a href="ProjectInterface.html">ProjectInterface</a></span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="ProjectInterface.html">ProjectInterface</a></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line90">line 90</a> </li></ul></dd> </dl> <h4 class="name" id="result"><span class="type-signature"></span>result<span class="type-signature"> :PluginResultBase</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">PluginResultBase</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line144">line 144</a> </li></ul></dd> </dl> <h4 class="name" id="rootNode"><span class="type-signature"></span>rootNode<span class="type-signature"> :<a href="module-Core.html#~Node">module:Core~Node</a></span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="module-Core.html#~Node">module:Core~Node</a></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line103">line 103</a> </li></ul></dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="addArtifact"><span class="type-signature"></span>addArtifact<span class="signature">(name, files, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="external-Promise.html">external:Promise</a>}</span></h4> <div class="description"> <p>Adds multiple files to the blob storage and bundles them as an artifact of which the hash is added to the plugin-result.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type"><a href="global.html#string">string</a></span> </td> <td class="attributes"> </td> <td class="description last"><p>name of the file bundle.</p></td> </tr> <tr> <td class="name"><code>files</code></td> <td class="type"> <span class="param-type"><a href="global.html#object">object</a>.&lt;<a href="global.html#string">string</a>, (<a href="global.html#string">string</a>|Buffer|ArrayBuffer)></span> </td> <td class="attributes"> </td> <td class="description last"><p>Keys are file names and values the content.</p></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type"><a href="global.html#function">function</a></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>if provided no promise will be returned.</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type"><a href="global.html#null">null</a></span> | <span class="param-type"><a href="global.html#Error">Error</a></span> </td> <td class="description last"><p>status of the call.</p></td> </tr> <tr> <td class="name"><code>metadataHash</code></td> <td class="type"> <span class="param-type"><a href="global.html#string">string</a></span> </td> <td class="description last"><p>the &quot;id&quot; of the uploaded artifact.</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line834">line 834</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>If no callback is given, the result will be provided in a promise.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="external-Promise.html">external:Promise</a></span> </dd> </dl> <h4 class="name" id="addCommitToResult"><span class="type-signature"></span>addCommitToResult<span class="signature">(status)</span><span class="type-signature"></span></h4> <div class="description"> <p>Adds the commit to the results. N.B. if you're using your own save method - make sure to update this.currentHash and this.branchName accordingly before adding the commit.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>status</code></td> <td class="type"> <span class="param-type"><a href="global.html#string">string</a></span> </td> <td class="description last"><p>Status of the commit 'SYNCED', 'FORKED', 'CANCELED', null.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line620">line 620</a> </li></ul></dd> </dl> <h4 class="name" id="addFile"><span class="type-signature"></span>addFile<span class="signature">(name, data, callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="external-Promise.html">external:Promise</a>}</span></h4> <div class="description"> <p>Adds a file to the blob storage and adds it to the plugin-result.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type"><a href="global.html#string">string</a></span> </td> <td class="attributes"> </td> <td class="description last"><p>file name.</p></td> </tr> <tr> <td class="name"><code>data</code></td> <td class="type"> <span class="param-type"><a href="global.html#string">string</a></span> | <span class="param-type">Buffer</span> | <span class="param-type">ArrayBuffer</span> </td> <td class="attributes"> </td> <td class="description last"><p>file content.</p></td> </tr> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type"><a href="global.html#function">function</a></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>if provided no promise will be returned.</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type"><a href="global.html#null">null</a></span> | <span class="param-type"><a href="global.html#Error">Error</a></span> </td> <td class="description last"><p>status of the call</p></td> </tr> <tr> <td class="name"><code>metadataHash</code></td> <td class="type"> <span class="param-type"><a href="global.html#string">string</a></span> </td> <td class="description last"><p>the &quot;id&quot; of the uploaded file</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line813">line 813</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>If no callback is given, the result will be provided in a promise</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="external-Promise.html">external:Promise</a></span> </dd> </dl> <h4 class="name" id="baseIsMeta"><span class="type-signature"></span>baseIsMeta<span class="signature">(node)</span><span class="type-signature"> &rarr; {<a href="global.html#boolean">boolean</a>}</span></h4> <div class="description"> <p>Returns true if node is a direct instance of a meta-type node (or a meta-type node itself).</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>node</code></td> <td class="type"> <span class="param-type"><a href="module-Core.html#~Node">module:Core~Node</a></span> </td> <td class="description last"><p>Node to be checked.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line330">line 330</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="global.html#boolean">boolean</a></span> </dd> </dl> <h4 class="name" id="configure"><span class="type-signature"></span>configure<span class="signature">(config)</span><span class="type-signature"></span></h4> <div class="description"> <p>Configures this instance of the plugin for a specific execution. This function is called before the main by the PluginManager. Initializes the result with a new object.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>config</code></td> <td class="type"> <span class="param-type"><a href="global.html#object">object</a></span> </td> <td class="description last"><p>specific context: project, branch, core, active object and active selection.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line941">line 941</a> </li></ul></dd> </dl> <h4 class="name" id="createMessage"><span class="type-signature"></span>createMessage<span class="signature">(node, message, severity)</span><span class="type-signature"></span></h4> <div class="description"> <p>Creates a new message for the user and adds it to the result.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>node</code></td> <td class="type"> <span class="param-type"><a href="module-Core.html#~Node">module:Core~Node</a></span> | <span class="param-type"><a href="global.html#object">object</a></span> </td> <td class="description last"><p>webgme object which is related to the message</p></td> </tr> <tr> <td class="name"><code>message</code></td> <td class="type"> <span class="param-type"><a href="global.html#string">string</a></span> </td> <td class="description last"><p>feedback to the user</p></td> </tr> <tr> <td class="name"><code>severity</code></td> <td class="type"> <span class="param-type"><a href="global.html#string">string</a></span> </td> <td class="description last"><p>severity level of the message: 'debug', 'info' (default), 'warning', 'error'.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line367">line 367</a> </li></ul></dd> </dl> <h4 class="name" id="fastForward"><span class="type-signature"></span>fastForward<span class="signature">(callback<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="external-Promise.html">external:Promise</a>}</span></h4> <div class="description"> <p>If plugin is started from a branch - it will reload the instance's nodes and update the currentHash to the current hash of the branch.</p> <p>N.B. Use this with caution, for instance manually referenced nodes in a plugin will still be part of the previous commit. Additionally if the namespaces have changed between commits - the this.META might end up being empty.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>callback</code></td> <td class="type"> <span class="param-type"><a href="global.html#function">function</a></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>the result callback</p> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>err</code></td> <td class="type"> <span class="param-type"><a href="global.html#null">null</a></span> | <span class="param-type"><a href="global.html#Error">Error</a></span> </td> <td class="description last"><p>status of the call</p></td> </tr> <tr> <td class="name"><code>didUpdate</code></td> <td class="type"> <span class="param-type"><a href="global.html#boolean">boolean</a></span> </td> <td class="description last"><p>true if there was a change and it updated the state to it</p></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line562">line 562</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>If no callback is given, the result will be provided in a promise</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="external-Promise.html">external:Promise</a></span> </dd> </dl> <h4 class="name" id="getArtifact"><span class="type-signature"></span>getArtifact<span class="signature">(metadataHash)</span><span class="type-signature"> &rarr; {<a href="external-Promise.html">external:Promise</a>}</span></h4> <div class="description"> <p>Retrieves all the files in the artifact from the blob storage.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>metadataHash</code></td> <td class="type"> <span class="param-type"><a href="global.html#string">string</a></span> </td> <td class="description last"><p>the &quot;id&quot; of the artifact to retrieve.</p></td> </tr> <tr> <td class="name"><code>callback.err</code></td> <td class="type"> <span class="param-type"><a href="global.html#null">null</a></span> | <span class="param-type"><a href="global.html#Error">Error</a></span> </td> <td class="description last"><p>status of the call.</p></td> </tr> <tr> <td class="name"><code>callback.files</code></td> <td class="type"> <span class="param-type"><a href="global.html#object">object</a>.&lt;<a href="global.html#string">string</a>, <a href="global.html#string">string</a>></span> </td> <td class="description last"><p>Keys are file names, and values the content.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line879">line 879</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>If no callback is given, the result will be provided in a promise.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="external-Promise.html">external:Promise</a></span> </dd> </dl> <h4 class="name" id="getBinFile"><span class="type-signature"></span>getBinFile<span class="signature">(metadataHash, subpath<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="external-Promise.html">external:Promise</a>}</span></h4> <div class="description"> <p>Retrieves the file from blob storage in binary format.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>metadataHash</code></td> <td class="type"> <span class="param-type"><a href="global.html#string">string</a></span> </td> <td class="attributes"> </td> <td class="description last"><p>the &quot;id&quot; of the file to retrieve.</p></td> </tr> <tr> <td class="name"><code>subpath</code></td> <td class="type"> <span class="param-type"><a href="global.html#string">string</a></span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>optional file-like path to sub-object if complex blob</p></td> </tr> <tr> <td class="name"><code>callback.err</code></td> <td class="type"> <span class="param-type"><a href="global.html#null">null</a></span> | <span class="param-type"><a href="global.html#Error">Error</a></span> </td> <td class="attributes"> </td> <td class="description last"><p>status of the call.</p></td> </tr> <tr> <td class="name"><code>callback.content</code></td> <td class="type"> <span class="param-type">Buffer</span> </td> <td class="attributes"> </td> <td class="description last"><p>the file content.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line868">line 868</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>If no callback is given, the result will be provided in a promise.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="external-Promise.html">external:Promise</a></span> </dd> </dl> <h4 class="name" id="getConfigStructure"><span class="type-signature"></span>getConfigStructure<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="global.html#Array">Array</a>.&lt;<a href="global.html#object">object</a>>}</span></h4> <div class="description"> <p>Configuration structure with names, descriptions, minimum, maximum values, default values and type definitions.</p> <p>Example:</p> <p>[{ &quot;name&quot;: &quot;logChildrenNames&quot;, &quot;displayName&quot;: &quot;Log Children Names&quot;, &quot;description&quot;: '', &quot;value&quot;: true, // this is the 'default config' &quot;valueType&quot;: &quot;boolean&quot;, &quot;readOnly&quot;: false },{ &quot;name&quot;: &quot;logLevel&quot;, &quot;displayName&quot;: &quot;Logger level&quot;, &quot;description&quot;: '', &quot;value&quot;: &quot;info&quot;, &quot;valueType&quot;: &quot;string&quot;, &quot;valueItems&quot;: [ &quot;debug&quot;, &quot;info&quot;, &quot;warn&quot;, &quot;error&quot; ], &quot;readOnly&quot;: false },{ &quot;name&quot;: &quot;maxChildrenToLog&quot;, &quot;displayName&quot;: &quot;Maximum children to log&quot;, &quot;description&quot;: 'Set this parameter to blabla', &quot;value&quot;: 4, &quot;minValue&quot;: 1, &quot;valueType&quot;: &quot;number&quot;, &quot;readOnly&quot;: false }]</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line256">line 256</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="global.html#Array">Array</a>.&lt;<a href="global.html#object">object</a>></span> </dd> </dl> <h4 class="name" id="getCurrentConfig"><span class="type-signature"></span>getCurrentConfig<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="PluginConfig.html">PluginConfig</a>}</span></h4> <div class="description"> <p>Gets the current configuration of the plugin that was set by the user and plugin manager.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line356">line 356</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="PluginConfig.html">PluginConfig</a></span> </dd> </dl> <h4 class="name" id="getDefaultConfig"><span class="type-signature"></span>getDefaultConfig<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="PluginConfig.html">PluginConfig</a>}</span></h4> <div class="description"> <p>Gets the default configuration based on the configuration structure for this plugin.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line984">line 984</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="PluginConfig.html">PluginConfig</a></span> </dd> </dl> <h4 class="name" id="getDescription"><span class="type-signature"></span>getDescription<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="global.html#string">string</a>}</span></h4> <div class="description"> <p>A detailed description of this plugin and its purpose. It can be one or more sentences.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line214">line 214</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="global.html#string">string</a></span> </dd> </dl> <h4 class="name" id="getFile"><span class="type-signature"></span>getFile<span class="signature">(metadataHash)</span><span class="type-signature"> &rarr; {<a href="external-Promise.html">external:Promise</a>}</span></h4> <div class="description"> <p>Retrieves the file from blob storage.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>metadataHash</code></td> <td class="type"> <span class="param-type"><a href="global.html#string">string</a></span> </td> <td class="description last"><p>the &quot;id&quot; of the file to retrieve.</p></td> </tr> <tr> <td class="name"><code>callback.err</code></td> <td class="type"> <span class="param-type"><a href="global.html#null">null</a></span> | <span class="param-type"><a href="global.html#Error">Error</a></span> </td> <td class="description last"><p>status of the call.</p></td> </tr> <tr> <td class="name"><code>callback.content</code></td> <td class="type"> <span class="param-type"><a href="global.html#string">string</a></span> </td> <td class="description last"><p>the file content.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line856">line 856</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>If no callback is given, the result will be provided in a promise.</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="external-Promise.html">external:Promise</a></span> </dd> </dl> <h4 class="name" id="getId"><span class="type-signature"></span>getId<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="global.html#string">string</a>}</span></h4> <div class="description"> <p>Readable name of this plugin that can contain spaces.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line177">line 177</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="global.html#string">string</a></span> </dd> </dl> <h4 class="name" id="getMetaType"><span class="type-signature"></span>getMetaType<span class="signature">(node)</span><span class="type-signature"> &rarr; {<a href="module-Core.html#~Node">module:Core~Node</a>}</span></h4> <div class="description"> <p>Finds and returns the node object defining the meta type for the given node.</p> </div> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>node</code></td> <td class="type"> <span class="param-type"><a href="module-Core.html#~Node">module:Core~Node</a></span> </td> <td class="description last"><p>Node to be checked for type.</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line321">line 321</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <ul> <li>Node object defining the meta type of node.</li> </ul> </div> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="module-Core.html#~Node">module:Core~Node</a></span> </dd> </dl> <h4 class="name" id="getMetadata"><span class="type-signature"></span>getMetadata<span class="signature">()</span><span class="type-signature"> &rarr; {PluginMetaData}</span></h4> <div class="description"> <p>Gets the metadata for the plugin.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line1009">line 1009</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">PluginMetaData</span> </dd> </dl> <h4 class="name" id="getName"><span class="type-signature"></span>getName<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="global.html#string">string</a>}</span></h4> <div class="description"> <p>Readable name of this plugin that can contain spaces.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line190">line 190</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="global.html#string">string</a></span> </dd> </dl> <h4 class="name" id="getPluginDependencies"><span class="type-signature"></span>getPluginDependencies<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="global.html#Array">Array</a>.&lt;<a href="global.html#string">string</a>>}</span></h4> <div class="description"> <p>Gets the ids of the directly defined dependencies of the plugin</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="plugin_PluginBase.js.html">plugin/PluginBase.js</a>, <a href="plugin_PluginBase.js.html#line1018">line 1018</a> </li></ul></dd>