be.ehealth.business.mycarenetcommons.builders
Interface BlobBuilder

All Superinterfaces:
ConfigurableImplementation
All Known Implementing Classes:
BlobBuilderImpl

public interface BlobBuilder
extends ConfigurableImplementation

Used to build the blob. Default implem : BlobBuilderImpl remarks : blobs created by connector never contain a hashValue : this is ( until now at least ) never needed. the builds methods are provided to allow an implementation using default value. there is an implementation provided by default by the RequestBuilderFactory to use the method that implement the request using default data, you have to create the following keys in properties file. "mycarenet.blobbuilder." + projectName + ".id" "mycarenet.blobbuilder." + projectName + ".encodingtype" "mycarenet.blobbuilder." + projectName + ".contenttype" projetName is the project where the message is send (exemple in the provided empties properties files)


Field Summary
static String PROJECT_NAME_KEY
          key to identify project name.
 
Method Summary
 Blob build(byte[] input)
          encodes the given byte array and creates Blob jaxb object.
 Blob build(byte[] input, String id)
          encodes the given byte array and creates Blob jaxb object.
 Blob build(byte[] input, String encodingType, String id, String contentType)
          encodes the given byte array and creates Blob jaxb object.
 Blob build(byte[] input, String encodingType, String id, String contentType, String messageName)
          encodes the given byte array and creates Blob jaxb object.
 byte[] checkAndRetrieveContent(Blob blob)
          checks the validity of the blobs content and returns the content as byte array.
 
Methods inherited from interface be.ehealth.technicalconnector.utils.ConfigurableImplementation
initialize
 

Field Detail

PROJECT_NAME_KEY

static final String PROJECT_NAME_KEY
key to identify project name.

See Also:
Constant Field Values
Method Detail

build

Blob build(byte[] input)
           throws InvalidBlobContentConnectorException,
                  TechnicalConnectorException
encodes the given byte array and creates Blob jaxb object.

Parameters:
input - the byte array to encode
Returns:
Throws:
InvalidBlobContentConnectorException
TechnicalConnectorException

build

Blob build(byte[] input,
           String id)
           throws InvalidBlobContentConnectorException,
                  TechnicalConnectorException
encodes the given byte array and creates Blob jaxb object.

Parameters:
input - the byte array to encode
id - the id given to the blob , needed when using xades
Returns:
Throws:
InvalidBlobContentConnectorException
TechnicalConnectorException

build

Blob build(byte[] input,
           String encodingType,
           String id,
           String contentType)
           throws InvalidBlobContentConnectorException,
                  TechnicalConnectorException
encodes the given byte array and creates Blob jaxb object.

Parameters:
input - the byte array to encode
encodingType - the type of encoding used , see cookbook
id - the id given to the blob , needed when using xades
contentType - the contentType
Returns:
Throws:
InvalidBlobContentConnectorException
TechnicalConnectorException

build

Blob build(byte[] input,
           String encodingType,
           String id,
           String contentType,
           String messageName)
           throws InvalidBlobContentConnectorException,
                  TechnicalConnectorException
encodes the given byte array and creates Blob jaxb object.

Parameters:
input - the byte array to encode
encodingType - the type of encoding used , see cookbook
id - the id given to the blob , needed when using xades
contentType - the contentType
messageName - the messageName
Returns:
Throws:
InvalidBlobContentConnectorException
TechnicalConnectorException

checkAndRetrieveContent

byte[] checkAndRetrieveContent(Blob blob)
                               throws InvalidBlobContentConnectorException,
                                      TechnicalConnectorException
checks the validity of the blobs content and returns the content as byte array.

Parameters:
blob - Blob object
Returns:
Throws:
InvalidBlobContentConnectorException
TechnicalConnectorException
NoSuchAlgorithmException
DataFormatException



Connector Business ORGPHARMACY 3.11.1 API
Copyright © {inceptionYear}-2016 eHealth. All Rights Reserved.