adcutil
Version:
Utilities tools for Askia Design Control
1 lines • 22.9 kB
JavaScript
Ext.data.JsonP.ADC({"tagname":"class","name":"ADC","autodetected":{},"files":[{"filename":"ADCUtilAPI.js","href":"ADCUtilAPI.html#ADC"}],"members":[{"name":"_adxShell","tagname":"property","owner":"ADC","id":"property-_adxShell","meta":{"private":true}},{"name":"configurator","tagname":"property","owner":"ADC","id":"property-configurator","meta":{}},{"name":"path","tagname":"property","owner":"ADC","id":"property-path","meta":{}},{"name":"preferences","tagname":"property","owner":"ADC","id":"property-preferences","meta":{}},{"name":"constructor","tagname":"method","owner":"ADC","id":"method-constructor","meta":{}},{"name":"build","tagname":"method","owner":"ADC","id":"method-build","meta":{}},{"name":"checkFixtures","tagname":"method","owner":"ADC","id":"method-checkFixtures","meta":{}},{"name":"getFixtureList","tagname":"method","owner":"ADC","id":"method-getFixtureList","meta":{}},{"name":"load","tagname":"method","owner":"ADC","id":"method-load","meta":{}},{"name":"show","tagname":"method","owner":"ADC","id":"method-show","meta":{}},{"name":"validate","tagname":"method","owner":"ADC","id":"method-validate","meta":{}},{"name":"generate","tagname":"method","owner":"ADC","id":"static-method-generate","meta":{"static":true}},{"name":"getTemplateList","tagname":"method","owner":"ADC","id":"static-method-getTemplateList","meta":{"static":true}}],"alternateClassNames":[],"aliases":{},"id":"class-ADC","short_doc":"Object used to generate, validate, show and build an ADC\n\nExample of usage of existing ADC\n\n var ADC = require('adcut...","component":false,"superclasses":[],"subclasses":[],"mixedInto":[],"mixins":[],"parentMixins":[],"requires":[],"uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Files</h4><div class='dependency'><a href='source/ADCUtilAPI.html#ADC' target='_blank'>ADCUtilAPI.js</a></div></pre><div class='doc-contents'><p>Object used to generate, validate, show and build an ADC</p>\n\n<p>Example of usage of existing ADC</p>\n\n<pre><code> var ADC = require('adcutil').ADC;\n var myAdc = new ADC('path/to/adc/dir');\n\n // Validate an ADC\n myAdc.validate({test : false, autoTest : false}, function (err, report) {\n // Callback when the ADC structure has been validated\n });\n\n // Show the output of an ADC\n myAdc.show({ output : 'fallback', fixture : 'single.xml' }, function (err, output) {\n // Callback with the output of the ADC\n });\n\n // Build the ADC (package it)\n myAdc.build({test : false, autoTest : false}, function (err, path, report) {\n // Callback when the ADC has been built\n });\n</code></pre>\n\n<p>Generate and use the new ADC instance</p>\n\n<pre><code> <a href=\"#!/api/ADC-static-method-generate\" rel=\"ADC-static-method-generate\" class=\"docClass\">ADC.generate</a>('myNewADC', {output : '/path/of/parent/dir', template : 'blank'}, function (err, adc) {\n console.log(adc.path);\n adc.load(function (err) {\n if (err) {\n console.log(err);\n return;\n }\n console.log(adc.configurator.info.get());\n });\n });\n</code></pre>\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-property'>Properties</h3><div class='subsection'><div id='property-_adxShell' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='ADC'>ADC</span><br/><a href='source/ADCUtilAPI.html#ADC-property-_adxShell' target='_blank' class='view-source'>view source</a></div><a href='#!/api/ADC-property-_adxShell' class='name expandable'>_adxShell</a> : *|InteractiveADXShell<span class=\"signature\"><span class='private' >private</span></span></div><div class='description'><div class='short'><p>Interactive ADX Shell</p>\n</div><div class='long'><p>Interactive ADX Shell</p>\n</div></div></div><div id='property-configurator' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='ADC'>ADC</span><br/><a href='source/ADCUtilAPI.html#ADC-property-configurator' target='_blank' class='view-source'>view source</a></div><a href='#!/api/ADC-property-configurator' class='name expandable'>configurator</a> : <a href=\"#!/api/ADC.Configurator\" rel=\"ADC.Configurator\" class=\"docClass\">ADC.Configurator</a><span class=\"signature\"></span></div><div class='description'><div class='short'><p>Configurator of the ADC\nExpose the object to manipulate the config.xml</p>\n</div><div class='long'><p>Configurator of the ADC\nExpose the object to manipulate the config.xml</p>\n</div></div></div><div id='property-path' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='ADC'>ADC</span><br/><a href='source/ADCUtilAPI.html#ADC-property-path' target='_blank' class='view-source'>view source</a></div><a href='#!/api/ADC-property-path' class='name expandable'>path</a> : string<span class=\"signature\"></span></div><div class='description'><div class='short'><p>Path to the ADC directory</p>\n</div><div class='long'><p>Path to the ADC directory</p>\n</div></div></div><div id='property-preferences' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='ADC'>ADC</span><br/><a href='source/ADCUtilAPI.html#ADC-property-preferences' target='_blank' class='view-source'>view source</a></div><a href='#!/api/ADC-property-preferences' class='name expandable'>preferences</a> : ADC.Preferences<span class=\"signature\"></span></div><div class='description'><div class='short'><p>Instance of the object to manage the preferences</p>\n</div><div class='long'><p>Instance of the object to manage the preferences</p>\n</div></div></div></div></div><div class='members-section'><h3 class='members-title icon-method'>Methods</h3><div class='subsection'><div class='definedBy'>Defined By</div><h4 class='members-subtitle'>Instance methods</h3><div id='method-constructor' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='ADC'>ADC</span><br/><a href='source/ADCUtilAPI.html#ADC-method-constructor' target='_blank' class='view-source'>view source</a></div><strong class='new-keyword'>new</strong><a href='#!/api/ADC-method-constructor' class='name expandable'>ADC</a>( <span class='pre'>adcDirPath</span> ) : <a href=\"#!/api/ADC\" rel=\"ADC\" class=\"docClass\">ADC</a><span class=\"signature\"></span></div><div class='description'><div class='short'>Create a new instance of ADC object\n\n var ADC = require('adcutil').ADC;\n var myAdc = new ADC('path/to/adc/dir'); ...</div><div class='long'><p>Create a new instance of ADC object</p>\n\n<pre><code> var ADC = require('adcutil').ADC;\n var myAdc = new ADC('path/to/adc/dir');\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>adcDirPath</span> : String<div class='sub-desc'><p>Path of the ADC directory</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/ADC\" rel=\"ADC\" class=\"docClass\">ADC</a></span><div class='sub-desc'>\n</div></li></ul></div></div></div><div id='method-build' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='ADC'>ADC</span><br/><a href='source/ADCUtilAPI.html#ADC-method-build' target='_blank' class='view-source'>view source</a></div><a href='#!/api/ADC-method-build' class='name expandable'>build</a>( <span class='pre'>[options], [callback]</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>Build the ADC\n\n var ADC = require('adcutil').ADC;\n var myAdc = new ADC('path/to/adc/dir');\n\n // Build the ADC (packag...</div><div class='long'><p>Build the ADC</p>\n\n<pre><code> var ADC = require('adcutil').ADC;\n var myAdc = new ADC('path/to/adc/dir');\n\n // Build the ADC (package it)\n myAdc.build({test : false, autoTest : false}, function (err, path, report) {\n // Callback when the ADC has been built\n });\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>options</span> : Object (optional)<div class='sub-desc'><p>Options of validation</p>\n<ul><li><span class='pre'>test</span> : Boolean (optional)<div class='sub-desc'><p>Run unit tests</p>\n<p>Defaults to: <code>true</code></p></div></li><li><span class='pre'>autoTest</span> : Boolean (optional)<div class='sub-desc'><p>Run auto unit tests</p>\n<p>Defaults to: <code>true</code></p></div></li><li><span class='pre'>xml</span> : Boolean (optional)<div class='sub-desc'><p>Validate the config.xml file</p>\n<p>Defaults to: <code>true</code></p></div></li><li><span class='pre'>logger</span> : Object (optional)<div class='sub-desc'><p>Logger</p>\n</div></li><li><span class='pre'>writeMessage</span> : Function (optional)<div class='sub-desc'><p>Function where regular messages will be print</p>\n</div></li><li><span class='pre'>writeSuccess</span> : Function (optional)<div class='sub-desc'><p>Function where success messages will be print</p>\n</div></li><li><span class='pre'>writeWarning</span> : Function (optional)<div class='sub-desc'><p>Function where warning messages will be print</p>\n</div></li><li><span class='pre'>writeError</span> : Function (optional)<div class='sub-desc'><p>Function where error messages will be print</p>\n</div></li></ul></div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>Callback function</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>err</span> : Error (optional)<div class='sub-desc'><p>Error</p>\n</div></li><li><span class='pre'>outputPath</span> : String (optional)<div class='sub-desc'><p>Path of the output</p>\n</div></li><li><span class='pre'>report</span> : Object (optional)<div class='sub-desc'><p>Validation report</p>\n</div></li></ul></div></li></ul></div></div></div><div id='method-checkFixtures' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='ADC'>ADC</span><br/><a href='source/ADCUtilAPI.html#ADC-method-checkFixtures' target='_blank' class='view-source'>view source</a></div><a href='#!/api/ADC-method-checkFixtures' class='name expandable'>checkFixtures</a>( <span class='pre'>callback</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>Verify if the fixture exist and create it if it doesn't ...</div><div class='long'><p>Verify if the fixture exist and create it if it doesn't</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>callback</span> : Function<div class='sub-desc'><p>Callback when the operation is complete</p>\n</div></li></ul></div></div></div><div id='method-getFixtureList' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='ADC'>ADC</span><br/><a href='source/ADCUtilAPI.html#ADC-method-getFixtureList' target='_blank' class='view-source'>view source</a></div><a href='#!/api/ADC-method-getFixtureList' class='name expandable'>getFixtureList</a>( <span class='pre'>callback</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>Returns the list of fixtures\n\n var ADC = require('adcutil').ADC;\n var myAdc = new ADC('path/to/adc/dir');\n\n // List a...</div><div class='long'><p>Returns the list of fixtures</p>\n\n<pre><code> var ADC = require('adcutil').ADC;\n var myAdc = new ADC('path/to/adc/dir');\n\n // List all fixtures on the ADC\n myAdc.getFixtureList(function (err, list) {\n console.log(list[0]); // -> \"Single.xml\"\n });\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>callback</span> : Function<div class='sub-desc'><p>Callback</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>err</span> : Error<div class='sub-desc'><p>Error</p>\n</div></li><li><span class='pre'>list</span> : String[]<div class='sub-desc'><p>List of fixtures</p>\n</div></li></ul></div></li></ul></div></div></div><div id='method-load' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='ADC'>ADC</span><br/><a href='source/ADCUtilAPI.html#ADC-method-load' target='_blank' class='view-source'>view source</a></div><a href='#!/api/ADC-method-load' class='name expandable'>load</a>( <span class='pre'>[callback]</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>Load the config of the current ADC instance\n\n var ADC = require('adcutil').ADC;\n var myAdc = new ADC('path/to/adc/dir...</div><div class='long'><p>Load the config of the current ADC instance</p>\n\n<pre><code> var ADC = require('adcutil').ADC;\n var myAdc = new ADC('path/to/adc/dir');\n\n // Load an ADC\n myAdc.load(function (err) {\n // Callback when the ADC has been loaded\n });\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>Callback function</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>err</span> : Error (optional)<div class='sub-desc'><p>Error</p>\n</div></li></ul></div></li></ul></div></div></div><div id='method-show' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='ADC'>ADC</span><br/><a href='source/ADCUtilAPI.html#ADC-method-show' target='_blank' class='view-source'>view source</a></div><a href='#!/api/ADC-method-show' class='name expandable'>show</a>( <span class='pre'>options, callback</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>Show the ADC output\n\n var ADC = require('adcutil').ADC;\n var myAdc = new ADC('path/to/adc/dir');\n\n // Show the output...</div><div class='long'><p>Show the ADC output</p>\n\n<pre><code> var ADC = require('adcutil').ADC;\n var myAdc = new ADC('path/to/adc/dir');\n\n // Show the output of an ADC\n myAdc.show({ output : 'fallback', fixture : 'single.xml' }, function (err, output) {\n // Callback with the output of the ADC\n });\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>options</span> : Object<div class='sub-desc'><p>Options</p>\n<ul><li><span class='pre'>output</span> : String<div class='sub-desc'><p>Name of the ADC Output to use</p>\n</div></li><li><span class='pre'>fixture</span> : String<div class='sub-desc'><p>FileName of the ADC fixture to use</p>\n</div></li><li><span class='pre'>masterPage</span> : String (optional)<div class='sub-desc'><p>Path of the master page to use</p>\n</div></li><li><span class='pre'>silent</span> : Boolean (optional)<div class='sub-desc'><p>Silent mode: Don't message in the console but only through the callback</p>\n<p>Defaults to: <code>false</code></p></div></li></ul></div></li><li><span class='pre'>callback</span> : Function<div class='sub-desc'><p>Callback function</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>err</span> : Error<div class='sub-desc'><p>Error</p>\n</div></li><li><span class='pre'>output</span> : String<div class='sub-desc'><p>Output string</p>\n</div></li></ul></div></li></ul></div></div></div><div id='method-validate' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='ADC'>ADC</span><br/><a href='source/ADCUtilAPI.html#ADC-method-validate' target='_blank' class='view-source'>view source</a></div><a href='#!/api/ADC-method-validate' class='name expandable'>validate</a>( <span class='pre'>[options], [callback]</span> )<span class=\"signature\"></span></div><div class='description'><div class='short'>Validate the current ADC instance\n\n var ADC = require('adcutil').ADC;\n var myAdc = new ADC('path/to/adc/dir');\n\n // V...</div><div class='long'><p>Validate the current ADC instance</p>\n\n<pre><code> var ADC = require('adcutil').ADC;\n var myAdc = new ADC('path/to/adc/dir');\n\n // Validate an ADC\n myAdc.validate({test : false, autoTest : false}, function (err, report) {\n // Callback when the ADC structure has been validated\n });\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>options</span> : Object (optional)<div class='sub-desc'><p>Options of validation</p>\n<ul><li><span class='pre'>test</span> : Boolean (optional)<div class='sub-desc'><p>Run unit tests</p>\n<p>Defaults to: <code>true</code></p></div></li><li><span class='pre'>autoTest</span> : Boolean (optional)<div class='sub-desc'><p>Run auto unit tests</p>\n<p>Defaults to: <code>true</code></p></div></li><li><span class='pre'>xml</span> : Boolean (optional)<div class='sub-desc'><p>Validate the config.xml file</p>\n<p>Defaults to: <code>true</code></p></div></li><li><span class='pre'>logger</span> : Object (optional)<div class='sub-desc'><p>Logger</p>\n</div></li><li><span class='pre'>writeMessage</span> : Function (optional)<div class='sub-desc'><p>Function where regular messages will be print</p>\n</div></li><li><span class='pre'>writeSuccess</span> : Function (optional)<div class='sub-desc'><p>Function where success messages will be print</p>\n</div></li><li><span class='pre'>writeWarning</span> : Function (optional)<div class='sub-desc'><p>Function where warning messages will be print</p>\n</div></li><li><span class='pre'>writeError</span> : Function (optional)<div class='sub-desc'><p>Function where error messages will be print</p>\n</div></li></ul></div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'><p>Callback function</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>err</span> : Error (optional)<div class='sub-desc'><p>Error</p>\n</div></li><li><span class='pre'>report</span> : Object (optional)<div class='sub-desc'><p>Validation report</p>\n</div></li></ul></div></li></ul></div></div></div></div><div class='subsection'><div class='definedBy'>Defined By</div><h4 class='members-subtitle'>Static methods</h3><div id='static-method-generate' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='ADC'>ADC</span><br/><a href='source/ADCUtilAPI.html#ADC-static-method-generate' target='_blank' class='view-source'>view source</a></div><a href='#!/api/ADC-static-method-generate' class='name expandable'>generate</a>( <span class='pre'>name, [options], [callback]</span> )<span class=\"signature\"><span class='static' >static</span></span></div><div class='description'><div class='short'>Generate a new ADC structure\n\n // Generate the ADC structure in '/path/of/parent/dir/myNewADC'\n ADC.generate('myNewAD...</div><div class='long'><p>Generate a new ADC structure</p>\n\n<pre><code> // Generate the ADC structure in '/path/of/parent/dir/myNewADC'\n <a href=\"#!/api/ADC-static-method-generate\" rel=\"ADC-static-method-generate\" class=\"docClass\">ADC.generate</a>('myNewADC', {output : '/path/of/parent/dir', template : 'blank'}, function (err, adc) {\n console.log(adc.path);\n });\n</code></pre>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>name</span> : String<div class='sub-desc'><p>Name of the ADC to generate</p>\n</div></li><li><span class='pre'>options</span> : Object (optional)<div class='sub-desc'><p>Options</p>\n<ul><li><span class='pre'>description</span> : String (optional)<div class='sub-desc'><p>Description of the ADC</p>\n<p>Defaults to: <code>''</code></p></div></li><li><span class='pre'>author</span> : Object (optional)<div class='sub-desc'><p>Author of the ADC</p>\n<ul><li><span class='pre'>name</span> : String (optional)<div class='sub-desc'><p>Author name</p>\n<p>Defaults to: <code>''</code></p></div></li><li><span class='pre'>email</span> : String (optional)<div class='sub-desc'><p>Author email</p>\n<p>Defaults to: <code>''</code></p></div></li><li><span class='pre'>company</span> : String (optional)<div class='sub-desc'><p>Author Company</p>\n<p>Defaults to: <code>''</code></p></div></li><li><span class='pre'>website</span> : String (optional)<div class='sub-desc'><p>Author web site</p>\n<p>Defaults to: <code>''</code></p></div></li></ul></div></li><li><span class='pre'>output</span> : String (optional)<div class='sub-desc'><p>Path of the output director</p>\n<p>Defaults to: <code>process.cwd()</code></p></div></li><li><span class='pre'>template</span> : String (optional)<div class='sub-desc'><p>Name of the template to use</p>\n<p>Defaults to: <code>"blank"</code></p></div></li></ul></div></li><li><span class='pre'>callback</span> : Function (optional)<div class='sub-desc'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>err</span> : Error (optional)<div class='sub-desc'><p>Error</p>\n</div></li><li><span class='pre'>adc</span> : <a href=\"#!/api/ADC\" rel=\"ADC\" class=\"docClass\">ADC</a> (optional)<div class='sub-desc'><p>Instance of the new generated ADC</p>\n</div></li></ul></div></li></ul></div></div></div><div id='static-method-getTemplateList' class='member not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='ADC'>ADC</span><br/><a href='source/ADCUtilAPI.html#ADC-static-method-getTemplateList' target='_blank' class='view-source'>view source</a></div><a href='#!/api/ADC-static-method-getTemplateList' class='name expandable'>getTemplateList</a>( <span class='pre'>callback</span> )<span class=\"signature\"><span class='static' >static</span></span></div><div class='description'><div class='short'>Returns the list of templates directory ...</div><div class='long'><p>Returns the list of templates directory</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>callback</span> : Function<div class='sub-desc'><p>Callback</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>err</span> : Error<div class='sub-desc'><p>Error</p>\n</div></li><li><span class='pre'>dirs</span> : Object[]<div class='sub-desc'><p>List of template</p>\n</div></li><li><span class='pre'>dirs</span> : String<div class='sub-desc'><p>[].name Name of the template</p>\n</div></li><li><span class='pre'>dirs</span> : String<div class='sub-desc'><p>[].path Path of the template directory</p>\n</div></li></ul></div></li></ul></div></div></div></div></div></div></div>","meta":{}});