Class AbstractBundleProvider
java.lang.Object
org.openehealth.ipf.commons.ihe.fhir.AbstractBundleProvider
- All Implemented Interfaces:
IBundleProvider
- Direct Known Subclasses:
EagerBundleProvider, LazyBundleProvider
Base class of a
IBundleProvider delegating to a RequestConsumer instance-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final jakarta.servlet.http.HttpServletResponse -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractBundleProvider(AbstractBundleProvider original, RequestDetails currentRequest) Copies a bundle provider and binds the copy to a later request, typically one that asks for another page of a result that has been cached withSpringCachePagingProvider.AbstractBundleProvider(RequestConsumer consumer, boolean sort, Object payload, Map<String, Object> headers, jakarta.servlet.http.HttpServletResponse httpServletResponse) AbstractBundleProvider(RequestConsumer consumer, Object payload, Map<String, Object> headers, jakarta.servlet.http.HttpServletResponse httpServletResponse) -
Method Summary
Modifier and TypeMethodDescriptionboundTo(RequestDetails requestDetails) Returns a bundle provider that can serve the given request.protected RequestConsumerprotected ObjectgetUuid()protected List<IBaseResource> obtainResources(Object payload, Map<String, Object> inHeaders) <T extends IBaseResource>
voidsortIfApplicable(List<T> resources) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IBundleProvider
containsAllResources, getAllResourceIds, getAllResources, getCurrentPageId, getCurrentPageOffset, getCurrentPageSize, getNextPageId, getPreviousPageId, getResourceListComplete, getResources, getResources, isEmpty, size, sizeOrThrowNpe
-
Field Details
-
httpServletResponse
protected final jakarta.servlet.http.HttpServletResponse httpServletResponse
-
-
Constructor Details
-
AbstractBundleProvider
public AbstractBundleProvider(RequestConsumer consumer, Object payload, Map<String, Object> headers, jakarta.servlet.http.HttpServletResponse httpServletResponse) -
AbstractBundleProvider
public AbstractBundleProvider(RequestConsumer consumer, boolean sort, Object payload, Map<String, Object> headers, jakarta.servlet.http.HttpServletResponse httpServletResponse) -
AbstractBundleProvider
Copies a bundle provider and binds the copy to a later request, typically one that asks for another page of a result that has been cached withSpringCachePagingProvider.The servlet request and response of the original request are recycled by the servlet container once it has completed, so the copy writes to the response of the current request and gets
RequestDetailsthat describe the original search, but are backed by the current servlet request.- Parameters:
original- bundle provider that was created for the original requestcurrentRequest- the request that is being processed now
-
-
Method Details
-
boundTo
Returns a bundle provider that can serve the given request. Subclasses that call theRequestConsumeragain after the original request has completed must return a copy created withAbstractBundleProvider(AbstractBundleProvider, RequestDetails).- Parameters:
requestDetails- the request that is being processed now- Returns:
- a bundle provider bound to the request, or this instance if it does not need to be bound
-
getPublished
- Specified by:
getPublishedin interfaceIBundleProvider
-
preferredPageSize
- Specified by:
preferredPageSizein interfaceIBundleProvider
-
obtainResources
-
getConsumer
-
getHeaders
-
getPayload
-
getUuid
- Specified by:
getUuidin interfaceIBundleProvider
-
sortIfApplicable
-