Package no.digipost.api.client.internal
Class ApiServiceImpl
java.lang.Object
no.digipost.api.client.internal.ApiServiceImpl
- All Implemented Interfaces:
ArchiveApi,BatchApi,MessageDeliveryApi,DocumentApi,InboxApi,SharedDocumentsApi,TagApi
public class ApiServiceImpl
extends Object
implements MessageDeliveryApi, InboxApi, DocumentApi, ArchiveApi, BatchApi, TagApi, SharedDocumentsApi
-
Nested Class Summary
Nested classes/interfaces inherited from interface no.digipost.api.client.archive.ArchiveApi
ArchiveApi.ArchivingDocuments -
Constructor Summary
ConstructorsConstructorDescriptionApiServiceImpl(DigipostClientConfig config, org.apache.http.impl.client.HttpClientBuilder httpClientBuilder, BrokerId brokerId, Signer signer) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.http.client.methods.CloseableHttpResponseaddData(AddDataLink addDataLink, AdditionalData data) Legger til ytterligere data til et dokument.voidaddUniqueUUIDToArchiveDocument(SenderId senderId, UUID uuid, UUID newuuid) voidcancelBatch(Batch batch) completeBatch(Batch batch) createBatch(UUID batchUUID) createOrActivateUserAccount(SenderId senderId, UserInformation user) voiddeleteArchiveDocumentByUUID(URI deleteArchiveDocumentUri) voiddeleteInboxDocument(InboxDocument inboxDocument) Delets the given document from the servergetArchiveDocument(URI uri) getArchiveDocumentByUUID(SenderId senderId, UUID uuid) getArchiveDocuments(URI uri) getArchiveDocumentsByReferenceId(SenderId senderId, String referenceId) Henter en liste av ArkivDokumenter med en gitt referanseIdgetArchives(SenderId senderId) getBatchInformation(UUID batchUUID) getDocumentContent(String path) Retrieve the content of a document.getDocumentEvents(String organisation, String partId, SenderId senderId, ZonedDateTime from, ZonedDateTime to, int offset, int maxResults) Henter hendelser knyttet til tidligere sendte brev.getDocumentStatus(Link linkToDocumentStatus) Henter status på dokumeter som tidligere blitt sendt i Digipost, både via digital og print-kanal.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.CloseableHttpResponseHenter public krypteringsnøkkel i x509 format for forsendelser som skal sendes til print.org.apache.http.client.methods.CloseableHttpResponsegetEncryptionKey(URI location) getEntryPoint(SenderId senderId) Get documents from the inbox for the organisation represented by senderId.getInboxDocumentContentStream(InboxDocument inboxDocument) Get the content of a document as a stream.getSenderInformation(String orgnr, String avsenderenhet) Henter informasjon om en avsender.getSenderInformation(MayHaveSender mayHaveSender) Henter informasjon om en faktisk avsender av en melding, altså det mottaker ser som avsender.getSenderInformation(SenderId senderId) Henter informasjon om en avsender.Gets the content of a specific document as a link to view on Digipost's domain.Gets the content of a specific document as a stream of bytes.getShareDocumentsRequestState(SenderId senderId, UUID shareDocumentsRequestUuid) Gets the current state for an existing ShareDocumentsRequest.getTags(PersonalIdentificationNumber personalIdentificationNumber) org.apache.http.client.methods.CloseableHttpResponseidentifyAndGetEncryptionKey(Identification identification) Sjekker hvis spesifisert mottaker er Digipost-bruker.org.apache.http.client.methods.CloseableHttpResponseidentifyRecipient(Identification identification) voidsaveArchiveDocument(ArchiveDocument archiveDocument, URI uri) searchSuggest(String searchString) org.apache.http.client.methods.CloseableHttpResponsesendMultipartArchive(org.apache.http.HttpEntity multipart) org.apache.http.client.methods.CloseableHttpResponsesendMultipartMessage(org.apache.http.HttpEntity multipart) Oppretter og sender en multipartforsendelseorg.apache.http.client.methods.CloseableHttpResponsestopSharing(SenderId senderId, URI uri) Stops the sharing, after which you will no longer have access to the shared documents
-
Constructor Details
-
ApiServiceImpl
public ApiServiceImpl(DigipostClientConfig config, org.apache.http.impl.client.HttpClientBuilder httpClientBuilder, BrokerId brokerId, Signer signer)
-
-
Method Details
-
getEntryPoint
-
getEntryPoint
-
sendMultipartMessage
public org.apache.http.client.methods.CloseableHttpResponse sendMultipartMessage(org.apache.http.HttpEntity multipart) Description copied from interface:MessageDeliveryApiOppretter og sender en multipartforsendelse- Specified by:
sendMultipartMessagein interfaceMessageDeliveryApi
-
sendMultipartArchive
public org.apache.http.client.methods.CloseableHttpResponse sendMultipartArchive(org.apache.http.HttpEntity multipart) - Specified by:
sendMultipartArchivein interfaceArchiveApi
-
getArchiveDocument
- Specified by:
getArchiveDocumentin interfaceArchiveApi
-
getArchiveDocumentContent
- Specified by:
getArchiveDocumentContentin interfaceArchiveApi
-
getArchiveDocumentContentStream
- Specified by:
getArchiveDocumentContentStreamin interfaceArchiveApi
-
identifyAndGetEncryptionKey
public org.apache.http.client.methods.CloseableHttpResponse identifyAndGetEncryptionKey(Identification identification) Description copied from interface:MessageDeliveryApiSjekker hvis spesifisert mottaker er Digipost-bruker. Returnerer då også publik del av krypteringsnøkkel for Digipost-bruker. Nøkkelen brukes for å kryptere dokument-innhold for dokumenter som skal prekrypteres.- Specified by:
identifyAndGetEncryptionKeyin interfaceMessageDeliveryApi
-
getEncryptionKey
- Specified by:
getEncryptionKeyin interfaceMessageDeliveryApi
-
getEncryptionCertificateForPrint
public org.apache.http.client.methods.CloseableHttpResponse getEncryptionCertificateForPrint()Description copied from interface:MessageDeliveryApiHenter public krypteringsnøkkel i x509 format for forsendelser som skal sendes til print.- Specified by:
getEncryptionCertificateForPrintin interfaceMessageDeliveryApi
-
addData
public org.apache.http.client.methods.CloseableHttpResponse addData(AddDataLink addDataLink, AdditionalData data) Description copied from interface:MessageDeliveryApiLegger til ytterligere data til et dokument. Det er en forutsetning at dokumentet har datatype fra tidligere.- Specified by:
addDatain interfaceMessageDeliveryApi
-
getDocumentEvents
public DocumentEvents getDocumentEvents(String organisation, String partId, SenderId senderId, ZonedDateTime from, ZonedDateTime to, int offset, int maxResults) Description copied from interface:DocumentApiHenter hendelser knyttet til tidligere sendte brev.- Specified by:
getDocumentEventsin interfaceDocumentApi- Parameters:
organisation- OrganisasjonsnummerpartId- Frivillig organisasjons-enhet, kan værenull
-
getDocumentStatus
Description copied from interface:DocumentApiHenter status på dokumeter som tidligere blitt sendt i Digipost, både via digital og print-kanal.- Specified by:
getDocumentStatusin interfaceDocumentApi
-
getDocumentStatus
Description copied from interface:DocumentApiHenter status på dokumeter som tidligere blitt sendt i Digipost, både via digital og print-kanal.- Specified by:
getDocumentStatusin interfaceDocumentApi
-
getDocumentContent
Description copied from interface:DocumentApiRetrieve the content of a document.- Specified by:
getDocumentContentin interfaceDocumentApi- Parameters:
path- the path to the document resource- Returns:
- the bytes of the document
-
search
- Specified by:
searchin interfaceMessageDeliveryApi
-
searchSuggest
- Specified by:
searchSuggestin interfaceMessageDeliveryApi
-
identifyRecipient
public org.apache.http.client.methods.CloseableHttpResponse identifyRecipient(Identification identification) - Specified by:
identifyRecipientin interfaceMessageDeliveryApi
-
getSenderInformation
Description copied from interface:MessageDeliveryApiHenter informasjon om en avsender.- Specified by:
getSenderInformationin interfaceMessageDeliveryApi- Parameters:
senderId- id-en til avsenderen.
-
getSenderInformation
Description copied from interface:MessageDeliveryApiHenter informasjon om en avsender. Avsender må ha godtatt å identifiseres med organisasjonsnummer og ev. underenhet.- Specified by:
getSenderInformationin interfaceMessageDeliveryApi- Parameters:
orgnr- organisasjonsnummeret til avsenderen.avsenderenhet- underenhet for et organisasjonsnummer.
-
getSenderInformation
Description copied from interface:MessageDeliveryApiHenter informasjon om en faktisk avsender av en melding, altså det mottaker ser som avsender.- Specified by:
getSenderInformationin interfaceMessageDeliveryApi- Parameters:
mayHaveSender- melding som skal sendes.
-
getArchives
- Specified by:
getArchivesin interfaceArchiveApi
-
getArchiveDocuments
- Specified by:
getArchiveDocumentsin interfaceArchiveApi
-
getArchiveDocumentsByReferenceId
Description copied from interface:ArchiveApiHenter en liste av ArkivDokumenter med en gitt referanseId- Specified by:
getArchiveDocumentsByReferenceIdin interfaceArchiveApi- Returns:
- En liste av arkiver som igjen holder en liste av arkivdokumenter med den gitte referanseID-en.
-
getArchiveDocumentByUUID
- Specified by:
getArchiveDocumentByUUIDin interfaceArchiveApi
-
deleteArchiveDocumentByUUID
- Specified by:
deleteArchiveDocumentByUUIDin interfaceArchiveApi
-
addUniqueUUIDToArchiveDocument
- Specified by:
addUniqueUUIDToArchiveDocumentin interfaceArchiveApi
-
saveArchiveDocument
- Specified by:
saveArchiveDocumentin interfaceArchiveApi
-
getInbox
Description copied from interface:InboxApiGet documents from the inbox for the organisation represented by senderId.- Specified by:
getInboxin interfaceInboxApi- Parameters:
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)- Returns:
- Inbox element with the n=limit first documents
-
getInboxDocumentContentStream
Description copied from interface:InboxApiGet the content of a document as a stream. The content is streamed from the server so remember to close the stream to prevent connection leaks.- Specified by:
getInboxDocumentContentStreamin interfaceInboxApi- Parameters:
inboxDocument- The document to get content for- Returns:
- Entire content of the document as a stream
-
deleteInboxDocument
Description copied from interface:InboxApiDelets the given document from the server- Specified by:
deleteInboxDocumentin interfaceInboxApi- Parameters:
inboxDocument- The document to delete
-
createOrActivateUserAccount
- Specified by:
createOrActivateUserAccountin interfaceMessageDeliveryApi
-
createBatch
- Specified by:
createBatchin interfaceBatchApi
-
getBatchInformation
- Specified by:
getBatchInformationin interfaceBatchApi
-
completeBatch
- Specified by:
completeBatchin interfaceBatchApi
-
cancelBatch
- Specified by:
cancelBatchin interfaceBatchApi
-
addTag
-
removeTag
-
getTags
-
stopSharing
Description copied from interface:SharedDocumentsApiStops the sharing, after which you will no longer have access to the shared documents- Specified by:
stopSharingin interfaceSharedDocumentsApiuri- The URI of the StopSharing relation returned as part of the ShareDocumentsRequestState
-