Class XadesSigningProfile

java.lang.Object
xades4j.production.XadesSigningProfile
Direct Known Subclasses:
XadesBesSigningProfile, XadesEpesSigningProfile, XadesTSigningProfile

public abstract class XadesSigningProfile extends Object
A profile for signature production. This class and its subclasses are the entry point for producing signatures. A profile is a configuration for the signature production process. This includes not only characteristics of the signer and the signature, such as the signing key/certificate and signature properties, but also components for the process itself, such as digest and time-stamp generation.

The purpose of this class is to configure a XadesSigner that will actually produce signatures with those characteristics.

Only a KeyingDataProvider has to externally be supplied. All the other components have default implementations that are used if no other actions are taken. However, all of them can be replaced through the corresponding methods, either by an instance or a class. When a class is used it may have dependencies on other components, which will be handled in order to create the XadesSigner. The types may also depend on external components, as long as that dependency is registered with on of the addBinding methods. To that end, the constructors and/or setters should use the Inject annotation from Guice.

Custom PropertyDataObjectGenerators can also be configured. The principles on their dependencies are the same.

The XAdES form is also part of the profile. Each form has additional requirements, hence being defined by a specific subclass. There are profiles up to XAdES-C. The extended formats are also supported (with a few limitations) but can only be added after verfication (XadesVerifier).

Repeated dependency bindings will not cause an immediate error. An exception will be thrown when an instance of XadesSigner is requested.

Author:
Luís
See Also: