@Test public void testGetSearchRoot() { ConfigurationParameters params = ConfigurationParameters.of( UserConstants.PARAM_USER_PATH, "/configured/user/path", UserConstants.PARAM_GROUP_PATH, "/configured/group/path"); Map<AuthorizableType, String> paths = ImmutableMap.of( AuthorizableType.USER, "/configured/user/path", AuthorizableType.GROUP, "/configured/group/path", AuthorizableType.AUTHORIZABLE, "/configured"); assertSearchRoot(paths, params); }
@NotNull public static String getSearchRoot(AuthorizableType type, ConfigurationParameters config) { String path = UserUtil.getAuthorizableRootPath(config, type); if (PathUtils.denotesRoot(path)) { return QueryConstants.SEARCH_ROOT_PATH; } else { return QueryConstants.SEARCH_ROOT_PATH + path; } }
QueryUtil { @NotNull public static String getSearchRoot(AuthorizableType type, ConfigurationParameters config) { String path = UserUtil.getAuthorizableRootPath(config, type); if (PathUtils.denotesRoot(path)) { return QueryConstants.SEARCH_ROOT_PATH; } else { return QueryConstants.SEARCH_ROOT_PATH + path; } } }
QueryUtil { @NotNull public static String getSearchRoot(AuthorizableType type, ConfigurationParameters config) { String path = UserUtil.getAuthorizableRootPath(config, type); if (PathUtils.denotesRoot(path)) { return QueryConstants.SEARCH_ROOT_PATH; } else { return QueryConstants.SEARCH_ROOT_PATH + path; } } private  QueryUtil(); }
QueryUtil { @NotNull public static String getSearchRoot(AuthorizableType type, ConfigurationParameters config) { String path = UserUtil.getAuthorizableRootPath(config, type); if (PathUtils.denotesRoot(path)) { return QueryConstants.SEARCH_ROOT_PATH; } else { return QueryConstants.SEARCH_ROOT_PATH + path; } } private  QueryUtil(); @NotNull static String getSearchRoot(AuthorizableType type, ConfigurationParameters config); @NotNull static String getNodeTypeName(@NotNull AuthorizableType type); @NotNull static String escapeNodeName(@NotNull String string); @NotNull static String format(@NotNull Value value); @NotNull static String escapeForQuery(@NotNull String oakName, @NotNull NamePathMapper namePathMapper); @NotNull static String escapeForQuery(@NotNull String value); @NotNull static RelationOp getCollation(@NotNull QueryBuilder.Direction direction); @Nullable static String getID(@Nullable Authorizable authorizable); }
QueryUtil { @NotNull public static String getSearchRoot(AuthorizableType type, ConfigurationParameters config) { String path = UserUtil.getAuthorizableRootPath(config, type); if (PathUtils.denotesRoot(path)) { return QueryConstants.SEARCH_ROOT_PATH; } else { return QueryConstants.SEARCH_ROOT_PATH + path; } } private  QueryUtil(); @NotNull static String getSearchRoot(AuthorizableType type, ConfigurationParameters config); @NotNull static String getNodeTypeName(@NotNull AuthorizableType type); @NotNull static String escapeNodeName(@NotNull String string); @NotNull static String format(@NotNull Value value); @NotNull static String escapeForQuery(@NotNull String oakName, @NotNull NamePathMapper namePathMapper); @NotNull static String escapeForQuery(@NotNull String value); @NotNull static RelationOp getCollation(@NotNull QueryBuilder.Direction direction); @Nullable static String getID(@Nullable Authorizable authorizable);  }