Package 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: MarshallerHelperinvalid input: '<'T, T> helper = new MarshallerHelperinvalid input: '<'T, T>(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
  Description
  `static final String`
  `PROJECT_NAME_KEY`
  key to indicate the project name.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getResponse(SendResponseType responseType)`
  `String`
  `getResponse(SendResponseType responseType, boolean validate)`
  `String`
  `getResponse(SendResponseType responseType)`
  `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 Details

  - ### PROJECT_NAME_KEY

    static final String PROJECT_NAME_KEY
    key to indicate the project name.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### 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 invalid input: '&gt' xades invalid input: '&gt' 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`