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

Mark Adamcin commented on JCRVLT-378:
-------------------------------------

Ah, I see what you mean. Based on the page you linked, it does appear that 
there should be a special case for using only relative path patterns, which 
just requires that the first character is not a {{/}}. Does this work?

 

 
{code:java}
<filter root="/var/acs-commons">
        <include pattern="^/var/acs-commons/httpcache"/>
        <include pattern="^/var/acs-commons/httpcache/root"/>
</filter>
{code}
I guess this is more of a special "ACL export" case, as described in the 
comment in AggregateImpl:

{color:#808080}// otherwise create sub node and collect items if needed
{color}{color:#808080}// but only if the node is either an ancestor or is 
included
{color}{color:#808080}// or if the workspace filter set contains relative 
pattern (ACL export case).{color}

 

Looking at AggregateImpl.getArtifacts(), it appears this might not collect 
{{_rep_policy.xml}} files, and instead only collect {{.content.xml}} files, so 
maybe this would also require some docview refactoring to actually include the 
ACLs that you are intending to include.

 
{code:java}
public ArtifactSet getArtifacts() throws RepositoryException {
    if (artifacts == null) {
        assertAttached();
        load();
        artifacts = (ArtifactSetImpl) aggregator.createArtifacts(this);

        if (filterArtifacts) {
            // filter out all non-directory and non .content.xml artifacts
            ArtifactSetImpl na = new ArtifactSetImpl();
            na.addAll(artifacts);
            for (Artifact a: na.values()) {
                if (a.getType() != ArtifactType.DIRECTORY) {
                    if 
(!".content.xml".equals(Text.getName(a.getPlatformPath()))) {
                        artifacts.remove(a);
                    }
                }
            }
        }
    }
    return artifacts;
{code}
 

> WorkspaceFilter.contains return false negative
> ----------------------------------------------
>
>                 Key: JCRVLT-378
>                 URL: https://issues.apache.org/jira/browse/JCRVLT-378
>             Project: Jackrabbit FileVault
>          Issue Type: Bug
>          Components: vlt
>            Reporter: Konrad Windszus
>            Priority: Major
>
> For this workspace filter
> {code}
> <filter root="/var/acs-commons">
>         <include pattern="/var/acs-commons/httpcache"/>
>         <include pattern="/var/acs-commons/httpcache/root"/>
> </filter>
> {code}
> The call of {{WorkspaceFilter.contains("/var/acs-commons")}} returns 
> {{false}}.
> This is unexpected because this is the root path itself.
> So this node should be installed (including all direct properties) and only 
> sub nodes are being filtered with the includes/excludes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to