be.ehealth.business.mycarenetcommons.builders

## Interface ResponseBuilder

- All Known Implementing Classes:
    ResponseBuilderImpl

      public interface ResponseBuilder

  this class is use to retrieve the content of a response as String and validate this result. methods are: getResponse to retrieve the response as String getResponse with boolean the same but perform a xades and xml validation validateHash and validateXades perform validation of the content of the response. to convert the string returned by getResponse, use: MarshallerHelper helper = new MarshallerHelper(T.class, T.class); T commonInputResponse = helper.toObject(content); (T must be a JAXB Element) Default impl : `ResponseBuilderImpl`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `PROJECT_NAME_KEY` key to indicate the project name.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getResponse(SendResponseType responseType)`
    `String` | `getResponse(SendResponseType responseType)`
    `String` | `getResponse(SendResponseType responseType, boolean validate)`
    `String` | `getResponse(SendResponseType responseType, boolean validate)`
    `void` | `validateHash(Blob blob)`
    `void` | `validateXades(SendResponseType responseType)` validates the xades in the response type.
    `void` | `validateXades(SendResponseType responseType, Blob blob)` Deprecated. use validateXades(responseType) instead , the blob will be extracted from the responseType

- - ### Field Detail

    - #### PROJECT_NAME_KEY

          static final String PROJECT_NAME_KEY

      key to indicate the project name.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getResponse

          String getResponse(SendResponseType responseType)
                      throws TechnicalConnectorException

      Throws:
        `TechnicalConnectorException`

    - #### getResponse

          String getResponse(SendResponseType responseType)
                      throws TechnicalConnectorException

      Throws:
        `TechnicalConnectorException`

    - #### getResponse

          String getResponse(SendResponseType responseType,
                             boolean validate)
                      throws TechnicalConnectorException

      Throws:
        `TechnicalConnectorException`

    - #### validateHash

          void validateHash(Blob blob)
                     throws TechnicalConnectorException,
                            InvalidBlobContentConnectorException

      Parameters:
        `blob` - will throw InvalidBlobContentConnectorException if the hash is not correct.
      Throws:
        `TechnicalConnectorException`
        `InvalidBlobContentConnectorException`

    - #### validateXades

          @Deprecated
          void validateXades(SendResponseType responseType,
                                          Blob blob)
                                   throws TechnicalConnectorException,
                                          InvalidBlobContentConnectorException

      Deprecated. use validateXades(responseType) instead , the blob will be extracted from the responseType
      Parameters:
        `responseType` -
        `blob` - will throw InvalidBlobContentConnectorException if the xades is not correct.
      Throws:
        `TechnicalConnectorException`
        `InvalidBlobContentConnectorException`

    - #### validateXades

          void validateXades(SendResponseType responseType)
                      throws TechnicalConnectorException,
                             InvalidBlobContentConnectorException

      validates the xades in the response type. the exact check is configured with property mycarenet.{projectName}.response.requiredxades
      which can have the following values:
      - none
      - xades
      - xadest
      a response is valid if it has a 'higher' xades than required xadest > xades > none
      Parameters:
        `responseType` - the `SendResponseType` to validate will throw InvalidBlobContentConnectorException if the xades is not correct.
      Throws:
        `TechnicalConnectorException`
        `InvalidBlobContentConnectorException`

    - #### getResponse

          String getResponse(SendResponseType responseType,
                             boolean validate)
                      throws TechnicalConnectorException

      Throws:
        `TechnicalConnectorException`

Connector Packaging TRUSSMAKER 4.8.5 API
Copyright © {inceptionYear}-2026 eHealth. All Rights Reserved.