]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
NOJIRA - Fixed missing setup call to make vocabulary items support pagination.
authorPatrick Schmitz <pschmitz@berkeley.edu>
Thu, 17 Dec 2009 20:15:10 +0000 (20:15 +0000)
committerPatrick Schmitz <pschmitz@berkeley.edu>
Thu, 17 Dec 2009 20:15:10 +0000 (20:15 +0000)
services/vocabulary/service/src/main/java/org/collectionspace/services/vocabulary/VocabularyResource.java

index 359580097b438b211bea0b3b07f78a18b222eff9..9b6737ab77b5cee700996f78bffacc8998f56e15 100644 (file)
@@ -402,8 +402,11 @@ public class VocabularyResource extends AbstractCollectionSpaceResource {
             // Note that docType defaults to the ServiceName, so we're fine with that.
             ServiceContext ctx = MultipartServiceContextFactory.get().createServiceContext(null, getItemServiceName());
             DocumentHandler handler = createItemDocumentHandler(ctx, parentcsid);
-            DocumentFilter myFilter = new DocumentFilter(
-                    "vocabularyitems_common:inVocabulary='" + parentcsid + "'", 0, 0);
+            MultivaluedMap<String, String> queryParams = ui.getQueryParameters();
+            DocumentFilter myFilter =
+                DocumentFilter.CreatePaginatedDocumentFilter(queryParams);
+            myFilter.setWhereClause(
+                    "vocabularyitems_common:inVocabulary='" + parentcsid + "'");
             handler.setDocumentFilter(myFilter);
             getRepositoryClient(ctx).getFiltered(ctx, handler);
             vocabularyItemObjectList = (VocabularyitemsCommonList) handler.getCommonPartList();