Author: buildbot
Date: Wed Sep 27 10:41:01 2017
New Revision: 1018790

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/bundles/sling-pipes.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Sep 27 10:41:01 2017
@@ -1 +1 @@
-1809734
+1809827

Modified: 
websites/staging/sling/trunk/content/documentation/bundles/sling-pipes.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/bundles/sling-pipes.html 
(original)
+++ websites/staging/sling/trunk/content/documentation/bundles/sling-pipes.html 
Wed Sep 27 10:41:01 2017
@@ -247,6 +247,7 @@ If used, the returned value will be id o
 In that case you can monitor the pipes path with <code>status</code> selector 
as described above until it has the value <code>finished</code>.</p>
 <h2 id="registered-pipes">Registered Pipes<a class="headerlink" 
href="#registered-pipes" title="Permanent link">&para;</a></h2>
 <h3 id="readers">readers<a class="headerlink" href="#readers" title="Permanent 
link">&para;</a></h3>
+<p>those are pipes that will spit out resources, without modifying them</p>
 <h5 id="base-pipe-echopath">Base pipe <code>echo(path)</code><a 
class="headerlink" href="#base-pipe-echopath" title="Permanent 
link">&para;</a></h5>
 <p>outputs what is in input (so what is configured in path)</p>
 <ul>
@@ -279,18 +280,10 @@ In that case you can monitor the pipes p
 <li><code>properties</code> is a flag mentioning the pipe should traverse 
node's property,</li>
 <li><code>nameGlobs</code> filters the property that should get outputed</li>
 </ul>
-<h5 id="jsonpipe-jsonexpr">JsonPipe (<code>json(expr)</code>)<a 
class="headerlink" href="#jsonpipe-jsonexpr" title="Permanent 
link">&para;</a></h5>
-<p>feeds bindings with remote json</p>
-<ul>
-<li><code>sling:resourceType</code> is <code>slingPipes/json</code></li>
-<li><code>expr</code> mandatory property contains url that will be called, the 
json be sent to the output bindings, getOutput = getInput.
-An empty url or a failing url will block the pipe at that given place.</li>
-</ul>
-<p>In case the json is an array, the pipe will loop over
-the array elements, and output each one in the binding. Output resource 
remains each time the input one.</p>
 <h5 id="authorizablepipe-authconf">AuthorizablePipe 
(<code>auth(conf)</code>)<a class="headerlink" 
href="#authorizablepipe-authconf" title="Permanent link">&para;</a></h5>
 <p>retrieve authorizable resource corresponding to the id passed in 
expression, or if not found (or void expression),
-from the input path, output the found authorizable's resource</p>
+from the input path, output the found authorizable's resource
+caution this pipe <strong>can modify content</strong> in case additional 
configuration is added (see below)</p>
 <ul>
 <li><code>sling:resourceType</code> is 
<code>slingPipes/authorizable</code></li>
 <li><code>expr</code> should be an authorizable id, or void (but then input 
should be an authorizable)</li>
@@ -326,6 +319,43 @@ not containing <code>@foo=bar</code></p>
 
 
 <p>is an equivalent</p>
+<h3 id="inputstream-reader-pipes">InputStream reader pipes<a 
class="headerlink" href="#inputstream-reader-pipes" title="Permanent 
link">&para;</a></h3>
+<p>those are specific reader pipes, that read information an input stream from 
defined in expr configuration,
+that can be:</p>
+<ul>
+<li>a remote located file (starting with http),</li>
+<li>a file located in the repository (existing file stored in the 
repository),</li>
+<li>a file passed as request parameter with <code>pipes_inputFile</code> as 
parameter name (in that case, expr can be empty)</li>
+<li>direct data stream in the expression</li>
+</ul>
+<h5 id="jsonpipe-jsonexpr">JsonPipe (<code>json(expr)</code>)<a 
class="headerlink" href="#jsonpipe-jsonexpr" title="Permanent 
link">&para;</a></h5>
+<p>feeds bindings with json stream</p>
+<ul>
+<li><code>sling:resourceType</code> is <code>slingPipes/json</code></li>
+<li><code>expr</code> see above</li>
+<li><code>valuePath</code> json path like expression that defines where the 
json value we care about is. E.g. <code>$.items[2]</code> considers root is an 
object and that we want the 3rd item of items array, located at 
<code>items</code> key of the root object.</li>
+</ul>
+<p>In case the json value is an array, the pipe will loop over
+the array elements, and output each one in the binding. 
+Output resource remains each time the input one.</p>
+<div 
class="codehilite"><pre>json(&#39;{items:[{val:1},{val:2},{val:3}]}&#39;).with(&#39;valuePath&#39;,&#39;$.items&#39;).name(&#39;demo&#39;)
+mkdir(&#39;/content/<span class="cp">${</span><span class="n">demo</span><span 
class="o">.</span><span class="n">val</span><span class="cp">}</span>.run()
+</pre></div>
+
+
+<p>should create a tree of 3 resources /content/1, /content/2 and 
/content/3</p>
+<h5 id="csvpipe-csvexpr">CsvPipe (<code>csv(expr)</code>)<a class="headerlink" 
href="#csvpipe-csvexpr" title="Permanent link">&para;</a></h5>
+<p>feeds bindings with csv stream</p>
+<ul>
+<li><code>sling:resourceType</code> is <code>slingPipes/csv</code></li>
+<li><code>expr</code> see above</li>
+<li>
+<p><code>separator</code> separator character, default being comma 
<code>,</code></p>
+<p>json('idx,val\n1,1\n2,2\n3,3').name('demo')
+.mkdir('/content/${demo.val}.run()</p>
+</li>
+</ul>
+<p>should create a tree of 3 resources /content/1, /content/2 and 
/content/3</p>
 <h3 id="containers">containers<a class="headerlink" href="#containers" 
title="Permanent link">&para;</a></h3>
 <h5 id="container-pipe">Container Pipe<a class="headerlink" 
href="#container-pipe" title="Permanent link">&para;</a></h5>
 <p>assemble a sequence of pipes</p>
@@ -335,11 +365,17 @@ not containing <code>@foo=bar</code></p>
 </ul>
 <p>Note that pipe builder api automatically creates one for you to chain the 
subpipe you are configuring</p>
 <h5 id="referencepipe">ReferencePipe<a class="headerlink" 
href="#referencepipe" title="Permanent link">&para;</a></h5>
-<p>execute the pipe referenced in path property</p>
+<p>executes the pipe referenced in path property</p>
 <ul>
 <li><code>sling:resourceType</code> is <code>slingPipes/reference</code></li>
 <li><code>path</code> path of the referenced pipe</li>
 </ul>
+<h5 id="notpipe">NotPipe<a class="headerlink" href="#notpipe" title="Permanent 
link">&para;</a></h5>
+<p>executes the pipe referenced in path property, passes input only if 
referenced pipe doesn't return any resource</p>
+<ul>
+<li><code>sling:resourceType</code> is <code>slingPipes/not</code></li>
+<li><code>path</code> path of the referenced pipe</li>
+</ul>
 <h3 id="writers">writers<a class="headerlink" href="#writers" title="Permanent 
link">&para;</a></h3>
 <h5 id="write-pipe-writeconf">Write Pipe (<code>write(conf)</code>)<a 
class="headerlink" href="#write-pipe-writeconf" title="Permanent 
link">&para;</a></h5>
 <p>writes given nodes &amp; properties to current input</p>
@@ -447,7 +483,7 @@ it does </p>
 <li>jackrabbit api (2.7.5+) (used in AuthorizablePipe)</li>
 </ul>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; 
text-align: right;">
-        Rev. 1807296 by npeltier on Mon, 4 Sep 2017 19:48:33 +0000
+        Rev. 1809827 by npeltier on Wed, 27 Sep 2017 10:40:34 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache 
Sling project


Reply via email to