be.fedict.eid.applet.service.signer.odf
Class AbstractODFSignatureService

java.lang.Object
  extended by be.fedict.eid.applet.service.signer.AbstractXmlSignatureService
      extended by be.fedict.eid.applet.service.signer.odf.AbstractODFSignatureService
All Implemented Interfaces:
SignatureService

public abstract class AbstractODFSignatureService
extends AbstractXmlSignatureService

Signature Service implementation for OpenDocument format signatures. The signatures created with this class are accepted as valid signature within OpenOffice.org 3.x. They probably don't get accepted by older OOo versions.

Author:
fcorneli
See Also:
http://wiki.services.openoffice.org/wiki/Security/Digital_Signatures

Constructor Summary
AbstractODFSignatureService(DigestAlgo digestAlgo)
           
 
Method Summary
protected  Document getEnvelopingDocument()
          Gives back the enveloping document.
 String getFilesDigestAlgorithm()
           
protected abstract  URL getOpenDocumentURL()
          Returns the URL of the ODF to be signed.
protected  String getSignatureDescription()
          Gives back the human-readable description of what the citizen will be signing.
protected  OutputStream getSignedDocumentOutputStream()
          Gives back the output stream to which to write the signed XML document.
protected abstract  OutputStream getSignedOpenDocumentOutputStream()
          The output stream to which to write the signed ODF file.
protected  javax.xml.crypto.URIDereferencer getURIDereferencer()
          Override this method to change the URI dereferener used by the signing engine.
protected  XAdESSignatureFacet getXAdESSignatureFacet()
          Gives back the used XAdES signature facet.
 
Methods inherited from class be.fedict.eid.applet.service.signer.AbstractXmlSignatureService
addSignatureFacet, getCanonicalizationMethod, getSignatureDigestAlgorithm, getTemporaryDataStorage, loadDocument, loadDocumentNoClose, postSign, preSign, setSignatureId, setSignatureNamespacePrefix, writeDocument, writeDocumentNoClosing, writeDocumentNoClosing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractODFSignatureService

public AbstractODFSignatureService(DigestAlgo digestAlgo)
Method Detail

getXAdESSignatureFacet

protected XAdESSignatureFacet getXAdESSignatureFacet()
Gives back the used XAdES signature facet. Allows for extra configuration of the XAdES elements.

Returns:

getOpenDocumentURL

protected abstract URL getOpenDocumentURL()
Returns the URL of the ODF to be signed.

Returns:

getURIDereferencer

protected final javax.xml.crypto.URIDereferencer getURIDereferencer()
Description copied from class: AbstractXmlSignatureService
Override this method to change the URI dereferener used by the signing engine.

Overrides:
getURIDereferencer in class AbstractXmlSignatureService
Returns:

getSignatureDescription

protected String getSignatureDescription()
Description copied from class: AbstractXmlSignatureService
Gives back the human-readable description of what the citizen will be signing. The default value is "XML Document". Override this method to provide the citizen with another description.

Overrides:
getSignatureDescription in class AbstractXmlSignatureService
Returns:

getSignedDocumentOutputStream

protected final OutputStream getSignedDocumentOutputStream()
Description copied from class: AbstractXmlSignatureService
Gives back the output stream to which to write the signed XML document.

Specified by:
getSignedDocumentOutputStream in class AbstractXmlSignatureService
Returns:

getSignedOpenDocumentOutputStream

protected abstract OutputStream getSignedOpenDocumentOutputStream()
The output stream to which to write the signed ODF file.

Returns:

getFilesDigestAlgorithm

public final String getFilesDigestAlgorithm()

getEnvelopingDocument

protected final Document getEnvelopingDocument()
                                        throws ParserConfigurationException,
                                               IOException,
                                               SAXException
Description copied from class: AbstractXmlSignatureService
Gives back the enveloping document. Return null in case ds:Signature should be the top-level element. Implementations can override this method to provide a custom enveloping document.

Overrides:
getEnvelopingDocument in class AbstractXmlSignatureService
Returns:
Throws:
IOException
SAXException
ParserConfigurationException


Copyright © 2008-2012 FedICT. All Rights Reserved.