Package com.centraview.support.thread

Examples of com.centraview.support.thread.ThreadList


     
      if (tVO.getId() != 0) {
        fileList = remoteFile.getAllTicketFiles(individualID, tVO.getId());
      }
     
      ThreadList threadList = remote.getThreadList(individualID, tVO.getId());
      threadList = setLinksfunction(threadList);
      Vector timeSlipColumns = new Vector();

      timeSlipColumns.addElement("Description");
      timeSlipColumns.addElement("CreatedBy");
View Full Code Here


      if (tVO.getId() != 0) {
        fileList = cvFile.getAllTicketFiles(individualId, tVO.getId());
        fileList = setLinksFunction(fileList);
      }

      ThreadList threadList = remote.getThreadList(individualId, tVO.getId());
      threadList = setLinksfunction(threadList);

      ListGenerator lg1 = ListGenerator.getListGenerator(dataSource);
      HashMap hmDispLists = lg1.getDisplayLists();

      if (hmDispLists != null) {
        hmDispLists.put(new Long(threadList.getListID()), threadList);
      }

      Vector timeSlipColumns = new Vector();

      timeSlipColumns.addElement("Description");
View Full Code Here

      SupportFacadeHome supFacade = (SupportFacadeHome) CVUtility.getHomeObject(
          "com.centraview.support.supportfacade.SupportFacadeHome", "SupportFacade");
      SupportFacade remote = supFacade.create();
      remote.setDataSource(dataSource);

      ThreadList threadList = remote.getThreadList(individualID, tVO.getId());
      String threadValues = this.setLinksfunction(threadList);

      EntityVO entityVO = tVO.getEntityVO();
      if (entityVO != null) {
        String entityName = entityVO.getName();
View Full Code Here

    return faqlist;
  }

  public ThreadList getThreadList(int userID, int curTicketID)
  {
    ThreadList threadlist = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      SupportListLocalHome home = (SupportListLocalHome) ic.lookup("local/SupportList");
     SupportListLocal remote = home.create();
      remote.setDataSource(this.dataSource);
View Full Code Here

  }


  public ThreadList getThreadList(int userID, int curTicketID)
  {
    ThreadList threadList = new ThreadList();

    CVDal cvdl = new CVDal(dataSource);

    Collection colList = null;

    cvdl.setSql("support.ticket.getthreadforticket");

    cvdl.setInt(1, curTicketID);
    colList = cvdl.executeQuery();
    cvdl.clearParameters();

    cvdl.destroy();

    if (colList.size() > 0)
    {
      Iterator it = colList.iterator();
      int i = 0;

      while (it.hasNext())
      {
        i++;
        HashMap hm = (HashMap)it.next();
        int threadID = ((Long)hm.get("threadid")).intValue();

        try
        {
          IntMember intThreadID = new IntMember("ThreadID", threadID, 10, "", 'T', false, 10);

          /*
           * Make sure that no more than 255 characters get passed to the list.
           * For title and description.
           */
          StringMember strTitle = null;
          String str = (String)hm.get("title");
          String subStr = null;
          if (str != null)
          {
            if (str.length() >= 255)
              subStr = str.substring(0, 255);
            else
              subStr = str;
            strTitle = new StringMember("Title", subStr, 10, "", 'T', true);
          } else {
            strTitle = new StringMember("Title", null, 10, "", 'T', true);
          }

          StringMember strDesc = null;
          str = (String)hm.get("detail");
          if (str != null)
          {
            if (str.length() >= 255)
            {
              subStr = str.substring(0, 252);
              subStr = subStr.concat("...");
            } else {
              subStr = str;
            }
            strDesc = new StringMember("Description", subStr, 10, "", 'T', false);
          } else
          {
            strDesc = new StringMember("Description", null, 10, "", 'T', false);
          }

          StringMember strPriority = new StringMember("Priority", (String)hm.get("priorityname"), 10, "", 'T', false);
          StringMember strCreatedBy = new StringMember("CreatedBy", (String)hm.get("createdby"), 10, "", 'T', true);
          //                  StringMember strReference = new
          // StringMember("Reference",(String)hm.get("reference"), 10, "", 'T',
          // false);

          IntMember intIndividualID = null;
          IntMember intEntityID = null;

          if ((hm.get("creator") != null))
            intIndividualID = new IntMember("IndividualID", ((Long)hm.get("creator")).intValue(), 10, "", 'T', false, 10);
          else
            intIndividualID = new IntMember("IndividualID", 0, 10, "", 'T', false, 10);

          if ((hm.get("entityid") != null))
            intEntityID = new IntMember("EntityID", ((Long)hm.get("entityid")).intValue(), 10, "", 'T', false, 10);
          else
            intEntityID = new IntMember("EntityID", 0, 10, "", 'T', false, 10);

          Timestamp dtCreated = null;
          DateMember dmCreated = null;

          String timezoneid = "EST";

          if ((hm.get("created") != null))
          {
            dtCreated = (Timestamp)hm.get("created");
            dmCreated = new DateMember("Created", dtCreated, 10, "", 'T', false, 1, timezoneid);
          } else {
            dmCreated = new DateMember("Created", null, 10, "", 'T', false, 1, timezoneid);
          }

          ThreadListElement threadlistelement = new ThreadListElement(threadID);

          threadlistelement.put("ThreadID", intThreadID);
          threadlistelement.put("Description", strDesc);
          threadlistelement.put("Title", strTitle);
          threadlistelement.put("Created", dmCreated);
          threadlistelement.put("Priority", strPriority);
          threadlistelement.put("CreatedBy", strCreatedBy);
          //  threadlistelement.put("Reference",strReference);

          threadlistelement.put("IndividualID", intIndividualID);
          threadlistelement.put("EntityID", intEntityID);

          StringBuffer stringbuffer = new StringBuffer("00000000000");
          stringbuffer.setLength(11);
          String s3 = (new Integer(i)).toString();
          stringbuffer.replace(stringbuffer.length() - s3.length(), stringbuffer.length(), s3);
          String s4 = stringbuffer.toString();

          threadList.put(s4, threadlistelement);
        } catch (Exception e) {
          logger.debug(" [Exception] SupportListEJB.getThreadList " + e);
          e.printStackTrace();
        }
      }
View Full Code Here

TOP

Related Classes of com.centraview.support.thread.ThreadList

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.