Interface SignatureServiceProvider
-
- All Known Implementing Classes:
NativeServiceProvider
,SoSignatureServiceProvider
public interface SignatureServiceProvider
This is the main signing service provider interface which provides access to third party signing services.This interface has to be implemented by the specific signature solution vendors to provide access to their specific customized signing service.
The enclosing application expects the signing realization as a JAR archive with a signature service provider, which fulfills this interface and is declared as signature service provider.
To declare a signature service provider, a
services
subdirectory have to be placed within theMETA-INF
directory that is present in every JAR file. This directory should contain a file for signature service providers that has one or more implementation classes present in the JAR file. This file should contain an entry per line for each service provider that has an implementation in the JAR.For example, if the JAR file contained a class named
com.mycompany.mysigner.MySignatureServiceProviderImpl
which implements this interface, the JAR file must contain a file namedorg.jopensignature.sign.SignatureServiceProvider
containing the linecom.mycompany.mysigner.MySignatureServiceProviderImpl
and have to be located in the JAR file in the following directoryMETA-INF/services/
For more details on declaring service providers, and the JAR format in general, see the JAR File Specification.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Signer
createSigner()
Return the provided signer service.Signer
createSigner(SigningDevice device)
Return the provided signer service for a specificSigningDevice
.SigningDevice
findSigningDevice(java.lang.String identifier)
Find a specific aSigningDevice
using aidentifier
.SigningDevice[]
getSigningDevices()
All to thisSignatureServiceProvider
accessiblesigning devices
.
-
-
-
Method Detail
-
createSigner
Signer createSigner(SigningDevice device)
Return the provided signer service for a specificSigningDevice
.- Parameters:
device
- theSigningDevice
on which theSigner
shall operate.- Returns:
- a
Signer
provided by this implementation - Throws:
java.lang.IllegalArgumentException
- if device isnull
or theSigningDevice
is unsupported.
-
createSigner
Signer createSigner()
Return the provided signer service. This method will return a "default"Signer
which is either liked to aSigningDevice
which theSignatureServiceProvider
implementation has chosen.- Returns:
- a
Signer
provided by this implementation
-
getSigningDevices
SigningDevice[] getSigningDevices()
All to thisSignatureServiceProvider
accessiblesigning devices
.- Returns:
- all to this
SignatureServiceProvider
accessiblesigning devices
.
-
findSigningDevice
SigningDevice findSigningDevice(java.lang.String identifier)
Find a specific aSigningDevice
using aidentifier
. If no suchSigningDevice
could be foundnull
will be returned.- Parameters:
identifier
- theidentifier
of a specificSigningDevice
- Returns:
- the
SigningDevice
found for the givenidentifier
ornull
otherwise.
-
-