本文整理了Java中org.apache.jackrabbit.util.Text.isDescendantOrEqual()
方法的一些代码示例,展示了Text.isDescendantOrEqual()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.isDescendantOrEqual()
方法的具体详情如下:
包路径:org.apache.jackrabbit.util.Text
类名称:Text
方法名:isDescendantOrEqual
[英]Determines if the descendant
path is hierarchical a descendant of path
or equal to it.
[中]确定descendant
路径是path
的子路径还是与其相等的子路径。
代码示例来源:origin: org.apache.jackrabbit/jackrabbit-core
@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);
}
}
}
代码示例来源:origin: apache/jackrabbit
@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);
}
}
}
代码示例来源:origin: apache/jackrabbit-oak
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;
}
代码示例来源:origin: org.apache.jackrabbit/oak-authorization-cug
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;
}
代码示例来源:origin: apache/jackrabbit-oak
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;
}
代码示例来源:origin: apache/jackrabbit-oak
@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);
}
}
}
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
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;
}
代码示例来源:origin: org.apache.jackrabbit/oak-core
@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);
}
}
}
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
@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);
}
}
}
代码示例来源:origin: apache/jackrabbit-oak
static boolean isSupportedPath(@NotNull String configuredPath, @NotNull String path) {
return Text.isDescendantOrEqual(configuredPath, path);
}
代码示例来源:origin: apache/jackrabbit-oak
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);
}
}
}
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
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);
}
}
}
代码示例来源:origin: org.apache.jackrabbit/oak-core
@Override
public boolean definesLocation(@NotNull TreeLocation location) {
return Text.isDescendantOrEqual(PRIVILEGES_PATH, location.getPath());
}
代码示例来源:origin: org.apache.jackrabbit/oak-core
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);
}
}
}
代码示例来源:origin: apache/jackrabbit-oak
@Override
public boolean definesLocation(@NotNull TreeLocation location) {
return Text.isDescendantOrEqual(PRIVILEGES_PATH, location.getPath());
}
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
@Override
public boolean definesLocation(@Nonnull TreeLocation location) {
return Text.isDescendantOrEqual(PRIVILEGES_PATH, location.getPath());
}
代码示例来源:origin: apache/jackrabbit-oak
boolean matchesParent(@NotNull String parentPath) {
return Text.isDescendantOrEqual(path, parentPath) && (restriction == RestrictionPattern.EMPTY || restriction.matches(parentPath));
}
代码示例来源:origin: org.apache.jackrabbit/oak-core
boolean matchesParent(@NotNull String parentPath) {
return Text.isDescendantOrEqual(path, parentPath) && (restriction == RestrictionPattern.EMPTY || restriction.matches(parentPath));
}
代码示例来源:origin: org.apache.sling/org.apache.sling.testing.sling-mock-oak
boolean matchesParent(@Nonnull String parentPath) {
return Text.isDescendantOrEqual(path, parentPath) && (restriction == RestrictionPattern.EMPTY || restriction.matches(parentPath));
}
代码示例来源:origin: apache/jackrabbit-oak
static boolean isSupported(@NotNull String path) {
return Text.isDescendantOrEqual(AbstractCompositeProviderTest.TEST_A_PATH, path);
}
内容来源于网络,如有侵权,请联系作者删除!