Package com.centraview.contact.contactfacade

Examples of com.centraview.contact.contactfacade.ContactFacade


        i++;
      }
      groupId = Integer.parseInt(request.getParameter("groupId"));
      UserObject userobject = (UserObject)session.getAttribute("userobject");
      ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject("com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
      ContactFacade remote = aa.create();
      remote.setDataSource(dataSource);
      remote.addContactToGroup(userobject.getIndividualID(), groupId, memberIds);
    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    StringBuffer path = new StringBuffer(mapping.findForward("viewGroup").getPath());
View Full Code Here


        rowId = request.getParameterValues("selectId");
      } else {
        rowId[0] = new String(request.getParameter(Constants.PARAMID));
      }

      ContactFacade remote = aa.create();
      remote.setDataSource(dataSource);

      entityVO = remote.getEntity(Integer.parseInt(rowId[0]));
      DynaActionForm dynaForm = (DynaActionForm)form;

      dynaForm.set("entityName", entityVO.getName());

      Collection mocList = entityVO.getMOC();
View Full Code Here

      // Get the marketingList for the parent EntityId and set our parameter
      // accordingly.
      try {
        ContactFacadeHome contactFacadeHome = (ContactFacadeHome)CVUtility.getHomeObject(
            "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
        ContactFacade contactFacadeRemote = contactFacadeHome.create();
        contactFacadeRemote.setDataSource(dataSource);
        marketingListId = contactFacadeRemote.getEntityMarketingList(entityId);
      } catch (Exception e) {
        // If something goes wrong, it's okay we will default to marketingList 1
        logger.error("[Exception] execute(): ", e);
      }
    }
View Full Code Here

        writer.print("FAIL: Invalid contact ID specified.");
        return(null);
      }
     
      ContactFacadeHome cfh = (ContactFacadeHome)CVUtility.getHomeObject("com.centraview.contact.contactfacade.ContactFacadeHome","ContactFacade");
      ContactFacade remote = (ContactFacade)cfh.create();
      remote.setDataSource(dataSource);

      try {
        // check to see if the user has the right to update this record
        AuthorizationHome authHome = (AuthorizationHome)CVUtility.getHomeObject("com.centraview.administration.authorization.AuthorizationHome", "Authorization");
        Authorization authRemote = (Authorization)authHome.create();
       
        if (! authRemote.canPerformRecordOperation(individualID, "Individual", contactID, 20)) {
          return(null);
        }
      }catch(Exception e){
        System.out.println("[Exception][SyncContactEdit] Exception thrown in editContact(2): " + e);
        //e.printStackTrace();
        return(null);
      }

      ModuleFieldRightMatrix rightsMatrix = userObject.getUserPref().getModuleAuthorizationMatrix();
      HashMap indivFieldRights = rightsMatrix.getFieldRights("Individual");
      HashMap entityFieldRights = rightsMatrix.getFieldRights("Entity");

      IndividualVO individualVO = new IndividualVO();
      IndividualVO individualCurrent = remote.getIndividual(contactID);

      individualVO.setContactID(contactID);
     
      String companyName = (String)contactForm.get("companyName");
      if (companyName != null) {
        if (! companyName.equals("")) {
          // first, check to see if a entity with a matching name exists
          // if yes, then associate this invidivual with that entity
          // if no, then create a new entity, and associate this individual with that entity
          SyncFacadeHome syncHome = (SyncFacadeHome)CVUtility.getHomeObject("com.centraview.syncfacade.SyncFacadeHome", "SyncFacade");
          com.centraview.syncfacade.SyncFacade sfremote = (com.centraview.syncfacade.SyncFacade)syncHome.create();
          sfremote.setDataSource(dataSource);
         
          int newEntityID = sfremote.findCompanyNameMatch(companyName, individualID);

          individualVO.setEntityID(newEntityID);
        }else{
          individualVO.setEntityID(individualCurrent.getEntityID());
        }
      }

      String firstName = (String)contactForm.get("firstName");
      if (firstName != null && ! firstName.equals("") && ((Integer)indivFieldRights.get("firstname")).intValue() < ModuleFieldRightMatrix.VIEW_RIGHT) {
        individualVO.setFirstName(firstName);
      }else{
        individualVO.setFirstName(individualCurrent.getFirstName());
      }


      String MI = (String)contactForm.get("MI");
      if (MI != null && ! MI.equals("") && ((Integer)indivFieldRights.get("middlename")).intValue() < ModuleFieldRightMatrix.VIEW_RIGHT) {
        individualVO.setMiddleName(MI);
      }else{
        individualVO.setMiddleName(individualCurrent.getMiddleName());
      }

      String lastName = (String)contactForm.get("lastName");
      if (lastName != null && ! lastName.equals("") && ((Integer)indivFieldRights.get("lastname")).intValue() < ModuleFieldRightMatrix.VIEW_RIGHT) {
        individualVO.setLastName(lastName);
      }else{
        individualVO.setLastName(individualCurrent.getLastName());
      }

      String title = (String)contactForm.get("title");
      if (title != null && ! title.equals("") && ((Integer)indivFieldRights.get("title")).intValue() < ModuleFieldRightMatrix.VIEW_RIGHT) {
        individualVO.setTitle(title);
      }else{
        individualVO.setTitle(individualCurrent.getTitle());
      }

      String primaryContact = (String)contactForm.get("primaryContact");
      if (primaryContact != null) { // && ((Integer)indivFieldRights.get("primarycontact")).intValue() < ModuleFieldRightMatrix.VIEW_RIGHT)
        if (primaryContact.equals("YES") || primaryContact.equals("NO")) {
          individualVO.setIsPrimaryContact(primaryContact);
        }
      }else{
        individualVO.setIsPrimaryContact(individualCurrent.getIsPrimaryContact());
      }
     
      AddressVO primaryAddress = individualCurrent.getPrimaryAddress();
     
      if (primaryAddress == null) {
        primaryAddress = new AddressVO();
      }
      primaryAddress.setIsPrimary("YES");

      if (((Integer)indivFieldRights.get("address")).intValue() < ModuleFieldRightMatrix.VIEW_RIGHT) {
        String street1 = (String)contactForm.get("street1");
        if ((street1 != null) && (! street1.equals(""))) {
          primaryAddress.setStreet1(street1);
        }
       
        String street2 = (String)contactForm.get("street2");
        if ((street2 != null) && (! street2.equals(""))) {
          primaryAddress.setStreet2(street2);
        }
       
        String city = (String)contactForm.get("city");
        if ((city != null) && (! city.equals(""))) {
          primaryAddress.setCity(city);
        }
       
        String state = (String)contactForm.get("state");
        if ((state != null) && (!state.equals(""))) {
          primaryAddress.setStateName(state);
        }

        String zipCode = (String)contactForm.get("zipCode");
        if ((zipCode != null) && (! zipCode.equals(""))) {
          primaryAddress.setZip(zipCode);
        }

        String country = (String)contactForm.get("country");
        if ((country != null) && (!country.equals(""))) {
          primaryAddress.setCountryName(country);
        }
       
        individualVO.setPrimaryAddress(primaryAddress);

      }   // end if (((Integer)indivFieldRights.get("address")).intValue() < ModuleFieldRightMatrix.VIEW_RIGHT)

      if (((Integer)indivFieldRights.get("contactmethod")).intValue() < ModuleFieldRightMatrix.VIEW_RIGHT) {
        // get the current MOC values from the individualCurrent MOC
        // save them in String variables for use below
        String currentWorkPhone   = new String("");
        String currentHomePhone   = new String("");
        String currentFaxPhone    = new String("");
        String currentOtherPhone  = new String("");
        String currentMainPhone   = new String("");
        String currentPagerPhone  = new String("");
        String currentMobilePhone = new String("");
        String currentEmail       = new String("");

        MethodOfContactVO currentWorkVO = null;
        MethodOfContactVO currentHomeVO = null;
        MethodOfContactVO currentFaxVO = null;
        MethodOfContactVO currentOtherVO = null;
        MethodOfContactVO currentMainVO = null;
        MethodOfContactVO currentPagerVO = null;
        MethodOfContactVO currentMobileVO = null;
        MethodOfContactVO currentEmailVO = null;

        Vector currentMOCs = individualCurrent.getMOC();
        if (currentMOCs != null) {
          Enumeration e = currentMOCs.elements();
          while (e.hasMoreElements()) {
            MethodOfContactVO mocVO = (MethodOfContactVO)e.nextElement();
            String syncAs = mocVO.getSyncAs();
            if (syncAs != null && (! syncAs.equals(""))) {
              if (syncAs.equals("Work")) {
                currentWorkPhone = mocVO.getContent();
                currentWorkVO = mocVO;
              }else if (syncAs.equals("Home")){
                currentHomePhone = mocVO.getContent();
                currentHomeVO = mocVO;
              }else if (syncAs.equals("Fax")){
                currentFaxPhone = mocVO.getContent();
                currentFaxVO = mocVO;
              }else if (syncAs.equals("Other")){
                currentOtherPhone = mocVO.getContent();
                currentOtherVO = mocVO;
              }else if (syncAs.equals("Main")){
                currentMainPhone = mocVO.getContent();
                currentMainVO = mocVO;
              }else if (syncAs.equals("Pager")){
                currentPagerPhone = mocVO.getContent();
                currentPagerVO = mocVO;
              }else if (syncAs.equals("Mobile")){
                currentMobilePhone = mocVO.getContent();
                currentMobileVO = mocVO;
              }   // end if (syncAs.equals("Work"))
            }else if (mocVO.getMocType() == 1 && mocVO.getIsPrimary().equals("YES")){
              currentEmail = mocVO.getContent();
              currentEmailVO = mocVO;
            }   // end if (syncAs != null && (! syncAs.equals("")))
          }   // end while (e.hasMoreElements())
        }   // end if (currentMOCS != null)


        Vector newMOCs = new Vector();

        // now, check to see what SyncAs values we were passed,
        // if a given value is not null, then check to see if
        // there is an existing value for that field in the db:
        // (check "currentXxxVO" where "Xxx" equals one of the
        // syncAs types [Work, Home, Fax, etc]). If currentXxxVO
        // is null, create a new MethodOfContactVO object, and set
        // the appropriate values, then add that object to the
        // individualVO using setMOC(). Else, update the "content"
        // field and updated field on the currentXxxVO, and pass
        // that object to individualVO.setMOC();
        String workPhone = (String)contactForm.get("workPhone");
        if (workPhone != null && (! workPhone.equals(""))) {
          if (currentWorkVO == null) {
            MethodOfContactVO workPhoneVO = new MethodOfContactVO();
            workPhoneVO.setContent(workPhone);
            workPhoneVO.setSyncAs("Work");
            workPhoneVO.setMocType(Constants.MOC_WORK);
            newMOCs.add(workPhoneVO);
          }else{
            currentWorkVO.setContent(workPhone);
            currentWorkVO.updated(true);
            currentWorkVO.added(false);
            currentWorkVO.delete(false);
            newMOCs.add(currentWorkVO);
          }
        }

        String homePhone = (String)contactForm.get("homePhone");
        if (homePhone != null && (! homePhone.equals(""))) {
          if (currentHomeVO == null) {
            MethodOfContactVO homePhoneVO = new MethodOfContactVO();
            homePhoneVO.setContent(homePhone);
            homePhoneVO.setSyncAs("Home");
            homePhoneVO.setMocType(Constants.MOC_HOME);
            newMOCs.add(homePhoneVO);
          }else{
            currentHomeVO.setContent(homePhone);
            currentHomeVO.updated(true);
            currentHomeVO.added(false);
            currentHomeVO.delete(false);
            newMOCs.add(currentHomeVO);
          }
        }

        String faxPhone = (String)contactForm.get("faxPhone");
        if (faxPhone != null && (! faxPhone.equals(""))) {
          if (currentFaxVO == null) {
            MethodOfContactVO faxPhoneVO = new MethodOfContactVO();
            faxPhoneVO.setContent(faxPhone);
            faxPhoneVO.setSyncAs("fax");
            faxPhoneVO.setMocType(Constants.MOC_FAX);
            newMOCs.add(faxPhoneVO);
          }else{
            currentFaxVO.setContent(faxPhone);
            currentFaxVO.updated(true);
            currentFaxVO.added(false);
            currentFaxVO.delete(false);
            newMOCs.add(currentFaxVO);
          }
        }
       
        String otherPhone = (String)contactForm.get("otherPhone");
        if (otherPhone != null && (! otherPhone.equals(""))) {
          if (currentOtherVO == null) {
            MethodOfContactVO otherPhoneVO = new MethodOfContactVO();
            otherPhoneVO.setContent(otherPhone);
            otherPhoneVO.setSyncAs("other");
            otherPhoneVO.setMocType(Constants.MOC_OTHER);
            newMOCs.add(otherPhoneVO);
          }else{
            currentOtherVO.setContent(otherPhone);
            currentOtherVO.updated(true);
            currentOtherVO.added(false);
            currentOtherVO.delete(false);
            newMOCs.add(currentOtherVO);
          }
        }

        String mainPhone = (String)contactForm.get("mainPhone");
        if (mainPhone != null && (! mainPhone.equals(""))) {
          if (currentMainVO == null) {
            MethodOfContactVO mainPhoneVO = new MethodOfContactVO();
            mainPhoneVO.setContent(mainPhone);
            mainPhoneVO.setSyncAs("main");
            mainPhoneVO.setMocType(Constants.MOC_MAIN);
            newMOCs.add(mainPhoneVO);
          }else{
            currentMainVO.setContent(mainPhone);
            currentMainVO.updated(true);
            currentMainVO.added(false);
            currentMainVO.delete(false);
            newMOCs.add(currentMainVO);
          }
        }

        String pagerPhone = (String)contactForm.get("pagerPhone");
        if (pagerPhone != null && (! pagerPhone.equals(""))) {
          if (currentPagerVO == null) {
            MethodOfContactVO pagerPhoneVO = new MethodOfContactVO();
            pagerPhoneVO.setContent(pagerPhone);
            pagerPhoneVO.setSyncAs("pager");
            pagerPhoneVO.setMocType(Constants.MOC_PAGER);
            newMOCs.add(pagerPhoneVO);
          }else{
            currentPagerVO.setContent(pagerPhone);
            currentPagerVO.updated(true);
            currentPagerVO.added(false);
            currentPagerVO.delete(false);
            newMOCs.add(currentPagerVO);
          }
        }

        String mobilePhone = (String)contactForm.get("mobilePhone");
        if (mobilePhone != null && (! mobilePhone.equals(""))) {
          if (currentMobileVO == null) {
            MethodOfContactVO mobilePhoneVO = new MethodOfContactVO();
            mobilePhoneVO.setContent(mobilePhone);
            mobilePhoneVO.setSyncAs("mobile");
            mobilePhoneVO.setMocType(Constants.MOC_MOBILE);
            newMOCs.add(mobilePhoneVO);
          }else{
            currentMobileVO.setContent(mobilePhone);
            currentMobileVO.updated(true);
            currentMobileVO.added(false);
            currentMobileVO.delete(false);
            newMOCs.add(currentMobileVO);
          }
        }

        String email = (String)contactForm.get("email");
        if (email != null && (! email.equals(""))) {
          if (currentEmailVO == null) {
            MethodOfContactVO emailVO = new MethodOfContactVO();
            emailVO.setContent(email);
            emailVO.setMocType(Constants.MOC_EMAIL);    // 1 == "email"
            emailVO.setIsPrimary("YES")// always set as the primary email address
            newMOCs.add(emailVO);
          }else{
            currentEmailVO.setContent(email);
            currentEmailVO.updated(true);
            currentEmailVO.added(false);
            currentEmailVO.delete(false);
            newMOCs.add(currentEmailVO);
          }
        }
        individualVO.setMoc(newMOCs);
      }   // end if (((Integer)indivFieldRights.get("contactmethod")).intValue() < ModuleFieldRightMatrix.VIEW_RIGHT)

      // now check notes
      String noteContent = (String)contactForm.get("notes");
      if (noteContent != null)
      {
        // ok, here's the tricky part. We need to take this content,
        // parse it into individual notes, and figure out which to
        // change/delete/create. This could prove troublesome...
        NoteHome noteHome = (NoteHome)CVUtility.getHomeObject("com.centraview.note.NoteHome", "Note");
        Note noteRemote = (Note)noteHome.create();
        noteRemote.setDataSource(dataSource);

        NoteVO noteVO = new NoteVO();

        // the "title" of the note will be the first 22 characters of the content,
        // plus "...", unless the content is less than 22 characters, in which case
        // it will be the same as the content...
        String noteTitle = "";
        if (noteContent.length() > 22)
        {
          noteTitle = noteContent.substring(0, 22) + "...";
        }else{
          noteTitle = noteContent;
        }
       
        noteVO.setTitle(noteTitle);
        noteVO.setDetail(noteContent);
        noteVO.setPriority(NoteVO.NP_MEDIUM);
        noteVO.setCreatedBy(individualID);
        noteVO.setOwner(individualID);
        noteVO.setRelateEntity(individualVO.getEntityID());
        noteVO.setRelateIndividual(contactID);
       
        try
        {
          noteRemote.addNote(individualID, noteVO);
        }catch(NoteException ne){
          // TODO: clean up this NoteException handling
          System.out.println("[Exception][ContactAdd] Note Exception caught!: " + ne);
          //ne.printStackTrace();
        }
        // ..whew! That was interesting! At least we're finished now ;-)
      }
     
      individualVO.setContactType(2);
      remote.updateIndividual(individualVO, individualID);//Integer.parseInt(contactID));
      writer.print(contactID);
     
      // we need to make the IndividualList dirty, so that the next time
      // it is viewed, it is refreshed and contains the record we just added
      ListGenerator lg = ListGenerator.getListGenerator(dataSource);
View Full Code Here

    }
    // Put the MarketingList names on the request so the dropdown on the left
    // can be rendered
    ContactFacadeHome cfh = (ContactFacadeHome)CVUtility.getHomeObject(
        "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
    ContactFacade remote = null;
    try {
      remote = cfh.create();
    } catch (CreateException e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    remote.setDataSource(dataSource);
    Vector allDBList = remote.getDBList(individualId);
    request.setAttribute("AllDBList", allDBList);
    // For the searchBar
    String moduleID = (String)moduleList.get("Individual");
    request.setAttribute("moduleId", moduleID);
    request.setAttribute("listType", "Individual");
View Full Code Here

          "Entity Name"));
    }

    entityVO.setModifiedBy(individualId);

    ContactFacade contactFacade = null;
    try {
      contactFacade = (ContactFacade)CVUtility.setupEJB("ContactFacade",
          "com.centraview.contact.contactfacade.ContactFacadeHome", dataSource);
    } catch (Exception e) {
      throw new ServletException(e);
    }

    ActionForward forward = null;
    StringBuffer path = new StringBuffer();
    // Decide if we are updating an existing or creating a new
    if (entityVO.getContactID() < 1) {
      // set the creator
      entityVO.setCreatedBy(individualId);
      // if necessary the account manager
      if (entityVO.getAccManager() < 1) {
        entityVO.setAccManager(individualId);
      }
      String marketingListSession = (String)session.getAttribute("dbid");
      int marketingList = 1;
      try {
        marketingList = Integer.valueOf(marketingListSession).intValue();
      } catch (NumberFormatException nfe) {}

      entityVO.setList(marketingList);

      if (!allErrors.isEmpty()) {
        // if there were any validation errors, show the
        // new entity form again, with error messages...
        this.saveErrors(request, allErrors);
        return mapping.findForward(".view.contact.new_entity");
      }

      int newEntityId = contactFacade.createEntity(entityVO, individualId);

      if (request.getParameter("new") != null) {
        path.append(mapping.findForward("newEntity").getPath());
        path.append(entityVO.getList());
        forward = new ActionForward(path.toString(), true);
      } else {
        path.append(mapping.findForward("viewEntity").getPath());
        path.append(newEntityId);
        path.append("&closeWindow=false");
        forward = new ActionForward(path.toString(), true);
      }
    } else {
      try {
        contactFacade.updateEntity(entityVO, individualId);
      } catch (Exception e) {
        logger.error("[execute] Exception thrown.", e);
        throw new ServletException(e);
      }
      path.append(mapping.findForward("viewEntity").getPath());
View Full Code Here

    IndividualVO individualVO = new IndividualVOX(form, request, dataSource);
    HttpSession session = request.getSession(true);
    UserObject userobject = (UserObject)session.getAttribute("userobject");
    int individualId = userobject.getIndividualID();
    individualVO.setModifiedBy(individualId);
    ContactFacade contactFacade = null;
    try {
      contactFacade = (ContactFacade)CVUtility.setupEJB("ContactFacade",
          "com.centraview.contact.contactfacade.ContactFacadeHome", dataSource);
    } catch (Exception e) {
      throw new ServletException(e);
    }
    ActionForward forward = null;
    StringBuffer path = new StringBuffer();
    // Decide if we are updating an existing or creating a new individual
    if (individualVO.getContactID() < 1) {
      String marketingListSession = (String)session.getAttribute("dbid");
      int marketingList = 1;
      try {
        marketingList = Integer.valueOf(marketingListSession).intValue();
      } catch (NumberFormatException nfe) {}
      individualVO.setList(marketingList);
      individualVO.setCreatedBy(individualId);
      int newIndividualId = 0;
      try {
        newIndividualId = contactFacade.createIndividual(individualVO, individualId);
      } catch (Exception e) {
        logger.error("[execute] Exception thrown.", e);
        throw new ServletException(e);
      }
      if (request.getParameter("new") != null) {
        path.append(mapping.findForward("newIndividual").getPath());
        path.append(individualVO.getList());
        path.append("&entityNo=");
        path.append(individualVO.getEntityID());
        path.append("&entityName=");
        path.append(individualVO.getEntityName());
        forward = new ActionForward(path.toString(), true);
      } else {
        path.append(mapping.findForward("viewIndividual").getPath());
        path.append(newIndividualId);
        path.append("&closeWindow=false");
        forward = new ActionForward(path.toString(), true);
      }
    } else {
      try {
        contactFacade.updateIndividual(individualVO, individualId);
      } catch (Exception e) {
        logger.error("[execute] Exception thrown.", e);
        throw new ServletException(e);
      }
      path.append(mapping.findForward("viewIndividual").getPath());
View Full Code Here

        CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
    int individualId = 0;
    try {
      ContactFacadeHome cfh = (ContactFacadeHome)CVUtility.getHomeObject(
          "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
      ContactFacade remote = cfh.create();
      remote.setDataSource(dataSource);
      individualId = userObject.getIndividualID();
      String rowId[] = null;
      String row = null;
      if (request.getParameterValues("rowIdParent") != null) {
        rowId = request.getParameterValues("rowIdParent");
      } else if (request.getParameterValues("rowId") != null) {
        rowId = request.getParameterValues("rowId");
      } else if (request.getParameter("groupId") != null) {
        row = request.getParameter("groupId");
      } else if (session.getAttribute("groupid") != null) {
        row = (String)session.getAttribute("groupid");
        session.removeAttribute("groupid");
      } else {
        row = (String)request.getAttribute("groupid");
      }
      if (rowId != null) {
        row = rowId[0];
      }
      // After performing the logic in the DeleteHanlder, we are generat a new
      // request for the list
      // So we will not be carrying the old error. So that we will try to
      // collect the error from the Session variable
      // Then destory it after getting the Session value
      if (session.getAttribute("listErrorMessage") != null) {
        ActionMessages allErrors = (ActionMessages)session.getAttribute("listErrorMessage");
        saveErrors(request, allErrors);
        session.removeAttribute("listErrorMessage");
      }
      GroupVO groupVO = remote.getGroup(individualId, Integer.parseInt(row));
      DynaActionForm dynaForm = (DynaActionForm)form;
      IndividualVO ivo = remote.getIndividual(groupVO.getOwner());
      if (ivo != null) {
        dynaForm.set("ownerName", new String(ivo.getFirstName() + " " + ivo.getLastName()));
      }
      ivo = null;
      dynaForm.set("groupname", groupVO.getGroupName());
View Full Code Here

    String rowId[] = request.getParameterValues("rowId");
    ContactFacadeHome contactFacadeHome = (ContactFacadeHome)CVUtility.getHomeObject(
        "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
    try {
      ContactFacade remote = contactFacadeHome.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.deleteIndividual(elementID, individualId);
          } catch (AuthorizationFailedException ae) {
            String errorMessage = ae.getExceptionDescription();
            deleteLog.add(errorMessage);
          } catch (RemoveException re) {
            if (re instanceof UserLoginAssociationException) {
View Full Code Here

    ContactFacadeHome cfh = (ContactFacadeHome)CVUtility.getHomeObject(
        "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
    String[] rowId = request.getParameterValues("rowId");
    returnStatus = "deletesuccess";
    try {
      ContactFacade remote = cfh.create();
      remote.setDataSource(dataSource);
      if (rowId != null) {
        for (int i = 0; i < rowId.length; i++) {
          remote.deleteIndividual(Integer.parseInt(rowId[i]), indvID);
        }// end of for (int i = 0; i < rowId.length; i++)
      }// end of if (rowId != null)
    }// end of try block
    catch (Exception e) {
      logger.error("[Exception] DeleteIndividualHandler.Execute Handler ", e);
View Full Code Here

TOP

Related Classes of com.centraview.contact.contactfacade.ContactFacade

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.