use of io.lumeer.api.model.Pagination in project engine by Lumeer.
the class ViewService method getViews.
@GET
public List<JsonView> getViews(@QueryParam("page") Integer page, @QueryParam("pageSize") Integer pageSize) {
Pagination pagination = new Pagination(page, pageSize);
List<View> views = viewFacade.getViews(pagination);
return JsonView.convert(views);
}
use of io.lumeer.api.model.Pagination in project engine by Lumeer.
the class CollectionService method getCollections.
@GET
public List<JsonCollection> getCollections(@QueryParam("page") Integer page, @QueryParam("pageSize") Integer pageSize) {
Pagination pagination = new Pagination(page, pageSize);
List<Collection> collections = collectionFacade.getCollections(pagination);
return JsonCollection.convert(collections);
}
use of io.lumeer.api.model.Pagination in project engine by Lumeer.
the class DocumentService method getDocuments.
@GET
public List<JsonDocument> getDocuments(@QueryParam("page") Integer page, @QueryParam("pageSize") Integer pageSize) {
Pagination pagination = new Pagination(page, pageSize);
List<Document> documents = documentFacade.getDocuments(collectionId, pagination);
return JsonDocument.convert(documents);
}
use of io.lumeer.api.model.Pagination in project engine by Lumeer.
the class DocumentFacadeIT method testGetDocuments.
@Test
public void testGetDocuments() {
String id1 = createDocument().getId();
String id2 = createDocument().getId();
Pagination pagination = new Pagination(null, null);
List<Document> documents = documentFacade.getDocuments(collection.getId(), pagination);
assertThat(documents).extracting(Document::getId).containsOnly(id1, id2);
}
Aggregations