Package ca.uhn.fhir.rest.api.server
Class SimplePreResourceShowDetails
java.lang.Object
ca.uhn.fhir.rest.api.server.SimplePreResourceShowDetails
- All Implemented Interfaces:
IPreResourceShowDetails
,Iterable<org.hl7.fhir.instance.model.api.IBaseResource>
-
Constructor Summary
ConstructorDescriptionSimplePreResourceShowDetails
(Collection<T> theResources) Constructor for a collection of resourcesSimplePreResourceShowDetails
(org.hl7.fhir.instance.model.api.IBaseResource theResource) Constructor for a single resource -
Method Summary
Modifier and TypeMethodDescriptionList
<org.hl7.fhir.instance.model.api.IBaseResource> Returns aList
containing all resources that will be shown.org.hl7.fhir.instance.model.api.IBaseResource
getResource
(int theIndex) Iterator
<org.hl7.fhir.instance.model.api.IBaseResource> iterator()
void
markResourceAtIndexAsSubset
(int theIndex) Indicates that data is being masked from within the resource at the given index.void
setResource
(int theIndex, org.hl7.fhir.instance.model.api.IBaseResource theResource) Replace the resource being returned at indexint
size()
List
<org.hl7.fhir.instance.model.api.IBaseResource> toList()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SimplePreResourceShowDetails
Constructor for a single resource -
SimplePreResourceShowDetails
Constructor for a collection of resources
-
-
Method Details
-
size
- Specified by:
size
in interfaceIPreResourceShowDetails
- Returns:
- Returns the number of resources being shown
-
getResource
- Specified by:
getResource
in interfaceIPreResourceShowDetails
- Returns:
- Returns the resource at the given index. If you wish to make modifications to any resources
-
setResource
Description copied from interface:IPreResourceShowDetails
Replace the resource being returned at index- Specified by:
setResource
in interfaceIPreResourceShowDetails
- Parameters:
theIndex
- The resource indextheResource
- The resource at index
-
markResourceAtIndexAsSubset
Description copied from interface:IPreResourceShowDetails
Indicates that data is being masked from within the resource at the given index. This generally flags to the rest of the stack that the resource should include a SUBSET tag as an indication to consumers that some data has been removed.- Specified by:
markResourceAtIndexAsSubset
in interfaceIPreResourceShowDetails
- Parameters:
theIndex
- The resource index
-
getAllResources
Description copied from interface:IPreResourceShowDetails
Returns aList
containing all resources that will be shown. The returned list will have the same relative ordering as if the resources were retrieved usingIPreResourceShowDetails.getResource(int)
, but any null entries will be filtered out.The returned List may not be modified. Use this method only if you are not looking to make changes.
- Specified by:
getAllResources
in interfaceIPreResourceShowDetails
-
iterator
-
toList
-