Package com.centraview.contact.helper

Examples of com.centraview.contact.helper.AddressVO


    String dataSource = Settings.getInstance().getSiteInfo(
        CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
    String status = returnStatus;
    AddressVOX addressVOX = new AddressVOX(form);
    HttpSession session = request.getSession();
    AddressVO addVO = addressVOX.getVO();

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

    if (addVO != null) {
      addVO.setAddressType(1);
    }

    ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
        "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
View Full Code Here


      printTemplateField.setLastName(individualVOReference.getLastName());
      printTemplateField.setTitle(individualVOReference.getTitle());
      printTemplateField.setExternalID(individualVOReference.getExternalID());
      printTemplateField.setSource(individualVOReference.getSourceName());

      AddressVO primaryAdd = individualVOReference.getPrimaryAddress();
      // Set the Address information
      if (primaryAdd != null) {
        printTemplateField.setStreet1(primaryAdd.getStreet1());
        printTemplateField.setStreet2(primaryAdd.getStreet2());
        printTemplateField.setCity(primaryAdd.getCity());
        String state = primaryAdd.getStateName();
        printTemplateField.setState(state);
        printTemplateField.setZip(primaryAdd.getZip());
        String country = primaryAdd.getCountryName();
        printTemplateField.setCountry(country);
        printTemplateField.setWebsite(primaryAdd.getWebsite());
      } // end if (primaryAdd != null)
      // set the Method of Contacts
      Collection mocList = individualVOReference.getMOC();
      Iterator iterator = mocList.iterator();
      while (iterator.hasNext()) {
View Full Code Here

      EntityVO entityVO = tVO.getEntityVO();
      if (entityVO != null) {
        String entityName = entityVO.getName();
        Values.put("--Name--", entityName);
        AddressVO primaryAdd = entityVO.getPrimaryAddress();
        String address = "";
        if (primaryAdd != null) {
          if (primaryAdd.getStreet1() != null && !primaryAdd.getStreet1().equals("")) {
            address += primaryAdd.getStreet1();
          }
          if (primaryAdd.getStreet2() != null && !primaryAdd.getStreet2().equals("")) {
            address += ", " + primaryAdd.getStreet2() + "\n";
          } else {
            address += "\n";
          }
          if (primaryAdd.getCity() != null && !primaryAdd.getCity().equals("")) {
            address += primaryAdd.getCity();
          }
          if (primaryAdd.getStateName() != null && !primaryAdd.getStateName().equals("")) {
            address += ", " + primaryAdd.getStateName();
          }
          if (primaryAdd.getZip() != null && !primaryAdd.getZip().equals("")) {
            address += " " + primaryAdd.getZip();
          }
          if (primaryAdd.getCountryName() != null && !primaryAdd.getCountryName().equals("")) {
            address += ", " + primaryAdd.getCountryName();
          }
          address = address.replaceAll("\n", "<br>");
        } // end if (primaryAdd != null)

        Values.put("--Address--", address);
View Full Code Here

     
      EntityVO entityVO = tVO.getEntityVO();
      if (entityVO != null) {
        String entityName = entityVO.getName();
        ticketForm.setEntityname(entityName);
        AddressVO primaryAdd = entityVO.getPrimaryAddress();
       
        if (primaryAdd != null) {
          String address = "";
          if (primaryAdd.getStreet1() != null && !primaryAdd.getStreet1().equals("")) {
            address += primaryAdd.getStreet1();
          }
          if (primaryAdd.getStreet2() != null && !primaryAdd.getStreet2().equals("")) {
            address +=", "+ primaryAdd.getStreet2()+"\n";
          }else{
            address += "\n";
          }
          if (primaryAdd.getCity() != null && !primaryAdd.getCity().equals("")) {
            address += primaryAdd.getCity();
          }
          if (primaryAdd.getStateName() != null && !primaryAdd.getStateName().equals("")) {
            address += ", "+ primaryAdd.getStateName();
          }
          if (primaryAdd.getZip() != null && !primaryAdd.getZip().equals("")) {
            address += " "+ primaryAdd.getZip();
          }
          if (primaryAdd.getCountryName() != null && !primaryAdd.getCountryName().equals("")) {
            address += ", "+ primaryAdd.getCountryName();
          }
          ticketForm.setAddress(address);
          if (primaryAdd.getWebsite() != null) {
            ticketForm.setWebsite(primaryAdd.getWebsite());
          }
        }
       
        Collection mocList = entityVO.getMOC();
       
View Full Code Here

      Integer rowId = new Integer(request.getParameter("selectId"));

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

      if (individualVO.getEntityID() != 0) {
        dynaForm.set("entityId", new Integer(individualVO.getEntityID()));
      }

      if (individualVO.getTitle() != null) {
        dynaForm.set("title", individualVO.getTitle());
      }

      if (individualVO.getExternalID() != null) {
        dynaForm.set("id2", individualVO.getExternalID());
      }

      if (individualVO.getSourceName() != null) {
        dynaForm.set("sourceName", individualVO.getSourceName());
      }

      if (individualVO.getSource() > 0) {
        dynaForm.set("sourceId", new Integer(individualVO.getSource()));
      }

      if (individualVO.getContactID() != 0) {
        dynaForm.set("individualId", new Integer(individualVO.getContactID()));
      }

      request.setAttribute("marketingListId", new Integer(individualVO.getList()));
      Collection mocList = individualVO.getMOC();
      Iterator iterator = mocList.iterator();
      int count = 1;

      while (iterator.hasNext()) {
        MethodOfContactVO moc = (MethodOfContactVO)iterator.next();
        if (moc.getMocType() == 1 && moc.getIsPrimary().equalsIgnoreCase("YES")) {
          // this is for email
          dynaForm.set("email", moc.getContent());
          dynaForm.set("emailId", new Integer(moc.getMocID()).toString());
        } else if (count < 4 && moc.getMocType() != 1) {
          dynaForm.set("mocType" + count, new Integer(moc.getMocType()).toString());
          String mocContent = moc.getContent();
          String mocContentValue = "";
          String mocContentExt = "";
          if (mocContent.indexOf("EXT") != -1) {
            String tempContent = mocContent;
            mocContentValue = tempContent.substring(0, tempContent.indexOf("EXT"));
            mocContentExt = tempContent.substring(tempContent.indexOf("EXT") + 3, tempContent
                .length());
          } else {
            mocContentValue = mocContent;
          }

          dynaForm.set("mocContent" + count, mocContentValue);
          dynaForm.set("mocExt" + count, mocContentExt);
          dynaForm.set("mocId" + count, String.valueOf(moc.getMocID()));
          count++;
        }
      }

      primaryAdd = individualVO.getPrimaryAddress();
      if (primaryAdd != null) {
        if (primaryAdd.getAddressID() != 0) {
          dynaForm.set("addressId", new Integer(primaryAdd.getAddressID()));
        }
        if (primaryAdd.getStreet1() != null) {
          dynaForm.set("street1", primaryAdd.getStreet1());
        }
        if (primaryAdd.getStreet2() != null) {
          dynaForm.set("street2", primaryAdd.getStreet2());
        }
        if (primaryAdd.getCity() != null) {
          dynaForm.set("city", primaryAdd.getCity());
        }
        if (primaryAdd.getStateName() != null) {
          dynaForm.set("state", primaryAdd.getStateName());
        }
        if (primaryAdd.getZip() != null) {
          dynaForm.set("zip", primaryAdd.getZip());
        }
        if (primaryAdd.getCountryName() != null) {
          dynaForm.set("country", primaryAdd.getCountryName());
        }
      } // end of if (primaryAdd != null)
      returnStatus = "success";
    } catch (Exception e) {
      logger.error("[Exception] DuplicateIndividualHandler.Execute Handler ", e);
View Full Code Here

          dynaForm.set("mocId" + count, new Integer(moc.getMocID()).toString());
          count++;
        }
      }

      AddressVO primaryAdd = entityVO.getPrimaryAddress();
      IndividualVO individualVO = entityVO.getIndividualVO();

      if (individualVO.getFirstName() != null) {
        dynaForm.set("pcFirstName", individualVO.getFirstName());
      }

      if (individualVO.getMiddleName() != null) {
        dynaForm.set("pcMiddleInitial", individualVO.getMiddleName());
      }

      if (individualVO.getLastName() != null) {
        dynaForm.set("pcLastName", individualVO.getLastName());
      }

      if (individualVO.getTitle() != null) {
        dynaForm.set("pcTitle", individualVO.getTitle());
      }

      if (primaryAdd != null) {
        if (primaryAdd.getStreet1() != null) {
          dynaForm.set("street1", primaryAdd.getStreet1());
        }

        if (primaryAdd.getStreet2() != null) {
          dynaForm.set("street2", primaryAdd.getStreet2());
        }

        if (primaryAdd.getCity() != null) {
          dynaForm.set("city", primaryAdd.getCity());
        }

        if (primaryAdd.getStateName() != null) {
          dynaForm.set("state", primaryAdd.getStateName());
        }

        if (primaryAdd.getZip() != null) {
          dynaForm.set("zip", primaryAdd.getZip());
        }

        if (primaryAdd.getCountryName() != null) {
          dynaForm.set("country", primaryAdd.getCountryName());
        }

        if (primaryAdd.getWebsite() != null) {
          dynaForm.set("website", primaryAdd.getWebsite());
        }

        dynaForm.set("addressId", new Integer(primaryAdd.getAddressID()));
      }

      if (entityVO.getSourceName() != null) {
        dynaForm.set("sourceName", entityVO.getSourceName());
      }
View Full Code Here

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

    } // end for(int i = 0; i < entityVOs.size(); i++)

    // populate bean from AddressVO
    for (int i=0; i < addressVOs.size(); i++)
    {
      AddressVO address = (AddressVO)addressVOs.get(i);
      StringBuffer addressLabel = new StringBuffer();
      // I know, bad programmer, HTML stuff shouldn't be here.
      // I blame the guy who designed the prototype.
      // Anyway its only two little <br> tags, it won't hurt anyone.
      // Plus it will make the other screen look "nice."
      addressLabel.append(address.getStreet1()+"<br>");
      addressLabel.append(address.getStreet2()+"<br>");
      addressLabel.append(address.getCity()+", ");
      addressLabel.append(address.getStateName()+", ");
      addressLabel.append(address.getZip()+", ");
      addressLabel.append(address.getCountryName());
      LabelValueBean currentAddress = new LabelValueBean(addressLabel.toString(), String.valueOf(address.getAddressID()));
      addressCollection.add(currentAddress);
    } // end for (int i=0; i < addressVOs.size(); i++)

    // populate bean with all MOC vos
    for (int i = 0; i < methodOfContactVOs.size(); i++)
View Full Code Here

      }
    } // end for(int i = 0; i < entityVOs.size(); i++)

    // populate bean from AddressVO
    for (int i=0; i < addressVOs.size(); i++) {
      AddressVO address = (AddressVO)addressVOs.get(i);
      StringBuffer addressLabel = new StringBuffer();
      // I know, bad programmer, HTML stuff shouldn't be here.
      // I blame the guy who designed the prototype.
      // Anyway its only two little <br> tags, it won't hurt anyone.
      // Plus it will make the other screen look "nice."
      addressLabel.append(address.getStreet1()+"<br>");
      addressLabel.append(address.getStreet2()+"<br>");
      addressLabel.append(address.getCity()+", ");
      addressLabel.append(address.getStateName()+", ");
      addressLabel.append(address.getZip()+", ");
      addressLabel.append(address.getCountryName());
      LabelValueBean currentAddress = new LabelValueBean(addressLabel.toString(), String.valueOf(address.getAddressID()));
      addressCollection.add(currentAddress);
    } // end for (int i=0; i < addressVOs.size(); i++)
   
    // populate bean with all MOC vos
    for (int i = 0; i < methodOfContactVOs.size(); i++) {
View Full Code Here



      if (entityVO  != null)
      {
        AddressVO primaryAdd       = entityVO.getPrimaryAddress();
        OwningEntity= OwningEntity + "<p><font face=\"Arial, Helvetica, sans-serif\"><strong>" +entityVO.getName()+"</strong><br>\n";
        if (primaryAdd != null)
        {
          if (primaryAdd.getStreet1() != null)
          {
            OwningEntity= OwningEntity+ primaryAdd.getStreet1()+"<BR>\n";
          }
         
          if (primaryAdd.getStreet2() != null)
          {
            OwningEntity= OwningEntity+ primaryAdd.getStreet2()+"<BR>\n";
          }
         
          if (primaryAdd.getCity() != null)
          {
            OwningEntity=OwningEntity + primaryAdd.getCity()+", ";
          }


          String state = primaryAdd.getStateName();
                    if (state != null){
              OwningEntity=OwningEntity + state+" ";
                    }

          if (primaryAdd.getZip() != null)
          {
            OwningEntity=OwningEntity + primaryAdd.getZip()+"<BR>";
          }

          String country = primaryAdd.getCountryName();

                    if (country != null)
          {
              OwningEntity= OwningEntity + country+"<BR>";
                    }

          String Email = "";

          String Phone = "";

          Collection mocList = entityVO.getMOC();
          Iterator iterator = mocList.iterator();
          int count = 1;
          while (iterator.hasNext())
          {
            MethodOfContactVO moc = (MethodOfContactVO)iterator.next();
            if (moc.getMocType() == 1 && moc.getIsPrimary().equalsIgnoreCase("YES")) // this is for email
            {
              Email=moc.getContent()+"<BR>";
            }else if (moc.getMocType() != 1){
              if(moc.getContent() != null)
              {
                Phone=Phone+ moc.getContent()+" ";
              }
            }
          }
          OwningEntity = OwningEntity + Email+"<BR>";
          OwningEntity = OwningEntity+ Phone+"<BR>";

          if (primaryAdd.getWebsite() != null)
          {
            OwningEntity = OwningEntity + primaryAdd.getWebsite()+"<BR>";
          }
        }
      }
      OwningEntity = OwningEntity +"</font></p>";
View Full Code Here

TOP

Related Classes of com.centraview.contact.helper.AddressVO

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.