Package org.faceless.publisher.ext
Class GlobalSignSignatureExtension
java.lang.Object
org.faceless.publisher.ext.DefaultSignatureExtension
org.faceless.publisher.ext.GlobalSignSignatureExtension
- All Implemented Interfaces:
ReportFactoryExtension
,SignatureExtension
Supports GlobalSign DSS signatures with the "globalsign" engine.
Requires "apikey" and "apisecret" (or a CallbackHandler that can supply them)
as well as "keystore". KeyStore must have the mTLS certificate.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(org.faceless.publisher.type.FormSignatureResource resource, FormSignature field) Sign the signatureGlobalSignDSSManager
getGlobalSignDSSManager
(org.faceless.publisher.type.FormSignatureResource resource) Get a new GlobalSignDSSManager based on the specified resourceGlobalSignDSSManager
Get the factory-wide GlobalSignDSSManagerSignatureHandlerFactory
getSignatureFactory
(org.faceless.publisher.type.FormSignatureResource resource, GlobalSignDSSManager dss) Return a new SignatureFactory based on the identity specified in the resourcevoid
prepare
(org.faceless.publisher.type.FormSignatureResource resource) If this object returned true fromsupports(org.faceless.publisher.type.FormSignatureResource)
, this method is called to prepare the signature.void
setSharedGlobalSignDSSManager
(GlobalSignDSSManager dss) Set the factory-wide GlobalSignDSSManagerboolean
supports
(org.faceless.publisher.type.FormSignatureResource resource) Return true if this SignatureExtension supports the specified Signature type.Methods inherited from class org.faceless.publisher.ext.DefaultSignatureExtension
applyBasics, applyTSA, getKeyStoreAuthorization, getParameter
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.faceless.publisher.ext.ReportFactoryExtension
load, register, register, startDocument, unregister, unregister
-
Constructor Details
-
GlobalSignSignatureExtension
public GlobalSignSignatureExtension()
-
-
Method Details
-
supports
public boolean supports(org.faceless.publisher.type.FormSignatureResource resource) Return true if this SignatureExtension supports the specified Signature type.- Specified by:
supports
in interfaceSignatureExtension
- Overrides:
supports
in classDefaultSignatureExtension
-
prepare
public void prepare(org.faceless.publisher.type.FormSignatureResource resource) If this object returned true fromsupports(org.faceless.publisher.type.FormSignatureResource)
, this method is called to prepare the signature. This may involve validating, setting default attributes etc.- Specified by:
prepare
in interfaceSignatureExtension
- Overrides:
prepare
in classDefaultSignatureExtension
-
getGlobalSignDSSManager
public GlobalSignDSSManager getGlobalSignDSSManager(org.faceless.publisher.type.FormSignatureResource resource) throws GeneralSecurityException, IOException Get a new GlobalSignDSSManager based on the specified resource- Throws:
GeneralSecurityException
IOException
-
getSignatureFactory
public SignatureHandlerFactory getSignatureFactory(org.faceless.publisher.type.FormSignatureResource resource, GlobalSignDSSManager dss) throws GeneralSecurityException, IOException Return a new SignatureFactory based on the identity specified in the resource- Throws:
GeneralSecurityException
IOException
-
apply
public void apply(org.faceless.publisher.type.FormSignatureResource resource, FormSignature field) throws GeneralSecurityException, IOException Sign the signature- Specified by:
apply
in interfaceSignatureExtension
- Overrides:
apply
in classDefaultSignatureExtension
- Throws:
GeneralSecurityException
IOException
-