at.knowcenter.wag.egov.egiz.sig.connectors
Class MOAConnector

java.lang.Object
  extended by at.knowcenter.wag.egov.egiz.sig.connectors.MOAConnector
All Implemented Interfaces:
Connector

public class MOAConnector
extends Object
implements Connector

Connector to access the MOA service.

Author:
wlackner, wprinz

Field Summary
static ConnectorInformation CONNECTOR_INFORMATION
          ConnectorInformation that identifies this Connector to the system.
static String DESCRIPTION
          The connector description.
static String SERVICE_SIGN
          MOA siganture creation mode
static String SERVICE_VERIFY
          MOA siganture verification mode
 
Constructor Summary
MOAConnector()
          The empty constructor
 
Method Summary
static String connectMOA(String requestString, String serviceMode, String endpointURL)
          This method connects the moa server getting the requestString, the given serviseMode and the endpointUrl.
 SignatureObject doSign(String sigType, String userName, String signText)
          This method calls the MOA signing a given text.
 SignatureResponse doVerify(String normalizedText, SignatureObject sigObject)
          This method generates the MOA verify prozess.
protected  String getConnectorValueFromProfile(String profile, String key)
           
protected  String getSignKeyIdentifier(String profile)
           
protected  String getSignRequestTemplateFileName(String profile)
           
 String getSignURL(String profile)
           
protected  String getSigPropFileName(String profile)
           
protected  String getVerifyRequestTemplateFileName(String profile)
           
 String getVerifyTemplate(String normalizedText, SignatureObject sigObject)
          This method reads the verify template from the file system and fills out the template with the SignatureObject values.
protected  String getVerifyTemplateFileName(String profile)
           
protected  String getVerifyTrustProfileID(String profile)
           
 String getVerifyURL(String profile)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONNECTOR_INFORMATION

public static final ConnectorInformation CONNECTOR_INFORMATION
ConnectorInformation that identifies this Connector to the system.

See Also:
ConnectorFactory, ConnectorInformation

DESCRIPTION

public static final String DESCRIPTION
The connector description.

See Also:
Constant Field Values

SERVICE_VERIFY

public static final String SERVICE_VERIFY
MOA siganture verification mode

See Also:
Constant Field Values

SERVICE_SIGN

public static final String SERVICE_SIGN
MOA siganture creation mode

See Also:
Constant Field Values
Constructor Detail

MOAConnector

public MOAConnector()
             throws SignatureException
The empty constructor

Throws:
SignatureException
Method Detail

doSign

public SignatureObject doSign(String sigType,
                              String userName,
                              String signText)
                       throws SignatureException
This method calls the MOA signing a given text. The signaton type is to used initializing the corresponding SigantureObject. The initialized SignatureObject is filled out by the parsed MOA-Response.
If an error request is send back from MOA, an error message is generated an an exception is thrown.

Specified by:
doSign in interface Connector
Parameters:
sigType - the type of the SignatureObject that should be returned
userName - the name of the user calling this method
signText - the text that shoulf be signed from MOA
Returns:
the complete SingatureObject of the given type filled by values from the MOA-Request
Throws:
SignatureException - ErrorCode 300
See Also:
SignatureObject

getVerifyTemplate

public String getVerifyTemplate(String normalizedText,
                                SignatureObject sigObject)
                         throws SignatureException
This method reads the verify template from the file system and fills out the template with the SignatureObject values.

Parameters:
normalizedText - the normalized text to veryfied
sigObject - the SignatureObject holding the singature values
Returns:
the filled verify template string
Throws:
SignatureException - ErrorCode (311, 312, 313)
See Also:
SignatureObject, CodingHelper

doVerify

public SignatureResponse doVerify(String normalizedText,
                                  SignatureObject sigObject)
                           throws SignatureException
This method generates the MOA verify prozess. It checks if the given SignatureObject is signed by MOA or BKU. The verify template string is filled out by the corresponding method.

Specified by:
doVerify in interface Connector
Parameters:
normalizedText - the normalized text to verify
sigObject - the SignatureObject holding the singature values
Returns:
a SignatureResponse object if the verify prozess does not fails
Throws:
SignatureException
See Also:
SignatureResponse

getConnectorValueFromProfile

protected String getConnectorValueFromProfile(String profile,
                                              String key)

getSignURL

public String getSignURL(String profile)

getSignRequestTemplateFileName

protected String getSignRequestTemplateFileName(String profile)

getSignKeyIdentifier

protected String getSignKeyIdentifier(String profile)

getVerifyURL

public String getVerifyURL(String profile)

getVerifyRequestTemplateFileName

protected String getVerifyRequestTemplateFileName(String profile)

getVerifyTemplateFileName

protected String getVerifyTemplateFileName(String profile)

getSigPropFileName

protected String getSigPropFileName(String profile)

getVerifyTrustProfileID

protected String getVerifyTrustProfileID(String profile)

connectMOA

public static String connectMOA(String requestString,
                                String serviceMode,
                                String endpointURL)
                         throws WebException
This method connects the moa server getting the requestString, the given serviseMode and the endpointUrl. The requestString is the envelope of the SOAP Message send and recieve by the AXIS module. The Response SOAP message of the MOA server is parsed by AXIS and the message envelope is send back to the calling method.

Parameters:
requestString - the request string (XML) to send.
serviceMode - the mode which connect to MOA
endpointURL - the URL which the MOA server is running
Returns:
the response string (XML) of the MOA server
Throws:
WebException


Copyright © 2006-2007 EGIZ - E-Government Innovationszentrum. All Rights Reserved.