From 913d56c7c019ddf1cea22ee5714ee784e9e235e7 Mon Sep 17 00:00:00 2001 From: Patrick Schmitz Date: Thu, 1 Dec 2011 02:03:51 +0000 Subject: [PATCH] CSPACE-4601 fix regex in sortBy to allow sortBy on complex fields. --- .../org/collectionspace/services/nuxeo/util/NuxeoUtils.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java b/services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java index eb6a3cf1a..5c7a93d04 100644 --- a/services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java +++ b/services/common/src/main/java/org/collectionspace/services/nuxeo/util/NuxeoUtils.java @@ -91,7 +91,10 @@ public class NuxeoUtils { // Regular expressions pattern for identifying valid ORDER BY clauses. // FIXME: Currently supports only USASCII word characters in field names. - private static final String ORDER_BY_CLAUSE_REGEX = "\\w+(_\\w+)?:\\w+( ASC| DESC)?(, \\w+(_\\w+)?:\\w+( ASC| DESC)?)*"; + //private static final String ORDER_BY_CLAUSE_REGEX = "\\w+(_\\w+)?:\\w+( ASC| DESC)?(, \\w+(_\\w+)?:\\w+( ASC| DESC)?)*"; + // Allow paths so can sort on complex fields. CSPACE-4601 + private static final String ORDER_BY_CLAUSE_REGEX = "\\w+(_\\w+)?:\\w+(/(\\*|\\w+))*( ASC| DESC)?(, \\w+(_\\w+)?:\\w+(/(\\*|\\w+))*( ASC| DESC)?)*"; + public static void exportDocModel(DocumentModel src) { DocumentReader reader = null; -- 2.47.3