[ 
https://issues.apache.org/jira/browse/SLING-5367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15048315#comment-15048315
 ] 

Marius Petria edited comment on SLING-5367 at 12/9/15 8:57 AM:
---------------------------------------------------------------

We will have three types of modifiers for a package
1. package builder filters (applied to all package created by that package 
builder)
2. request filters (applied to request)
3. isDeep (applied to current request)

a. include filters include just the matched content
b. isDeep - is equivalent with a shallow distribution + include root path

{noformat}
- content
  - parent1
     - jcr:content
     - child
        - jcr:content
{noformat}

{noformat}
DISTRIBUTE paths=[/content/parent] isDeep=false 

DISTRIBUTED [/content/page]
{noformat}

{noformat}
DISTRIBUTE paths=[/content/parent] includes=[/content/parent] isDeep=true 

DISTRIBUTED [/content/page]
{noformat}

{noformat}
DISTRIBUTE paths=[/content/parent] includes=[/content/parent/jcr:content] 
isDeep=false 

DISTRIBUTED [/content/page, /content/page/jcr:content]
{noformat}

{noformat}
DISTRIBUTE paths=[/content/parent] includes=[/content/parent/jcr:content] 
isDeep=true 

DISTRIBUTED [/content/page/jcr:content]
{noformat}

{noformat}
DISTRIBUTE paths=[/content/parent] isDeep=true 

DISTRIBUTED [/content/page/*]
{noformat}


was (Author: mpetria):
We will have three types of modifiers for a package
1. package builder filters (applied to all package created by that package 
builder)
2. request filters (applied to request)
3. isDeep (applied to current request)

a. include filters include just the matched content
b. isDeep - is equivalent with a shallow distribution + include root path

{noformat}
- content
  - parent1
     - jcr:content
     - child
        - jcr:content
{noformat}

{noformat}
DISTRIBUTE paths=[/content/parent] isDeep=false 

DISTRIBUTED [/content/page]
{noformat}

{noformat}
DISTRIBUTE paths=[/content/parent] includes=[/content/parent] isDeep=true 

DISTRIBUTED [/content/page]
{noformat}

{noformat}
DISTRIBUTE paths=[/content/parent] includes=[/content/parent/jcr:content] 
isDeep=false 

DISTRIBUTED [/content/page, /content/page/jcr:content\
{noformat}

{noformat}
DISTRIBUTE paths=[/content/parent] includes=[/content/parent/jcr:content] 
isDeep=true 

DISTRIBUTED [/content/page/jcr:content]
{noformat}

{noformat}
DISTRIBUTE paths=[/content/parent] isDeep=true 

DISTRIBUTED [/content/page/*]
{noformat}

> Allow specification of include/exclude patterns at request level
> ----------------------------------------------------------------
>
>                 Key: SLING-5367
>                 URL: https://issues.apache.org/jira/browse/SLING-5367
>             Project: Sling
>          Issue Type: Improvement
>          Components: Distribution
>            Reporter: Marius Petria
>
> We should allow filters to be specified at request level
> {noformat}
>      * | Pattern        | Matches
>      * | /foo           | exactly "/foo"
>      * | /foo.*         | all paths starting with "/foo"
>      * | ^.* /foo[^/]*$ | all files starting with "foo"
>      * | /foo/[^/]*$    | all direct children of /foo
>      * | /foo/.*        | all children of /foo
>      * | /foo(/.*)?     | all children of /foo and foo itself
> {noformat}
> [1] 
> https://svn.apache.org/repos/asf/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/fs/filter/DefaultPathFilter.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to