be.ehealth.business.mycarenetdomaincommons.util
Class DomainBlobUtil

java.lang.Object
  extended by be.ehealth.business.mycarenetdomaincommons.util.DomainBlobUtil

public class DomainBlobUtil
extends Object

provide 2 methods to help the xades management of the content. a simple method to get a xades signature on a content a more complex method that take the content, a provided xades (can be null) and a mandatory projectName if you use this one and if you want a signature, you have to can retrieve a true value in properties file. in this case, if provided xades is not null, it's this value that will be use


Constructor Summary
DomainBlobUtil()
           
 
Method Summary
static Base64Binary generateXades(Blob inValue, String projectName)
          generates a xades value as defined for the project.
static Base64Binary generateXadesForBlob(Blob blob, String projectName)
          generates the xades based on the content of the blob.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainBlobUtil

public DomainBlobUtil()
Method Detail

generateXades

public static Base64Binary generateXades(Blob inValue,
                                         String projectName)
                                  throws TechnicalConnectorException
generates a xades value as defined for the project. configProperty : mycarenet.{projectName}.request.xadestype , with value xades or xadest default = defined in mycarenet.default.request.xadestype

Parameters:
inValue -
projectName -
Returns:
Throws:
TechnicalConnectorException

generateXadesForBlob

public static Base64Binary generateXadesForBlob(Blob blob,
                                                String projectName)
                                         throws TechnicalConnectorException
generates the xades based on the content of the blob. it needs the Blobtype as input , because the signature generator will search the xml tree for a tag with a given id ( inValue.getId ) to find the content to sign. the signing is also influence by the encoding of the content ( which we give to the signer in the transformList )
Configuration : will use property mycarenet.default.request.xadestype , more info see generateXades(BlobType inValue, String projectName)

transformers used : see documentation :

 The reference must contain one or several of following transforms, in the below order:
 •   'http://www.w3.org/2000/09/xmldsig#base64': to base64 decode the content of the message (always needed).
 •   'urn:nippin:xml:sig:transform:optional-deflate' to deflate the content of the message (needed if the content is deflated, i.e. for Async flows)
 •   'http://www.w3.org/2001/10/xml-exc-c14n#' in case the content is XML and no other formats like text or pdf.
 

Parameters:
blob - Blob to sign
projectName - the name of the project ( needed to retrieve config properties )
Returns:
signature xades in base64Binary format
Throws:
TechnicalConnectorException



Connector Business ORGPHARMACY 3.13.1 API
Copyright © {inceptionYear}-2017 eHealth. All Rights Reserved.