mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.2.N (5.2.1) to HEAD (5.2)
130298 gjames: Merged searchapi (5.2.1) to 5.2.N (5.2.1) 130051 gjames: SEARCH-159: Don't allow sort for cmis_alfresco language git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130370 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -170,7 +170,7 @@ public class SearchMapper
|
||||
{
|
||||
if (sort != null && !sort.isEmpty())
|
||||
{
|
||||
if (CMIS.equals(sp.getLanguage()))
|
||||
if (LANGUAGE_CMIS_ALFRESCO.equals(sp.getLanguage()))
|
||||
{
|
||||
throw new InvalidArgumentException(InvalidArgumentException.DEFAULT_MESSAGE_ID,
|
||||
new Object[] { ": sort {} not allowed with cmis language" });
|
||||
|
@@ -46,6 +46,7 @@ import org.alfresco.rest.framework.resource.parameters.Paging;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.cmr.search.LimitBy;
|
||||
import org.alfresco.service.cmr.search.SearchParameters;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
@@ -211,7 +212,7 @@ public class SearchMapperTests
|
||||
assertEquals("{}TYPE", searchParameters.getSortDefinitions().get(0).getField());
|
||||
|
||||
searchParameters = new SearchParameters();
|
||||
searchParameters.setLanguage(SearchMapper.CMIS);
|
||||
searchParameters.setLanguage(SearchService.LANGUAGE_CMIS_ALFRESCO);
|
||||
try
|
||||
{
|
||||
searchMapper.fromSort(searchParameters, Arrays.asList(new SortDef("FIELD", null, false)));
|
||||
|
Reference in New Issue
Block a user