1
0
mirror of https://github.com/sismics/docs.git synced 2026-01-03 20:09:28 +00:00

Search on tags (server)

This commit is contained in:
jendib
2013-07-31 20:57:12 +02:00
parent 990a1c3aa5
commit 4dc5cb12b3
6 changed files with 48 additions and 3 deletions

View File

@@ -108,7 +108,8 @@ public class DocumentResource extends BaseResource {
@QueryParam("asc") Boolean asc,
@QueryParam("search") String search,
@QueryParam("create_date_min") String createDateMinStr,
@QueryParam("create_date_max") String createDateMaxStr) throws JSONException {
@QueryParam("create_date_max") String createDateMaxStr,
@QueryParam("tags[]") List<String> tagIdList) throws JSONException {
if (!authenticate()) {
throw new ForbiddenClientException();
}
@@ -127,6 +128,7 @@ public class DocumentResource extends BaseResource {
documentCriteria.setUserId(principal.getId());
documentCriteria.setCreateDateMin(createDateMin);
documentCriteria.setCreateDateMax(createDateMax);
documentCriteria.setTagIdList(tagIdList);
if (!Strings.isNullOrEmpty(search)) {
documentCriteria.setSearch(search);
}