Package be.ehealth.businessconnector.chapterIV.builders

# Class BuilderFactory

java.lang.Object
be.ehealth.businessconnector.chapterIV.builders.BuilderFactory

public final class BuilderFactory extends Object
A factory for creating Builder objects.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BuilderFactory(KmehrValidator validator, Chapter4XmlValidator chapter4XmlValidator)`
  `BuilderFactory(Crypto holderOfKeyCrypto, Crypto encryptionCrypto, KmehrValidator validator, Chapter4XmlValidator chapter4XmlValidator)`
  Deprecated.
  use it without the crypto parameters

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ResponseBuilder`
  `createResponseBuilder()`
  Deprecated.
  `AdmissionBuilder`
  `getAdmissionBuilder()`
  `static BuilderFactory`
  `getBuilderFactoryForSession()`
  creates a BuilderFactory with default validators and cryptos created from the sessionItem.
  `static BuilderFactory`
  `getBuilderFactoryForSession(SessionItem sessionItem)`
  creates a BuilderFactory with default validators and cryptos created from the sessionItem.
  `ConsultationBuilder`
  `getConsultationBuilder()`
  `ResponseBuilder`
  `getResponseBuilder()`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### BuilderFactory

    @Deprecated public BuilderFactory(Crypto holderOfKeyCrypto, Crypto encryptionCrypto, KmehrValidator validator, Chapter4XmlValidator chapter4XmlValidator)
    Deprecated.
    use it without the crypto parameters
    Instantiates a new builder factory.
    Parameters:
      `holderOfKeyCrypto` -
      `encryptionCrypto` -
      `validator` -
      `chapter4XmlValidator` -

  - ### BuilderFactory

    public BuilderFactory(KmehrValidator validator, Chapter4XmlValidator chapter4XmlValidator)

- ## Method Details

  - ### getBuilderFactoryForSession

    public static BuilderFactory getBuilderFactoryForSession(SessionItem sessionItem) throws TechnicalConnectorException
    creates a BuilderFactory with default validators and cryptos created from the sessionItem.
    Parameters:
      `sessionItem` - SessionItem : should have its Hok and encryption credentials configured
    Returns:
      `BuilderFactory`
    Throws:
      `TechnicalConnectorException` - if the crypto's could not be created

  - ### getBuilderFactoryForSession

    public static BuilderFactory getBuilderFactoryForSession() throws TechnicalConnectorException
    creates a BuilderFactory with default validators and cryptos created from the sessionItem.
    Returns:
      `BuilderFactory`
    Throws:
      `TechnicalConnectorException` - if the crypto's could not be created

  - ### getConsultationBuilder

    public ConsultationBuilder getConsultationBuilder() throws TechnicalConnectorException
    Returns:
      ConsultationBuilder
    Throws:
      `TechnicalConnectorException`

  - ### getAdmissionBuilder

    public AdmissionBuilder getAdmissionBuilder() throws TechnicalConnectorException
    Returns:
      ConsultationBuilder
    Throws:
      `TechnicalConnectorException`

  - ### getResponseBuilder

    public ResponseBuilder getResponseBuilder() throws TechnicalConnectorException
    Returns:
      ResponseBuilder
    Throws:
      `TechnicalConnectorException`

  - ### createResponseBuilder

    @Deprecated public ResponseBuilder createResponseBuilder() throws TechnicalConnectorException
    Deprecated.
    Throws:
      `TechnicalConnectorException`