<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Mixin: Node</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">Mixin: Node</h1> <section> <header> <h2> Node </h2> </header> <article> <div class="container-overview"> <div class="description"><p>Mixin type that allows path items (Depot, Dir, and File) to operate like a tree easily.</p> <p>A node requires that the implementing class provide certain basic properties:</p> <ol> <li><p><code>this.children</code>: If the node contains children, this should be defined as an empty array.</p> </li> <li><p><code>this.pathId</code>: This should be an array of path names indicating the absolute location in an easily comparable way.</p> </li> <li><p><code>this.name</code>: The comparable string 'name' of the item</p> </li> </ol></div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="models_Node.js.html">models/Node.js</a>, <a href="models_Node.js.html#line19">line 19</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".getParentName"><span class="type-signature">(static) </span>getParentName<span class="signature">()</span><span class="type-signature"> → {string}</span></h4> <div class="description"> <p>Returns the parent name of this node.</p> </div> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="models_Node.js.html">models/Node.js</a>, <a href="models_Node.js.html#line68">line 68</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">string</span> </dd> </dl> <h4 class="name" id=".insert"><span class="type-signature">(static) </span>insert<span class="signature">(child)</span><span class="type-signature"> → {boolean}</span></h4> <div class="description"> <p>Inserts the child into the tree, if it belongs.</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>child</code></td> <td class="type"> </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="models_Node.js.html">models/Node.js</a>, <a href="models_Node.js.html#line34">line 34</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>Returns true if the child is inserted</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id=".isChildRelation"><span class="type-signature">(static) </span>isChildRelation<span class="signature">(parent)</span><span class="type-signature"></span></h4> <div class="description"> <p>Validates that the current node could be a child of the indicated parent.</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>parent</code></td> <td class="type"> </td> <td class="description last"><p>The potential parent</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="models_Node.js.html">models/Node.js</a>, <a href="models_Node.js.html#line58">line 58</a> </li></ul></dd> </dl> <h4 class="name" id=".sortChildren"><span class="type-signature">(static) </span>sortChildren<span class="signature">()</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="models_Node.js.html">models/Node.js</a>, <a href="models_Node.js.html#line24">line 24</a> </li></ul></dd> </dl> </article> </section> </div> <nav> <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="HelixWebServicesClient.html">HelixWebServicesClient</a></li><li><a href="models.Depot.html">Depot</a></li><li><a href="models.Dir.html">Dir</a></li><li><a href="models.File.html">File</a></li></ul><h3>Mixins</h3><ul><li><a href="Node.html">Node</a></li></ul><h3>Global</h3><ul><li><a href="global.html#addSessionExpiredHandler">addSessionExpiredHandler</a></li></ul> </nav> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0-dev</a> on Wed Jun 24 2015 12:48:36 GMT-0700 (PDT) </footer> <script> prettyPrint(); </script> <script src="scripts/linenumber.js"> </script> </body> </html>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 15688 | Doug Scheirer |
Populate -o //guest/perforce_software/helix-web-services/... //guest/doug_scheirer/helix-web-services/.... |
||
//guest/perforce_software/helix-web-services/main/build/doc/helix_web_services_client_js/Node.html | |||||
#2 | 14151 | tjuricek |
Add depot tree control and selection to the create projects page. Styling and error checking is kept to a minimum for the time being. Our goal is just internal workflow and feedback. |
||
#1 | 14108 | tjuricek |
Added models for handling Perforce server depot listing and traversal. This is not complete, however, the models are a start to making it easy to generate a tree control. (Most tree controls in the wild assume you know the tree structure from the start, which is not true in our case.) The tricky bit is making it easy to build the tree out given that you're visiting only one directory at a time. |