public class DirectClient extends Object
Constructor and Description |
---|
DirectClient(ClientConfiguration config) |
Modifier and Type | Method and Description |
---|---|
void |
confirm(DirectJobStatusResponse receivedStatusResponse)
Confirms that the status retrieved from
getStatus(StatusReference) or getStatusChange() is received. |
DirectJobResponse |
create(DirectJob job) |
void |
deleteDocuments(DeleteDocumentsUrl deleteDocumentsUrl) |
InputStream |
getPAdES(PAdESReference pAdESReference) |
DirectJobStatusResponse |
getStatus(StatusReference statusReference)
Get the current status for the given
StatusReference , which references the status for a specific job. |
DirectJobStatusResponse |
getStatusChange()
If there is a job with an updated
status , the returned object contains
necessary information to act on the status change. |
DirectJobStatusResponse |
getStatusChange(Sender sender)
If there is a job with an updated
status , the returned object contains
necessary information to act on the status change. |
InputStream |
getXAdES(XAdESReference xAdESReference) |
public DirectClient(ClientConfiguration config)
public DirectJobResponse create(DirectJob job)
public DirectJobStatusResponse getStatus(StatusReference statusReference)
StatusReference
, which references the status for a specific job.
When processing of the status is complete (e.g. retrieving PAdES
and/or
XAdES
documents for a completed
job
where all signers have signed
their documents),
the returned status must be confirmed
.statusReference
- the reference to the status of a specific job.DirectJobStatusResponse
for the job referenced by the given StatusReference
,
never null
.public DirectJobStatusResponse getStatusChange()
status
, the returned object contains
necessary information to act on the status change. The returned object can be queried using
.is(
NO_CHANGES)
to determine if there has been a status change. When processing of the status change is complete, (e.g. retrieving
PAdES
and/or XAdES
documents for a
completed
job where all signers have signed
their documents,
the returned status must be confirmed
.
Only jobs with status retrieval method
set
to POLLING
will be returned.
no changes
,
never null
.public DirectJobStatusResponse getStatusChange(Sender sender)
status
, the returned object contains
necessary information to act on the status change. The returned object can be queried using
.is(
NO_CHANGES)
to determine if there has been a status change. When processing of the status change is complete, (e.g. retrieving
PAdES
and/or XAdES
documents for a
completed
job where all signers have signed
their documents,
the returned status must be confirmed
.
Only jobs with status retrieval method
set
to POLLING
will be returned.
no changes
,
never null
.public void confirm(DirectJobStatusResponse receivedStatusResponse)
getStatus(StatusReference)
or getStatusChange()
is received.
If the confirmed DirectJobStatus
is a terminal status
(i.e. completed
or failed
),
the Signature service may make the job's associated resources unavailable through the API when
receiving the confirmation. Calling this method for a response with no ConfirmationReference
has no effect.
If the status is retrieved using the polling method
, failing to confirm the
received response may cause subsequent statuses for the same job to be reported as "changed", even
though the status has not changed.
receivedStatusResponse
- the updated status retrieved from getStatus(StatusReference)
.public InputStream getXAdES(XAdESReference xAdESReference)
public InputStream getPAdES(PAdESReference pAdESReference)
public void deleteDocuments(DeleteDocumentsUrl deleteDocumentsUrl)
Copyright © 2018 Digipost. All rights reserved.