Class DirectJobResponse
java.lang.Object
no.digipost.signature.client.direct.DirectJobResponse
-
Constructor Summary
ConstructorsConstructorDescriptionDirectJobResponse(long signatureJobId, String reference, URI statusUrl, List<DirectSignerResponse> signers) -
Method Summary
Modifier and TypeMethodDescriptionfindSignerIdentifiedBy(String identifier) Try to find the signer with the given identifier for this job.longgetSignerIdentifiedBy(String identifier) Get the signer with the given identifier for this job.Gets all thesignersfor this jobGets the single signer for this job.
-
Constructor Details
-
DirectJobResponse
public DirectJobResponse(long signatureJobId, String reference, URI statusUrl, List<DirectSignerResponse> signers)
-
-
Method Details
-
getSignatureJobId
public long getSignatureJobId() -
getReference
- Returns:
- the signature job's custom reference as specified upon
creation. May benull.
-
getSingleSigner
Gets the single signer for this job. Convenience method for retrieving the signer for jobs with exactly one signer.- Returns:
- the signer
- Throws:
IllegalStateException- if there are multiple signers for this job- See Also:
-
getSigners
Gets all thesignersfor this job- Returns:
- the signers
-
getSignerIdentifiedBy
Get the signer with the given identifier for this job.- Parameters:
identifier- the string identifying the signer, either a personal identification number, or a custom identifier- Returns:
- the signer with the given identifier
- Throws:
NoSuchElementException- if the signer was not found.
-
findSignerIdentifiedBy
Try to find the signer with the given identifier for this job. If you expect the signer to exist, consider usinggetSignerIdentifiedBy(String)instead. -
getStatusUrl
-