Package xades4j.properties
Class SignaturePolicyIdentifierProperty
java.lang.Object
xades4j.properties.SignatureProperty
xades4j.properties.SignedSignatureProperty
xades4j.properties.SignaturePolicyBase
xades4j.properties.SignaturePolicyIdentifierProperty
- All Implemented Interfaces:
QualifyingProperty
An explicit and unambiguous identifier of a signature policy.
- Author:
- Luís
- See Also:
-
Field Summary
Fields inherited from class xades4j.properties.SignaturePolicyBase
PROP_NAME
Fields inherited from interface xades4j.properties.QualifyingProperty
QUALIFYING_PROPS_REF_TAG, QUALIFYING_PROPS_TAG, SIGNED_DATAOBJ_PROPS_TAG, SIGNED_PROPS_TAG, SIGNED_PROPS_TYPE_URI, SIGNED_SIGNATURE_PROPS_TAG, TARGET_ATTR, UNSIGNED_DATAOBJ_PROPS_TAG, UNSIGNED_PROPS_TAG, UNSIGNED_SIGNATURE_PROPS_TAG, XADES_XMLNS, XADESV141_XMLNS
-
Constructor Summary
ConstructorDescriptionSignaturePolicyIdentifierProperty
(ObjectIdentifier identifier, byte[] policyDocumentData) SignaturePolicyIdentifierProperty
(ObjectIdentifier identifier, InputStream policyDocumentStream) -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
Gets the content of the policy documentGets the stream to the policy document.withLocationUrl
(String url) Adds a URL where a copy of the signature policy may be obtained.Methods inherited from class xades4j.properties.SignaturePolicyBase
getName
Methods inherited from class xades4j.properties.SignedSignatureProperty
isSigned
Methods inherited from class xades4j.properties.SignatureProperty
isSignature
-
Constructor Details
-
SignaturePolicyIdentifierProperty
public SignaturePolicyIdentifierProperty(ObjectIdentifier identifier, InputStream policyDocumentStream) - Parameters:
identifier
- the policy identifierpolicyDocumentStream
- anInputStream
to the policy document- Throws:
NullPointerException
- ifpolicyDocumentStream
isnull
-
SignaturePolicyIdentifierProperty
- Parameters:
identifier
- the policy identifierpolicyDocumentData
- the content of the policy document- Throws:
NullPointerException
- ifpolicyDocumentData
isnull
-
-
Method Details
-
getPolicyDocumentData
public byte[] getPolicyDocumentData()Gets the content of the policy document- Returns:
- the content or
null
if the instance was created with a stream
-
getPolicyDocumentStream
Gets the stream to the policy document. If the instance was created with the policy document content, a ByteArrayInputStream is returned.- Returns:
- the stream
-
getIdentifier
-
withLocationUrl
Adds a URL where a copy of the signature policy may be obtained. This will be added as a qualifier.- Parameters:
url
- the location URL- Returns:
- the current instance
-
getLocationUrl
-