Package com.centraview.support.supportfacade

Examples of com.centraview.support.supportfacade.SupportFacade


        .getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome",
          "SupportFacade");

      try
      {
        SupportFacade remote = supFacade.create();
        remote.setDataSource(dataSource);
        FaqVO fVO = remote.getFaq(individualID, faqId);

        dynaForm.set("faqid", new Integer(fVO.getFaqId()).toString());
        dynaForm.set("title", fVO.getTitle());
        dynaForm.set("status", fVO.getStatus());
        dynaForm.set("publishToCustomerView", fVO.getPublishToCustomerView());
        ownerID = fVO.getOwner();

        QuestionList questionList = remote.getQuestionList(individualID, fVO.getFaqId());
        questionList = setLinksfunction(questionList);
        request.setAttribute("questionlist", questionList);

        // Condition if the record status is Publish then Only Owner can update it.
        // Other user can't update it.
View Full Code Here


      int userId = ((UserObject)session.getAttribute("userobject")).getIndividualID();
      request.setAttribute("actionPath","AddKnowledgebase");
     
      // Get all categories and recurively process them for there parent/child relationships.
      SupportFacadeHome supportFacade = (SupportFacadeHome)CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome","SupportFacade");
      SupportFacade remote =(SupportFacade)supportFacade.create();
      ArrayList flatList = (ArrayList)remote.getAllCategory(userId);
      ArrayList categoryList = new ArrayList();
     
      categoryList.add(new DDNameValue(1, "Knowledgebase"));
      Iterator iter = flatList.iterator();
      while (iter.hasNext()) {
View Full Code Here

    listObject.setDisplay(displayParameters);
    request.setAttribute("valueList", listObject);
   
    // For the breadcrumbs on the folder bar.
    try {
      SupportFacade ejb = (SupportFacade)CVUtility.setupEJB("SupportFacade", "com.centraview.support.supportfacade.SupportFacadeHome", dataSource);
      Vector vec = null;
      vec = ejb.getCategoryRootPath(individualId, Integer.parseInt(catID));
      if (vec != null) {
        Collections.reverse(vec);
        request.setAttribute("breadCrumbs", vec);
      }
    } catch (Exception e) {
View Full Code Here

      int individualID = userObject.getIndividualID();
     
      TicketForm ticketForm = (TicketForm) form;
     
      SupportFacadeHome sfh = (SupportFacadeHome)CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome", "SupportFacade");
      SupportFacade remote = (SupportFacade)sfh.create();
      remote.setDataSource(dataSource);
     
      TicketVO tVO = remote.getTicketBasicRelations(individualID, Integer.parseInt(request.getParameter("ticketId").toString()));
     
      ticketForm.setSubject(tVO.getTitle());
      ticketForm.setDetail(tVO.getDetail());
      ticketForm.setId(new Integer(tVO.getId()).toString());
      ticketForm.setEntityid(new Integer(tVO.getRefEntityId()).toString());
View Full Code Here

      CategoryForm catForm = (CategoryForm)form;
     
      catForm.setCategoryname("");

      SupportFacadeHome supportFacade = (SupportFacadeHome)CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome","SupportFacade");
      SupportFacade remote =(SupportFacade)supportFacade.create();
     
      ArrayList flatList = (ArrayList)remote.getAllCategory(userId);
      ArrayList categoryList = new ArrayList();
     
      categoryList.add(new DDNameValue(1, "Knowledgebase"));
      Iterator iter = flatList.iterator();
      while (iter.hasNext()) {
View Full Code Here

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

    request.setAttribute(SupportConstantKeys.TYPEOFSUBMODULE, "Knowledgebase");
    KnowledgeVO kVO = new KnowledgeVO();
    SupportFacade remote = null;
    int kbId = -1;
    try {
      String rowId = request.getParameter("rowId");
      if (rowId != null) {
        if (rowId.indexOf("*") > -1) {
          String elements[] = rowId.split("\\*");
          if (elements.length != 2)
            throw new Exception("No row selected.");
          kbId = Integer.parseInt(elements[0]);
        } else {
          kbId = Integer.parseInt(rowId);
        }
      } else {
        throw new Exception("No row selected.");
      }

      remote = supportFacade.create();
      remote.setDataSource(dataSource);
      kVO = remote.getKB(individualID, kbId);
      ArrayList categoryList = remote.getAllCategory(individualID);
      request.setAttribute("CATEGORYVOARRAY", categoryList);
    } catch (Exception e) {
      logger.error("[Exception] [ViewKnowledgebaseHandler.execute Calling SupportFacade]  ", e);
    }
    int ownerID = 0;
    if (kVO != null) {
      kbForm.setTitle(kVO.getTitle());
      kbForm.setDetail(kVO.getDetail().replaceAll("\n","<br/>"));
      kbForm.setCategory(new Integer(kVO.getCatid()).toString());
      kbForm.setRowId(new Integer(kbId).toString());
      kbForm.setParentcategory(new Integer(kVO.getParent()).toString());
      kbForm.setStatus(kVO.getStatus());
      kbForm.setPublishToCustomerView(kVO.getPublishToCustomerView());
      ownerID = kVO.getOwner();

      // Condition if the record status is Publish then Only Owner can update
      // it.
      // Other user can't update it.
      // thats why we will disable the Edit button
      boolean editFlag = false;
      if (kVO.getStatus() != null && kVO.getStatus().equals("PUBLISH")) {
        AuthorizationHome homeAuthorization = (AuthorizationHome)CVUtility.getHomeObject(
            "com.centraview.administration.authorization.AuthorizationHome", "Authorization");
        try {
          Authorization remoteAuthorization = homeAuthorization.create();
          remoteAuthorization.setDataSource(dataSource);
          editFlag = remoteAuthorization.canPerformRecordOperation(individualID, "KnowledgeBase",
              kbId, ModuleFieldRightMatrix.UPDATE_RIGHT);
        } catch (Exception e) {
          logger.error("[Exception] [ViewKnowledgebaseHandler.execute Calling Authorization]  ", e);
        }
      } else if (individualID == ownerID) {
        editFlag = true;
      }
      request.setAttribute("showEditRecordButton", new Boolean(editFlag));
    }
    request.setAttribute("showPermissionButton", new Boolean("true"));
    String show = (String)request.getAttribute("show");
    String typeOfOperation = (String)request.getAttribute(Constants.TYPEOFOPERATION);
    if (typeOfOperation == null)
      typeOfOperation = request.getParameter(Constants.TYPEOFOPERATION);

    if (typeOfOperation != null) {
      if (typeOfOperation.equalsIgnoreCase("editkb")) {
        FORWARD_final = ".view.support.knowledgebase.edit";
        if (show != null) {
          kbForm.setTitle("");
          kbForm.setDetail("");
        }
        // Get all categories and recurively process them for there parent/child
        // relationships.
        ArrayList flatList = remote.getAllCategory(individualID);
        ArrayList categoryList = new ArrayList();

        categoryList.add(new DDNameValue(1, "Knowledgebase"));
        Iterator iter = flatList.iterator();
        while (iter.hasNext()) {
View Full Code Here

   */
  public void  deleteElement( int indvID, String key ) throws CommunicationException,NamingException {
    int elementID = Integer.parseInt(key);
    SupportFacadeHome supportFacadeHome=(SupportFacadeHome)CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome","SupportFacade");//call to SupportFacadeEJB
    try {
      SupportFacade remote=supportFacadeHome.create();
      remote.setDataSource(this.dataSource);
      remote.delete(indvID,elementID);
    }
    catch(Exception e) {
      logger.error("[Exception] TicketList.deleteElement( int indvID, String key )", e);
    }
  }
View Full Code Here

    ArrayList resultDeleteLog = new ArrayList();
    SupportFacadeHome supportFacadeHome=(SupportFacadeHome)CVUtility.getHomeObject("com.centraview.support.supportfacade.SupportFacadeHome","SupportFacade");//call to SupportFacadeEJB
    try
    {
      //call to EJB server
      SupportFacade remote=supportFacadeHome.create();
      remote.setDataSource(this.dataSource);
      for (int i=0; i<recordID.length; i++)
      {
        if(recordID[i] != null && !recordID[i].equals("")){
          int elementID = Integer.parseInt(recordID[i]);
          try{
            remote.delete(individualID,elementID);
          }//end of try block
          catch(AuthorizationFailedException ae){
            String errorMessage = ae.getExceptionDescription();
            resultDeleteLog.add(errorMessage);
          }//end of catch block
View Full Code Here

        SupportFacadeHome aa = (SupportFacadeHome)CVUtility.getHomeObject(
            "com.centraview.support.supportfacade.SupportFacadeHome", "SupportFacade");
        try {

          SupportFacade remote = (SupportFacade)aa.create();
          remote.setDataSource(this.dataSource);
          returnDL = remote.getTicketList(userID, hm);
        } catch (Exception e) {
          System.out.println("[Exception] ListGenerator.getTicketList: " + e.toString());
          // e.printStackTrace();
        }
View Full Code Here

    hm.put("sortType", new Character(paramDL.getSortType()));

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

      returnDL = remote.getTicketList(userid, hm);
    } catch (Exception e) {
      System.out.println("[Exception] ListGenerator.getTicketList: " + e.toString());
      // e.printStackTrace();
    }
    returnDL.setListType("Ticket");
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.