fr.cnes.sitools.mail
Class MailResource

java.lang.Object
  extended by ExtendedWadlServerResource
      extended by fr.cnes.sitools.common.resource.AbstractSitoolsResource
          extended by fr.cnes.sitools.common.SitoolsResource
              extended by fr.cnes.sitools.mail.MailResource

public final class MailResource
extends SitoolsResource

Resource to configure mail management.

Author:
jp.boignard (AKKA Technologies)

Field Summary
 
Fields inherited from class fr.cnes.sitools.common.SitoolsResource
DEFAULT_MEDIATYPE
 
Constructor Summary
MailResource()
           
 
Method Summary
 void describePost(org.restlet.ext.wadl.MethodInfo info)
           
 void doInit()
          Initiate the resource
 Mail getObject(org.restlet.representation.Representation representation, org.restlet.representation.Variant variant)
          Get the mail from representation
 org.restlet.representation.Representation getRepresentation(Response response, org.restlet.data.MediaType media)
          Response to Representation
 org.restlet.representation.Representation sendMail(org.restlet.representation.Representation representation, org.restlet.representation.Variant variant)
          Envoi Mail
 void sendMailAsynchrone(org.restlet.Context context, org.restlet.Request request)
          Send mail in asynchronous mode
 void sitoolsDescribe()
          Method implementation mandatory
 
Methods inherited from class fr.cnes.sitools.common.SitoolsResource
addStandardGetRequestInfo, addStandardInternalServerErrorInfo, addStandardNotificationInfo, addStandardObjectResponseInfo, addStandardPostOrPutRequestInfo, addStandardResourceCollectionFilterInfo, addStandardResponseInfo, addStandardSimpleResponseInfo, configure, getNotificationObject, getRepresentation, getSettings, getSitoolsApplication, getSitoolsSetting, trace, trace
 
Methods inherited from class fr.cnes.sitools.common.resource.AbstractSitoolsResource
getMediaType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailResource

public MailResource()
Method Detail

doInit

public void doInit()
Description copied from class: SitoolsResource
Initiate the resource


sitoolsDescribe

public void sitoolsDescribe()
Description copied from class: AbstractSitoolsResource
Method implementation mandatory

Specified by:
sitoolsDescribe in class AbstractSitoolsResource

sendMail

@Post
public org.restlet.representation.Representation sendMail(org.restlet.representation.Representation representation,
                                                               org.restlet.representation.Variant variant)
Envoi Mail

Parameters:
representation - representation XML / JSON of a Mail object
variant - XML / JSON for response
Returns:
a representation of the mail sent

describePost

public void describePost(org.restlet.ext.wadl.MethodInfo info)

getObject

public Mail getObject(org.restlet.representation.Representation representation,
                      org.restlet.representation.Variant variant)
Get the mail from representation

Parameters:
representation - Request entity
variant - the variant used
Returns:
a mail corresponding to the representation

getRepresentation

public org.restlet.representation.Representation getRepresentation(Response response,
                                                                   org.restlet.data.MediaType media)
Response to Representation

Overrides:
getRepresentation in class SitoolsResource
Parameters:
response - the response to transform
media - the media type
Returns:
Representation

sendMailAsynchrone

public void sendMailAsynchrone(org.restlet.Context context,
                               org.restlet.Request request)
Send mail in asynchronous mode

Parameters:
context - Context
request - prepared request to mail server


Copyright © 2010-2013 CNES. All Rights Reserved.