nmos-ledger
Version:
NMOS discovery and registration APIs
1,607 lines (444 loc) • 21.1 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Flow</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: Flow</h1>
<section>
<header>
<h2>Flow</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="Flow"><span class="type-signature"></span>new Flow<span class="signature">(id, version, label, description, format, tags, source_id, parents)</span><span class="type-signature"></span></h4>
<div class="description">
Describes a Flow. Immutable value.
</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>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Globally unique UUID identifier for the Flow.</td>
</tr>
<tr>
<td class="name"><code>version</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">String formatted PTP timestamp
(<<em>seconds</em>>:<<em>nanoseconds</em>>)
indicating precisely when an attribute of the resource
last changed.</td>
</tr>
<tr>
<td class="name"><code>label</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Freeform string label for the Flow.</td>
</tr>
<tr>
<td class="name"><code>description</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Detailed description of the Flow.</td>
</tr>
<tr>
<td class="name"><code>format</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><a href="global.html#formats">Format</a> of the data coming from the
Flow as a URN.</td>
</tr>
<tr>
<td class="name"><code>tags</code></td>
<td class="type">
<span class="param-type">Object.<string, Array.<string>></span>
</td>
<td class="description last">Key value set of freeform string tags
to aid in filtering Flows. Can be empty.</td>
</tr>
<tr>
<td class="name"><code>source_id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last">Globally unique UUID for the source
which initially created the Flow.</td>
</tr>
<tr>
<td class="name"><code>parents</code></td>
<td class="type">
<span class="param-type">Array.<string></span>
</td>
<td class="description last">Array of UUIDs representing the Flow IDs of Grains
which came together to generate this Flow. (May
change over the lifetime of this Flow).</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="model_Flow.js.html">model/Flow.js</a>, <a href="model_Flow.js.html#line42">line 42</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Extends</h3>
<ul>
<li><a href="Versionned.html">Versionned</a></li>
</ul>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="description"><span class="type-signature">(readonly) </span>description<span class="type-signature"> :string</span></h4>
<div class="description">
Detailed description of the Flow.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="model_Flow.js.html">model/Flow.js</a>, <a href="model_Flow.js.html#line52">line 52</a>
</li></ul></dd>
</dl>
<h4 class="name" id="format"><span class="type-signature">(readonly) </span>format<span class="type-signature"> :string</span></h4>
<div class="description">
<a href="global.html#formats">Format</a> of the data coming from the Flow as a URN.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="model_Flow.js.html">model/Flow.js</a>, <a href="model_Flow.js.html#line58">line 58</a>
</li></ul></dd>
</dl>
<h4 class="name" id="id"><span class="type-signature">(readonly) </span>id<span class="type-signature"> :string</span></h4>
<div class="description">
Globally unique UUID identifier for the resource.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="Versionned.html#id">Versionned#id</a>
</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="model_Versionned.js.html">model/Versionned.js</a>, <a href="model_Versionned.js.html#line47">line 47</a>
</li></ul></dd>
</dl>
<h4 class="name" id="label"><span class="type-signature">(readonly) </span>label<span class="type-signature"> :string</span></h4>
<div class="description">
Freeform string label for the resource.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="Versionned.html#label">Versionned#label</a>
</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="model_Versionned.js.html">model/Versionned.js</a>, <a href="model_Versionned.js.html#line60">line 60</a>
</li></ul></dd>
</dl>
<h4 class="name" id="parents"><span class="type-signature"></span>parents<span class="type-signature"></span></h4>
<div class="description">
Array of UUIDs representing the Flow IDs of Grains which came together to
generate this Flow. (May change over the lifetime of this Flow.)
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="model_Flow.js.html">model/Flow.js</a>, <a href="model_Flow.js.html#line79">line 79</a>
</li></ul></dd>
</dl>
<h4 class="name" id="source_id"><span class="type-signature">(readonly) </span>source_id<span class="type-signature"> :string</span></h4>
<div class="description">
Globally unique UUID identifier for the Flow which initially created the
Flow.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="model_Flow.js.html">model/Flow.js</a>, <a href="model_Flow.js.html#line72">line 72</a>
</li></ul></dd>
</dl>
<h4 class="name" id="tags"><span class="type-signature">(readonly) </span>tags<span class="type-signature"> :Array.<string, Array.<string>></span></h4>
<div class="description">
Key value set of freeform string tags to aid in filtering Flows. Can be
empty.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">Array.<string, Array.<string>></span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="model_Flow.js.html">model/Flow.js</a>, <a href="model_Flow.js.html#line65">line 65</a>
</li></ul></dd>
</dl>
<h4 class="name" id="version"><span class="type-signature">(readonly) </span>version<span class="type-signature"> :string</span></h4>
<div class="description">
String formatted PTP timestamp (<<em>seconds</em>>:<<em>nanoseconds</em>>)
indicating precisely when an attribute of the resource last changed.
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">string</span>
</li>
</ul>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="Versionned.html#version">Versionned#version</a>
</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="model_Versionned.js.html">model/Versionned.js</a>, <a href="model_Versionned.js.html#line54">line 54</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="generateID"><span class="type-signature"></span>generateID<span class="signature">(id<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
Generate an <a href="Versionned.html#id">identifier</a> when one is not provided,
otherwise pass this one through. No validation takes place.
</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>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">Identifier to pass through.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="Versionned.html#generateID">Versionned#generateID</a>
</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="model_Versionned.js.html">model/Versionned.js</a>, <a href="model_Versionned.js.html#line71">line 71</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Value passed to the method or a generated pseudo-random
UUID for no arguments, null or undefined.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="generateLabel"><span class="type-signature"></span>generateLabel<span class="signature">(label<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
Generate a <a href="Versionned.html#label">label</a> when one is not provided, otherwise
pass the given one through. No validation takes place.
</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>label</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">Label to pass through.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="Versionned.html#generateLabel">Versionned#generateLabel</a>
</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="model_Versionned.js.html">model/Versionned.js</a>, <a href="model_Versionned.js.html#line102">line 102</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Value passed to the method or an empty string for
no arguments, null or undefined.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="generateVersion"><span class="type-signature"></span>generateVersion<span class="signature">(version<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
Generate a <a href="Versionned.html#version">version number</a> when one is not provided,
otherwise pass the given one through. No validation takes place.
</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>version</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="description last">Version number to pass through.</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="Versionned.html#generateVersion">Versionned#generateVersion</a>
</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="model_Versionned.js.html">model/Versionned.js</a>, <a href="model_Versionned.js.html#line85">line 85</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Value passed to the method or a generated version
number from the current clock with no arguments,
null or undefined.
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id="valid"><span class="type-signature"></span>valid<span class="signature">()</span><span class="type-signature"> → {boolean}</span></h4>
<div class="description">
Checks that all the properties of this resource are valid. The is a syntactic
check and does not check semantics such as references to other objects can be
checked. Valid includes:
<ul>
<li>Required properties are defined and not null.</li>
<li>Identifiers a valid UUIDs.</li>
<li>Enumerations are known values and/or match expected patterns.</li>
<li>Values are of the expected type.</li>
</ul>
</div>
<dl class="details">
<dt class="tag-overrides">Overrides:</dt>
<dd class="tag-overrides"><ul class="dummy"><li>
<a href="Versionned.html#valid">Versionned#valid</a>
</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="model_Versionned.js.html">model/Versionned.js</a>, <a href="model_Versionned.js.html#line211">line 211</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Is the resource valid?
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Device.html">Device</a></li><li><a href="Flow.html">Flow</a></li><li><a href="Node.html">Node</a></li><li><a href="NodeAPI.html">NodeAPI</a></li><li><a href="NodeRAMStore.html">NodeRAMStore</a></li><li><a href="Versionned.html">Versionned</a></li></ul><h3>Interfaces</h3><ul><li><a href="NodeStore.html">NodeStore</a></li></ul><h3>Global</h3><ul><li><a href="global.html#capabilities">capabilities</a></li><li><a href="global.html#deviceTypes">deviceTypes</a></li><li><a href="global.html#formats">formats</a></li><li><a href="global.html#statusError">statusError</a></li><li><a href="global.html#transports">transports</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Mon Dec 21 2015 17:19:50 GMT+0000 (GMT)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>