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)
130183 gjames: Merged searchapi (5.2.1) to 5.2.N (5.2.1) 129823 gjames: SEARCH-113: Clearer default parameters git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130334 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -77,13 +77,23 @@ public class SearchMapper
|
||||
ParameterCheck.mandatory("query", searchQuery.getQuery());
|
||||
|
||||
SearchParameters sp = new SearchParameters();
|
||||
setDefaults(sp);
|
||||
|
||||
fromQuery(sp, searchQuery.getQuery());
|
||||
fromPaging(sp, searchQuery.getPaging());
|
||||
validateInclude(searchQuery.getInclude());
|
||||
|
||||
return sp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the API defaults
|
||||
* @param sp
|
||||
*/
|
||||
protected void setDefaults(SearchParameters sp)
|
||||
{
|
||||
//Hardcode workspace store
|
||||
sp.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
|
||||
return sp;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,8 +144,7 @@ public class SearchMapper
|
||||
{
|
||||
if (!PERMITTED_INCLUDES.contains(inc))
|
||||
{
|
||||
throw new InvalidArgumentException(InvalidArgumentException.DEFAULT_MESSAGE_ID,
|
||||
new Object[] { inc });
|
||||
throw new InvalidArgumentException(InvalidArgumentException.DEFAULT_MESSAGE_ID, new Object[] { inc });
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user