public class SignatureProperties extends java.lang.Object implements SignerSignatureProperties, VerifierSignatureProperties
The application will not work with this implementation class, but with one of two interfaces, depending
on the actual use case. The interfaces provide specialized views on this class: SignerSignatureProperties is used for the signing use case, VerifierSignatureProperties is used
for the verification use case.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
addedToContainer_
Signals if this signature property container has already been incorporated into a
Object
container. |
protected java.lang.String |
id_
Value for the "Id" attribute of the XML SignatureProperties element.
|
protected java.util.List |
signatureProperties_
A list of all signature properties stored in this signature property container.
|
protected org.w3c.dom.Element |
signaturePropertiesDOMElem_
DOM Element representation of the signature properties container.
|
protected java.util.Set |
signaturePropertyElemsWithID_
A set of all signature properties stored in this container which have its Id attribute set.
|
| Modifier | Constructor and Description |
|---|---|
protected |
SignatureProperties(org.w3c.dom.Document owningDoc,
java.lang.String id)
Creates a new, empty signature property container.
|
protected |
SignatureProperties(org.w3c.dom.Element propertiesDOMElem,
org.w3c.dom.Document owningDoc)
Creates a new signature property container from the specified DOM element representation.
|
| Modifier and Type | Method and Description |
|---|---|
SignatureProperty |
addSignatureProperty(SignatureProperty signatureProperty)
Appends a signature property to the list maintained by this signature property container.
|
SignatureProperty |
createSignatureProperty(org.w3c.dom.DocumentFragment content)
Creates a new signature property.
|
SignatureProperty |
createSignatureProperty(org.w3c.dom.Element content)
Creates a new signature property.
|
SignatureProperty |
createSignatureProperty(java.lang.String content)
Creates a new signature property.
|
java.lang.String |
getId()
Gets the value of the Id attribute.
|
SignatureProperty[] |
getSignatureProperties()
Gets an array containing all signature properties of this container.
|
SignatureProperty |
removeSignatureProperty(SignatureProperty signatureProperty)
Removes the specified signature property from this signature property container.
|
void |
setId(java.lang.String id)
Sets the Id attribute value of the signature property container.
|
org.w3c.dom.Element |
toElement()
Gets a DOM element representation of this signature property container.
|
protected java.lang.String id_
protected org.w3c.dom.Element signaturePropertiesDOMElem_
protected java.util.List signatureProperties_
protected java.util.Set signaturePropertyElemsWithID_
protected boolean addedToContainer_
Object
container.protected SignatureProperties(org.w3c.dom.Element propertiesDOMElem,
org.w3c.dom.Document owningDoc)
propertiesDOMElem - A DOM element representation of the signature property container.owningDoc - The DOM Document which should be used to create necessary DOM nodes.protected SignatureProperties(org.w3c.dom.Document owningDoc,
java.lang.String id)
owningDoc - The DOM Document which should be used to create necessary DOM nodes.id - The value for the Id attribute. If it equals null
public SignatureProperty createSignatureProperty(java.lang.String content)
createSignatureProperty in interface SignerSignaturePropertiescontent - The value for the DOM Text node to be set as child of the SignatureProperty element.public SignatureProperty createSignatureProperty(org.w3c.dom.Element content)
createSignatureProperty in interface SignerSignaturePropertiescontent - Contains the DOM element which will become the only child node of the SignatureProperty
element.public SignatureProperty createSignatureProperty(org.w3c.dom.DocumentFragment content)
createSignatureProperty in interface SignerSignaturePropertiescontent - Contains the DOM document fragment which children will become the child nodes of the
SignatureProperty element.public SignatureProperty addSignatureProperty(SignatureProperty signatureProperty)
Object
container. If the signature property is already in the signature property container, this method will
have no effect. If the signature property has already been added to a signature property container,
this method will also have no effect.addSignatureProperty in interface SignerSignaturePropertiessignatureProperty - The signature property to be appended. Must not be null.null if the specified signature property is
already in the container, of if the signature property container has already been incorporated
into an Object container, or if the signature property has already been added to
a signature property container, or if the signature property does not have its Target attribute
set.public SignatureProperty removeSignatureProperty(SignatureProperty signatureProperty)
Object container.
If the signature property is not in the signature property container, nothing will happen.removeSignatureProperty in interface SignerSignaturePropertiessignatureProperty - The signature property to be removed. Must not be null.null if the specified signature property is not
in this signature property container, or if the signature property container has already been
incorporated into an Object container.public SignatureProperty[] getSignatureProperties()
getSignatureProperties in interface SignerSignaturePropertiesgetSignatureProperties in interface VerifierSignaturePropertiesnull if there
are no properties in this container.public java.lang.String getId()
getId in interface SignerSignaturePropertiesgetId in interface VerifierSignaturePropertiesnull if the attribute does not exist.public void setId(java.lang.String id)
null, the possibly existing Id
attribute will be removed. If the signature property container has already been added to a Object container, this method will have no effect.setId in interface SignerSignaturePropertiesid - The Id attribute value.public org.w3c.dom.Element toElement()
toElement in interface SignerSignaturePropertiestoElement in interface VerifierSignatureProperties