org.opencrx.application.mail.importer
Class MailImporterServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.opencrx.application.mail.importer.MailImporterServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class MailImporterServlet
extends HttpServlet

The MailImporterServlet imports E-Mails from a configured Mail server and folder as openCRX EMail activities. Activities are created either with a default EMail activity creator or by the activity creator defined by the EMail subject. The subject line of the wrapper message must be of the form > @ [#] The activity creator name / activity# is optional. If specified an activity is created and the imported E-Mails are linked to this activity.

See Also:
Serialized Form

Constructor Summary
MailImporterServlet()
           
 
Method Summary
protected  void doGet(HttpServletRequest req, HttpServletResponse res)
           
protected  void doPost(HttpServletRequest req, HttpServletResponse res)
           
protected  void handleRequest(HttpServletRequest req, HttpServletResponse res)
          Process an email import request.
protected  void importMessages(javax.jdo.PersistenceManager pm, String providerName, String segmentName, MimeMessage message, MailImporterConfig config)
          Import new messages from message store.
protected  void importMessages(String providerName, String segmentName)
          Import messages to segment.
 void init(ServletConfig config)
           
protected  void notifyAdmin(javax.jdo.PersistenceManager pm, String providerName, String segmentName, short importance, String subject, String message, String[] params)
          Send notification to segment admin.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailImporterServlet

public MailImporterServlet()
Method Detail

init

public void init(ServletConfig config)
          throws ServletException
Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Throws:
ServletException

notifyAdmin

protected void notifyAdmin(javax.jdo.PersistenceManager pm,
                           String providerName,
                           String segmentName,
                           short importance,
                           String subject,
                           String message,
                           String[] params)
Send notification to segment admin.

Parameters:
pm -
providerName -
segmentName -
importance -
subject -
message -
params -

importMessages

protected void importMessages(javax.jdo.PersistenceManager pm,
                              String providerName,
                              String segmentName,
                              MimeMessage message,
                              MailImporterConfig config)
Import new messages from message store.

Parameters:
pm -
providerName -
segmentName -
message -
config -

importMessages

protected void importMessages(String providerName,
                              String segmentName)
                       throws IOException
Import messages to segment.

Parameters:
providerName -
segmentName -
Throws:
IOException

handleRequest

protected void handleRequest(HttpServletRequest req,
                             HttpServletResponse res)
                      throws ServletException,
                             IOException
Process an email import request.

Parameters:
req - the servlet request
res - the servlet response
Throws:
ServletException
IOException

doGet

protected void doGet(HttpServletRequest req,
                     HttpServletResponse res)
              throws ServletException,
                     IOException
Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException

doPost

protected void doPost(HttpServletRequest req,
                      HttpServletResponse res)
               throws ServletException,
                      IOException
Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException


This software is published under the BSD license. Copyright © 2003-2013, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.