@Path(value="email") public class EMailResource extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
PATH
the resource path for this plugin
|
| Constructor and Description |
|---|
EMailResource() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
connect(EMailCredentials credentials)
Connect to a mail service with the given parameters
|
void |
disconnect()
Disconnect the currently running connection to the mail server
|
MessageDTO[] |
getMails(int amount)
REST implementation of
EMailLogic.getMailsForREST(int) |
boolean |
isConnected()
Check, if currently connected to mail server
|
public static final String PATH
@GET @Path(value="isConnected") @Produces(value="application/json") public boolean isConnected()
@POST @Path(value="connect") @Consumes(value="application/json") @Produces(value="application/json") public boolean connect(EMailCredentials credentials)
credentials - the email credentials@GET
@Path(value="getMails/{amount}")
@Produces(value="application/json")
public MessageDTO[] getMails(@PathParam(value="amount")
int amount)
EMailLogic.getMailsForREST(int)amount - the amount of mails, put -1 here if you want all mails@POST @Path(value="disconnect") public void disconnect()
Copyright © 2018. All rights reserved.