org.apache.jackrabbit.vault.fs.api.WorkspaceFilter.contains()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(93)

本文整理了Java中org.apache.jackrabbit.vault.fs.api.WorkspaceFilter.contains()方法的一些代码示例,展示了WorkspaceFilter.contains()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkspaceFilter.contains()方法的具体详情如下:
包路径:org.apache.jackrabbit.vault.fs.api.WorkspaceFilter
类名称:WorkspaceFilter
方法名:contains

WorkspaceFilter.contains介绍

[英]Checks if the given node path is contained in this workspace filter. It returns true if any of the filter sets contain the path and it's not globally ignored.
[中]检查给定的节点路径是否包含在此工作区筛选器中。如果任何过滤器集包含该路径且未被全局忽略,则返回true。

代码示例

代码示例来源:origin: net.adamcin.oakpal/oakpal-core

Predicate<? super Map.Entry<PackageId, WorkspaceFilter>> overlaps(final String path) {
  return entry -> entry.getValue().contains(path);
}

代码示例来源:origin: net.adamcin.oakpal/oakpal-core

@Override
public void importedPath(final PackageId packageId, final String path, final Node node)
    throws RepositoryException {
  // don't worry about nodes outside of our own scope.
  if (filters.get(packageId).contains(path)) {
    findOverlaps(packageId, path, Violation.Severity.MINOR);
  }
}

代码示例来源:origin: org.apache.jackrabbit.vault/org.apache.jackrabbit.vault

private void assertInFilter(String repoPath) {
  if (!fs.getWorkspaceFilter().contains(repoPath)) {
    log.warn("{} is excluded by the workspace filter. continuing with unknown results.", repoPath);
  }
}

代码示例来源:origin: org.apache.sling/org.apache.sling.fsresource

/**
 * Checks if the given path matches the workspace filter.
 * @param path Path
 * @return true if path matches
 */
public boolean pathMatches(String path) {
  // ignore .dir folder
  if (StringUtils.endsWith(path, DOT_DIR_SUFFIX) || StringUtils.endsWith(path, DOT_CONTENT_XML_SUFFIX)) {
    return false;
  }
  if (workspaceFilter == null) {
    return true;
  }
  else {
    return workspaceFilter.contains(path);
  }
}

代码示例来源:origin: net.adamcin.oakpal/oakpal-core

@Override
public void importedPath(final PackageId packageId, final String path, final Node node) throws RepositoryException {
  if (!wspFilter.contains(path)) {
    return;
  }
  final Rule lastMatch = Rule.lastMatch(scopePaths, path);
  if (lastMatch.isInclude()) {
    this.checkNode(packageId, node);
  }
}

代码示例来源:origin: org.apache.jackrabbit.vault/org.apache.jackrabbit.vault

private TxInfo postFilter(TxInfo root) {
  TxInfo modifierRoot = root;
  if (filter.contains(modifierRoot.path)){
    return modifierRoot;
  }
  if (filter.isAncestor(modifierRoot.path)) {
    for (String k : modifierRoot.children().keySet()) {
      TxInfo child = modifierRoot.children().get(k);
      modifierRoot.children().put(k, postFilter(child));
    }
  }
  else {
    modifierRoot.discard();
  }
  return modifierRoot;
}

代码示例来源:origin: org.apache.jackrabbit.vault/org.apache.jackrabbit.vault

continue;
if (filter == null || filter.contains(child.getPath())) {
  if (!built || pack.getSize() > 0) {
    packages.add(pack);

代码示例来源:origin: org.apache.jackrabbit.vault/org.apache.jackrabbit.vault

private boolean isIncluded(Item item, int depth) throws RepositoryException {
  String path = importInfo.getRemapped().map(item.getPath());
  return wspFilter.contains(path) && (depth == 0 || filter.contains(item, path, depth));
}

代码示例来源:origin: org.apache.jackrabbit.vault/org.apache.jackrabbit.vault

Node child = iter.nextNode();
String path = child.getPath();
if (wspFilter.contains(path)) {
  if (wspFilter.getImportMode(path) == ImportMode.REPLACE) {
    if (!hints.contains(path)) {

代码示例来源:origin: org.apache.jackrabbit.vault/org.apache.jackrabbit.vault

PathFilterSet coverSet = filter.getCoveringFilterSet(path);
boolean isAncestor = filter.isAncestor(path);
boolean isIncluded = filter.contains(path);
if (coverSet == null && !isAncestor) {
  continue;

代码示例来源:origin: org.apache.jackrabbit.vault/org.apache.jackrabbit.vault

currentPath = path;
String dstPath = dstParent.getPath() + "/" + dstName;
if (srcFilter != null && !srcFilter.contains(path)) {
  track(path, "------ I");
  return;

代码示例来源:origin: net.adamcin.granite/granite-client-packman

protected static ValidationResult checkDeniedPathInclusion(ValidationOptions options, VaultPackage pack) {
  List<String> pathsDeniedForInclusion = options.getPathsDeniedForInclusion();
  if (pathsDeniedForInclusion != null) {
    for (String path : pathsDeniedForInclusion) {
      if (pack.getMetaInf().getFilter().contains(path)) {
        WspFilter.Root invalidRoot = null;
        PathFilterSet filter = pack.getMetaInf().getFilter().getCoveringFilterSet(path);
        if (filter != null) {
          invalidRoot = WspFilter.adaptFilterSet(filter);
        }
        return ValidationResult.deniedPathInclusion(path, invalidRoot);
      }
    }
  }
  return ValidationResult.success();
}

代码示例来源:origin: org.apache.jackrabbit.vault/org.apache.jackrabbit.vault

String id = userManagement.getAuthorizableId(ni);
String newPath = node.getPath() + "/" + ni.name;
boolean isIncluded = wspFilter.contains(newPath);
String oldPath = userManagement.getAuthorizablePath(this.session, id);
if (oldPath == null) {

代码示例来源:origin: org.apache.jackrabbit.vault/org.apache.jackrabbit.vault

if (filter.contains(info.path) && session.nodeExists(info.path) && info.isIntermediate < 2) {
  Node node = session.getNode(info.path);
  imp = new ImportInfoImpl();
  if (nameList != null && (filter.contains(path) || type == ImportInfo.Type.CRE)) {
    TxInfo subInfo = info.findChild(path);
    if (subInfo != null) {

相关文章