|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxades4j.production.XadesSigningProfile
public abstract class XadesSigningProfile
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.
XadesBesSigningProfile,
XadesEpesSigningProfile,
XadesTSigningProfile,
XadesCSigningProfile,
XadesProfileCore| Constructor Summary | |
|---|---|
protected |
XadesSigningProfile(Class<? extends KeyingDataProvider> keyingProviderClass)
|
protected |
XadesSigningProfile(KeyingDataProvider keyingProvider)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected XadesSigningProfile(KeyingDataProvider keyingProvider)
protected XadesSigningProfile(Class<? extends KeyingDataProvider> keyingProviderClass)
| Method Detail |
|---|
public final XadesSigner newSigner()
throws XadesProfileResolutionException
XadesSigner based on the current state of the profile.
If any changes are made after this call, the previously returned signer will
not be afected. Other signers can be created, accumulating the profile changes.
XadesSigner accordingly to this profile
XadesProfileResolutionException - if the dependencies of the signer (direct and indirect) cannot be resolvedprotected abstract Class<? extends XadesSigner> getSignerClass()
public final <T> XadesSigningProfile withBinding(Class<T> from,
Class<? extends T> to)
from is found, the to class is used. The to class
may in turn have its own dependencies.
The other withNNNNNN methods are convenient shortcuts for this one.
from - the dependencyto - the type that resolves the dependency
public final <T> XadesSigningProfile withBinding(Class<T> from,
T to)
from is found, the to instance is used.
The other withNNNNNN methods are convenient shortcuts for this one.
from - the dependencyto - the instance that resolves the dependency
public XadesSigningProfile withAlgorithmsProvider(AlgorithmsProvider algsProvider)
public XadesSigningProfile withAlgorithmsProvider(Class<? extends AlgorithmsProvider> algsProviderClass)
public XadesSigningProfile withDigestEngineProvider(MessageDigestEngineProvider digestProvider)
public XadesSigningProfile withDigestEngineProvider(Class<? extends MessageDigestEngineProvider> digestProviderClass)
public XadesSigningProfile withBasicSignatureOptionsProvider(BasicSignatureOptionsProvider optionsProvider)
public XadesSigningProfile withBasicSignatureOptionsProvider(Class<? extends BasicSignatureOptionsProvider> optionsProvider)
public XadesSigningProfile withSignaturePropertiesProvider(SignaturePropertiesProvider signaturePropsProv)
public XadesSigningProfile withSignaturePropertiesProvider(Class<? extends SignaturePropertiesProvider> signaturePropsProvClass)
public XadesSigningProfile withDataObjectPropertiesProvider(DataObjectPropertiesProvider dataObjPropsProvider)
public XadesSigningProfile withDataObjectPropertiesProvider(Class<? extends DataObjectPropertiesProvider> dataObjPropsProviderClass)
public XadesSigningProfile withTimeStampTokenProvider(TimeStampTokenProvider tsTokenProvider)
public XadesSigningProfile withTimeStampTokenProvider(Class<? extends TimeStampTokenProvider> tsTokenProviderClass)
public XadesSigningProfile withSignedPropertiesMarshaller(SignedPropertiesMarshaller sPropsMarshaller)
public XadesSigningProfile withSignedPropertiesMarshaller(Class<? extends SignedPropertiesMarshaller> sPropsMarshallerClass)
public XadesSigningProfile withUnsignedPropertiesMarshaller(UnsignedPropertiesMarshaller uPropsMarshaller)
public XadesSigningProfile withUnsignedPropertiesMarshaller(Class<? extends UnsignedPropertiesMarshaller> uPropsMarshallerClass)
public <TProp extends QualifyingProperty> XadesSigningProfile withPropertyDataObjectGenerator(Class<TProp> propClass,
PropertyDataObjectGenerator<TProp> propDataGen)
public <TProp extends QualifyingProperty> XadesSigningProfile withPropertyDataObjectGenerator(Class<TProp> propClass,
Class<? extends PropertyDataObjectGenerator<TProp>> propDataGenClass)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||