at.gv.egiz.pdfas.impl.api.internal
Class PdfAsInternalObject

java.lang.Object
  extended by at.gv.egiz.pdfas.impl.api.internal.PdfAsInternalObject
All Implemented Interfaces:
PdfAsInternal

public class PdfAsInternalObject
extends Object
implements PdfAsInternal

Author:
exthex
See Also:
PdfAsInternal

Constructor Summary
PdfAsInternalObject()
           
 
Method Summary
 AnalyzeResult analyzeFromRawText(String rawText, Map sigValues)
          Create an AnalyzeResult from raw text, instead of a PDF.
 SignResult finishLocalSign(PdfAs pdfAs, SignParameters signParameters, SignatureDetailInformation sdi, LocalBKUParams bkuParams, boolean multipart, String xmlResponse)
          Finish the sign process.
 VerifyResult finishLocalVerify(SignatureInformation sigInfo, String connector, String profile, String loc_ref_url, String xmlResponse)
          Parse the given xml_response - must be a VerifyXMLSignatureResponse - from the BKU or Mocca and generates a VerifyResult from it.
 Map getConnectorsAvailableForWeb()
          Get a map of all connectors available for web.
 String getLocalServiceAddress(String profile, String device)
          Get the security layer address for the given connector.
 SignatureEntry getSignatureEntryFromSignatureInformation(String key, SignatureInformation sigInfo)
          Get the SignatureEntry corresponding to a given SignatureInformation
 String getSignedText(SignatureInformation sigInfo)
          Get the signed text for a given sigInfo.
 String prepareLocalSignRequest(SignParameters signParameters, boolean multipart, String loc_ref_url, SignatureDetailInformation sdi)
          Get the CreateXMLSignatureRequest for the given parameters.
 String prepareLocalVerifyRequest(SignatureInformation sigInfo, String connector, String profile, String loc_ref_url)
          Create the SecurityLayer VerifyXMLSignatureRequest for the given parameters.
 void verifyBKUSupport(LocalBKUParams bkuParams)
          Check if a BKU with the given parameters is supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfAsInternalObject

public PdfAsInternalObject()
Method Detail

verifyBKUSupport

public void verifyBKUSupport(LocalBKUParams bkuParams)
                      throws ConnectorException,
                             SettingsException
Description copied from interface: PdfAsInternal
Check if a BKU with the given parameters is supported.

Specified by:
verifyBKUSupport in interface PdfAsInternal
Throws:
ConnectorException - if the BKU is not supported
SettingsException - if the BKU is not supported
See Also:
PdfAsInternal.verifyBKUSupport(LocalBKUParams)

finishLocalSign

public SignResult finishLocalSign(PdfAs pdfAs,
                                  SignParameters signParameters,
                                  SignatureDetailInformation sdi,
                                  LocalBKUParams bkuParams,
                                  boolean multipart,
                                  String xmlResponse)
                           throws PdfAsException
Description copied from interface: PdfAsInternal
Finish the sign process.

Specified by:
finishLocalSign in interface PdfAsInternal
sdi - This info will most likely come from a PdfAs.prepareSign(SignParameters) call
xmlResponse - the SecurityLayer response from the BKU
Returns:
the signed document + additional info
Throws:
PdfAsException
See Also:
PdfAsInternal#finishLocalSign(PdfAs, SignParameters, SignatureDetailInformation, LocalBKUParams, String)

getLocalServiceAddress

public String getLocalServiceAddress(String profile,
                                     String device)
                              throws SettingsException
Description copied from interface: PdfAsInternal
Get the security layer address for the given connector. (zB: http://127.0.0.1:3495/http-security-layer-request)

Specified by:
getLocalServiceAddress in interface PdfAsInternal
Returns:
Throws:
SettingsException
See Also:
PdfAsInternal.getLocalServiceAddress(String, String)

prepareLocalSignRequest

public String prepareLocalSignRequest(SignParameters signParameters,
                                      boolean multipart,
                                      String loc_ref_url,
                                      SignatureDetailInformation sdi)
                               throws ConnectorException
Description copied from interface: PdfAsInternal
Get the CreateXMLSignatureRequest for the given parameters. The request will use the given callback address to retrieve the data to sign.

Specified by:
prepareLocalSignRequest in interface PdfAsInternal
Parameters:
signParameters - the sign parameters. SignParameters.getSignatureDevice() determines the connector to use.
multipart - true to select a LocalConnector that uses multipart requests
loc_ref_url - the URL where to retrieve the PDF to sign
sdi - SignatureDetailInformation.getSignatureData() provides the data to be signed.
Returns:
Throws:
ConnectorException
See Also:
PdfAsInternal#prepareLocalSignRequest(SignParameters, String, SignatureDetailInformation)

analyzeFromRawText

public AnalyzeResult analyzeFromRawText(String rawText,
                                        Map sigValues)
                                 throws SignatureException,
                                        SettingsException,
                                        SignatureTypesException,
                                        NormalizeException
Description copied from interface: PdfAsInternal
Create an AnalyzeResult from raw text, instead of a PDF.

Specified by:
analyzeFromRawText in interface PdfAsInternal
sigValues - the signature values
Returns:
Throws:
SignatureException
SettingsException
SignatureTypesException
NormalizeException
See Also:
PdfAsInternal.analyzeFromRawText(String, Map)

prepareLocalVerifyRequest

public String prepareLocalVerifyRequest(SignatureInformation sigInfo,
                                        String connector,
                                        String profile,
                                        String loc_ref_url)
                                 throws SignatureException,
                                        ConnectorException
Description copied from interface: PdfAsInternal
Create the SecurityLayer VerifyXMLSignatureRequest for the given parameters.

Specified by:
prepareLocalVerifyRequest in interface PdfAsInternal
Returns:
Throws:
SignatureException
ConnectorException
See Also:
PdfAsInternal.prepareLocalVerifyRequest(SignatureInformation, String, String, String)

finishLocalVerify

public VerifyResult finishLocalVerify(SignatureInformation sigInfo,
                                      String connector,
                                      String profile,
                                      String loc_ref_url,
                                      String xmlResponse)
                               throws SignatureException,
                                      ConnectorException
Description copied from interface: PdfAsInternal
Parse the given xml_response - must be a VerifyXMLSignatureResponse - from the BKU or Mocca and generates a VerifyResult from it.

Specified by:
finishLocalVerify in interface PdfAsInternal
Returns:
Throws:
SignatureException
ConnectorException
See Also:
PdfAsInternal.finishLocalVerify(SignatureInformation, String, String, String, String)

getSignatureEntryFromSignatureInformation

public SignatureEntry getSignatureEntryFromSignatureInformation(String key,
                                                                SignatureInformation sigInfo)
Description copied from interface: PdfAsInternal
Get the SignatureEntry corresponding to a given SignatureInformation

Specified by:
getSignatureEntryFromSignatureInformation in interface PdfAsInternal
Returns:
See Also:
PdfAsInternal.getSignatureEntryFromSignatureInformation(String, SignatureInformation)

getSignedText

public String getSignedText(SignatureInformation sigInfo)
Description copied from interface: PdfAsInternal
Get the signed text for a given sigInfo.
If this signature is not text based this method will return null.

Specified by:
getSignedText in interface PdfAsInternal
Returns:
See Also:
PdfAsInternal.getSignedText(SignatureInformation)

getConnectorsAvailableForWeb

public Map getConnectorsAvailableForWeb()
                                 throws ConnectorFactoryException
Description copied from interface: PdfAsInternal
Get a map of all connectors available for web. The key is the connector id, the value is the description.

Specified by:
getConnectorsAvailableForWeb in interface PdfAsInternal
Returns:
Throws:
ConnectorFactoryException
See Also:
PdfAsInternal.getConnectorsAvailableForWeb()


Copyright © 2006-2011. All Rights Reserved.