public class ApiServiceMock extends Object implements ApiService
Modifier and Type | Class and Description |
---|---|
static class |
ApiServiceMock.ContentPart |
static class |
ApiServiceMock.DigipostRequest |
static class |
ApiServiceMock.Method |
static class |
ApiServiceMock.MockRequest |
static class |
ApiServiceMock.MultipartRequestMatcher |
static class |
ApiServiceMock.RequestMatcher |
static class |
ApiServiceMock.RequestsAndResponses |
Constructor and Description |
---|
ApiServiceMock(DigipostClientMock.ValidatingMarshaller validatingMarshaller) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addContent(Document document,
InputStream letterContent)
Angir innholdet i en allerede opprettet forsendelse
Før man kaller denne metoden, må man allerede ha opprettet en
forsendelsesressurs på serveren ved metoden
opprettForsendelse . |
void |
addFilter(javax.ws.rs.client.ClientRequestFilter filter) |
javax.ws.rs.core.Response |
createMessage(Message message)
Oppretter en ny forsendelsesressurs på serveren ved å sende en
POST-forespørsel.
|
javax.ws.rs.core.Response |
fetchExistingMessage(URI location)
Henter en allerede eksisterende forsendelsesressurs fra serveren.
|
javax.ws.rs.core.Response |
getContent(String path) |
javax.ws.rs.core.Response |
getDocumentEvents(String organisation,
String partId,
org.joda.time.DateTime from,
org.joda.time.DateTime to,
int offset,
int maxResults)
Henter hendelser knyttet til tidligere sendte brev.
|
javax.ws.rs.core.Response |
getEncryptionKey(URI location) |
javax.ws.rs.core.Response |
getEncryptionKeyForPrint()
Henter publik krypteringsnøkkel for forsendelser som skal sendes til print.
|
EntryPoint |
getEntryPoint() |
javax.ws.rs.core.Response |
identifyAndGetEncryptionKey(Identification identification)
Sjekker hvis spesifisert mottaker er Digipost-bruker.
|
javax.ws.rs.core.Response |
identifyRecipient(Identification identification) |
javax.ws.rs.core.Response |
multipartMessage(org.glassfish.jersey.media.multipart.MultiPart multiPart)
Oppretter og sender en multipartforsendelse
|
void |
reset() |
Recipients |
search(String searchString) |
Autocomplete |
searchSuggest(String searchString) |
javax.ws.rs.core.Response |
send(MessageDelivery createdMessage)
Sender innholdet i forsendelsen som en POST-forespørsel til serveren
OBS! Denne metoden fører til at brevet blir sendt på ordentlig.
|
public ApiServiceMock(DigipostClientMock.ValidatingMarshaller validatingMarshaller)
public void reset()
public EntryPoint getEntryPoint()
getEntryPoint
in interface ApiService
public javax.ws.rs.core.Response multipartMessage(org.glassfish.jersey.media.multipart.MultiPart multiPart)
ApiService
multipartMessage
in interface ApiService
public javax.ws.rs.core.Response identifyAndGetEncryptionKey(Identification identification)
ApiService
identifyAndGetEncryptionKey
in interface ApiService
public javax.ws.rs.core.Response getEncryptionKeyForPrint()
ApiService
getEncryptionKeyForPrint
in interface ApiService
public javax.ws.rs.core.Response createMessage(Message message)
ApiService
createMessage
in interface ApiService
public javax.ws.rs.core.Response fetchExistingMessage(URI location)
ApiService
fetchExistingMessage
in interface ApiService
public javax.ws.rs.core.Response getEncryptionKey(URI location)
getEncryptionKey
in interface ApiService
public javax.ws.rs.core.Response addContent(Document document, InputStream letterContent)
ApiService
opprettForsendelse
.addContent
in interface ApiService
public javax.ws.rs.core.Response send(MessageDelivery createdMessage)
ApiService
addContent
send
in interface ApiService
public Recipients search(String searchString)
search
in interface ApiService
public Autocomplete searchSuggest(String searchString)
searchSuggest
in interface ApiService
public void addFilter(javax.ws.rs.client.ClientRequestFilter filter)
addFilter
in interface ApiService
public javax.ws.rs.core.Response identifyRecipient(Identification identification)
identifyRecipient
in interface ApiService
public javax.ws.rs.core.Response getDocumentEvents(String organisation, String partId, org.joda.time.DateTime from, org.joda.time.DateTime to, int offset, int maxResults)
ApiService
getDocumentEvents
in interface ApiService
organisation
- OrganisasjonsnummerpartId
- Frivillig organisasjons-enhet, kan være null
public javax.ws.rs.core.Response getContent(String path)
getContent
in interface ApiService
Copyright © 2015 Digipost Open Source. All rights reserved.