Package com.centraview.mail

Examples of com.centraview.mail.MailHome


    String errorForward = ".view.preference.mail.new_account";

    // "mailAccountForm" defined in struts-config-preference.xml
    DynaActionForm accountForm = (DynaActionForm)form;

    MailHome home = (MailHome)CVUtility.getHomeObject("com.centraview.mail.MailHome", "Mail");

    try {
      Mail remote = (Mail)home.create();
      remote.setDataSource(dataSource);

      // build a MailAccountVO
      MailAccountVO accountVO = new MailAccountVO();
View Full Code Here


        // no point in continuing forward. Show user the door. :-)
        allErrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requiredField", "Account ID"));
        return(mapping.findForward(forward));
      }

      MailHome home = (MailHome)CVUtility.getHomeObject("com.centraview.mail.MailHome", "Mail");
      Mail remote = (Mail)home.create();
      remote.setDataSource(dataSource);

      remote.deleteEmailAccount(individualID, accountID.intValue());
    } catch (Exception e) {
      System.out.println("[Exception][DeleteAccountHandler] Exception thrown in execute(): " + e);
View Full Code Here

      }
      // Check wheather the User is have any email account set up already.
      // if user as more then one accout we will set the value to true. so that
      // it will not show EMAIL
      // else it will be false
      MailHome home = (MailHome) CVUtility.getHomeObject("com.centraview.mail.MailHome", "Mail");
      Mail remote = home.create();
      remote.setDataSource(dataSource);

      int numberOfAccounts = remote.getNumberOfAccountsForUser(individualID);
      boolean emailFlag = false;
      if (numberOfAccounts <= 0) {
View Full Code Here

  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
    AdvancedSearchHome advancedSearchHome = (AdvancedSearchHome) CVUtility.getHomeObject("com.centraview.advancedsearch.AdvancedSearchHome",
        "AdvancedSearch");
    PrintTemplateHome PTHome = (PrintTemplateHome) CVUtility.getHomeObject("com.centraview.printtemplate.PrintTemplateHome", "Printtemplate");
    MailHome mailHome = (MailHome) CVUtility.getHomeObject("com.centraview.mail.MailHome", "Mail");
    try {
      HttpSession session = request.getSession();
      UserObject userObject = (UserObject) session.getAttribute("userobject");
      int individualID = userObject.getIndividualID();
      DynaActionForm dynaform = (DynaActionForm) form;
      String mergeType = (String) dynaform.get("mergetype");

      String actionType = null;
      if (request.getParameter("actionType") != null) {
        actionType = request.getParameter("actionType");
      }

      int categoryId = this.getCategoryIdFromType(mergeType);
      PrintTemplate PTRemote = PTHome.create();
      PTRemote.setDataSource(dataSource);
      AdvancedSearch remoteAdvancedSearch = advancedSearchHome.create();
      remoteAdvancedSearch.setDataSource(dataSource);
      String savedsearch1 = "";
      String specificentity = "";
      String entitysavedsearch = "";
      if (mergeType.equals("EMAIL")) {
        // collect the Account List and set it to the dynaActionForm.
        Mail mailRemote = mailHome.create();
        mailRemote.setDataSource(dataSource);
        ArrayList accountIDList = mailRemote.getUserAccountList(individualID);
        // also adding delegated accounts
        accountIDList.addAll(mailRemote.getDelegatedAccountList(individualID));
        ArrayList accountList = new ArrayList(); // this, we're sending to the
View Full Code Here

    // Setting the Attachments to form.
    emailForm.set("attachmentList", attachments);

    try {
      MailHome home = (MailHome)CVUtility.getHomeObject("com.centraview.mail.MailHome", "Mail");
      Mail remote = home.create();
      remote.setDataSource(dataSource);

      // create a MailMessageVO
      MailMessageVO messageVO = new MailMessageVO();
View Full Code Here

    String forward = "displayMessage";

    // "emailMessageForm", defined in struts-config-email.xml
    DynaActionForm emailForm = (DynaActionForm)form;

    MailHome home = (MailHome)CVUtility.getHomeObject("com.centraview.mail.MailHome", "Mail");
   
    try
    {
      // get the message ID from the form bean
      Integer messageID = (Integer)emailForm.get("messageID");

      // now, check the message ID on the form...
      if (messageID == null || messageID.intValue() <= 0 )
      {
        // if Message ID is not set on the form, then there is
        // no point in continuing forward. Show user the door. :-)
        allErrors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.general.requiredField", "Message ID"));
        return(mapping.findForward(forward));
      }

 
      Mail remote = (Mail)home.create();
      remote.setDataSource(dataSource);

      MailMessageVO messageVO = remote.getEmailMessageVO(individualID, messageID.intValue());

      emailForm.set("accountID", new Integer(messageVO.getEmailAccountID()));
View Full Code Here

    logger.debug("[execute]: Starting SupportMailCheck thread.");
    // Get the mailHome and the dataSource from the JobDataMap
    // start a mail check.
    try
    {
      MailHome mailHome = (MailHome)CVUtility.getHomeObject("com.centraview.mail.MailHome", "Mail");
      Mail mailremote = mailHome.create();
      mailremote.setDataSource(this.dataSource);
      mailremote.checkAllSupportAccounts();
    } catch (Exception e) {
      logger.error("[run] Exception thrown.", e);
    }
View Full Code Here

    // use default formatters for locale
    DateFormat timeFormat = DateFormat.getTimeInstance(DateFormat.SHORT, locale);
    DateFormat dateTimeFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, locale);

    // email portlet
    MailHome home = (MailHome)CVUtility.getHomeObject("com.centraview.mail.MailHome", "Mail");
    Mail remote = home.create();
    remote.setDataSource(dataSource);
    ArrayList emailFolders = remote.getHomeFolderList(individualId);
    // this modifier gets stuck right in the html of the "Compose" button
    String emailButtonModifier = "";
    if ((emailFolders == null) || (emailFolders.size() < 1)) {
View Full Code Here

     
      HttpSession session = request.getSession(true);
     
      UserObject userObject = (UserObject)session.getAttribute("userobject");
     
      MailHome mailHome = (MailHome)CVUtility.getHomeObject("com.centraview.mail.MailHome", "Mail");
      Mail mailRemote = (Mail)mailHome.create();
      mailRemote.setDataSource(dataSource);

      Vector accountList = (Vector)mailRemote.getAccountList();
     
      AppSettingsHome appHome = (AppSettingsHome)CVUtility.getHomeObject("com.centraview.administration.applicationsettings.AppSettingsHome","AppSettings");
View Full Code Here

    // "mailAccountListform" defined in struts-config-preference.xml
    DynaActionForm accountForm = (DynaActionForm)form;
   
    try {
      MailHome home = (MailHome)CVUtility.getHomeObject("com.centraview.mail.MailHome", "Mail");
      Mail remote = (Mail)home.create();
      remote.setDataSource(dataSource);

      ArrayList accountList = new ArrayList();

      ArrayList accountIDList = remote.getUserAccountList(individualID);
View Full Code Here

TOP

Related Classes of com.centraview.mail.MailHome

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.