From: Patrick Schmitz Date: Thu, 1 Dec 2011 02:03:51 +0000 (+0000) Subject: CSPACE-4601 fix regex in sortBy to allow sortBy on complex fields. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=913d56c7c019ddf1cea22ee5714ee784e9e235e7;p=tmp%2Fjakarta-migration.git CSPACE-4601 fix regex in sortBy to allow sortBy on complex fields. --- 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;