mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
13249: Fix for ETHREEOH-1064 and ETHREEOH-1286 and fix for issue where New Page action not activated in Share Wiki page list. 13251: Final part of fix for ETHREEOH-1270 - Group pickers in JSF client now use new findAuthorities() API to find groups for user searches - over 10x quicker for installations with many groups. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13580 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -67,6 +67,7 @@ import org.alfresco.service.cmr.repository.InvalidNodeRefException;
|
||||
import org.alfresco.service.cmr.repository.NoTransformerException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.util.URLEncoder;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.DownloadContentServlet;
|
||||
@@ -1051,4 +1052,22 @@ public final class Utils extends StringUtils
|
||||
}
|
||||
return userAgent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the Lucene query for a standard Person search. The query used is standardised
|
||||
* across multiple JSF components and beans.
|
||||
*
|
||||
* @param query Buffer for the query
|
||||
* @param term Search term
|
||||
*/
|
||||
public static void generatePersonSearch(StringBuilder query, String term)
|
||||
{
|
||||
query.append("@").append(NamespaceService.CONTENT_MODEL_PREFIX).append("\\:firstName:\"*");
|
||||
query.append(term);
|
||||
query.append("*\" @").append(NamespaceService.CONTENT_MODEL_PREFIX).append("\\:lastName:\"*");
|
||||
query.append(term);
|
||||
query.append("*\" @").append(NamespaceService.CONTENT_MODEL_PREFIX).append("\\:userName:");
|
||||
query.append(term);
|
||||
query.append("*");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user