Class DirectJobStatusResponse
- java.lang.Object
-
- no.digipost.signature.client.direct.DirectJobStatusResponse
-
- All Implemented Interfaces:
Confirmable
public class DirectJobStatusResponse extends Object implements Confirmable
-
-
Constructor Summary
Constructors Constructor Description DirectJobStatusResponse(Long signatureJobId, String reference, DirectJobStatus signatureJobStatus, ConfirmationReference confirmationUrl, DeleteDocumentsUrl deleteDocumentsUrl, List<Signature> signatures, PAdESReference pAdESReference, Instant nextPermittedPollTime)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfirmationReference
getConfirmationReference()
DeleteDocumentsUrl
getDeleteDocumentsUrl()
Instant
getNextPermittedPollTime()
Gets the point in time where you are allowed toget status changes
.PAdESReference
getpAdESUrl()
String
getReference()
Signature
getSignatureFrom(String signer)
Gets the signature from a given signer.long
getSignatureJobId()
List<Signature>
getSignatures()
DirectJobStatus
getStatus()
boolean
is(DirectJobStatus status)
boolean
isPAdESAvailable()
String
toString()
-
-
-
Constructor Detail
-
DirectJobStatusResponse
public DirectJobStatusResponse(Long signatureJobId, String reference, DirectJobStatus signatureJobStatus, ConfirmationReference confirmationUrl, DeleteDocumentsUrl deleteDocumentsUrl, List<Signature> signatures, PAdESReference pAdESReference, Instant nextPermittedPollTime)
-
-
Method Detail
-
getSignatureJobId
public long getSignatureJobId()
-
getReference
public String getReference()
- Returns:
- the signature job's custom reference as specified upon
creation
. May benull
.
-
getStatus
public DirectJobStatus getStatus()
-
is
public boolean is(DirectJobStatus status)
-
isPAdESAvailable
public boolean isPAdESAvailable()
-
getpAdESUrl
public PAdESReference getpAdESUrl()
-
getSignatureFrom
public Signature getSignatureFrom(String signer)
Gets the signature from a given signer.- Parameters:
signer
- a string referring to a signer of the job. It may be a personal identification number or a custom signer reference, depending of how thesigner
was initially created (usingDirectSigner.withPersonalIdentificationNumber(String)
orDirectSigner.withCustomIdentifier(String)
).- Throws:
IllegalArgumentException
- if the job response doesn't contain a signature from this signer- See Also:
getSignatures()
-
getNextPermittedPollTime
public Instant getNextPermittedPollTime()
Gets the point in time where you are allowed toget status changes
.Only applicable for jobs with
status retrieval method
set toPOLLING
.- Throws:
IllegalStateException
- for jobs withstatus retrieval method
not set toPOLLING
.
-
getConfirmationReference
public ConfirmationReference getConfirmationReference()
- Specified by:
getConfirmationReference
in interfaceConfirmable
-
getDeleteDocumentsUrl
public DeleteDocumentsUrl getDeleteDocumentsUrl()
-
-