public class MailAPI extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.Header |
acceptJsonHeader |
protected org.apache.http.impl.client.CloseableHttpClient |
httpClient |
protected org.apache.http.client.protocol.HttpClientContext |
httpContext |
protected static org.exoplatform.services.log.Log |
LOG |
protected static String |
MODELS_ERROR |
protected static String |
READ_ATTACHMENT_ERROR |
protected static String |
READ_MESSAGE_ERROR |
| Constructor and Description |
|---|
MailAPI() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkError(org.apache.http.HttpResponse response,
String errorBase) |
void |
close() |
org.exoplatform.ws.frameworks.json.value.JsonValue |
getAttachment(OutlookUser user,
String messageId,
String attachmentToken,
String attachmentId) |
org.exoplatform.ws.frameworks.json.value.JsonValue |
getMessage(OutlookUser user,
String messageId,
String messageToken) |
protected org.exoplatform.ws.frameworks.json.value.JsonValue |
readJson(InputStream content) |
protected String |
readText(org.apache.http.HttpEntity entity) |
void |
reset() |
protected static final org.exoplatform.services.log.Log LOG
protected static final String READ_ATTACHMENT_ERROR
protected static final String READ_MESSAGE_ERROR
protected static final String MODELS_ERROR
protected final org.apache.http.impl.client.CloseableHttpClient httpClient
protected final org.apache.http.client.protocol.HttpClientContext httpContext
protected final org.apache.http.Header acceptJsonHeader
public MailAPI()
throws MailServerException
MailServerExceptionpublic void close()
throws MailServerException
MailServerExceptionpublic void reset()
public org.exoplatform.ws.frameworks.json.value.JsonValue getAttachment(OutlookUser user, String messageId, String attachmentToken, String attachmentId) throws BadCredentialsException, ForbiddenException, MailServerException
public org.exoplatform.ws.frameworks.json.value.JsonValue getMessage(OutlookUser user, String messageId, String messageToken) throws BadCredentialsException, ForbiddenException, MailServerException
protected org.exoplatform.ws.frameworks.json.value.JsonValue readJson(InputStream content) throws org.exoplatform.ws.frameworks.json.impl.JsonException
org.exoplatform.ws.frameworks.json.impl.JsonExceptionprotected String readText(org.apache.http.HttpEntity entity)
protected void checkError(org.apache.http.HttpResponse response,
String errorBase)
throws BadCredentialsException,
ForbiddenException,
MailServerException
Copyright © 2003–2016 eXo Platform SAS. All rights reserved.