Interface SignatureServiceProvider
-
- All Known Implementing Classes:
NativeServiceProvider,SoSignatureServiceProvider
public interface SignatureServiceProviderThis 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
servicessubdirectory have to be placed within theMETA-INFdirectory 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.MySignatureServiceProviderImplwhich 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 SignercreateSigner()Return the provided signer service.SignercreateSigner(SigningDevice device)Return the provided signer service for a specificSigningDevice.SigningDevicefindSigningDevice(java.lang.String identifier)Find a specific aSigningDeviceusing aidentifier.SigningDevice[]getSigningDevices()All to thisSignatureServiceProvideraccessiblesigning devices.
-
-
-
Method Detail
-
createSigner
Signer createSigner(SigningDevice device)
Return the provided signer service for a specificSigningDevice.- Parameters:
device- theSigningDeviceon which theSignershall operate.- Returns:
- a
Signerprovided by this implementation - Throws:
java.lang.IllegalArgumentException- if device isnullor theSigningDeviceis unsupported.
-
createSigner
Signer createSigner()
Return the provided signer service. This method will return a "default"Signerwhich is either liked to aSigningDevicewhich theSignatureServiceProviderimplementation has chosen.- Returns:
- a
Signerprovided by this implementation
-
getSigningDevices
SigningDevice[] getSigningDevices()
All to thisSignatureServiceProvideraccessiblesigning devices.- Returns:
- all to this
SignatureServiceProvideraccessiblesigning devices.
-
findSigningDevice
SigningDevice findSigningDevice(java.lang.String identifier)
Find a specific aSigningDeviceusing aidentifier. If no suchSigningDevicecould be foundnullwill be returned.- Parameters:
identifier- theidentifierof a specificSigningDevice- Returns:
- the
SigningDevicefound for the givenidentifierornullotherwise.
-
-