This is an automated email from the ASF dual-hosted git repository.

npeltier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git


The following commit(s) were added to refs/heads/master by this push:
     new a219225  SLING-7708 update pipes documentation
a219225 is described below

commit a2192254319ce03b659170240d781fe3bd18b0aa
Author: Nicolas Peltier <[email protected]>
AuthorDate: Mon Oct 8 17:09:17 2018 +0200

    SLING-7708 update pipes documentation
---
 .../content/documentation/bundles/sling-pipes.md   | 20 +++++++++++++--
 .../documentation/bundles/sling-pipes/bindings.md  |  2 +-
 .../bundles/sling-pipes/execution-monitoring.md    | 18 ++++++++++---
 .../documentation/bundles/sling-pipes/logical.md   | 19 +++++++++++---
 .../documentation/bundles/sling-pipes/readers.md   | 13 +++++++++-
 .../documentation/bundles/sling-pipes/writers.md   | 30 ++++++++++++++++++++--
 6 files changed, 89 insertions(+), 13 deletions(-)

diff --git a/src/main/jbake/content/documentation/bundles/sling-pipes.md 
b/src/main/jbake/content/documentation/bundles/sling-pipes.md
index afb4d5c..2892e5e 100644
--- a/src/main/jbake/content/documentation/bundles/sling-pipes.md
+++ b/src/main/jbake/content/documentation/bundles/sling-pipes.md
@@ -19,11 +19,25 @@ and would be more opaque, not talking about monitoring or 
execution common, but
 
 With Sling Pipes, what you need to develop, and what is readable by another 
developer is
  
-        
plumber.newPipe(resolver).$("[sling:resourceType='foo/bar']").write("id",3).build("/etc/demo")
+        plumber.newPipe(resolver).$("foo/bar").write("id",3).build("/etc/demo")
         
 this is enough to persist a pipe in `/etc/demo` that is executable as http, 
java, groovy console script, or JMX. 
 You can make it monitor it with JMX, logs, http, you'll have dry run 
possibility of that execution for example, or asynchronous execution. 
-You could also use a pipe to create a java-free json or csv servlet, or a list 
component whose list possibilities are pipes accessed through the `PipeModel`   
+You could also use a pipe to create a java-free json or csv servlet, or a list 
component whose list possibilities are pipes accessed through the `PipeModel`
+
+you can check some introductions at different adaptTo presentations:
+
+## AdaptTo introductions
+
+some presentations were made at the adaptTo conference, last two were:
+
+[General introduction at a 2017 lightning 
talk](https://adapt.to/2017/en/schedule/lightning-talks/apache-sling-pipes.html).
+
+<iframe width="560" height="315" 
src="https://www.youtube.com/embed/XcWMB26bMxA?start=666"; frameborder="0" 
allow="autoplay; encrypted-media" allowfullscreen></iframe>
+
+and [latest news at a 2018 lightning 
talk](https://adapt.to/2018/en/schedule/lightning-talks/whats-new-with-filters-pipes.html)
+
+<iframe width="560" height="315" 
src="https://www.youtube.com/embed/LhxVE-56p2Y?start=122"; frameborder="0" 
allow="autoplay; encrypted-media" allowfullscreen></iframe>   
 
 ## What is a pipe
 
@@ -41,6 +55,8 @@ Important bits of a pipe are:
 - its optional expression, configured with `expr` property, that means 
different things depending on the pipe,
 - its configuration node, configured with `conf` node, that means different 
things depending on the pipe
 
+
+
 ## Get Started
 
 You can [configure and execute a pipe with java, groovy console, http, or 
jmx](/documentation/bundles/sling-pipes/execution-monitoring.html)
diff --git 
a/src/main/jbake/content/documentation/bundles/sling-pipes/bindings.md 
b/src/main/jbake/content/documentation/bundles/sling-pipes/bindings.md
index 001afa7..053d7a4 100644
--- a/src/main/jbake/content/documentation/bundles/sling-pipes/bindings.md
+++ b/src/main/jbake/content/documentation/bundles/sling-pipes/bindings.md
@@ -72,7 +72,7 @@ or with a set of key / value pairs
         
 [http 
api](/documentation/bundles/sling-pipes/execution-monitoring.html#http-api) for 
this is a binding parameter
     
-        -F binding='{"env":"prod"}'
+        -F bindings='{"env":"prod"}'
                  
 ## additional scripts
 
diff --git 
a/src/main/jbake/content/documentation/bundles/sling-pipes/execution-monitoring.md
 
b/src/main/jbake/content/documentation/bundles/sling-pipes/execution-monitoring.md
index d46c6cb..a12390b 100644
--- 
a/src/main/jbake/content/documentation/bundles/sling-pipes/execution-monitoring.md
+++ 
b/src/main/jbake/content/documentation/bundles/sling-pipes/execution-monitoring.md
@@ -42,7 +42,7 @@ You can encapsulate the whole execution of a pipe through the 
`execute` methods
 Plumber osgi service provides PipeBuilder with `newPipe(ResourceResolver 
resolver)` API, that gives a fluent API to quickly configure and run pipes.
 e.g. 
 
-    
plumber.newPipe(resolver).xpath('//element(*,nt:unstructured)[@sling:resourceType='to/delete']").rm().run();
+    
plumber.newPipe(resolver).xpath("//element(*,nt:unstructured)[@sling:resourceType='to/delete']").rm().run();
 
 will search for resource of type `to/delete` and remove them.
 
@@ -68,7 +68,7 @@ This works pretty well with a groovy console just by entering 
following set of i
 note that that configuration part has shortcuts for some pipes. Typically, 
above sample is a shorter equivalent of 
 
         plumber.newPipe(resolver)
-            
.pipe('slingPipes/xpath').expr('//element(*,nt:unstructured)[@sling:resourceType='to/delete']")
+            
.pipe('slingPipes/xpath').expr("//element(*,nt:unstructured)[@sling:resourceType='to/delete']")
             .pipe('slingPipes/rm').run();
 
 when available, shortcuts will be specified next to each pipe type 
documentation, for
@@ -87,6 +87,17 @@ Once you are happy with the pipe you have created, you 
should terminate the buil
 | `run(bindings)` or `runWith(bindings...)` | will build the pipe in random 
location, and run it with passed bindings |
 | `runAsync(bindings)` | will do the same, but asynchronously |
 
+### Apache Felix Gogo
+
+when installing pipes bundle, [apache felix 
gogo](http://felix.apache.org/documentation/subprojects/apache-felix-gogo.html) 
commands are exposed to the console that allow you to
+- build (pipe:build or just build if no other command) 
+- run (pipe:run or just run if no other command)
+- execute (pipe:execute or just execute if no other command)
+- and print help on how to use the above
+
+the pipe is here represented as `/` character as `|` is already used by gogo 
console, an heavy usage of the gogo console is made in the [main page 
videos](http://localhost:8820/documentation/bundles/sling-pipes.html#adaptto-introductions),
 or you can direcly check 
+in there for sample gogo commands for [99 bottles of 
beer](https://github.com/npeltier/99-bottles-of-beers-with-sling) sample.
+
 ### HTTP API
 
 #### Pipe HTTP Request bits 
@@ -154,5 +165,4 @@ so a breadcrumb pipe could be something like
 
 as soon as you add `monitored=true` flag to a pipe configuration, you'll make 
the given pipe monitored by JMX, giving stats, status, and an entry point
 to execute it. Note that if you don't see the pipe you just added, you might 
have to refresh monitored pipes by hitting the related button
-in plumber mbean.
-
+in plumber mbean.
\ No newline at end of file
diff --git 
a/src/main/jbake/content/documentation/bundles/sling-pipes/logical.md 
b/src/main/jbake/content/documentation/bundles/sling-pipes/logical.md
index 18d1a77..34c3c4d 100644
--- a/src/main/jbake/content/documentation/bundles/sling-pipes/logical.md
+++ b/src/main/jbake/content/documentation/bundles/sling-pipes/logical.md
@@ -7,20 +7,33 @@ Those pipes help assembling pipes, or modifying the resource 
streams
 [readers](/documentation/bundles/sling-pipes/readers.html) or 
[writers](/documentation/bundles/sling-pipes/writers.html)
 could create.
 
-### Container Pipe
-assemble a sequence of pipes
+
+### Super pipes
+Pipes that litterally contains sub pipes
+
+#### Container Pipe
+assemble a simple sequence of pipes
 
 - `sling:resourceType` is `slingPipes/container`
 - `conf` node contains child pipes' configurations, that will be configured in 
the order they are found (note you should use sling:OrderedFolder)
 
 Note that pipe builder api automatically creates one for you to chain the 
subpipe you are configuring.
 
-### ReferencePipe (`ref(path)`)
+#### ReferencePipe (`ref(path)`)
 executes the pipe referenced in path property
 
 - `sling:resourceType` is `slingPipes/reference`
 - `path` path of the referenced pipe
 
+#### Manifold
+allows parallel execution of the sub pipes listed in configuration
+
+- `sling:resourceType` is `slingPipes/filter`
+- `conf` node contains child pipes' configurations, that will be configured in 
the order they are found (note you should use sling:OrderedFolder)
+- `queueSize` size of the merged resource queue,
+- `numThread` thread pool size for the execution of the subpipes
+- `executionTimeout` execution time out for each sub pipe
+
 ### FilterPipe (`grep(conf)`)
 outputs the input resource if its matches its configuration
 
diff --git 
a/src/main/jbake/content/documentation/bundles/sling-pipes/readers.md 
b/src/main/jbake/content/documentation/bundles/sling-pipes/readers.md
index fa680ae..3785658 100644
--- a/src/main/jbake/content/documentation/bundles/sling-pipes/readers.md
+++ b/src/main/jbake/content/documentation/bundles/sling-pipes/readers.md
@@ -138,4 +138,15 @@ feeds bindings with csv stream
         .csv('idx,val\n1,1\n2,2\n3,3').name('demo')
         .mkdir('/content/${demo.val}')
 
-should create a tree of 3 resources /content/1, /content/2 and /content/3
\ No newline at end of file
+should create a tree of 3 resources /content/1, /content/2 and /content/3
+
+### Regexp pipe (`egrep(expr)`)
+feeds bindings with text input stream, parsed with a regexp
+
+- `sling:resourceType` is `slingPipes/egrep`
+- `expr` see above
+- `pattern` is a regular expression, with named group (e.g. `(?<user>.*)`) 
that will be used to produce the output binding names
+
+        egrep("https://sling.apache.org/";)
+              
.with("pattern",'src=\"/res/(?<asset>/[\\-\\w\\.\\/0-9]+)\"').name("demo")
+        .echo('/content/assets/${demo.asset}')
diff --git 
a/src/main/jbake/content/documentation/bundles/sling-pipes/writers.md 
b/src/main/jbake/content/documentation/bundles/sling-pipes/writers.md
index cb48be9..6cb62aa 100644
--- a/src/main/jbake/content/documentation/bundles/sling-pipes/writers.md
+++ b/src/main/jbake/content/documentation/bundles/sling-pipes/writers.md
@@ -61,7 +61,18 @@ get or create path given in expression. Uses 
[ResourceUtil.getOrCreateResource](
 
         .mkdir("/content/foo/bar")
         
-will create a `/content/foo/bar` path of `sling:Folder` nodes  
+will create a `/content/foo/bar` path of `sling:Folder` nodes
+
+##### PackagePipe (`pkg(expr)`)
+will create a package and add current resource as a filter. At the end of 
super pipe execution, will attempt to build the package
+- `sling:resourceType` is `slingPipes/package`
+- `expr` package path
+
+This example searches for folders in a given location and package them up
+
+        .echo("/content/foo/bar")
+        .$("sling:Folder")
+        .pkg("/etc/packages/foobar-folders.zip")
 
 ##### AuthorizablePipe (`auth(conf)`)
 retrieve authorizable resource corresponding to the id passed in expression, 
or if not found (or void expression),
@@ -89,4 +100,19 @@ In this example, auth is not writing anything but makes use 
of bind members and
 
         .auth("bindMembers",true).expr("administrators")
         .json('${one}')
-        .mkdir('/content/admin-users/${two}')
\ No newline at end of file
+        .mkdir('/content/admin-users/${two}')
+        
+##### ACLPipe (`acls(), allow(expr), deny(expr)`)
+either output ACL of current resource in the output bindings, or allow / deny 
default or configured privileges for the authorizable
+passed as the expression
+
+- `sling:resourceType` is `slingPipes/acl`
+- `expr` should be an authorizable id, or void
+- `allow` (boolean) to allow some privileges for configured authorizable
+- `deny` (boolean) to deny some privileges for configured authorizable
+
+following will give bar-users authorizable the right to read on 
/content/foo/bar
+
+        .echo("/content/foo/bar")
+        .allow("bar-users")
+

Reply via email to