|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxades4j.properties.DataObjectDesc
public abstract class DataObjectDesc
Base class for descriptions of the signed data objects. Each data object can be characterized by a set of transforms and a set of properties, specified via a fluent interface. class.
EnvelopedXmlObject,
DataObjectReference| Constructor Summary | |
|---|---|
protected |
DataObjectDesc()
|
| Method Summary | |
|---|---|
Collection<SignedDataObjectProperty> |
getSignedDataObjProps()
|
Collection<DataObjectTransform> |
getTransforms()
|
Collection<UnsignedDataObjectProperty> |
getUnsignedDataObjProps()
|
boolean |
hasProperties()
|
DataObjectDesc |
withCommitmentType(CommitmentTypeProperty commitment)
Adds a CommitmentType signed property to the current data object description. |
DataObjectDesc |
withDataObjectFormat(DataObjectFormatProperty format)
Adds a DataObjectFormat signed property to the current data object description. |
DataObjectDesc |
withDataObjectTimeStamp()
Add a new IndividualDataObjectsTimeStamp signed property to the current data object description. |
DataObjectDesc |
withDataObjectTimeStamp(IndividualDataObjsTimeStampProperty timestamp)
Add a IndividualDataObjectsTimeStamp signed property to the current data object description. |
DataObjectDesc |
withOtherDataObjectProperty(OtherSignedDataObjectProperty otherSignedDataObjProp)
Adds a custom signed property to the current data object description. |
DataObjectDesc |
withOtherDataObjectProperty(OtherUnsignedDataObjectProperty otherUnsignedDataObjProp)
Adds a custom unsigned property to the current data object description. |
DataObjectDesc |
withTransform(DataObjectTransform transf)
Registers a transform to be applied to the data object at the signature generation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DataObjectDesc()
| Method Detail |
|---|
public final DataObjectDesc withTransform(DataObjectTransform transf)
ds:Transform element
within the ds:Reference resulting from the current data object
description.
transf - the transform to be applied
NullPointerException - if transf is null
IllegalStateException - if the transform (instance) is already
presentpublic Collection<DataObjectTransform> getTransforms()
public final DataObjectDesc withDataObjectFormat(DataObjectFormatProperty format)
ObjectReference of the resulting property in the XAdES signature
will refer the ds:Reference resulting from the current data object
description.
This property can only be defined once.
format - DataObjectFormat property
NullPointerException - if format is null
PropertyTargetException - if a DataObjectFormat property is already
present or format is already applied
to another data objectpublic final DataObjectDesc withCommitmentType(CommitmentTypeProperty commitment)
ObjectReference of the resulting property in the XAdES signature
will refer the ds:Reference resulting from the current data object
description.
This method can be invoked multiple times with different properties since
the signer may express multiple commitments towards the current data object.
Furthermore, the same property instance can be added to different data object
descriptions, since the signed can express the same commitment towards them.
commitment - CommitmentType property
NullPointerException - if commitment is null
PropertyTargetException - if the property (instance) is already presentpublic final DataObjectDesc withDataObjectTimeStamp(IndividualDataObjsTimeStampProperty timestamp)
Include list of the resulting property in
the XAdES signature will refer the ds:Reference resulting from the
current data object description.
This method can be invoked multiple times with different properties since
multiple instances of the property may exist in the signature and be applied
to the current data object. Furthermore, the same property instance can be
added to different data object descriptions since a single time-stamp may
cover multiple data objects.
timestamp - the IndividualDataObjectsTimeStamp property
NullPointerException - if timestamp is null
PropertyTargetException - if the property (instance) is already presentpublic final DataObjectDesc withDataObjectTimeStamp()
withDataObjectTimeStamp(xades4j.properties.IndividualDataObjsTimeStampProperty)
that can be used when the time-stamp is not applied to other data objects.
public final DataObjectDesc withOtherDataObjectProperty(OtherSignedDataObjectProperty otherSignedDataObjProp)
Each custom property needs a corresponding PropertyDataObjectGenerator
which can be supplied through XadesSigningProfile.
otherSignedDataObjProp - the custom property
NullPointerException - if otherSignedDataObjProp is null
PropertyTargetException - if the property is already present
or is already applied to another data object (if it can't)
IllegalArgumentException - if the property is not properly annotatedpublic final DataObjectDesc withOtherDataObjectProperty(OtherUnsignedDataObjectProperty otherUnsignedDataObjProp)
Each custom property needs a corresponding PropertyDataObjectGenerator
which can be supplied through XadesSigningProfile.
otherUnsignedDataObjProp - the custom property
NullPointerException - if otherUnsignedProp is null
PropertyTargetException - if the property is already present
or is already applied to another data object (if it can't)
IllegalArgumentException - if the property is not properly annotatedpublic boolean hasProperties()
public Collection<SignedDataObjectProperty> getSignedDataObjProps()
public Collection<UnsignedDataObjectProperty> getUnsignedDataObjProps()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||