Package com.centraview.email.emailfacade

Examples of com.centraview.email.emailfacade.EmailFacadeHome


  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
    try
    {
      //System.out.println("Email : updateStatusHandler");
      EmailFacadeHome cfh = (EmailFacadeHome)CVUtility.getHomeObject("com.centraview.email.emailfacade.EmailFacadeHome","EmailFacade");
      EmailFacade remote =( EmailFacade )cfh.create();
      remote.setDataSource(dataSource);
      String headerName = Constants.EH_ATTENDEE_STATUS_KEY;
      String headerValue = status;
      //ejb call to update header 
      remote.updateHeader(userId,messageId,headerName,headerValue);
View Full Code Here


    long l = ( new java.util.Date() ).getTime();
    mailMessage.setMessageDate( new java.sql.Timestamp( ) ) ;

    mailMessage.setAttachFileIDs( attchmentids );

    EmailFacadeHome facade = (EmailFacadeHome)CVUtility.getHomeObject("com.centraview.email.emailfacade.EmailFacadeHome","EmailFacade");
    EmailFacade remote =( EmailFacade )facade.create();
    remote.setDataSource(dataSource);
    int mesgid =  remote.editDraft( individualId , mailMessage  );

    request.setAttribute( "messageid" ,  messageid  )
    request.setAttribute( "action" ,"Drafts"  )
View Full Code Here

        catch (NumberFormatException e)
        {}
      }
      String messageID[] = request.getParameterValues("rowId");

      EmailFacadeHome cfh = (EmailFacadeHome)CVUtility.getHomeObject("com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
      EmailFacade remote = (EmailFacade)cfh.create();
      remote.setDataSource(dataSource);
      remote.emailMarkasRead(sourcefolderid, smarkFlag, messageID);
    }
    catch (Exception e)
    {
View Full Code Here

  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException, CommunicationException, NamingException
  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();

  EmailFacadeHome cfh = (EmailFacadeHome)CVUtility.getHomeObject("com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
    try
    {
      DynaActionForm dynaForm = (DynaActionForm)form;

      HttpSession session = request.getSession(true);
      UserObject userobjectd = (UserObject)session.getAttribute("userobject");
      int individualID = userobjectd.getIndividualID();
      ListPreference listpreference = userobjectd.getListPreference("Email");
      String rowId = null;


      rowId = request.getParameter("rowId");
      int messageID = Integer.parseInt(rowId);

      String listAction = request.getParameter("listAction");

      String folderid = request.getParameter("folderid");
      if (folderid == null)
      {
        folderid = (String)session.getAttribute("folderid");
      }
      else
      {
        session.setAttribute("folderid", folderid);
      }


      String indexfrompage = request.getParameter("index");
     System.out.println("indexfrompage"+indexfrompage);

      if (listAction != null && listAction.equals("next"))
      {
      System.out.println("messageID"+messageID);
           messageID = messageID - 1 ;
           int index = 0;
           if (indexfrompage != null){
         index = Integer.parseInt(indexfrompage);
         indexfrompage = (index - 1)+"";
       }
           rowId = messageID + "";
      }

      System.out.println("indexfrompage"+indexfrompage);
      DisplayList displaylistSession = (DisplayList)session.getAttribute("displaylist");

      int index = 0;
      boolean flag = false;

      // THIS IS UTTER SILLINESS. WHY ARE WE LOOPING THROUGH A SESSION ATTRIBUTE
      // WITH A GENERIC NAME LIKE "displaylist", WHICH COULD HAVE BEEN SET
      // BY *ANY* HANDLER, WHEN WE *ALREADY HAVE* THE KEY TO THE MESSAGE?!??!
      // I'VE INTRODUCED A HACK HERE, TO ACCOUNT FOR CASES IN WHICH WE'RE TRYING
      // TO VIEW A MESSAGE DETAILS, BUT WE HAVEN'T COME FROM THE EMAIL LIST SCREEN.
      if (displaylistSession != null && (displaylistSession.getListType()).equals("Email"))
      {
        Set listkey = displaylistSession.keySet();
        Iterator it = listkey.iterator();

        while (it.hasNext())
        {
          index++;
          String str = (String)it.next();
          ListElement ele = (ListElement)displaylistSession.get(str);
          ListElementMember sm = (ListElementMember)ele.get("MessageID");
          Integer id = (Integer)sm.getMemberValue();
          int messageid = id.intValue();

          if (index == (Integer.parseInt(indexfrompage)))
          {
            flag = true;
            messageID = messageid;
            break;
          }
        } // end while(it.hasNext())
      }
      else
      {
        flag = true;
      }
/*
      if (listAction != null && listAction.equals("next"))
      {
      System.out.println("messageID"+messageID);
           messageID = messageID - 1 ;
           rowId = messageID + "";
      }

*/
      System.out.println("messageID after"+messageID);

      if (indexfrompage != null)
      {
        dynaForm.set("index", indexfrompage);
      }
      else
      {
        dynaForm.set("index", Integer.toString(index));
      }

      if (flag == true)
      {
        MailMessage mailmessage = null;
        EmailFacade remote = (EmailFacade)cfh.create();

        HashMap hm = new HashMap();
        hm.put("MessageID", new Integer(messageID));
        mailmessage = remote.getMailMessage(individualID, hm);
        remote.setDataSource(dataSource);
View Full Code Here

      mailaccount.setSignature(signature);

      String smtpserver = (String)dynaForm.get("smtpserver");
      mailaccount.setSmtpserver(smtpserver);

      EmailFacadeHome facade = (EmailFacadeHome)CVUtility.getHomeObject("com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
      EmailFacade remote = (EmailFacade)facade.create();
      remote.setDataSource(dataSource);

      int newAccountID = remote.createNewEmailAccount(individualId, mailaccount);

      if (newAccountID != 0)
View Full Code Here

    HttpSession session = request.getSession(true);
    UserObject userobjectd = (UserObject)session.getAttribute("userobject");
        int individualId = userobjectd.getIndividualID();

    EmailFacadeHome cfh = (EmailFacadeHome)CVUtility.getHomeObject("com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
    EmailFacade remote = (EmailFacade)cfh.create();
    remote.setDataSource(dataSource);

    int accountid        = 0;
    String accountID           = (String) request.getParameter("accountid");
View Full Code Here

      HttpSession session = request.getSession(true);
      UserObject userobjectd = (UserObject)session.getAttribute("userobject");
      int individualId = userobjectd.getIndividualID();

      DynaActionForm dynaForm = (DynaActionForm)form;
      EmailFacadeHome cfh = (EmailFacadeHome)CVUtility.getHomeObject("com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
      EmailFacade remote = (EmailFacade)cfh.create();
      remote.setDataSource(dataSource);

      HashMap hmFolder = new HashMap();
      String str = (String)dynaForm.get("accountid");
      String folderid = (String)dynaForm.get("folderid");
View Full Code Here

      //Attchment
      HashMap attchmentids           = (HashMap) session.getAttribute("AttachfileList");
      mailmessage.setAttachFileIDs(attchmentids);
 
      session.removeAttribute("AttachfileList");
      EmailFacadeHome aa             = (EmailFacadeHome) CVUtility.getHomeObject("com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
      EmailFacade remote             = (EmailFacade) aa.create();
      remote.setDataSource(dataSource);
     
      //to
      StringTokenizer st             = new StringTokenizer(mailTo, ",");
      while (st.hasMoreTokens())
View Full Code Here

          newEventHashMap.put("StartDate", startTimestamp);
          newEventHashMap.put("EndDate", endTimestamp);

          //Add the attachment here
          MailMessage mailmessage = null;
          EmailFacadeHome cfh = (EmailFacadeHome)CVUtility.getHomeObject("com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
          EmailFacade facade = (EmailFacade)cfh.create();
          HashMap hm = new HashMap();
          hm.put("MessageID", new Integer(eventID));

          mailmessage = facade.getAttachment(individualId, hm);
View Full Code Here

    try
    {
      String foldername = "";
      String ruleid = request.getParameter("rowId");
      int ruleID = Integer.parseInt(ruleid);
      EmailFacadeHome cfh = (EmailFacadeHome)CVUtility.getHomeObject("com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
      EmailFacade remote = (EmailFacade)cfh.create();
      remote.setDataSource(dataSource);

      RuleDetails ruledetails = remote.getRuleDetails(ruleID);
      DynaActionForm dynaForm = (DynaActionForm)form;
      dynaForm.set("RuleID", ruledetails.getRuleID());
View Full Code Here

TOP

Related Classes of com.centraview.email.emailfacade.EmailFacadeHome

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.