at.knowcenter.wag.egov.egiz.sig.connectors.bku
Class EnvelopedBase64BKUConnector

java.lang.Object
  extended byat.knowcenter.wag.egov.egiz.sig.connectors.bku.EnvelopedBase64BKUConnector
All Implemented Interfaces:
Connector, LocalConnector
Direct Known Subclasses:
OldEnvelopingBase64BKUConnector

public class EnvelopedBase64BKUConnector
extends Object
implements Connector, LocalConnector

Author:
wprinz

Nested Class Summary
static class EnvelopedBase64BKUConnector.Environment
          Holds environment configuration information like templates.
 
Field Summary
protected  EnvelopedBase64BKUConnector.Environment environment
          The environemnt configuration of this connector containing templates and other configurable elements.
 
Constructor Summary
EnvelopedBase64BKUConnector(String profile)
          Constructor that builds the configuration environment for this connector according to the given profile.
 
Method Summary
 SignSignatureObject analyzeSignResponse(Properties response_properties)
          Analyzes the sign response xml and extracts the signature data.
 SignatureResponse analyzeVerifyResponse(Properties response_properties)
          Analyzes the verify response string.
protected  String computeSignedPropertiesReplace(String verify_xml, AlgorithmSuiteObject algSuite)
           
 SignSignatureObject doSign(SignatureData data)
          Performs a sign.
 SignatureResponse doVerify(SignatureData data, SignSignatureObject so)
          Performs a verification.
 String prepareSignRequest(SignatureData data)
          Prepares the sign request xml to be sent using the sign request template.
 String prepareVerifyRequest(SignatureData data, SignSignatureObject so)
          Prepares the verify request xml to be sent using the verify request template.
 String prepareXMLContent(SignatureData data, SignSignatureObject so)
          Prepares the XML content the holds the actual signature data.
protected  Properties sendRequest(String url, String request_string)
          Sends the request to the given URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

environment

protected EnvelopedBase64BKUConnector.Environment environment
The environemnt configuration of this connector containing templates and other configurable elements.

Constructor Detail

EnvelopedBase64BKUConnector

public EnvelopedBase64BKUConnector(String profile)
                            throws ConnectorException
Constructor that builds the configuration environment for this connector according to the given profile.

If confuguration parameters are not defined on that profile, the default parameters defined in the configuration are used.

This is the new "hotfix" base64 connector.

Parameters:
profile - The profile from which the Environment should be assembled.
Throws:
ConnectorException - f.e.
Method Detail

doSign

public SignSignatureObject doSign(SignatureData data)
                           throws ConnectorException
Description copied from interface: Connector
Performs a sign.

Specified by:
doSign in interface Connector
Parameters:
data - The data to be signed.
Returns:
Returns the signature object containing the signature data.
Throws:
ConnectorException - Thrown if something goes wrong.
See Also:
Connector.doSign(at.knowcenter.wag.egov.egiz.sig.SignatureData)

doVerify

public SignatureResponse doVerify(SignatureData data,
                                  SignSignatureObject so)
                           throws ConnectorException
Description copied from interface: Connector
Performs a verification.

Specified by:
doVerify in interface Connector
Parameters:
data - The data to be verified.
so - The signature object with the signature information.
Returns:
Returns the SignatureResponse with the result of the verification.
Throws:
ConnectorException - Thrown if something goes wrong.
See Also:
Connector.doVerify(at.knowcenter.wag.egov.egiz.sig.SignatureData, at.knowcenter.wag.egov.egiz.sig.connectors.bku.SignSignatureObject)

prepareXMLContent

public String prepareXMLContent(SignatureData data,
                                SignSignatureObject so)
                         throws ConnectorException
Prepares the XML content the holds the actual signature data.

This strongly rebuilds the XML content as retuned from a sign request.

Parameters:
data - The data.
so - The signature object containing the signature information.
Returns:
Returns the XML content.
Throws:
ConnectorException - f.e.

computeSignedPropertiesReplace

protected String computeSignedPropertiesReplace(String verify_xml,
                                                AlgorithmSuiteObject algSuite)

prepareSignRequest

public String prepareSignRequest(SignatureData data)
                          throws ConnectorException
Prepares the sign request xml to be sent using the sign request template.

Specified by:
prepareSignRequest in interface LocalConnector
Parameters:
data - The SignatureData.
Returns:
Returns the sign request xml to be sent.
Throws:
ConnectorException - f.e.

prepareVerifyRequest

public String prepareVerifyRequest(SignatureData data,
                                   SignSignatureObject so)
                            throws ConnectorException
Prepares the verify request xml to be sent using the verify request template.

Specified by:
prepareVerifyRequest in interface LocalConnector
Parameters:
data - The SignatureData.
so - The signature information object.
Returns:
Returns the verify request xml to be sent.
Throws:
ConnectorException - f.e.

sendRequest

protected Properties sendRequest(String url,
                                 String request_string)
                          throws ConnectorException
Sends the request to the given URL.

Parameters:
url - The URL.
request_string - The request string.
Returns:
Returns the response string.
Throws:
ConnectorException - F.e.

analyzeSignResponse

public SignSignatureObject analyzeSignResponse(Properties response_properties)
                                        throws ConnectorException
Analyzes the sign response xml and extracts the signature data.

Specified by:
analyzeSignResponse in interface LocalConnector
Parameters:
response_properties - The response properties containing the response String and transport related information.
Returns:
Returns the extracted data encapsulated in a SignatureObject.
Throws:
ConnectorException - f.e.

analyzeVerifyResponse

public SignatureResponse analyzeVerifyResponse(Properties response_properties)
                                        throws ConnectorException
Analyzes the verify response string.

Specified by:
analyzeVerifyResponse in interface LocalConnector
Parameters:
response_properties - The response properties containing the response XML.
Returns:
Returns the SignatureResponse containing the verification result.
Throws:
ConnectorException - f.e.


Copyright © 2006-2010. All Rights Reserved.