Examples of TicketForm


Examples of com.centraview.support.ticket.TicketForm

      if (tVO != null) {
        TicketVO ticketVO = remote.getTicketBasicRelations(individualId, tVO.getTicketId());

        if (ticketVO != null) {
          TicketForm ticketForm = new TicketForm();
          ticketForm.setSubject(ticketVO.getTitle());
          ticketForm.setDetail(ticketVO.getDetail());
          ticketForm.setId(new Integer(ticketVO.getId()).toString());
          ticketForm.setEntityid(new Integer(ticketVO.getRefEntityId()).toString());
          ticketForm.setContactid(new Integer(ticketVO.getRefIndividualId()).toString());
          ticketForm.setContact(ticketVO.getRefIndividualName());
         
          EntityVO entityVO = ticketVO.getEntityVO();
          if (entityVO != null) {
            String entityName = entityVO.getName();
            ticketForm.setEntityname(entityName);
           
            AddressVO primaryAdd = entityVO.getPrimaryAddress();
           
            if (primaryAdd != null) {
              String address = "";
              if (primaryAdd.getStreet1() != null && !primaryAdd.getStreet1().equals("")) {
                address += primaryAdd.getStreet1();
              }
              if (primaryAdd.getStreet2() != null && !primaryAdd.getStreet2().equals("")) {
                address +=", "+ primaryAdd.getStreet2()+"\n";
              } else {
                address += "\n";
              }
              if (primaryAdd.getCity() != null && !primaryAdd.getCity().equals("")) {
                address += primaryAdd.getCity();
              }
              if (primaryAdd.getStateName() != null && !primaryAdd.getStateName().equals("")) {
                address += ", "+ primaryAdd.getStateName();
              }
              if (primaryAdd.getZip() != null && !primaryAdd.getZip().equals("")) {
                address += " "+ primaryAdd.getZip();
              }
              if (primaryAdd.getCountryName() != null && !primaryAdd.getCountryName().equals("")) {
                address += ", "+ primaryAdd.getCountryName();
              }
              ticketForm.setAddress(address);
              if (primaryAdd.getWebsite() != null) {
                ticketForm.setWebsite(primaryAdd.getWebsite());
              }
            }
           
            Collection mocList = entityVO.getMOC();
            Iterator iterator = mocList.iterator();
            while (iterator.hasNext()) {
              MethodOfContactVO moc  = (MethodOfContactVO) iterator.next();
              if (moc.getMocType() == 1 && moc.getIsPrimary().equalsIgnoreCase("YES")) {
                ticketForm.setEmail(moc.getContent());
              } else if (moc.getMocType() == 4) {
                ticketForm.setPhone(moc.getContent());
              }
            }
          }
          request.setAttribute("ticketform", ticketForm);
         
View Full Code Here

Examples of com.centraview.support.ticket.TicketForm

    try {
      HttpSession session = request.getSession();
      int individualId = ((UserObject)session.getAttribute("userobject")).getIndividualID();
      TicketVO ticketVO = new TicketVO();
      TicketForm ticketForm = (TicketForm)form;

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

      if (ticketForm.getSubject() != null) {
        ticketVO.setTitle(ticketForm.getSubject());
      }
     
      if (ticketForm.getDetail() != null) {
        ticketVO.setDetail(ticketForm.getDetail());
      }

      if (ticketForm.getPriority() != null) {
        ticketVO.setPriorityId(Integer.parseInt(ticketForm.getPriority()));
      }else{
        ticketVO.setPriorityId(Integer.parseInt(request.getParameter("priority")));
      }
     
      if (ticketForm.getStatus() != null) {
        ticketVO.setStatusId(Integer.parseInt(ticketForm.getStatus()));
      }

      if ((ticketForm.getManagerid() != null) && (!ticketForm.getManagerid().equals(""))) {
        ticketVO.setManagerId(Integer.parseInt(ticketForm.getManagerid()));
      }
     
      if ((ticketForm.getAssignedtoid() != null) && (!ticketForm.getAssignedtoid().equals(""))) {
        ticketVO.setAssignedToId(Integer.parseInt(ticketForm.getAssignedtoid()));
      }

      if ((ticketForm.getEntityid() != null) && (!ticketForm.getEntityid().equals(""))) {
        ticketVO.setRefEntityId(Integer.parseInt(ticketForm.getEntityid()));
      }

      if ((ticketForm.getContactid() != null) && (!ticketForm.getContactid().equals(""))) {
        ticketVO.setRefIndividualId(Integer.parseInt(ticketForm.getContactid()));
      }
      ticketVO.setCreatedBy(individualId);
      ticketVO.setCustomField(getCustomFieldVO(request, response));

      remote.addTicket(individualId, ticketVO);
View Full Code Here

Examples of com.centraview.support.ticket.TicketForm

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

      TicketVO ticketVO = new TicketVO();
      TicketForm ticketForm = (TicketForm)form;

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

      if (ticketForm.getSubject() != null) {
        ticketVO.setTitle(ticketForm.getSubject());
      }
     
      if (ticketForm.getDetail() != null) {
        ticketVO.setDetail(ticketForm.getDetail());
      }

      if (ticketForm.getPriority() != null) {
        ticketVO.setPriorityId(Integer.parseInt(ticketForm.getPriority()));
      }else{
        ticketVO.setPriorityId(Integer.parseInt(request.getParameter("priority")));
      }
     
      if (ticketForm.getStatus() != null) {
        ticketVO.setStatusId(Integer.parseInt(ticketForm.getStatus()));
      }

      if ((ticketForm.getManagerid() != null) && (!ticketForm.getManagerid().equals(""))) {
        ticketVO.setManagerId(Integer.parseInt(ticketForm.getManagerid()));
      }
     
      if ((ticketForm.getAssignedtoid() != null) && (!ticketForm.getAssignedtoid().equals(""))) {
        ticketVO.setAssignedToId(Integer.parseInt(ticketForm.getAssignedtoid()));
      }

      if ((ticketForm.getEntityid() != null) && (!ticketForm.getEntityid().equals(""))) {
        ticketVO.setRefEntityId(Integer.parseInt(ticketForm.getEntityid()));
      }

      if ((ticketForm.getContactid() != null) && (!ticketForm.getContactid().equals(""))) {
        ticketVO.setRefIndividualId(Integer.parseInt(ticketForm.getContactid()));
      }

      ticketVO.setCreatedBy(individualId);
      ticketVO.setCustomField(getCustomFieldVO(request, response));
      ticketVO.setId(Integer.parseInt(ticketForm.getId()));
      remote.updateTicket(individualId, ticketVO);

      String closeornew = (String)request.getParameter("closeornew");
      String saveandclose = null;
      String saveandnew = null;
      if (closeornew.equals("close")) {
        saveandclose = "saveandclose";
      } else if (closeornew.equals("new")) {
        ticketForm.setSubject("");
        ticketForm.setDetail("");
        ticketForm.setEntityname("");
        ticketForm.setAssignedto("");
        ticketForm.setContact("");
        ticketForm.setManagername("");
        saveandnew = "saveandnew";
      }

      // set refresh and closewindow flag
      if (saveandclose != null) {
View Full Code Here

Examples of com.centraview.support.ticket.TicketForm

      SupportFacade remote = (SupportFacade)sfh.create();
      remote.setDataSource(dataSource);

      TicketVO tVO = remote.getTicketBasicRelations(individualId, Integer.parseInt(request.getParameter("ticketId").toString()));

      TicketForm ticketForm = (TicketForm)form;

      if (tVO != null) {
        if (ticketForm != null) {
          ticketForm.setSubject(tVO.getTitle());
          ticketForm.setDetail(tVO.getDetail());
          ticketForm.setId(new Integer(tVO.getId()).toString());
          ticketForm.setEntityid(new Integer(tVO.getRefEntityId()).toString());
          ticketForm.setContactid(new Integer(tVO.getRefIndividualId()).toString());
          ticketForm.setContact(tVO.getRefIndividualName());
         
          EntityVO entityVO = tVO.getEntityVO();
         
          if (entityVO != null) {
            String entityName = entityVO.getName();
            ticketForm.setEntityname(entityName);
            AddressVO primaryAdd = entityVO.getPrimaryAddress();
           
            if (primaryAdd != null) {
              String address = "";
              if (primaryAdd.getStreet1() != null && !primaryAdd.getStreet1().equals("")) {
                address += primaryAdd.getStreet1();
              }
              if (primaryAdd.getStreet2() != null && !primaryAdd.getStreet2().equals("")) {
                address +=", "+ primaryAdd.getStreet2()+"\n";
              } else {
                address += "\n";
              }
              if (primaryAdd.getCity() != null && !primaryAdd.getCity().equals("")) {
                address += primaryAdd.getCity();
              }
              if (primaryAdd.getStateName() != null && !primaryAdd.getStateName().equals("")) {
                address += ", "+ primaryAdd.getStateName();
              }
              if (primaryAdd.getZip() != null && !primaryAdd.getZip().equals("")) {
                address += " "+ primaryAdd.getZip();
              }
              if (primaryAdd.getCountryName() != null && !primaryAdd.getCountryName().equals("")) {
                address += ", "+ primaryAdd.getCountryName();
              }
              ticketForm.setAddress(address);
              if (primaryAdd.getWebsite() != null) {
                ticketForm.setWebsite(primaryAdd.getWebsite());
              }
            }
           
            Collection mocList = entityVO.getMOC();
            Iterator iterator = mocList.iterator();
            while (iterator.hasNext()) {
              MethodOfContactVO moc  = (MethodOfContactVO) iterator.next();
              if (moc.getMocType() == 1 && moc.getIsPrimary().equalsIgnoreCase("YES")) {
                ticketForm.setEmail(moc.getContent());
              } else if (moc.getMocType() == 4) {
                ticketForm.setPhone(moc.getContent());
              }
            }
          }
          request.setAttribute("ticketform", ticketForm);
        }
View Full Code Here

Examples of com.centraview.support.ticket.TicketForm

          return mapping.findForward(FORWARD_final);
        }
      }
     
      TicketVO ticketVO = new TicketVO();
      TicketForm dynaForm = (TicketForm)form;

      TicketHome th = (TicketHome)CVUtility.getHomeObject("com.centraview.support.ticket.TicketHome", "Ticket");
      Ticket t = th.create();
      t.setDataSource(dataSource);

      TicketVO tVO = t.getTicketBasicRelations(individualId, ticketId);

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

      CvFileHome fileHome = (CvFileHome)CVUtility.getHomeObject("com.centraview.file.CvFileHome", "CvFile");
      CvFile cvFile = fileHome.create();
      cvFile.setDataSource(dataSource);
      FileList fileList = null;
     
      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");
      timeSlipColumns.addElement("Duration");
      timeSlipColumns.addElement("CreatedBy");
      timeSlipColumns.addElement("Date");
      timeSlipColumns.addElement("StartTime");
      timeSlipColumns.addElement("EndTime");

      TimeSlipList timesliplist = new TimeSlipList();

      ListGenerator lg = ListGenerator.getListGenerator(dataSource); //get the List Generator object for Listing

      String searchTimeSlipString =
        "ADVANCE:select ts.TimeSlipID, ts.Description, ts.CreatedBy, individual.FirstName,"
          + "individual.LastName, ts.BreakTime, ts.Date, ts.Start, ts.End "
          + "from timeslip  ts left outer join individual on "
          + "ts.CreatedBy = individual.IndividualID where ts.ticketid="
          + ticketId;

      timesliplist = (TimeSlipList)lg.getTimeSlipList(individualId, 1, 200, searchTimeSlipString, "Description");
      timesliplist = setTimeSlipLinks(timesliplist, ticketId);

      Vector expenseColumns = new Vector();

      expenseColumns.addElement("Reference");
      expenseColumns.addElement("Amount");
      expenseColumns.addElement("Created");
      expenseColumns.addElement("Creator");

      ExpenseList expenselist = new ExpenseList();

      String searchExpenseString =
        "ADVANCE:select expense.ExpenseID,expense.Amount,expense.Created,entity.name as Reference ,expense.Status, concat(individual.firstname,' ',individual.lastname) as Creator,individual.IndividualID "
          + "from expense left outer join individual on expense.creator = individual.individualid left outer join entity on expense.entityid = entity.entityid "
          + " where expense.linestatus != 'deleted'  and expense.ticket="
          + ticketId
          + " group by expense.ExpenseID,expense.Amount,expense.Created,Reference ,expense.Status, Creator";

      expenselist = (ExpenseList)lg.getExpenseList(individualId, 1, 200, searchExpenseString, "Reference"); //called when the request for the list is for first time
      expenselist = setExpenseLinks(expenselist, ticketId);

      request.setAttribute("closeDate", tVO.getCloseDate());
      request.setAttribute("openDate", tVO.getCreatedOn());
      request.setAttribute("modifyDate", tVO.getModifiedOn());
      request.setAttribute("threadlist", threadList);
      request.setAttribute("filelist", fileList);
      request.setAttribute("OCStatus", tVO.getOCStatus());
      request.setAttribute("timesliplist", timesliplist);
      request.setAttribute("timeSlipColumns", timeSlipColumns);
      request.setAttribute("expenselist", expenselist);
      request.setAttribute("expenseColumns", expenseColumns);

      dynaForm.setId(new Integer(tVO.getId()).toString());
      dynaForm.setSubject(tVO.getTitle());
      dynaForm.setDetail(tVO.getDetail());
      dynaForm.setStatus(new Integer(tVO.getStatusId()).toString());
      dynaForm.setPriority(new Integer(tVO.getPriorityId()).toString());
      dynaForm.setEntityid(new Integer(tVO.getRefEntityId()).toString());
      dynaForm.setAssignedto(tVO.getAssignedToName());
      dynaForm.setAssignedtoid(new Integer(tVO.getAssignedToId()).toString());
      dynaForm.setContact(tVO.getRefIndividualName());
     
      EntityVO entityVO = tVO.getEntityVO();
      if (entityVO != null) {
        String entityName = entityVO.getName();
        dynaForm.setEntityname(entityName);
        AddressVO primaryAdd = entityVO.getPrimaryAddress();
       
        if (primaryAdd != null) {
          String address = "";
          if (primaryAdd.getStreet1() != null && !primaryAdd.getStreet1().equals("")) {
            address += primaryAdd.getStreet1();
          }
          if (primaryAdd.getStreet2() != null && !primaryAdd.getStreet2().equals("")) {
            address +=", "+ primaryAdd.getStreet2()+"\n";
          } else {
            address += "\n";
          }
          if (primaryAdd.getCity() != null && !primaryAdd.getCity().equals("")) {
            address += primaryAdd.getCity();
          }
          if (primaryAdd.getStateName() != null && !primaryAdd.getStateName().equals("")) {
            address += ", "+ primaryAdd.getStateName();
          }
          if (primaryAdd.getZip() != null && !primaryAdd.getZip().equals("")) {
            address += " "+ primaryAdd.getZip();
          }
          if (primaryAdd.getCountryName() != null && !primaryAdd.getCountryName().equals("")) {
            address += ", "+ primaryAdd.getCountryName();
          }
          dynaForm.setAddress(address);
          if (primaryAdd.getWebsite() != null) {
            dynaForm.setWebsite(primaryAdd.getWebsite());
          }
        }
       
        Collection mocList = entityVO.getMOC();
        Iterator iterator = mocList.iterator();
        while (iterator.hasNext()) {
          MethodOfContactVO moc  = (MethodOfContactVO) iterator.next();
          if (moc.getMocType() == 1 && moc.getIsPrimary().equalsIgnoreCase("YES")) // this is for email
          {
            dynaForm.setEmail(moc.getContent());
          } else if (moc.getMocType() == 4) {
            dynaForm.setPhone(moc.getContent());
          }
        }
      }

      dynaForm.setContactid(new Integer(tVO.getRefIndividualId()).toString());
      dynaForm.setManagername(tVO.getManagerName() );
      dynaForm.setManagerid(new Integer(tVO.getManagerId()).toString());

System.out.println("dynaForm = [" + dynaForm + "]");

      FORWARD_final = FORWARD_newticket;
      request.setAttribute(SupportConstantKeys.TYPEOFSUBMODULE, "Ticket");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.