Package com.centraview.contact.contactfacade

Examples of com.centraview.contact.contactfacade.ContactFacade


    ContactFacadeHome contactFacadeHome = (ContactFacadeHome)CVUtility.getHomeObject("com.centraview.contact.contactfacade.ContactFacadeHome","ContactFacade");
    try
    {
      //call to EJB server

      ContactFacade contactFacade = contactFacadeHome.create();
      contactFacade.setDataSource(this.dataSource);
      for (int i=0; i<recordID.length; i++)
      {
        if(recordID[i] != null && !recordID[i].equals("")){
          int elementID = Integer.parseInt(recordID[i]);
          StringBuffer sb = new StringBuffer("00000000000");
          sb.setLength(11);
          String countString = Integer.toString(elementID);
          sb.replace((sb.length() - countString.length()), (sb.length()), countString);
          String newElementID = sb.toString();
          MarketingListMemberListElement elementAt = (MarketingListMemberListElement) this.get(newElementID);
          String individualStringID = (String) ((StringMember) elementAt.get("IndividualID")).getMemberValue();
          String entityStringID = (String) ((StringMember) elementAt.get("EntityID")).getMemberValue();

          try{
          if (individualStringID == null || individualStringID.equals("") || individualStringID.equals("0"))
          {
            //delete the entity
            //Argument individualID is added - pravink
            contactFacade.deleteEntity(Integer.parseInt(entityStringID),individualID);
          } //end of if statement (individualStringID == null ...
          else
          {
            //delete the individual
            //Argument individualID is added - pravink
            contactFacade.deleteIndividual(Integer.parseInt(individualStringID),individualID);
          } //end of else statement (individualStringID == null ...
          }//end of try block
          catch(AuthorizationFailedException ae){
            String errorMessage = ae.getExceptionDescription();
            resultDeleteLog.add(errorMessage);
View Full Code Here


      DynaActionForm dynaForm = (DynaActionForm)form;

      AddressVO avo = null;

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

      avo = remote.getAddress(Integer.parseInt(rowId[0]));

      if (avo != null) {
        dynaForm.set("addressid", rowId[0]);

        if (avo.getStreet1() != null) {
View Full Code Here

    String rowId[] = request.getParameterValues("rowId");

    ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
        "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
    try {
      ContactFacade remote = aa.create();
      remote.setDataSource(dataSource);
      if (rowId != null) {
        for (int i = 0; i < rowId.length; i++) {
          remote.deleteEntity(Integer.parseInt(rowId[i]), individualID);
        }// for (int i=0;i<rowId.length;i++)
      }
    } catch (Exception e) {
      logger.error("[Exception] DeleteEntityHandler.Execute Handler ", e);
    }
View Full Code Here

    request.setAttribute("valueList", listObject);
    // 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("Entity");
    request.setAttribute("moduleId", moduleID);
    request.setAttribute("listType", "Entity");
View Full Code Here

      DynaActionForm dynaForm = (DynaActionForm)form;

      IndividualVO individualVO = null;
      AddressVO primaryAdd = null;

      ContactFacade remote = cfh.create();
      remote.setDataSource(dataSource);
      individualVO = remote.getIndividual(rowId.intValue());

      if (individualVO.getFirstName() != null) {
        dynaForm.set("firstName", individualVO.getFirstName());
        dynaForm.set("lastName", individualVO.getLastName());
        dynaForm.set("middleInitial", individualVO.getMiddleName());
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.deleteGroup(individualId, elementId);
          } catch (AuthorizationFailedException ae) {
            String errorMessage = ae.getExceptionDescription();
            deleteLog.add(errorMessage);
          }
        }
View Full Code Here

    com.centraview.contact.group.GroupVO groupVO = group.getVO();
    ContactFacadeHome cfh = (ContactFacadeHome)CVUtility.getHomeObject(
        "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
    int groupid = 0;
    try {
      ContactFacade remote = cfh.create();
      remote.setDataSource(dataSource);
      if (group.getGroupID() < 1) {
        groupid = remote.createGroup(individualId, groupVO);
      } else {
        remote.updateGroup(individualId, groupVO);
      }
    } catch (Exception e) {
      logger.error("[saveGroup] Exception thrown.", e);
    }
    return groupid;
View Full Code Here

        rowId[0] = new String(request.getParameter(Constants.PARAMID));
      }

      ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
          "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
      ContactFacade remote = aa.create();
      remote.setDataSource(dataSource);

      mcontactVO = remote.getMOC(Integer.parseInt(rowId[0]));

      DynaActionForm dynaForm = (DynaActionForm)form;
      dynaForm.set("select", new Integer(mcontactVO.getMocType()).toString());
      dynaForm.set("text3", mcontactVO.getContent());
      dynaForm.set("mocid", new Integer(mcontactVO.getMocID()).toString());
View Full Code Here

        writer.print("FAIL: Unknown error occurred.");
        return(null);
      }

      ContactFacadeHome cfh = (ContactFacadeHome)CVUtility.getHomeObject("com.centraview.contact.contactfacade.ContactFacadeHome","ContactFacade");
      ContactFacade remote = (ContactFacade)cfh.create();
      remote.setDataSource(dataSource);

      // deleteIndividual() returns void
      // I guess, if no exception is thrown, then everything is good
      remote.deleteIndividual(contactID, individualID);
     
      ListGenerator lg = ListGenerator.getListGenerator(dataSource);
      lg.makeListDirty("Individual");

      writer.print(contactID);
View Full Code Here

    request.setAttribute("findIndividualId", viewIndividualId);

    // Ok, we know what individual to show, so lets get data together for the
    // main window
    DynaActionForm individualForm = (DynaActionForm)form;
    ContactFacade contactFacade = null;
    try {
      contactFacade = (ContactFacade)CVUtility.setupEJB("ContactFacade",
          "com.centraview.contact.contactfacade.ContactFacadeHome", dataSource);
    } catch (Exception e) {
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    IndividualVO individualVO = contactFacade.getIndividual(Integer.parseInt(viewIndividualId));
    individualVO.populateFormBean(individualForm);
    // Now we need to get the custom field stuff because it doesn't live on the
    // individualVO even though there is a nice space for it there
    CustomField customField = null;
    try {
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.