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.dss" or "globalsign.qss" engine.
Requires "apikey" and "apisecret" (or a CallbackHandler that can supply them)
as well as "keystore". KeyStore must have the mTLS certificate. The "url"
parameter is optional.
-
Constructor Summary
-
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 GlobalSignDSSManager, as set bysetSharedGlobalSignDSSManager(GlobalSignDSSManager)
SignatureHandlerFactory
getSignatureFactory
(org.faceless.publisher.type.FormSignatureResource resource, GlobalSignDSSManager dss) Return a new SignatureFactory based on the identity specified in the resource.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.void
setSharedGlobalSignDSSManager
(GlobalSignDSSManager dss) Set the factory-wide GlobalSignDSSManager.boolean
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
configure, load, register, register, 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- Parameters:
resource
- a resource which may specify parameters such as "apikey", "apisecret", "keystore" etc.- Returns:
- a GlobalSignDSSManager
- Throws:
GeneralSecurityException
- if the required parameters are unspecified or incorrectIOException
- if the required parameters cannot be used to log in
-
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. The "identity" parameter is required, and should be an email (for QSS) or X.500 name (for DSS)- Returns:
- a SignatureHandlerFactory
- 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
-