Package com.centraview.support.supportfacade

Examples of com.centraview.support.supportfacade.SupportFacade


  ArrayList resultDeleteLog = new ArrayList();
  SupportFacadeHome supportFacadeHome=(SupportFacadeHome)CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome","SupportFacade");//call to SupportFacadeEJB
   
    try
    {
     SupportFacade remote=supportFacadeHome.create();
    remote.setDataSource(dataSource);
      for (int i=0; i<rowId.length; i++)
      {
        if(rowId[i] != null && !rowId[i].equals(""))
        {
          int elementID = Integer.parseInt(rowId[i]);
          try
          {
            remote.delete(individualId, elementID);
          } catch(AuthorizationFailedException ae) {
            String errorMessage = ae.getExceptionDescription();
            deleteLog.add(errorMessage);
          } catch(RemoteException re) {
            logger.error("[execute] Exception thrown.", re);
View Full Code Here


      }

      categoryVO.setCatid(catid);


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

      if ((String) catForm.getCategoryname() != null)
      {
        categoryVO.setTitle((String) catForm.getCategoryname());
      }

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

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

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

      FORWARD_final = FORWARD_editsavecategory;
      String closeornew = (String) request.getParameter("closeornew");
      String saveandclose = null;
      String saveandnew = null;

      if (closeornew.equals("close"))
      {
        saveandclose = "saveandclose";
      }
      else if (closeornew.equals("new"))
      {
        saveandnew = "saveandnew";
        catForm.setCategoryname("");
        FORWARD_final = "viewcategory";
      }

      // set refresh and closewindow flag
      if (saveandclose != null)
      {
        request.setAttribute("closeWindow", "true");
      }
      request.setAttribute("refreshWindow", "true");

      if ((typeOfOperation != null)
          && typeOfOperation.equalsIgnoreCase(SupportConstantKeys.DUPLICATE))
      {
        remote.duplicateCategory(individualID, categoryVO);
      }
      else
      {
        try
        {
          categoryVO.setModifiedBy(individualID);
          remote.updateCategory(individualID, categoryVO);
        }
        catch (KBException kbex)
        {

          ActionErrors allErrors = new ActionErrors();
View Full Code Here

      int individualID = userObject.getIndividualID();
      DynaActionForm faqForm = (DynaActionForm) form;
      String[] qids = request.getParameterValues("rowId");
      SupportFacadeHome sfh = (SupportFacadeHome) CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome",
          "SupportFacade");
      SupportFacade remote = (SupportFacade) sfh.create();
      remote.setDataSource(dataSource);
      int qid = 0;

      for (int i = 0; i < qids.length; i++)
      {
        qid = Integer.parseInt(qids[i]);
        remote.deleteQuestion(individualID, qid);
      }

      request.setAttribute("refreshWindow", "true");
      FORWARD_final = FORWARD_question;
    }
View Full Code Here

    int individualId = ((UserObject)session.getAttribute("userobject")).getIndividualID();
    ArrayList deleteLog = new ArrayList();
    String rowId[] = request.getParameterValues("rowId");
    try {
      SupportFacade ejb = (SupportFacade)CVUtility.setupEJB("SupportFacade", "com.centraview.support.supportfacade.SupportFacadeHome", dataSource);
      for (int i=0; i<rowId.length; i++) {
        if(rowId[i] != null && !rowId[i].equals("")) {
          String elements[] = rowId[i].split("\\*");
          if (elements.length != 2)
            continue;
          if (elements[1].equals("CATEGORY"))
            ejb.deleteCategory(individualId, Integer.parseInt(elements[0]));
          else if (elements[1].equals("KBELEMENT"))
            ejb.deleteKB(individualId, Integer.parseInt(elements[0]));
          else
            continue;
        }
      }
    } catch(Exception e) {
View Full Code Here

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

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

      ticketVO.setId(Integer.parseInt(ticketForm.getId()));
      ticketVO.setTitle(ticketForm.getSubject());
      ticketVO.setDetail(ticketForm.getDetail());
      ticketVO.setPriorityId(Integer.parseInt(ticketForm.getPriority()));
      ticketVO.setStatusId(Integer.parseInt(ticketForm.getStatus()));

      if (ticketForm.getId() != null) {
        int ticketID = Integer.parseInt(ticketForm.getId());
        int statusID = ticketVO.getStatusId();
        String closeTicketParam = request.getParameter("closeTicket");
        // If the Status select was set to 2 (MAGIC NUMBER for closed) or
        // closeTicket=true was appended to the request then ...
        boolean closeTicket = ((statusID == 2) || (closeTicketParam != null && closeTicketParam.equals("true")));
        if (closeTicket) {
          ticketVO.setStatusId(2);
          remote.closeTicket(individualID, ticketID);
          request.setAttribute("OCStatus", TicketConstantKeys.TK_OCSTATUS_CLOSE);
        }
      }

      if ((ticketForm.getManagerid() != null) || (ticketForm.getManagerid().length() != 0)) {
        if (!(ticketForm.getManagerid().equals(""))) {
          ticketVO.setManagerId(Integer.parseInt(ticketForm.getManagerid()));
        }
      }

      if ((ticketForm.getAssignedtoid() != null) || (ticketForm.getAssignedtoid().length() != 0)) {
        if (!(ticketForm.getAssignedtoid().equals(""))) {
          ticketVO.setAssignedToId(Integer.parseInt(ticketForm.getAssignedtoid()));
        }
      }

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

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

      ticketVO.setModifiedBy(individualID);
      ticketVO.setCustomField(getCustomFieldVO(request));
      String operationType = request.getParameter("TYPEOFOPERATION");

      if (operationType.equalsIgnoreCase("EDIT")) {
        remote.updateTicket(individualID, ticketVO);
      } else if (operationType.equalsIgnoreCase("DUPLICATE")) {
        remote.duplicateTicket(individualID, ticketVO);
      }
      FORWARD_final = FORWARD_editsavefile;
      String closeornew = request.getParameter("closeornew");

      if (closeornew.equals("close")) {
View Full Code Here

    }

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

      if (request.getParameter(Constants.TYPEOFOPERATION).equals(SupportConstantKeys.ADD))
      {
        remote.addFaq(individualID, faqVO);
      }
      else if (request.getParameter(Constants.TYPEOFOPERATION).equals(SupportConstantKeys.DUPLICATE))
      {
        remote.duplicateFaq(individualID, faqVO);
      }
      else
      {
        remote.updateFaq(individualID, faqVO);
      }
    }
    catch (Exception e)
    {
      logger.error("[Exception] [SaveFAQHandler.execute Calling SurrotFacade]  ", e);
View Full Code Here

      qVO.setQuestion((String) faqForm.get("title"));
      qVO.setAnswer((String) faqForm.get("answer"));

      SupportFacadeHome sfh = (SupportFacadeHome) CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome",
          "SupportFacade");
      SupportFacade remote = (SupportFacade) sfh.create();
      remote.setDataSource(dataSource);
      String typeOfOp = request.getParameter(Constants.TYPEOFOPERATION);

      if (typeOfOp != null) {
        if (typeOfOp.equals(SupportConstantKeys.ADD)) {
          qVO.setFaqId(Integer.parseInt((String) faqForm.get("faqid")));
          int questionID = remote.addQuestion(individualID, qVO);
        } else {
          qVO.setFaqId(Integer.parseInt((String) faqForm.get("faqid")));
          qVO.setQuestionId(Integer.parseInt((String)request.getParameter("questionid")));
          remote.updateQuestion(individualID, qVO);
        }
      }

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

    //call to EJB server
    int elementID = Integer.parseInt(key);

    try {
      SupportFacadeHome supportFacade = (SupportFacadeHome)CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome","SupportFacade");
      SupportFacade remote =(SupportFacade)supportFacade.create();
      remote.setDataSource(this.dataSource);
      if (typeOfDoc.equals(SupportConstantKeys.KBELEMENT)) {
        remote.deleteKB (userID,elementID);

      }
      else if (typeOfDoc.equals(SupportConstantKeys.CATEGORY)) {
        remote.deleteCategory (userID,elementID);
      }
    }
    catch(Exception e ) {
      System.out.println("[Exception][KnowledgebaseList.deleteElement] Exception Thrown: "+e);
    }
View Full Code Here

    int individualId = ((UserObject)session.getAttribute("userobject")).getIndividualID();
    ArrayList deleteLog = new ArrayList();
    String rowId[] = request.getParameterValues("rowId");
    try {
      SupportFacade ejb = (SupportFacade)CVUtility.setupEJB("SupportFacade", "com.centraview.support.supportfacade.SupportFacadeHome", dataSource);
      for (int i=0; i<rowId.length; i++) {
        if(rowId[i] != null && !rowId[i].equals("")) {
          int elementId = Integer.parseInt(rowId[i]);
          ejb.deleteFaq(individualId, elementId);
        }
      }
    } catch(Exception e) {
      logger.error("[execute] Exception thrown.", e);
      throw new CommunicationException(e.getMessage());
View Full Code Here

      Values.put("--Manager--", tVO.getManagerName());
      Values.put("--AssignedTo--", tVO.getAssignedToName());

      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

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.