public class ApiServiceImpl extends Object implements MessageDeliveryApi, InboxApi, DocumentApi
Constructor and Description |
---|
ApiServiceImpl(DigipostClientConfig config,
org.apache.http.impl.client.HttpClientBuilder httpClientBuilder,
BrokerId brokerId,
Signer signer) |
Modifier and Type | Method and Description |
---|---|
org.apache.http.client.methods.CloseableHttpResponse |
addData(AddDataLink addDataLink,
AdditionalData data)
Legger til ytterligere data til et dokument.
|
UserAccount |
createOrActivateUserAccount(SenderId senderId,
UserInformation user) |
void |
deleteInboxDocument(InboxDocument inboxDocument)
Delets the given document from the server
|
InputStream |
getDocumentContent(String path)
Retrieve the content of a document.
|
DocumentEvents |
getDocumentEvents(String organisation,
String partId,
ZonedDateTime from,
ZonedDateTime to,
int offset,
int maxResults)
Henter hendelser knyttet til tidligere sendte brev.
|
DocumentStatus |
getDocumentStatus(Link linkToDocumentStatus)
Henter status på dokumeter som tidligere blitt sendt i Digipost, både via digital og print-kanal.
|
DocumentStatus |
getDocumentStatus(SenderId senderId,
UUID uuid)
Henter status på dokumeter som tidligere blitt sendt i Digipost, både via digital og print-kanal.
|
org.apache.http.client.methods.CloseableHttpResponse |
getEncryptionCertificateForPrint()
Henter public krypteringsnøkkel i x509 format for forsendelser som skal sendes til print.
|
org.apache.http.client.methods.CloseableHttpResponse |
getEncryptionKey(URI location) |
EntryPoint |
getEntryPoint() |
Inbox |
getInbox(SenderId senderId,
int offset,
int limit)
Get documents from the inbox for the organisation represented by senderId.
|
InputStream |
getInboxDocumentContentStream(InboxDocument inboxDocument)
Get the content of a document as a stream.
|
SenderInformation |
getSenderInformation(MayHaveSender mayHaveSender)
Henter informasjon om en faktisk avsender av en melding, altså
det mottaker ser som avsender.
|
SenderInformation |
getSenderInformation(SenderId senderId)
Henter informasjon om en avsender.
|
SenderInformation |
getSenderInformation(String orgnr,
String avsenderenhet)
Henter informasjon om en avsender.
|
org.apache.http.client.methods.CloseableHttpResponse |
identifyAndGetEncryptionKey(Identification identification)
Sjekker hvis spesifisert mottaker er Digipost-bruker.
|
org.apache.http.client.methods.CloseableHttpResponse |
identifyRecipient(Identification identification) |
Recipients |
search(String searchString) |
Autocomplete |
searchSuggest(String searchString) |
org.apache.http.client.methods.CloseableHttpResponse |
sendMultipartMessage(org.apache.http.HttpEntity multipart)
Oppretter og sender en multipartforsendelse
|
public ApiServiceImpl(DigipostClientConfig config, org.apache.http.impl.client.HttpClientBuilder httpClientBuilder, BrokerId brokerId, Signer signer)
public EntryPoint getEntryPoint()
public org.apache.http.client.methods.CloseableHttpResponse sendMultipartMessage(org.apache.http.HttpEntity multipart)
MessageDeliveryApi
sendMultipartMessage
in interface MessageDeliveryApi
public org.apache.http.client.methods.CloseableHttpResponse identifyAndGetEncryptionKey(Identification identification)
MessageDeliveryApi
identifyAndGetEncryptionKey
in interface MessageDeliveryApi
public org.apache.http.client.methods.CloseableHttpResponse getEncryptionKey(URI location)
getEncryptionKey
in interface MessageDeliveryApi
public org.apache.http.client.methods.CloseableHttpResponse getEncryptionCertificateForPrint()
MessageDeliveryApi
getEncryptionCertificateForPrint
in interface MessageDeliveryApi
public org.apache.http.client.methods.CloseableHttpResponse addData(AddDataLink addDataLink, AdditionalData data)
MessageDeliveryApi
addData
in interface MessageDeliveryApi
public DocumentEvents getDocumentEvents(String organisation, String partId, ZonedDateTime from, ZonedDateTime to, int offset, int maxResults)
DocumentApi
getDocumentEvents
in interface DocumentApi
organisation
- OrganisasjonsnummerpartId
- Frivillig organisasjons-enhet, kan være null
public DocumentStatus getDocumentStatus(Link linkToDocumentStatus)
DocumentApi
getDocumentStatus
in interface DocumentApi
public DocumentStatus getDocumentStatus(SenderId senderId, UUID uuid)
DocumentApi
getDocumentStatus
in interface DocumentApi
public InputStream getDocumentContent(String path)
DocumentApi
getDocumentContent
in interface DocumentApi
path
- the path to the document resourcepublic Recipients search(String searchString)
search
in interface MessageDeliveryApi
public Autocomplete searchSuggest(String searchString)
searchSuggest
in interface MessageDeliveryApi
public org.apache.http.client.methods.CloseableHttpResponse identifyRecipient(Identification identification)
identifyRecipient
in interface MessageDeliveryApi
public SenderInformation getSenderInformation(SenderId senderId)
MessageDeliveryApi
getSenderInformation
in interface MessageDeliveryApi
senderId
- id-en til avsenderen.public SenderInformation getSenderInformation(String orgnr, String avsenderenhet)
MessageDeliveryApi
getSenderInformation
in interface MessageDeliveryApi
orgnr
- organisasjonsnummeret til avsenderen.avsenderenhet
- underenhet for et organisasjonsnummer.public SenderInformation getSenderInformation(MayHaveSender mayHaveSender)
MessageDeliveryApi
getSenderInformation
in interface MessageDeliveryApi
mayHaveSender
- melding som skal sendes.public Inbox getInbox(SenderId senderId, int offset, int limit)
InboxApi
getInbox
in interface InboxApi
senderId
- Either an organisation that you operate on behalf of or your brokerIdoffset
- Number of documents to skip. For paginationlimit
- Maximum number of documents to retrieve (max 1000)public InputStream getInboxDocumentContentStream(InboxDocument inboxDocument)
InboxApi
getInboxDocumentContentStream
in interface InboxApi
inboxDocument
- The document to get content forpublic void deleteInboxDocument(InboxDocument inboxDocument)
InboxApi
deleteInboxDocument
in interface InboxApi
inboxDocument
- The document to deletepublic UserAccount createOrActivateUserAccount(SenderId senderId, UserInformation user)
createOrActivateUserAccount
in interface MessageDeliveryApi
Copyright © 2019 Digipost. All rights reserved.