@Override boolean matches(String toMatch) { if (restriction == null) { return Text.isDescendantOrEqual(nodePath, toMatch); } else if (restriction.length() == 0) { return nodePath.equals(toMatch); } else { // no wildcard contained in restriction: use path defined // by nodePath + restriction to calculate the match return Text.isDescendantOrEqual(patternStr, toMatch); } } }
@Override boolean matches(String toMatch) { if (restriction == null) { return Text.isDescendantOrEqual(nodePath, toMatch); } else if (restriction.length() == 0) { return nodePath.equals(toMatch); } else { // no wildcard contained in restriction: use path defined // by nodePath + restriction to calculate the match return Text.isDescendantOrEqual(patternStr, toMatch); } } }
public boolean containsMove(@Nullable String path) { if (path != null) { for (String p : Iterables.concat(parentSourcePaths, parentDestPaths)) { if (Text.isDescendantOrEqual(path, p)) { return true; } } } return false; }
static boolean isSupportedPath(@Nullable String oakPath, @NotNull Set<String> supportedPaths) { if (oakPath == null) { return false; } else { for (String supportedPath : supportedPaths) { if (Text.isDescendantOrEqual(supportedPath, oakPath)) { return true; } } } return false; }
static boolean isSupportedPath(@Nullable String oakPath, @NotNull Set<String> supportedPaths) { if (oakPath == null) { return false; } else { for (String supportedPath : supportedPaths) { if (Text.isDescendantOrEqual(supportedPath, oakPath)) { return true; } } } return false; }
@Override boolean matches(@NotNull String toMatch) { if (patternStr.isEmpty()) { return path.equals(toMatch); } else { // no wildcard contained in restriction: use path defined // by path + restriction to calculate the match return Text.isDescendantOrEqual(patternStr, toMatch); } } }
public boolean containsMove(@CheckForNull String path) { if (path != null) { for (String p : Iterables.concat(parentSourcePaths, parentDestPaths)) { if (Text.isDescendantOrEqual(path, p)) { return true; } } } return false; }
@Override boolean matches(@NotNull String toMatch) { if (patternStr.isEmpty()) { return path.equals(toMatch); } else { // no wildcard contained in restriction: use path defined // by path + restriction to calculate the match return Text.isDescendantOrEqual(patternStr, toMatch); } } }
@Override boolean matches(@Nonnull String toMatch) { if (patternStr.isEmpty()) { return path.equals(toMatch); } else { // no wildcard contained in restriction: use path defined // by path + restriction to calculate the match return Text.isDescendantOrEqual(patternStr, toMatch); } } }
static boolean isSupportedPath(@NotNull String configuredPath, @NotNull String path) { return Text.isDescendantOrEqual(configuredPath, path); }
private static void checkScope(@NotNull String userPath, @NotNull String targetPath, @NotNull String relPath) throws RepositoryException { if (!Text.isDescendantOrEqual(userPath, targetPath)) { throw new RepositoryException("Relative path " + relPath + " outside of scope of " + userPath); } } }
private static void checkScope(@Nonnull String userPath, @Nonnull String targetPath, @Nonnull String relPath) throws RepositoryException { if (!Text.isDescendantOrEqual(userPath, targetPath)) { throw new RepositoryException("Relative path " + relPath + " outside of scope of " + userPath); } } }
@Override public boolean definesLocation(@NotNull TreeLocation location) { return Text.isDescendantOrEqual(PRIVILEGES_PATH, location.getPath()); }
private static void checkScope(@NotNull String userPath, @NotNull String targetPath, @NotNull String relPath) throws RepositoryException { if (!Text.isDescendantOrEqual(userPath, targetPath)) { throw new RepositoryException("Relative path " + relPath + " outside of scope of " + userPath); } } }
@Override public boolean definesLocation(@NotNull TreeLocation location) { return Text.isDescendantOrEqual(PRIVILEGES_PATH, location.getPath()); }
@Override public boolean definesLocation(@Nonnull TreeLocation location) { return Text.isDescendantOrEqual(PRIVILEGES_PATH, location.getPath()); }
boolean matchesParent(@NotNull String parentPath) { return Text.isDescendantOrEqual(path, parentPath) && (restriction == RestrictionPattern.EMPTY || restriction.matches(parentPath)); }
boolean matchesParent(@NotNull String parentPath) { return Text.isDescendantOrEqual(path, parentPath) && (restriction == RestrictionPattern.EMPTY || restriction.matches(parentPath)); }
boolean matchesParent(@Nonnull String parentPath) { return Text.isDescendantOrEqual(path, parentPath) && (restriction == RestrictionPattern.EMPTY || restriction.matches(parentPath)); }
static boolean isSupported(@NotNull String path) { return Text.isDescendantOrEqual(AbstractCompositeProviderTest.TEST_A_PATH, path); }