webgme-engine
Version:
WebGME server and Client API without a GUI
1,706 lines (383 loc) • 20.6 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: PluginResult</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: PluginResult</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>PluginResult<span class="signature">(config)</span><span class="type-signature"></span></h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="PluginResult"><span class="type-signature"></span>new PluginResult<span class="signature">(config)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Initializes a new instance of a plugin result object.</p>
<p>Note: this object is JSON serializable see serialize method.</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">
</td>
<td class="description last"><p>deserializes an existing configuration to this object.</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_PluginResult.js.html">plugin/PluginResult.js</a>, <a href="plugin_PluginResult.js.html#line29">line 29</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Extends</h3>
<ul>
<li>PluginResultBase</li>
</ul>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="addCommit"><span class="type-signature"></span>addCommit<span class="signature">(commitData)</span><span class="type-signature"></span></h4>
<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>commitData</code></td>
<td class="type">
<span class="param-type"><a href="global.html#object">object</a></span>
</td>
<td class="description last">
<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>commitHash</code></td>
<td class="type">
<span class="param-type"><a href="global.html#string">string</a></span>
</td>
<td class="description last"><p>hash of the commit.</p></td>
</tr>
<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>storage.constants./SYNCED/FORKED/MERGED</p></td>
</tr>
<tr>
<td class="name"><code>branchName</code></td>
<td class="type">
<span class="param-type"><a href="global.html#string">string</a></span>
</td>
<td class="description last"><p>name of branch that got updated with the commitHash.</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_PluginResult.js.html">plugin/PluginResult.js</a>, <a href="plugin_PluginResult.js.html#line77">line 77</a>
</li></ul></dd>
</dl>
<h4 class="name" id="getError"><span class="type-signature"></span>getError<span class="signature">()</span><span class="type-signature"> → {<a href="global.html#string">string</a>}</span></h4>
<div class="description">
<p>Gets error if any error occured during execution.
FIXME: should this be an Error object?</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="plugin_PluginResult.js.html">plugin/PluginResult.js</a>, <a href="plugin_PluginResult.js.html#line152">line 152</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="getFinishTime"><span class="type-signature"></span>getFinishTime<span class="signature">()</span><span class="type-signature"> → {<a href="global.html#string">string</a>}</span></h4>
<div class="description">
<p>Gets the ISO 8601 representation of the time when the plugin finished its execution.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="plugin_PluginResult.js.html">plugin/PluginResult.js</a>, <a href="plugin_PluginResult.js.html#line134">line 134</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="getStartTime"><span class="type-signature"></span>getStartTime<span class="signature">()</span><span class="type-signature"> → {<a href="global.html#string">string</a>}</span></h4>
<div class="description">
<p>Gets the ISO 8601 representation of the time when the plugin started its execution.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="plugin_PluginResult.js.html">plugin/PluginResult.js</a>, <a href="plugin_PluginResult.js.html#line116">line 116</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="serialize"><span class="type-signature"></span>serialize<span class="signature">()</span><span class="type-signature"> → {Object}</span></h4>
<div class="description">
<p>Serializes this object to a JSON representation.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="plugin_PluginResult.js.html">plugin/PluginResult.js</a>, <a href="plugin_PluginResult.js.html#line179">line 179</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
<h4 class="name" id="setError"><span class="type-signature"></span>setError<span class="signature">(time)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Sets the error string if any error occured during execution.
FIXME: should this be an Error 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>time</code></td>
<td class="type">
<span class="param-type"><a href="global.html#string">string</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="plugin_PluginResult.js.html">plugin/PluginResult.js</a>, <a href="plugin_PluginResult.js.html#line161">line 161</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setFinishTime"><span class="type-signature"></span>setFinishTime<span class="signature">(time)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Sets the ISO 8601 representation of the time when the plugin finished its execution.</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>time</code></td>
<td class="type">
<span class="param-type"><a href="global.html#string">string</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="plugin_PluginResult.js.html">plugin/PluginResult.js</a>, <a href="plugin_PluginResult.js.html#line143">line 143</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setPluginId"><span class="type-signature"></span>setPluginId<span class="signature">(pluginName)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Sets the name of the plugin to which the result object belongs to.</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>pluginName</code></td>
<td class="type">
<span class="param-type"><a href="global.html#string">string</a></span>
</td>
<td class="description last"><p>name of the plugin</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_PluginResult.js.html">plugin/PluginResult.js</a>, <a href="plugin_PluginResult.js.html#line98">line 98</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setPluginName"><span class="type-signature"></span>setPluginName<span class="signature">(pluginName)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Sets the name of the plugin to which the result object belongs to.</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>pluginName</code></td>
<td class="type">
<span class="param-type"><a href="global.html#string">string</a></span>
</td>
<td class="description last"><p>name of the plugin</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_PluginResult.js.html">plugin/PluginResult.js</a>, <a href="plugin_PluginResult.js.html#line89">line 89</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setProjectId"><span class="type-signature"></span>setProjectId<span class="signature">(projectId)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Sets the name of the projectId the result was generated from.</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>projectId</code></td>
<td class="type">
<span class="param-type"><a href="global.html#string">string</a></span>
</td>
<td class="description last"><p>id of the project</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_PluginResult.js.html">plugin/PluginResult.js</a>, <a href="plugin_PluginResult.js.html#line107">line 107</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setStartTime"><span class="type-signature"></span>setStartTime<span class="signature">(time)</span><span class="type-signature"></span></h4>
<div class="description">
<p>Sets the ISO 8601 representation of the time when the plugin started its execution.</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>time</code></td>
<td class="type">
<span class="param-type"><a href="global.html#string">string</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="plugin_PluginResult.js.html">plugin/PluginResult.js</a>, <a href="plugin_PluginResult.js.html#line125">line 125</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="Server_GMEAuth.html">Server:GMEAuth</a></li><li><a href="Server_SafeStorage.html">Server:SafeStorage</a></li><li><a href="Server_UserProject.html">Server:UserProject</a></li><li><a href="module-Core.html">Core</a></li><li><a href="module-Storage.html">Storage</a></li><li><a href="module-crosscuts.html">crosscuts</a></li><li><a href="module-serialization.html">serialization</a></li></ul><h3>Externals</h3><ul><li><a href="external-Promise.html">Promise</a></li></ul><h3>Classes</h3><ul><li><a href="AddOnBase.html">AddOnBase</a></li><li><a href="AddOnUpdateResult.html">AddOnUpdateResult</a></li><li><a href="Artifact.html">Artifact</a></li><li><a href="BlobClient.html">BlobClient</a></li><li><a href="BlobMetadata.html">BlobMetadata</a></li><li><a href="BlobRunPluginClient.html">BlobRunPluginClient</a></li><li><a href="Client.html">Client</a></li><li><a href="Core.html">Core</a></li><li><a href="ExecutorClient.html">ExecutorClient</a></li><li><a href="GMENode.html">GMENode</a></li><li><a href="GmeLogger.html">GmeLogger</a></li><li><a href="InterPluginResult.html">InterPluginResult</a></li><li><a href="JobInfo.html">JobInfo</a></li><li><a href="OutputInfo.html">OutputInfo</a></li><li><a href="PluginBase.html">PluginBase</a></li><li><a href="PluginConfig.html">PluginConfig</a></li><li><a href="PluginMessage.html">PluginMessage</a></li><li><a href="PluginNodeDescription.html">PluginNodeDescription</a></li><li><a href="PluginResult.html">PluginResult</a></li><li><a href="Project.html">Project</a></li><li><a href="ProjectInterface.html">ProjectInterface</a></li><li><a href="Server_GMEAuth-GMEAuth.html">GMEAuth</a></li><li><a href="Server_SafeStorage-SafeStorage.html">SafeStorage</a></li><li><a href="Server_UserProject-UserProject.html">UserProject</a></li><li><a href="WebsocketRouter.html">WebsocketRouter</a></li><li><a href="WebsocketRouterUser.html">WebsocketRouterUser</a></li></ul><h3>Events</h3><ul><li><a href="Client.html#event:BRANCH_CHANGED">BRANCH_CHANGED</a></li><li><a href="Client.html#event:BRANCH_CLOSED">BRANCH_CLOSED</a></li><li><a href="Client.html#event:BRANCH_OPENED">BRANCH_OPENED</a></li><li><a href="Client.html#event:BRANCH_STATUS_CHANGED">BRANCH_STATUS_CHANGED</a></li><li><a href="Client.html#event:CONNECTED_USERS_CHANGED">CONNECTED_USERS_CHANGED</a></li><li><a href="Client.html#event:NETWORK_STATUS_CHANGED">NETWORK_STATUS_CHANGED</a></li><li><a href="Client.html#event:NOTIFICATION">NOTIFICATION</a></li><li><a href="Client.html#event:PLUGIN_FINISHED">PLUGIN_FINISHED</a></li><li><a href="Client.html#event:PLUGIN_INITIATED">PLUGIN_INITIATED</a></li><li><a href="Client.html#event:PLUGIN_NOTIFICATION">PLUGIN_NOTIFICATION</a></li><li><a href="Client.html#event:PROJECT_CLOSED">PROJECT_CLOSED</a></li><li><a href="Client.html#event:PROJECT_OPENED">PROJECT_OPENED</a></li></ul><h3><a href="global.html">Global</a></h3>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.2</a> on Fri Jun 21 2024 09:43:40 GMT-0400 (Eastern Daylight Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>