Package eu.europa.esig.dss.model
Class CommonCommitmentType
java.lang.Object
eu.europa.esig.dss.model.CommonCommitmentType
- All Implemented Interfaces:
CommitmentType
,ObjectIdentifier
,OidAndUriBasedEnum
,OidBasedEnum
,OidDescription
,UriBasedEnum
,Serializable
This class provides a basic implementation of
CommitmentType
providing a possibility
to create a customized CommitmentType signed property.- See Also:
-
Constructor Summary
ConstructorDescriptionDefault constructor instantiating object with null values -
Method Summary
Modifier and TypeMethodDescriptionGets custom CommitmentTypeQualifiers ListThis method returns the literal description of the OIDString[]
Returns a list of URI-based references NOTE: used in XAdESgetOid()
This method returns the OID valueReturns Object Identifier QualifierString[]
Gets references to signed data objects for the current CommitmentTypegetUri()
Returns a URIvoid
setCommitmentTypeQualifiers
(CommitmentQualifier... commitmentTypeQualifiers) Sets custom CommitmentTypeQualifiers List.void
setDescription
(String description) Sets text describing the CommitmentType object.void
setDocumentationReferences
(String... documentationReferences) Sets references pointing to a documentation describing the CommitmentType Use : OPTIONALvoid
Sets OID identifying the CommitmentType Use : CONDITIONAL (shall be present in CAdES, PAdES.void
setQualifier
(ObjectIdentifierQualifier qualifier) Sets Qualifier defining the type of OID identifier used for CommitmentType.void
setSignedDataObjects
(String... signedDataObjects) Sets signed data objects referenced by the current CommitmentType.void
Sets URI identifying the CommitmentType Use : CONDITIONAL (should be present in XAdES, JAdES)
-
Constructor Details
-
CommonCommitmentType
public CommonCommitmentType()Default constructor instantiating object with null values
-
-
Method Details
-
getUri
Description copied from interface:UriBasedEnum
Returns a URI- Specified by:
getUri
in interfaceUriBasedEnum
- Returns:
String
-
setUri
Sets URI identifying the CommitmentType Use : CONDITIONAL (should be present in XAdES, JAdES)- Parameters:
uri
-String
-
getOid
Description copied from interface:OidBasedEnum
This method returns the OID value- Specified by:
getOid
in interfaceOidBasedEnum
- Returns:
- the OID value
-
setOid
Sets OID identifying the CommitmentType Use : CONDITIONAL (shall be present in CAdES, PAdES. May be present in XAdES, JAdES). Note : when using OID in XAdES, a Qualifier shall be defined within the methodsetQualifier(qualifier)
. See EN 319 132-1 "5.1.2 The ObjectIdentifierType data type" for more information.- Parameters:
oid
-String
-
getQualifier
Description copied from interface:ObjectIdentifier
Returns Object Identifier Qualifier- Specified by:
getQualifier
in interfaceObjectIdentifier
- Returns:
ObjectIdentifierQualifier
-
setQualifier
Sets Qualifier defining the type of OID identifier used for CommitmentType. See EN 319 132-1 "5.1.2 The ObjectIdentifierType data type" for more information. Use : CONDITIONAL (shall be present XAdES when using OID identifier, but not URI) Note : used only in XAdES- Parameters:
qualifier
-ObjectIdentifierQualifier
-
getDescription
Description copied from interface:OidDescription
This method returns the literal description of the OID- Specified by:
getDescription
in interfaceOidDescription
- Returns:
- the OID description
-
setDescription
Sets text describing the CommitmentType object. Use : OPTIONAL- Parameters:
description
-String
-
getDocumentationReferences
Description copied from interface:ObjectIdentifier
Returns a list of URI-based references NOTE: used in XAdES- Specified by:
getDocumentationReferences
in interfaceObjectIdentifier
- Returns:
- an array of URI
String
references
-
setDocumentationReferences
Sets references pointing to a documentation describing the CommitmentType Use : OPTIONAL- Parameters:
documentationReferences
- array ofString
s
-
getSignedDataObjects
Gets references to signed data objects for the current CommitmentType- Returns:
- array of
String
s
-
setSignedDataObjects
Sets signed data objects referenced by the current CommitmentType. When CommitmentType is made for a subset of signed data objects, each element of the array shall refer one ds:Reference element within the ds:SignedInfo element or within a signed ds:Manifest element. When CommitmentType is made for all signed data objects, the array shall be: - empty (default), then AllSignedDataObjects element will be created; or - contain references to all signed data objects (one ObjectReference will be created for each). Use : OPTIONAL (XAdES only)- Parameters:
signedDataObjects
- array ofString
s
-
getCommitmentTypeQualifiers
Gets custom CommitmentTypeQualifiers List- Returns:
- array of
DSSDocument
s
-
setCommitmentTypeQualifiers
Sets custom CommitmentTypeQualifiers List. Use : OPTIONAL- Parameters:
commitmentTypeQualifiers
- array ofCommitmentQualifier
s representing content of the CommitmentTypeQualifier element
-