001package ca.uhn.fhir.rest.server; 002 003import ca.uhn.fhir.rest.api.server.IBundleProvider; 004import ca.uhn.fhir.rest.api.server.RequestDetails; 005 006import javax.annotation.Nonnull; 007import javax.annotation.Nullable; 008 009/* 010 * #%L 011 * HAPI FHIR - Server Framework 012 * %% 013 * Copyright (C) 2014 - 2019 University Health Network 014 * %% 015 * Licensed under the Apache License, Version 2.0 (the "License"); 016 * you may not use this file except in compliance with the License. 017 * You may obtain a copy of the License at 018 * 019 * http://www.apache.org/licenses/LICENSE-2.0 020 * 021 * Unless required by applicable law or agreed to in writing, software 022 * distributed under the License is distributed on an "AS IS" BASIS, 023 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 024 * See the License for the specific language governing permissions and 025 * limitations under the License. 026 * #L% 027 */ 028 029public interface IPagingProvider { 030 031 int getDefaultPageSize(); 032 033 int getMaximumPageSize(); 034 035 /** 036 * Retrieve a result list by ID 037 * <p> 038 * Note that the <code>theRequest</code> parameter was added to this 039 * method in HAPI FHIR 4.0.0. Existing implementations may choose to 040 * add this parameter and not use it if needed. 041 * </p> 042 */ 043 IBundleProvider retrieveResultList(@Nullable RequestDetails theRequestDetails, @Nonnull String theSearchId); 044 045 /** 046 * Retrieve a result list by ID 047 * <p> 048 * Note that the <code>theRequest</code> parameter was added to this 049 * method in HAPI FHIR 4.0.0. Existing implementations may choose to 050 * add this parameter and not use it if needed. 051 * </p> 052 */ 053 default IBundleProvider retrieveResultList(@Nullable RequestDetails theRequestDetails, @Nonnull String theSearchId, String thePageId) { 054 return null; 055 } 056 057 /** 058 * Stores a result list and returns an ID with which that list can be returned 059 * 060 * @param theRequestDetails The server request being made (may be null) 061 */ 062 String storeResultList(@Nullable RequestDetails theRequestDetails, IBundleProvider theList); 063 064}