be.ehealth.business.mycarenetcommons.builders.impl
Class BlobBuilderImpl

java.lang.Object
  extended by be.ehealth.business.mycarenetcommons.builders.impl.BlobBuilderImpl
All Implemented Interfaces:
BlobBuilder, ConfigurableImplementation

public class BlobBuilderImpl
extends Object
implements BlobBuilder

Used to build a Blob Implementation for the BlobBuilder interface. this builder is configured with the following properties :

where projectName is either


Field Summary
 
Fields inherited from interface be.ehealth.business.mycarenetcommons.builders.BlobBuilder
PROJECT_NAME_KEY
 
Constructor Summary
BlobBuilderImpl()
           
 
Method Summary
 Blob build(byte[] input)
          Build a Blob
Properties needed : id, contenttype and encoding type
 Blob build(byte[] input, String id)
          Build a Blob
Properties needed : contenttype and encoding type.
 Blob build(byte[] input, String encodingType, String id, String contentType)
          creates Blob with given parameters.
 Blob build(byte[] input, String encodingType, String id, String contentType, String messageName)
          creates Blob with given parameters.
 byte[] checkAndRetrieveContent(Blob blob)
          Return the content of the blob.
 void initialize(Map<String,Object> parameterMap)
          Project name defined in parameters when the RequestBuilderFactory
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlobBuilderImpl

public BlobBuilderImpl()
Method Detail

initialize

public void initialize(Map<String,Object> parameterMap)
                throws TechnicalConnectorException
Project name defined in parameters when the RequestBuilderFactory

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.
See Also:
ConfigurableImplementation.initialize(java.util.Map)

build

public Blob build(byte[] input)
           throws InvalidBlobContentConnectorException,
                  TechnicalConnectorException
Build a Blob
Properties needed : id, contenttype and encoding type

Specified by:
build in interface BlobBuilder
Parameters:
input - the byte array to encode
Returns:
Throws:
InvalidBlobContentConnectorException
TechnicalConnectorException
See Also:
BlobBuilder.build(byte[])

build

public Blob build(byte[] input,
                  String id)
           throws InvalidBlobContentConnectorException,
                  TechnicalConnectorException
Build a Blob
Properties needed : contenttype and encoding type.

Specified by:
build in interface BlobBuilder
Parameters:
input - the byte array to encode
id - the id given to the blob , needed when using xades
Returns:
Throws:
InvalidBlobContentConnectorException
TechnicalConnectorException
See Also:
BlobBuilder.build(byte[], java.lang.String)

build

public Blob build(byte[] input,
                  String encodingType,
                  String id,
                  String contentType)
           throws InvalidBlobContentConnectorException,
                  TechnicalConnectorException
creates Blob with given parameters.

Specified by:
build in interface BlobBuilder
Parameters:
input -
deflate -
id -
Returns:
Throws:
TechnicalConnectorException
InvalidBlobContentConnectorException

build

public Blob build(byte[] input,
                  String encodingType,
                  String id,
                  String contentType,
                  String messageName)
           throws InvalidBlobContentConnectorException,
                  TechnicalConnectorException
creates Blob with given parameters.

Specified by:
build in interface BlobBuilder
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
See Also:
BlobBuilder.build(byte[], java.lang.String, java.lang.String, java.lang.String, java.lang.String)

checkAndRetrieveContent

public byte[] checkAndRetrieveContent(Blob blob)
                               throws InvalidBlobContentConnectorException,
                                      TechnicalConnectorException
Return the content of the blob.

Specified by:
checkAndRetrieveContent in interface BlobBuilder
Parameters:
Blob -
Returns:
Throws:
TechnicalConnectorException
InvalidBlobContentConnectorException
NoSuchAlgorithmException
DataFormatException



Connector Packaging PERSDIETICIAN 3.11.1 API
Copyright © {inceptionYear}-2016 eHealth. All Rights Reserved.