Package com.centraview.support.supportfacade

Examples of com.centraview.support.supportfacade.SupportFacade


  private void setSupportLists()
  {
    try {
      SupportFacadeHome cfh = (SupportFacadeHome)CVUtility.getHomeObject(
          "com.centraview.support.supportfacade.SupportFacadeHome", "SupportFacade");
      SupportFacade remote = cfh.create();
      remote.setDataSource(this.dataSource);
      supportStatusList = remote.getStatusList();
      supportPriorityList = remote.getPriorityList();
    } catch (Exception e) {
      logger.error("[setSupportLists] Exception thrown.", e);
    }
  }
View Full Code Here


      HttpSession session = request.getSession();
      UserObject userObject = (UserObject) session.getAttribute("userobject");
      int individualID = userObject.getIndividualID();

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

      ThreadVO tVO = null;

      if (request.getParameter("rowId") != null) {
        tVO = remote.getThread(individualID, Integer.parseInt(request.getParameter("rowId")));
      } else {
        tVO = remote.getThread(individualID, Integer.parseInt(request.getAttribute("rowId").toString()));
      }

      TicketVO ticketVO = remote.getTicketBasicRelations(individualID, tVO.getTicketId());
      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());
View Full Code Here

      tVO.setDetail((String)dynaForm.get("threaddetail"));
      tVO.setCreatedBy(individualId);
      tVO.setOwner(individualId);

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

      remote.addThread(individualId, tVO);

      FORWARD_final = FORWARD_savenewthread;
    } catch (Exception e) {
      System.out.println("[Exception][SaveThreadHandler.execute] Exception Thrown: " + e);
      e.printStackTrace();
View Full Code Here

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

      SupportFacadeHome sfh = (SupportFacadeHome)CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome", "SupportFacade");
      SupportFacade remote = (SupportFacade)sfh.create();
      remote.setDataSource(dataSource);
      ThreadVO tVO = null;
     
      if (request.getParameter("rowId") != null) {
        tVO = remote.getThread(individualId, Integer.parseInt(request.getParameter("rowId")));
      } else {
        tVO = remote.getThread(individualId, Integer.parseInt(request.getAttribute("rowId").toString()));
      }

      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());
View Full Code Here

      if (request.getParameter("fileIds") != null) {
        fileIds = (String)request.getParameter("fileIds");
      }
     
      SupportFacadeHome supportFacade = (SupportFacadeHome)CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome", "SupportFacade");
      SupportFacade remote = (SupportFacade)supportFacade.create();
      remote.setDataSource(dataSource);

      // split string into array
      String[] fileIdArray = fileIds.split(",");
     
      // loop string array
      int[] idArray = new int[fileIdArray.length];
      for (int i = 0; i < fileIdArray.length; i++) {
        try {
          idArray[i] = Integer.parseInt(fileIdArray[i]);
        }catch(NumberFormatException nfe){
          // again, no contingency plan, give up
        }
      }
     
      remote.addFile(ticketId, idArray);
     
      request.setAttribute("ticketID", new Integer(ticketId));
      FORWARD_final = FORWARD_success;
    }catch (Exception e){
      System.out.println("[Exception] SaveAttachFileHandler.execute: " + e.toString());
View Full Code Here

      // initialize file vo
      CategoryVO categoryVO = new CategoryVO();
      CategoryForm catForm = (CategoryForm)form;


      SupportFacade remote =(SupportFacade)supportFacade.create();

      // set the VO from form bean data
      // set the CategoryVO
      if((String)catForm.getCategoryname() != null)
        categoryVO.setTitle((String)catForm.getCategoryname());

      if((String)catForm.getParentcategory() != null)
        categoryVO.setParent(Integer.parseInt((catForm.getParentcategory()).toString()));

      categoryVO.setCreatedBy(userId);
      categoryVO.setOwner(userId);

      if (catForm.getStatus() != null)
      {
        categoryVO.setStatus((String) catForm.getStatus());
      }

      if (catForm.getPublishToCustomerView() != null)
      {
        categoryVO.setPublishToCustomerView((String) catForm.getPublishToCustomerView());
      }

      rowID=remote.insertCategory(userId,categoryVO);

      FORWARD_final=  FORWARD_editsavecategory;

      String closeornew = (String)request.getParameter("closeornew");
      String saveandclose = null;
View Full Code Here

      QuestionVO QVO = null;

      if (request.getParameter(Constants.TYPEOFOPERATION).equals(SupportConstantKeys.EDIT)) {
        SupportFacadeHome sfh = (SupportFacadeHome) CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome",
            "SupportFacade");
        SupportFacade remote = (SupportFacade) sfh.create();
        remote.setDataSource(dataSource);
        QVO = remote.getQuestion(individualID, Integer.parseInt(request.getParameter("rowId")));
        qForm.set("title", QVO.getQuestion());
        qForm.set("answer", QVO.getAnswer());
        qForm.set("faqid", new Integer(QVO.getFaqId()).toString());
        FORWARD_final = FORWARD_editfaq;
      } else {
View Full Code Here

        // the int representation for use in the code below
        kbID = formKbID.intValue();
      }
     
      SupportFacadeHome supportFacade = (SupportFacadeHome)CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome", "SupportFacade");
      SupportFacade remote = (SupportFacade)supportFacade.create();
      remote.setDataSource(dataSource);

      KnowledgeVO kbVO = remote.getKB(individualID, kbID);
     
      kbForm.set("title", kbVO.getTitle());
      kbForm.set("detail", kbVO.getDetail());

System.out.println("\n\n\nkbForm = [" + kbForm + "]\n\n\n");     
View Full Code Here

      FaqVO faqDetail = remote.getFaq(individualID, faqID);

      faqForm.set("title", faqDetail.getTitle());
     
      SupportFacadeHome supFacade = (SupportFacadeHome)CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome", "SupportFacade");
      SupportFacade supRemote = supFacade.create();
      supRemote.setDataSource(dataSource);
     
      QuestionList questionList = supRemote.getQuestionList(individualID, faqID);

      ArrayList qList = new ArrayList();
     
      Set listkey = questionList.keySet();
      Iterator iter = listkey.iterator();
View Full Code Here

      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);

      FORWARD_final = FORWARD_editsavefile;
    } catch (Exception e) {
      System.out.println("[Exception][SaveTicketHandler.execute] Exception Thrown: " + e);
      e.printStackTrace();
View Full Code Here

TOP

Related Classes of com.centraview.support.supportfacade.SupportFacade

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.