Interface FHIRRestInteractionVisitor

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      FHIRRestOperationResponse doCreate​(int entryIndex, FHIRPersistenceEvent event, java.util.List<OperationOutcome.Issue> warnings, Bundle.Entry validationResponseEntry, java.lang.String requestDescription, FHIRUrlParser requestURL, long accumulatedTime, java.lang.String type, Resource resource, java.lang.String ifNoneExist, java.lang.String localIdentifier, PayloadPersistenceResponse offloadResponse)
      Performs the heavy lifting associated with a 'create' interaction.
      FHIRRestOperationResponse doDelete​(int entryIndex, java.lang.String requestDescription, FHIRUrlParser requestURL, long accumulatedTime, java.lang.String type, java.lang.String id, java.lang.String searchQueryString)
      Performs a 'delete' operation on the specified resource.
      FHIRRestOperationResponse doHistory​(int entryIndex, java.lang.String requestDescription, FHIRUrlParser requestURL, long accumulatedTime, java.lang.String type, java.lang.String id, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters, java.lang.String requestUri)
      Performs the work of retrieving versions of a Resource.
      FHIRRestOperationResponse doInvoke​(java.lang.String method, int entryIndex, Bundle.Entry validationResponseEntry, java.lang.String requestDescription, FHIRUrlParser requestURL, long accumulatedTime, FHIROperationContext operationContext, java.lang.String resourceTypeName, java.lang.String logicalId, java.lang.String versionId, Resource resource, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters)
      Helper method which invokes a custom operation.
      FHIRRestOperationResponse doPatch​(int entryIndex, FHIRPersistenceEvent event, Bundle.Entry validationResponseEntry, java.lang.String requestDescription, FHIRUrlParser requestURL, long accumulatedTime, java.lang.String type, java.lang.String id, Resource newResource, Resource prevResource, FHIRPatch patch, java.lang.String ifMatchValue, java.lang.String searchQueryString, boolean skippableUpdate, java.util.List<OperationOutcome.Issue> warnings, java.lang.String localIdentifier, PayloadPersistenceResponse offloadResponse)
      Performs a patch operation (a new version of the Resource will be stored).
      FHIRRestOperationResponse doRead​(int entryIndex, java.lang.String requestDescription, FHIRUrlParser requestURL, long accumulatedTime, java.lang.String type, java.lang.String id, boolean throwExcOnNull, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters, boolean checkInteractionAllowed)
      Performs a 'read' operation to retrieve a Resource.
      FHIRRestOperationResponse doSearch​(int entryIndex, java.lang.String requestDescription, FHIRUrlParser requestURL, long accumulatedTime, java.lang.String type, java.lang.String compartment, java.lang.String compartmentId, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters, java.lang.String requestUri, boolean checkInteractionAllowed)
      Performs heavy lifting associated with a 'search' operation.
      FHIRRestOperationResponse doUpdate​(int entryIndex, FHIRPersistenceEvent event, Bundle.Entry validationResponseEntry, java.lang.String requestDescription, FHIRUrlParser requestURL, long accumulatedTime, java.lang.String type, java.lang.String id, Resource newResource, Resource prevResource, java.lang.String ifMatchValue, java.lang.String searchQueryString, boolean skippableUpdate, java.lang.String localIdentifier, java.util.List<OperationOutcome.Issue> warnings, boolean isDeleted, java.lang.Integer ifNoneMatch, PayloadPersistenceResponse offloadResponse)
      Performs an update operation (a new version of the Resource will be stored).
      FHIRRestOperationResponse doVRead​(int entryIndex, java.lang.String requestDescription, FHIRUrlParser requestURL, long accumulatedTime, java.lang.String type, java.lang.String id, java.lang.String versionId, javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters)
      Performs a 'vread' operation by retrieving the specified version of a Resource with no query parameters
      FHIRRestOperationResponse issue​(int entryIndex, java.lang.String requestDescription, long accumulatedTime, javax.ws.rs.core.Response.Status status, Bundle.Entry responseEntry)
      Add the issue to the result bundle
      FHIRRestOperationResponse validationResponse​(int entryIndex, Bundle.Entry validationResponseEntry, java.lang.String requestDescription, long accumulatedTime)
      Add the given validationResponseEntry to the result bundle
    • Method Detail

      • doSearch

        FHIRRestOperationResponse doSearch​(int entryIndex,
                                           java.lang.String requestDescription,
                                           FHIRUrlParser requestURL,
                                           long accumulatedTime,
                                           java.lang.String type,
                                           java.lang.String compartment,
                                           java.lang.String compartmentId,
                                           javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters,
                                           java.lang.String requestUri,
                                           boolean checkInteractionAllowed)
                                    throws java.lang.Exception
        Performs heavy lifting associated with a 'search' operation.
        Parameters:
        entryIndex -
        requestDescription -
        requestURL -
        accumulatedTime -
        type - the resource type associated with the search
        compartment - the compartment type to search in, or null if not a compartment search
        compartmentId - the specific compartment to search in, or null if not a compartment search
        queryParameters - a Map containing the query parameters from the request URL
        requestUri - the request URI
        checkIfInteractionAllowed - if true, check that the search interaction is permitted
        Returns:
        a FHIRRestOperationResponse containing the search result bundle
        Throws:
        java.lang.Exception
      • doVRead

        FHIRRestOperationResponse doVRead​(int entryIndex,
                                          java.lang.String requestDescription,
                                          FHIRUrlParser requestURL,
                                          long accumulatedTime,
                                          java.lang.String type,
                                          java.lang.String id,
                                          java.lang.String versionId,
                                          javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters)
                                   throws java.lang.Exception
        Performs a 'vread' operation by retrieving the specified version of a Resource with no query parameters
        Parameters:
        entryIndex -
        requestDescription -
        requestURL -
        accumulatedTime -
        type - the resource type associated with the Resource to be retrieved
        id - the id of the Resource to be retrieved
        versionId - the version id of the Resource to be retrieved
        queryParameters -
        Returns:
        the Resource
        Throws:
        java.lang.Exception
      • doRead

        FHIRRestOperationResponse doRead​(int entryIndex,
                                         java.lang.String requestDescription,
                                         FHIRUrlParser requestURL,
                                         long accumulatedTime,
                                         java.lang.String type,
                                         java.lang.String id,
                                         boolean throwExcOnNull,
                                         javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters,
                                         boolean checkInteractionAllowed)
                                  throws java.lang.Exception
        Performs a 'read' operation to retrieve a Resource.
        Parameters:
        entryIndex -
        requestDescription -
        requestURL -
        accumulatedTime -
        type - the resource type associated with the Resource to be retrieved
        id - the id of the Resource to be retrieved
        throwExcOnNull - whether to throw an exception on null
        queryParameters - for supporting _elements and _summary for resource read
        checkInteractionAllowed - if true, check that the read interaction is permitted
        Returns:
        a SingleResourceResult wrapping the resource and including its deletion status
        Throws:
        java.lang.Exception
      • doHistory

        FHIRRestOperationResponse doHistory​(int entryIndex,
                                            java.lang.String requestDescription,
                                            FHIRUrlParser requestURL,
                                            long accumulatedTime,
                                            java.lang.String type,
                                            java.lang.String id,
                                            javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters,
                                            java.lang.String requestUri)
                                     throws java.lang.Exception
        Performs the work of retrieving versions of a Resource.
        Parameters:
        entryIndex -
        requestDescription -
        requestURL -
        accumulatedTime -
        type - the resource type associated with the Resource to be retrieved
        id - the id of the Resource to be retrieved
        queryParameters - a Map containing the query parameters from the request URL
        requestUri -
        Returns:
        a Bundle containing the history of the specified Resource
        Throws:
        java.lang.Exception
      • doCreate

        FHIRRestOperationResponse doCreate​(int entryIndex,
                                           FHIRPersistenceEvent event,
                                           java.util.List<OperationOutcome.Issue> warnings,
                                           Bundle.Entry validationResponseEntry,
                                           java.lang.String requestDescription,
                                           FHIRUrlParser requestURL,
                                           long accumulatedTime,
                                           java.lang.String type,
                                           Resource resource,
                                           java.lang.String ifNoneExist,
                                           java.lang.String localIdentifier,
                                           PayloadPersistenceResponse offloadResponse)
                                    throws java.lang.Exception
        Performs the heavy lifting associated with a 'create' interaction.
        Parameters:
        entryIndex -
        event -
        warnings - the list of warning issues accumulated for this entry
        validationResponseEntry -
        requestDescription -
        requestURL -
        accumulatedTime -
        type - the resource type specified as part of the request URL
        resource - the Resource to be stored.
        ifNoneExist - whether to create the resource if none exists
        localIdentifier -
        offloadResponse - the response from payload persistence when offloading
        Returns:
        a FHIRRestOperationResponse object containing the results of the operation
        Throws:
        java.lang.Exception
      • doUpdate

        FHIRRestOperationResponse doUpdate​(int entryIndex,
                                           FHIRPersistenceEvent event,
                                           Bundle.Entry validationResponseEntry,
                                           java.lang.String requestDescription,
                                           FHIRUrlParser requestURL,
                                           long accumulatedTime,
                                           java.lang.String type,
                                           java.lang.String id,
                                           Resource newResource,
                                           Resource prevResource,
                                           java.lang.String ifMatchValue,
                                           java.lang.String searchQueryString,
                                           boolean skippableUpdate,
                                           java.lang.String localIdentifier,
                                           java.util.List<OperationOutcome.Issue> warnings,
                                           boolean isDeleted,
                                           java.lang.Integer ifNoneMatch,
                                           PayloadPersistenceResponse offloadResponse)
                                    throws java.lang.Exception
        Performs an update operation (a new version of the Resource will be stored).
        Parameters:
        entryIndex -
        event - the persistence event used for this resource interaction
        validationResponseEntry -
        requestDescription -
        requestURL -
        accumulatedTime -
        type -
        id - the id of the Resource being updated
        newResource - the new resource to be stored
        prevResource - the old resource value if we have it
        ifMatchValue - an optional "If-Match" header value to request a version-aware update
        searchQueryString - an optional search query string to request a conditional update
        skippableUpdate - if true, and the resource content in the update matches the existing resource on the server, then skip the update; if false, then always attempt the update
        localIdentifier - if not null, represents the local identifier within the bundle used to support local references
        warnings - the accumulated list of warnings gathered while processing the interaction
        isDeleted - flag to indicate if the resource is currently deleted
        ifNoneMatch - conditional create-on-update
        offloadResponse - the response from payload persistence when offloading
        Returns:
        a FHIRRestOperationResponse that contains the results of the operation
        Throws:
        java.lang.Exception
      • doPatch

        FHIRRestOperationResponse doPatch​(int entryIndex,
                                          FHIRPersistenceEvent event,
                                          Bundle.Entry validationResponseEntry,
                                          java.lang.String requestDescription,
                                          FHIRUrlParser requestURL,
                                          long accumulatedTime,
                                          java.lang.String type,
                                          java.lang.String id,
                                          Resource newResource,
                                          Resource prevResource,
                                          FHIRPatch patch,
                                          java.lang.String ifMatchValue,
                                          java.lang.String searchQueryString,
                                          boolean skippableUpdate,
                                          java.util.List<OperationOutcome.Issue> warnings,
                                          java.lang.String localIdentifier,
                                          PayloadPersistenceResponse offloadResponse)
                                   throws java.lang.Exception
        Performs a patch operation (a new version of the Resource will be stored).
        Parameters:
        entryIndex -
        event - the persistence event used for this resource interaction
        validationResponseEntry -
        requestDescription -
        requestURL -
        accumulatedTime -
        type - the type of the resource to be updated
        id - the id of the Resource being updated
        newResource - the latest value of the resource
        prevResource - the value of the resource before any changes
        patch - the patch to apply
        ifMatchValue - an optional "If-Match" header value to request a version-aware update
        searchQueryString - an optional search query string to request a conditional update
        skippableUpdate - if true, and the result of the patch matches the existing resource on the server, then skip the update; if false, then always attempt the update
        offloadResponse - response from payload persistencen when offloading
        warnings -
        localIdentifier -
        Returns:
        a FHIRRestOperationResponse that contains the results of the operation
        Throws:
        java.lang.Exception
      • doInvoke

        FHIRRestOperationResponse doInvoke​(java.lang.String method,
                                           int entryIndex,
                                           Bundle.Entry validationResponseEntry,
                                           java.lang.String requestDescription,
                                           FHIRUrlParser requestURL,
                                           long accumulatedTime,
                                           FHIROperationContext operationContext,
                                           java.lang.String resourceTypeName,
                                           java.lang.String logicalId,
                                           java.lang.String versionId,
                                           Resource resource,
                                           javax.ws.rs.core.MultivaluedMap<java.lang.String,​java.lang.String> queryParameters)
                                    throws java.lang.Exception
        Helper method which invokes a custom operation.
        Parameters:
        method -
        entryIndex -
        validationResponseEntry -
        requestDescription -
        requestUrl -
        accumulatedTime -
        operationContext - the FHIROperationContext associated with the request
        resourceTypeName - the resource type associated with the request
        logicalId - the resource logical id associated with the request
        versionId - the resource version id associated with the request
        resource - the input resource associated with the custom operation to be invoked
        queryParameters - query parameters may be passed instead of a Parameters resource for certain custom operations invoked via GET
        Returns:
        a Resource that represents the response to the custom operation
        Throws:
        java.lang.Exception
      • doDelete

        FHIRRestOperationResponse doDelete​(int entryIndex,
                                           java.lang.String requestDescription,
                                           FHIRUrlParser requestURL,
                                           long accumulatedTime,
                                           java.lang.String type,
                                           java.lang.String id,
                                           java.lang.String searchQueryString)
                                    throws java.lang.Exception
        Performs a 'delete' operation on the specified resource.
        Parameters:
        type - the resource type associated with the Resource to be deleted
        id - the id of the Resource to be deleted
        Returns:
        a FHIRRestOperationResponse that contains the results of the operation
        Throws:
        java.lang.Exception
      • validationResponse

        FHIRRestOperationResponse validationResponse​(int entryIndex,
                                                     Bundle.Entry validationResponseEntry,
                                                     java.lang.String requestDescription,
                                                     long accumulatedTime)
                                              throws java.lang.Exception
        Add the given validationResponseEntry to the result bundle
        Parameters:
        entryIndex -
        validationResponseEntry -
        requestDescription -
        accumulatedTime -
        Returns:
        Throws:
        java.lang.Exception
      • issue

        FHIRRestOperationResponse issue​(int entryIndex,
                                        java.lang.String requestDescription,
                                        long accumulatedTime,
                                        javax.ws.rs.core.Response.Status status,
                                        Bundle.Entry responseEntry)
                                 throws java.lang.Exception
        Add the issue to the result bundle
        Parameters:
        entryIndex -
        requestDescription -
        accumulatedTime -
        status -
        responseEntry -
        Returns:
        Throws:
        java.lang.Exception