GitLab Mirror pushed to branch 2.8 at cms-community / hippo-jackrabbit
Commits: 9f218ecd by Julian Reschke at 2016-11-22T14:54:26+00:00 JCR-3845: Have AuthorizableQueryManager Support Specifying Sort Ignore Case Mode (patch provided by dominique jaeggi) (ported to 2.8) git-svn-id: https://svn.apache.org/repos/asf/jackrabbit/branches/2.8@1770849 13f79535-47bb-0310-9956-ffa450edef68 - - - - - 1 changed file: - jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/jackrabbit/user/AuthorizableQueryManager.java Changes: ===================================== jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/jackrabbit/user/AuthorizableQueryManager.java ===================================== --- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/jackrabbit/user/AuthorizableQueryManager.java +++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/jackrabbit/user/AuthorizableQueryManager.java @@ -60,6 +60,7 @@ import java.util.Stack; { property: /* relative path (String) * / ( direction: "asc" | "desc" ) // Defaults to "asc" + ( ignoreCase: true | false ) // Defaults to "true", see QueryBuilder#setSortOrder() } ) ? // Defaults to document order @@ -636,15 +637,16 @@ public class AuthorizableQueryManager { private String currentKey; private String property; private QueryBuilder.Direction direction; + private boolean ignoreCase = true; @Override public void endObject() throws IOException { if (property == null) { throw new IOException("Missing property"); } else { - queryBuilder.setSortOrder(property, direction == null - ? QueryBuilder.Direction.ASCENDING - : direction, true); + queryBuilder.setSortOrder(property, + direction == null ? QueryBuilder.Direction.ASCENDING : direction, + ignoreCase); } handlers.pop(); } @@ -660,6 +662,8 @@ public class AuthorizableQueryManager { property = s; } else if ("direction".equals(currentKey)) { direction = directionFor(s); + } else if ("ignoreCase".equals(currentKey)) { + ignoreCase = Boolean.valueOf(s); } else { throw new IOException("Unexpected: '" + currentKey + ':' + s + '\''); } View it on GitLab: https://code.onehippo.org/cms-community/hippo-jackrabbit/commit/9f218ecdd078ad8ccbf69dc196c2d7c95c866bbd
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn