Package com.centraview.email

Examples of com.centraview.email.EmailList


        endAt = sessionEmailList.getEndAT();
        sortType = sessionEmailList.getSortType();
      }

      ListGenerator lg = ListGenerator.getListGenerator(dataSource);
      EmailList emailList = null;
     
      // If we are setting the Advance Search Flag to True means we already processed the List with Advance Search condition. So we don't need to get the list once again.
      if (sessionEmailList != null && sessionEmailList.getAdvanceSearchFlag() == true)
      {
        emailList = (EmailList) sessionEmailList;
      }else{
        emailList = (EmailList)lg.getEmailList(individualID, startAt, endAt, searchString, listPrefs.getSortElement(), sortType, folderID.intValue(),true);
      }

      Set listkey = emailList.keySet();
      Iterator it = listkey.iterator();
      while (it.hasNext())
      {
        String str = (String)it.next();
        ListElement ele = (ListElement)emailList.get(str);

        StringMember sm = (StringMember)ele.get("Subject");
        if (folderName != null && folderName.equals(MailFolderVO.DRAFTS_FOLDER_NAME))
        {
          sm.setRequestURL("openWindows('" + request.getContextPath() + "/mail/EditDraft.do?messageID=" + ele.getElementID() + "', 720, 585, '')");
View Full Code Here


    return returnDL;
  }// end of method

  public EmailList createEmptyObject(EmailList list)
  {
    EmailList dummy = new EmailList();
    dummy.setListType(list.getListType());
    dummy.setPrimaryMemberType(list.getPrimaryMemberType());
    dummy.setPrimaryTable(list.getPrimaryTable());
    dummy.setSortMember(list.getSortMember());
    dummy.setSortType(list.getSortType());
    dummy.setPrimaryMember(list.getPrimaryMember());
    dummy.setStartAT(list.getStartAT());
    dummy.setEndAT(list.getEndAT());
    dummy.setBeginIndex(0);
    dummy.setEndIndex(0);
    return dummy;
  }
View Full Code Here

  }

  public EmailList getEmailList(int userid, DisplayList DLparam, int folderid, boolean adminUserFlag)
  {

    EmailList returnDL = null;
    EmailList paramDL = (EmailList)DLparam;

    int listSize = paramDL.getTotalNoOfRecords();
    int startAT = paramDL.getStartAT();
    int EndAt = paramDL.getEndAT();

    String searchString = paramDL.getSearchString();
    String sortColumn = paramDL.getSortMember();

    HashMap hm = new HashMap();
    hm.put("startATparam", new Integer(Math.max(startAT - 100, 1)));
    hm.put("EndAtparam", new Integer(Math.min(EndAt + 100, listSize)));
    hm.put("searchString", searchString);
    hm.put("sortmem", DLparam.getSortMember());
    hm.put("sortType", new Character(DLparam.getSortType()));
    hm.put("folderid", new Integer(folderid));
    hm.put("adminUserFlag", new Boolean(adminUserFlag));

    try {
      EmailFacadeHome aa = (EmailFacadeHome)CVUtility.getHomeObject(
          "com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
      EmailFacade remote = (EmailFacade)aa.create();
      remote.setDataSource(this.dataSource);
      returnDL = remote.getEmailList(userid, hm);
    } catch (Exception e) {
      System.out.println("[Exception][ListGenerator] Error in getEmailList(): " + e);
      // e.printStackTrace();
    }

    if (searchString != null && searchString.startsWith("SIMPLE :")) {
      returnDL.setSearchString(searchString);
      returnDL.search();
    }

    returnDL.setListType("Email");
    returnDL.setTotalNoOfRecords(returnDL.size());
    returnDL.setListID(paramDL.getListID());
    returnDL.setStartAT(paramDL.getStartAT());
    returnDL.setSortMember(DLparam.getSortMember());
    returnDL.setEndAT(paramDL.getEndAT());
    returnDL.setPrimaryTable("emailmessage");
    returnDL.setSearchString(searchString);
    returnDL.setSortType(DLparam.getSortType());
    return returnDL;
  }
View Full Code Here

  public EmailList getRelatedEmailList(HashMap searchCondition, int individualID)
      throws CommunicationException, NamingException
  {

    EmailList returnDL = null;
    EmailFacadeHome aa = (EmailFacadeHome)CVUtility.getHomeObject(
        "com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
    try {
      EmailFacade remote = (EmailFacade)aa.create();
      remote.setDataSource(this.dataSource);
      returnDL = remote.getRelatedEmailList(searchCondition, individualID);
    } catch (Exception e) {
      System.out.println("[Exception][ListGenerator] Error in getEmailList(): " + e);
      // e.printStackTrace();
    }

    returnDL.setListType("Email");
    long currentListID = this.getNextListID();
    returnDL.setListID(currentListID);

    EmailList emptyDL = createEmptyObject(returnDL);
    emptyDL.setTotalNoOfRecords(returnDL.getTotalNoOfRecords());
    emptyDL.setListID(currentListID);
    emptyDL.setListType("Email");
    emptyDL.setStartAT(returnDL.getStartAT());
    emptyDL.setEndAT(returnDL.getEndAT());
    displayLists.put(new Long(currentListID), emptyDL);

    return returnDL;
  }
View Full Code Here

  // **************************Start EMAIL *******************

  public EmailList getEmailList(int userID, int startATparam, int EndAtparam, String searchString,
      String sortColumn, char sortType, int folderid, boolean adminUserFlag)
  {
    EmailList returnDL = null;
    try {
      HashMap hm = new HashMap();
      hm.put("startATparam", new Integer(startATparam));
      hm.put("EndAtparam", new Integer(EndAtparam));
      hm.put("searchString", searchString);
      hm.put("sortmem", sortColumn);
      hm.put("sortType", new Character(sortType));
      hm.put("folderid", new Integer(folderid));
      hm.put("adminUserFlag", new Boolean(adminUserFlag));
      try {
        EmailFacadeHome aa = (EmailFacadeHome)CVUtility.getHomeObject(
            "com.centraview.email.emailfacade.EmailFacadeHome", "EmailFacade");
        EmailFacade remote = (EmailFacade)aa.create();
        remote.setDataSource(this.dataSource);
        returnDL = remote.getEmailList(userID, hm);
      } catch (Exception e) {
        logger.error("[getEmailList] Exception thrown.", e);
      }

      if (searchString != null && searchString.startsWith("SIMPLE :")) {
        returnDL.setSearchString(searchString);
        returnDL.search();
      }

      returnDL.setListType("Email");
      returnDL.setTotalNoOfRecords(returnDL.size());
      long currentListID = this.getNextListID();
      returnDL.setListID(currentListID);
      returnDL.setStartAT(startATparam);
      returnDL.setEndAT(EndAtparam);
      returnDL.setSortMember(sortColumn);
      returnDL.setSortType(sortType);
      returnDL.setPrimaryTable("emailmessage");

      EmailList emptyDL = createEmptyObject(returnDL);
      emptyDL.setTotalNoOfRecords(returnDL.getTotalNoOfRecords());
      emptyDL.setListID(currentListID);
      emptyDL.setListType("Email");
      emptyDL.setStartAT(returnDL.getStartAT());
      emptyDL.setEndAT(returnDL.getEndAT());
      displayLists.put(new Long(currentListID), emptyDL);

    } catch (Exception e) {
      logger.error("[getEmailList] Exception thrown.", e);
    }
View Full Code Here

   * @param info    A HashMap with information about the list.
   * @return        An Email list with the correct properties.
   */
  public EmailList getEmailList(int userId, HashMap info)
  {
    EmailList emailList  = new EmailList();
    CVDal cvdl = new CVDal(dataSource);

    try
    {
      Integer startATparam  = (Integer) info.get("startATparam");
      Integer EndAtparam    = (Integer) info.get("EndAtparam");
      String searchString   = (String) info.get("searchString");
      String sortmem        = (String) info.get("sortmem");
      Character chr         = (Character) info.get("sortType");
      boolean adminUserFlag = ((Boolean) info.get("adminUserFlag")).booleanValue();
      char sorttype  = chr.charValue();
      int startat    = startATparam.intValue();
      int endat      = EndAtparam.intValue();
      int beginindex = Math.max(startat - 100, 1);
      int endindex   = endat + 100;


      emailList.setSortMember(sortmem);

      Integer folderID = (Integer)info.get("folderid");
      Collection v     = null;

      if (sortmem.equals("From")){
        sortmem = "emailmessage.mailfrom";
      }

      if (sortmem.equals("To")){
        sortmem = "emailmessage.replyto";
      }

      if (sortmem.equals("Received")){
        sortmem = "emailmessage.messagedate";
      }

      String appendStr = "";
      String sortStr = "";

      if (sorttype != 'A'){
        sortStr = " DESC ";
      }
      String privateString = "";
      System.out.println(adminUserFlag+"adminUserFlag");
      if(!adminUserFlag){
        privateString = " AND (emailmessage.private ='NO' OR emailmessage.owner="+userId+" ) ";
      }
   
      System.out.println(privateString+"privateString");
      String folderString = "";
      if (folderID.intValue() != 0){
        folderString = " AND es.emailfolder=" + folderID.intValue();
      }

      String strSQL = "SELECT emailmessage.messageid, emailmessage.messagedate, emailmessage.mailfrom, emailmessage.replyto, emailmessage.subject, emailmessage.size, " +
                      "emailmessage.Priority, emailmessage.messageRead AS readstatus, es.folderID AS EmailFolder, " +
                      "COUNT(at.attachmentid) AS noofattachments " +
                      "FROM emailmessage LEFT JOIN emailmessagefolder es ON (emailmessage.messageid=es.messageID) " +
                      "LEFT JOIN attachment at ON (emailmessage.messageID=at.messageid) " +
                      "WHERE emailmessage.locallyDeleted = 'NO' "+privateString+" AND (emailmessage.MovedToFolder=" + folderID.intValue() +
                      " OR emailmessage.MovedToFolder=0) AND es.folderid=" + folderID.intValue() + "  GROUP BY emailmessage.messageid " +
                      "ORDER BY " + sortmem + sortStr + " ";

      if ((null != searchString) && (searchString.startsWith("ADVANCE:")))
      {
        int searchIndex = (searchString.toUpperCase()).indexOf("WHERE");
        strSQL = "SELECT emailmessage.messageid, emailmessage.messagedate, emailmessage.mailfrom, emailmessage.replyto, emailmessage.subject, emailmessage.size, " +
          "emailmessage.Priority, emailmessage.messageRead AS readstatus, es.folderID AS EmailFolder, " +
          "COUNT(at.attachmentid) AS noofattachments " +
          "FROM emailmessage LEFT JOIN emailmessagefolder es ON (emailmessage.messageid=es.messageID) " +
          "LEFT JOIN attachment at ON (emailmessage.messageID=at.messageid) " +
          "WHERE emailmessage.locallyDeleted = 'NO' "+privateString+" AND "+ searchString.substring((searchIndex+5),searchString.length())+"  GROUP BY emailmessage.messageid " +
          "ORDER BY " + sortmem + sortStr + " ";
      }

      if ((null != searchString) && (searchString.startsWith("SIMPLE :")))
      {
        searchString = searchString.substring(8);
        appendStr = " where 1=1 AND (emailmessage.messageid like '%" + searchString + "%' OR emailmessage.messagedate like '%" + searchString + "%' OR emailmessage.mailfrom like '%" + searchString + "%' OR emailmessage.subject like '%h%' OR emailmessage.size like '%" + searchString + "%') and ";
        strSQL = strSQL.replaceFirst("where ", appendStr);
      }


      // ATTENTION!!!!! THE FOLLOWING CODE IS A **HACK* IN ORDER
      // TO GET RELATED INFO EMAIL HISTORY TO WORK!!! THIS IS NO
      // WAY THE BEST METHOD FOR COMPLETING THIS FUNCTIONALITY,
      // BUT TIME AND RESOURCES NECESSITATE THIS TYPE OF "GUERILLA"
      // PROGRAMMING. PLEASE DO NOT ATTEMPT TO EXTEND THE FUNCTIONALITY
      // OF THE FOLLOWING CODE; INSTEAD, SPEAK WITH YOUR PROJECT
      // MANAGER AND TELL THEM THIS PIECE OF FUNCTIONALITY NEEDS
      // TO BE RE-WRITTEN IN A MORE MANAGE-ABLE AND SCALABLE MANNER.
      if ((searchString != null) && (searchString.startsWith("ADVANCED-RELATED:")))
      {
        searchString = searchString.substring(17);
        strSQL = "SELECT emailmessage.messageid, emailmessage.messagedate, emailmessage.mailfrom, " +
                 "emailmessage.replyto, emailmessage.subject, emailmessage.size, emailmessage.Priority, " +
                 "emailmessage.messageRead AS readstatus, es.folderID AS EmailFolder, COUNT(at.attachmentid) AS noofattachments " +
                 "FROM emailmessagefolder es LEFT JOIN emailmessage  ON " +
                 "(es.messageid=emailmessage.messageid) LEFT OUTER JOIN " +
                 "attachment at ON (emailmessage.messageid=at.messageid) WHERE " +
                 searchString + " AND emailmessage.locallyDeleted = 'NO' "+privateString+" AND (emailmessage.MovedToFolder=" + folderID.intValue() +
                 " OR emailmessage.MovedToFolder=0) GROUP BY emailmessage.messageid ORDER BY " +
                 sortmem + sortStr + " ";
                 //+ " LIMIT " + (beginindex - 1) + " ," + (endindex + 1);
      }
      // END REALLY BAD METHOD FOR ACHEIVING FUNCTIONALITY


      cvdl.setSqlQuery(strSQL);

      Collection col = cvdl.executeQuery();
      Iterator it = col.iterator();
      int i = 0;

      while (it.hasNext())
      {
        i++;
        HashMap hm = (HashMap)it.next();
        int messageID = ((Long)hm.get("messageid")).intValue();
        StringMember subject;
        StringMember fromAddress;
        StringMember toAddress;
        StringMember messageSize;
        StringMember attachmentNumber;
        StringMember readIndication;
        StringMember priority;
        DateMember dateReceived;
        IntMember intmem = new IntMember("messageid", messageID, 10, "URL", 'T', false, 10);
        int emailFolderIDx = ((Long)hm.get("EmailFolder")).intValue();
        IntMember emailFolderID = new IntMember("EmailFolder", emailFolderIDx, 10, "URL", 'T', false, 10);

        if (hm.get("subject") != null)
        {
          subject = new StringMember("Subject", (String) hm.get("subject"), 10, "", 'T', true);
        }else{
          subject = new StringMember("Subject", "", 10, "", 'T', true);
        }

        if (hm.get("mailfrom") != null)
        {
          String formattedAddress = (String)hm.get("mailfrom");
          formattedAddress = formattedAddress.replaceAll("<", "&lt;");
          formattedAddress = formattedAddress.replaceAll(">", "&gt;");
          fromAddress = new StringMember("From", formattedAddress, 10, "URL", 'T', true);
        }else{
          fromAddress = new StringMember("From", "", 10, "URL", 'T', true);
        }

        toAddress = new StringMember("To", getTOList(messageID), 10, "URL", 'T', true);
        if (hm.get("messagedate") != null)
        {
          dateReceived = new DateMember("Received", (java.util.Date) hm.get("messagedate"), 10, "URL", 'T', false, 100, "EST");
        }else{
          dateReceived = new DateMember("Received", (new java.util.Date()), 10, "URL", 'T', false, 100, "EST");
        }

        /*
         * Determine KB, MB, or GB for email size.
         */
        if (hm.get("size") != null)
        {
          float size = ((Integer)hm.get("size")).floatValue();
          DecimalFormat df = new DecimalFormat("###.#");
          Integer s = new Integer((int)size);
          String sizeStr = s.toString();
          if (size > 1000000000)
          {
            size /= 1073741824;          // 1GB
            sizeStr = df.format(size) + "GB";
          } else if (size > 1000000) {
            size /= 1048576;            // 1MB
            sizeStr = df.format(size) + "MB";
          } else if (size > 1000) {
            size /= 1024;               // 1KB
            sizeStr = df.format(size) + "KB";
          }
          messageSize = new StringMember("Size", sizeStr, 10, "URL", 'T', false);
        }else{
          messageSize = new StringMember("Size", "1KB", 10, "URL", 'T', false);
        }

        if (hm.get("noofattachments") != null)
        {
          attachmentNumber = new StringMember("AttIndication", "" + ((Number)hm.get("noofattachments")).intValue(), 10, "URL", 'T', false);
        }else{
          attachmentNumber = new StringMember("AttIndication", "", 10, "URL", 'T', false);
        }

        if (hm.get("readstatus") != null)
        {
          readIndication = new StringMember("ReadIndication", (String) hm.get("readstatus"), 10, "URL", 'T', true);
        }else{
          readIndication = new StringMember("ReadIndication", "", 10, "URL", 'T', true);
        }

        if (hm.get("Priority") != null)
        {
          priority = new StringMember("Priority", (String) hm.get("Priority"), 10, "URL", 'T', true);
        }else{
          priority = new StringMember("Priority", "MEDIUM", 10, "URL", 'T', true);
        }


        EmailListElement ele = new EmailListElement(messageID);
        ele.put("MessageID", intmem);
        ele.put("Subject", subject);
        ele.put("From", fromAddress);
        ele.put("To", toAddress);
        ele.put("Received", dateReceived);
        ele.put("Size", messageSize);
        ele.put("AttIndication", attachmentNumber);
        ele.put("ReadIndication", readIndication);
        ele.put("Priority", priority);
        ele.put("EmailFolder", emailFolderID);

        StringBuffer sb = new StringBuffer("00000000000");
        sb.setLength(11);
        String str = (new Integer(i)).toString();
        sb.replace((sb.length() - str.length()), (sb.length()), str);
        String newOrd = sb.toString();

        emailList.put(newOrd, ele);
        emailList.setTotalNoOfRecords(emailList.size());
        emailList.setListType("Email");
        emailList.setBeginIndex(beginindex);
        emailList.setEndIndex(endindex);
      }   // end while(it.hasNext())
      cvdl.clearParameters();
    }catch(Exception e){
      System.out.println("[Exception][EmailEJB.getEmailList] Exception Thrown: "+e);
      e.printStackTrace();
    }finally{
      cvdl.destroy();
      cvdl = null;
    }
    if (emailList == null)
    {
      emailList = new EmailList();
    }
    return emailList;
  }   // end getEmailList() method
View Full Code Here

   * @param individualID The individualID of the user retreiving the list.
   * @return EmailList object (DisplayList) containing records found.
   */
  public EmailList getRelatedEmailList(HashMap searchCondition, int individualID)
  {
    EmailList emailList = new EmailList();
    CVDal cvdl = new CVDal(this.dataSource);

    try
    {
    String sortmember = (String)searchCondition.get("sortmem");
      String sortmem = (String)searchCondition.get("sortmem");
      Character chr = (Character)searchCondition.get("sortType");
      String contactType = (String)searchCondition.get("contactType");
      String contactID = (String)searchCondition.get("contactID");

      if (sortmem.equals("From"))
      {
        sortmem = "em.MailFrom";
      }

      if (sortmem.equals("To"))
      {
        sortmem = "em.ReplyTo";
      }

      if (sortmem.equals("Received"))
      {
        sortmem = "em.MessageID";
      }

      if (sortmem.equals("Subject"))
      {
        sortmem = "em.Subject";
      }

      char sorttype  = chr.charValue();
      String sortType = "";
      if (sorttype == 'D')
      {
        sortType = " DESC ";
      }

      String sqlQuery = "";
      if (contactType != null && contactType.equals("1"))
      {
        sqlQuery = "SELECT em.MessageID, em.Subject, em.MessageDate, em.MailFrom, em.ReplyTo, " +
                   "em.Size, em.Priority, em.MessageRead AS readstatus, es.FolderID AS EmailFolder FROM emailmessage em " +
                   "LEFT JOIN emailrecipient er ON (em.MessageID=er.MessageID) LEFT JOIN  " +
                   "emailmessagefolder es ON (em.MessageID = es.MessageID) LEFT JOIN  " +
                   "methodofcontact moc ON (er.Address like concat('%',moc.Content,'%')) LEFT JOIN  " +
                   "mocrelate mr ON (moc.MOCID=mr.MOCID) LEFT JOIN individual i  " +
                   "ON (mr.ContactID=i.IndividualID) WHERE mr.ContactType=2  " +
                   "AND moc.MOCType=1 AND es.FolderID IS NOT NULL AND i.Entity="+contactID+" UNION  " +
                   "SELECT em.MessageID, em.Subject, em.MessageDate, em.MailFrom,  " +
                   "em.ReplyTo, em.Size, em.Priority, em.MessageRead AS readstatus,  " +
                   "es.FolderID AS EmailFolder FROM emailmessage em  " +
                   "LEFT JOIN emailrecipient er ON (em.MessageID=er.MessageID)  " +
                   "LEFT JOIN emailmessagefolder es ON (em.MessageID = es.MessageID)  " +
                   "LEFT JOIN methodofcontact moc ON (er.Address like concat('%',moc.Content,'%'))  " +
                   "LEFT JOIN mocrelate mr ON (moc.MOCID=mr.MOCID)  " +
                   "WHERE mr.ContactType=1 AND moc.MOCType=1 AND es.FolderID IS NOT NULL AND " +
                   "mr.ContactID="+contactID+" order by "+sortmem+sortType;
      }else{
        sqlQuery = "SELECT em.MessageID, em.Subject, em.MessageDate, em.MailFrom, " +
                   "em.ReplyTo, em.Size, em.Priority, em.MessageRead AS readstatus, es.FolderID AS EmailFolder " +
                   "FROM emailmessage em LEFT JOIN emailrecipient er ON (em.MessageID=er.MessageID) " +
                   "LEFT JOIN emailmessagefolder es ON (em.MessageID = es.MessageID) " +
                   "LEFT JOIN methodofcontact moc ON (er.Address like concat('%',moc.Content,'%')) " +
                   "LEFT JOIN mocrelate mr ON (moc.MOCID=mr.MOCID) " +
                   "WHERE mr.ContactType="+contactType+" AND moc.MOCType=1 AND es.FolderID IS NOT NULL AND " +
                   "mr.ContactID="+contactID+" order by "+sortmem+sortType;
      }

      cvdl.setSqlQuery(sqlQuery);

      Collection sqlResults = cvdl.executeQuery();

      if (sqlResults != null)
      {
        Iterator iter = sqlResults.iterator();
        int i = 0;
        while (iter.hasNext())
        {
          i++;
          HashMap sqlRow = (HashMap)iter.next();

          int messageID = ((Long)sqlRow.get("MessageID")).intValue();

          IntMember intmem = new IntMember("messageid", messageID, 10, "URL", 'T', false, 10);
          int emailFolderIDx = ((Long)sqlRow.get("EmailFolder")).intValue();
          IntMember emailFolderID = new IntMember("EmailFolder", emailFolderIDx, 10, "URL", 'T', false, 10);

          StringMember subject = new StringMember("Subject", (String) sqlRow.get("Subject"), 10, "", 'T', true);
          StringMember fromAddress = new StringMember("From", (String) sqlRow.get("MailFrom"), 10, "URL", 'T', true);
          StringMember toAddress = new StringMember("To", getTOList(messageID), 10, "URL", 'T', true);
          DateMember dateReceived = new DateMember("Received", (java.util.Date) sqlRow.get("MessageDate"), 10, "URL", 'T', false, 100, "EST");

          StringMember messageSize = null;
          if (sqlRow.get("Size") != null)
          {
            messageSize = new StringMember("Size", ((Number)sqlRow.get("Size")).toString() + " kb", 10, "URL", 'T', false);
          }else{
            messageSize = new StringMember("Size", "", 10, "URL", 'T', false);
          }
          StringMember attachmentNumber = new StringMember("AttIndication", "0", 10, "URL", 'T', false);
          StringMember readIndication = new StringMember("ReadIndication", (String) sqlRow.get("readstatus"), 10, "URL", 'T', true);
          StringMember priority = new StringMember("Priority", (String) sqlRow.get("Priority"), 10, "URL", 'T', true);

        EmailListElement ele = new EmailListElement(messageID);

        ele.put("MessageID", intmem);
        ele.put("Subject", subject);
        ele.put("From", fromAddress);
        ele.put("To", toAddress);
        ele.put("Received", dateReceived);
        ele.put("Size", messageSize);
        ele.put("AttIndication", attachmentNumber);
        ele.put("ReadIndication", readIndication);
        ele.put("Priority", priority);
        ele.put("EmailFolder", emailFolderID);

        StringBuffer sb = new StringBuffer("00000000000");
        sb.setLength(11);
        String str = (new Integer(i)).toString();
        sb.replace((sb.length() - str.length()), (sb.length()), str);
        String newOrd = sb.toString();

        emailList.put(newOrd, ele);
      }   // end while (iter.hasNext())
      emailList.setTotalNoOfRecords(emailList.size());
      emailList.setListType("Email");
      emailList.setBeginIndex(1);
      emailList.setEndIndex(emailList.size());
      emailList.setStartAT(1);
      emailList.setEndAT(emailList.size());
      emailList.setSortMember(sortmember);
      emailList.setSortType(sorttype);
    }   // end if (sqlResults != null)
    }catch(Exception e){
      e.printStackTrace();    // TODO: remove stacktrace
    }finally{
      cvdl.clearParameters();
View Full Code Here

    if (! CVUtility.isModuleVisible("Email", individualID,this.dataSource))
    {
      throw new AuthorizationFailedException("[EmailFacadeBean.getEmailList() for individualID = " + individualID);
    }

    EmailList emailList = new EmailList();

    try
    {
      InitialContext ic = CVUtility.getInitialContext();
      EmailLocalHome home = (EmailLocalHome)ic.lookup("local/EmailList");
      EmailLocal remote =  home.create();
      remote.setDataSource(this.dataSource);
      emailList = (EmailList)remote.getEmailList(individualID, info);
    }catch(Exception e){
      System.out.println("[Exception][EmailFacadeBean.getEmailList] Exception Thrown: "+e);
      e.printStackTrace();
    }

    if (emailList == null)
    {
      emailList = new EmailList();
    }
    return emailList;
  }
View Full Code Here

   * @param individualID The individualID of the user retreiving the list.
   * @return EmailList object (DisplayList) containing records found.
   */
  public EmailList getRelatedEmailList(HashMap searchCondition, int individualID)
  {
    EmailList emailList = new EmailList();
    try
    {
      InitialContext ic = CVUtility.getInitialContext();
      EmailLocalHome home = (EmailLocalHome)ic.lookup("local/EmailList");
      EmailLocal remote =  home.create();
View Full Code Here

TOP

Related Classes of com.centraview.email.EmailList

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.