Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## be.ehealth.business.mycarenetcommons.builders.impl
Class ResponseBuilderImpl

    java.lang.Object
      be.ehealth.business.mycarenetcommons.builders.impl.ResponseBuilderImpl

All Implemented Interfaces:
  ResponseBuilder, ConfigurationModuleBootstrap.ModuleBootstrapHook, ConfigurableImplementation

    public final class ResponseBuilderImpl

extends Object
implements ResponseBuilder, ConfigurableImplementation, ConfigurationModuleBootstrap.ModuleBootstrapHook

Basic implementation of the ResponseBuilder. Used for commons purpose. property for this configuration : mycarenet.{projectName}.response.neededxadeslevel values : none/xades/xadest
if the value is missing a default value of none is used.

Field Summary

Fields inherited from interface be.ehealth.business.mycarenetcommons.builders.ResponseBuilder
`PROJECT_NAME_KEY`

Constructor Summary
`ResponseBuilderImpl()` default constructor needed for ModuleBootstrapHook.

Method Summary
`void` | `bootstrap()`
`void` | `createInvalidBlobContentConnectorException(Blob blob, SignatureVerificationResult result, Base64Binary xades)` creates the error message for a failed validation.
`static ResponseBuilder` | `getInstance()`
`String` | `getResponse(SendResponseType responseType)`
`String` | `getResponse(SendResponseType responseType)`
`String` | `getResponse(SendResponseType responseType, boolean validate)`
`String` | `getResponse(SendResponseType responseType, boolean validate)`
`void` | `initialize(Map<String,Object> parameterMap)` initializes the implementation with additional parameters.
`Blob` | `mapBlobTypeToBlob(BlobType inBlob)`
`Blob` | `mapBlobTypeToBlob(BlobType inBlob)`
`String` | `retrieveResponseXadesProperty()` retrieves the xades property, if not found a default of none will be returned.
`void` | `validateHash(Blob blob)`
`void` | `validateXades(SendResponseType responseType)` validates the xades in the response type.
`void` | `validateXades(SendResponseType responseType, Blob blob)` Deprecated. : see interface , use the method without the second parameter instead

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ResponseBuilderImpl

    public ResponseBuilderImpl()

  default constructor needed for ModuleBootstrapHook.

Method Detail

### getInstance

    public static ResponseBuilder getInstance()

### initialize

    public void initialize(Map<String,Object> parameterMap)
                    throws TechnicalConnectorException

  Description copied from interface: `ConfigurableImplementation`
  initializes the implementation with additional parameters.

  Specified by:
    `initialize` in interface `ConfigurableImplementation`
  Parameters:
    `parameterMap` - Map with for each propertyString ,the input parameter as Object.
  Throws:
    `TechnicalConnectorException` - if the parameterMap is not correct.

### validateHash

    public void validateHash(Blob blob)
                      throws TechnicalConnectorException

  Specified by:
    `validateHash` in interface `ResponseBuilder`
  Parameters:
    `blob` - will throw InvalidBlobContentConnectorException if the hash is not correct.
  Throws:
    `TechnicalConnectorException`
  See Also:
    `be.ehealth.business.mycarenetcommons.builders.ResponseBuilder#validateHash(be.fgov.ehealth.mycarenet.commons.protocol.v3.SendResponseType)`

### validateXades

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

  Deprecated. : see interface , use the method without the second parameter instead

  Specified by:
    `validateXades` in interface `ResponseBuilder`
    `blob` - will throw InvalidBlobContentConnectorException if the xades is not correct.
  Throws:
    `TechnicalConnectorException`
  See Also:
    `ResponseBuilder.validateXades(be.fgov.ehealth.mycarenet.commons.protocol.v3.SendResponseType)`

### createInvalidBlobContentConnectorException

    public void createInvalidBlobContentConnectorException(Blob blob,
                                                           SignatureVerificationResult result,
                                                           Base64Binary xades)
                                                    throws InvalidBlobContentConnectorException

  creates the error message for a failed validation.

  Parameters:
    `blob` -
    `result` -
  Throws:
    `InvalidBlobContentConnectorException`

### validateXades

    public void validateXades(SendResponseType responseType)
                       throws TechnicalConnectorException

  Description copied from interface: `ResponseBuilder`
  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

  Specified by:
    `validateXades` in interface `ResponseBuilder`
  Parameters:
    `responseType` - the `SendResponseType` to validate will throw InvalidBlobContentConnectorException if the xades is not correct.
  Throws:
    `TechnicalConnectorException`

### retrieveResponseXadesProperty

    public String retrieveResponseXadesProperty()

  retrieves the xades property, if not found a default of none will be returned.

  Returns:
    String with the property

### getResponse

    public String getResponse(SendResponseType responseType)
                       throws TechnicalConnectorException

  Specified by:
    `getResponse` in interface `ResponseBuilder`
  Throws:
    `TechnicalConnectorException`

### getResponse

    public String getResponse(SendResponseType responseType)
                       throws TechnicalConnectorException

  Specified by:
    `getResponse` in interface `ResponseBuilder`
  Throws:
    `TechnicalConnectorException`

### getResponse

    public String getResponse(SendResponseType responseType,
                              boolean validate)
                       throws TechnicalConnectorException

  Specified by:
    `getResponse` in interface `ResponseBuilder`
  Throws:
    `TechnicalConnectorException`
  See Also:
    `ResponseBuilder.getResponse(be.fgov.ehealth.mycarenet.commons.protocol.v3.SendResponseType, boolean)`

### getResponse

    public String getResponse(SendResponseType responseType,
                              boolean validate)
                       throws TechnicalConnectorException

  Specified by:
    `getResponse` in interface `ResponseBuilder`
  Throws:
    `TechnicalConnectorException`

### mapBlobTypeToBlob

    public Blob mapBlobTypeToBlob(BlobType inBlob)

### mapBlobTypeToBlob

    public Blob mapBlobTypeToBlob(BlobType inBlob)

### bootstrap

    public void bootstrap()

  Specified by:
    `bootstrap` in interface `ConfigurationModuleBootstrap.ModuleBootstrapHook`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Connector Package PERSMIDWIFE 3.16.1 API
Copyright © {inceptionYear}-2018 eHealth. All Rights Reserved.