Package com.centraview.contact.contactfacade

Examples of com.centraview.contact.contactfacade.ContactFacade


    if (flag == false) {
      try {
        ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject(
            "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
        HashMap hm = new HashMap();
        ContactFacade remote = (ContactFacade)aa.create();
        remote.setDataSource(this.dataSource);
        DL = remote.getAllGroupList(userID, hm);
        DL.setIndividualId(userID);
        DL.setListType("Group");
        DL.setDirtyFlag(false);

        if (DL.getTotalNoOfRecords() == DL.getEndIndex()) {
View Full Code Here


        "com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
    try {
      HashMap hm = new HashMap();
      hm.put("sortColumn", sortColumn);
      hm.put("dbID", new Integer(dbID));
      ContactFacade remote = (ContactFacade)aa.create();
      remote.setDataSource(this.dataSource);
      DL = remote.getAllIndividualAndEntityEmailList(userID, hm);
      DL.setIndividualId(userID);
      DL.setSortMember(sortColumn);
      DL.setListType("Individual");
      DL.setDirtyFlag(false);
    } catch (Exception e) {
View Full Code Here

  {
    ContactFacadeHome contactFacadeHome = (ContactFacadeHome)CVUtility.getHomeObject("com.centraview.contact.contactfacade.ContactFacadeHome","ContactFacade");
    try
    {
      int elementID = Integer.parseInt(key);
      ContactFacade remote =(ContactFacade)contactFacadeHome.create();
      remote.setDataSource(this.dataSource);
      remote.deleteGroup(indvID, elementID );

      ListGenerator lg = ListGenerator.getListGenerator(dataSource);
      lg.makeListDirty("Group");

    }
View Full Code Here

    ArrayList resultDeleteLog = new ArrayList();
    ContactFacadeHome contactFacadeHome = (ContactFacadeHome)CVUtility.getHomeObject("com.centraview.contact.contactfacade.ContactFacadeHome","ContactFacade");
    try
    {
      //call to EJB server
      ContactFacade remote =(ContactFacade)contactFacadeHome.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.deleteGroup(individualID, elementID );
          }//end of try block
          catch(AuthorizationFailedException ae){
            String errorMessage = ae.getExceptionDescription();
            resultDeleteLog.add(errorMessage);
          }//end of catch block
View Full Code Here

      UserObject userobject = (UserObject)session.getAttribute("userobject");
      ModuleFieldRightMatrix mfrmx = ((UserObject)session.getAttribute("userobject")).getUserPref().getModuleAuthorizationMatrix();
      HashMap entityRights = mfrmx.getFieldRights("Entity");

      ContactFacadeHome contactFacadeHome = (ContactFacadeHome)CVUtility.getHomeObject("com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
      ContactFacade contactFacadeRemote = (ContactFacade)contactFacadeHome.create();
      // Here's hoping the EntityVOX is only used from the struts layer.
      contactFacadeRemote.setDataSource(dataSource);
      int entityId = entityIdForm.intValue();
      EntityVO entityVOReference = null;
      if (entityId > 0) {
        entityVOReference = contactFacadeRemote.getEntity(entityIdForm.intValue());
      } else {
        entityVOReference = new EntityVO();
        entityVOReference.setContactID(entityId);
      }
     
      // populate this VO completely from the Database.
      entityVOReference.setContacyType(1);
      this.setVO(entityVOReference);

      if (CVUtility.updateFieldPermitted(entityRights, "name")) {
        this.setName((String)dynaForm.get("entityName"));
      }

      if (CVUtility.updateFieldPermitted(entityRights, "id2")) {
        this.setExternalID((String)dynaForm.get("id2"));
      }

      AddressVO primaryAddress = this.getPrimaryAddress();
      if (CVUtility.updateFieldPermitted(entityRights, "address")) {
        primaryAddress.setStreet1((String)dynaForm.get("street1"));
        primaryAddress.setStreet2((String)dynaForm.get("street2"));
        primaryAddress.setCity((String)dynaForm.get("city"));
        primaryAddress.setStateName((String)dynaForm.get("state"));
        primaryAddress.setZip((String)dynaForm.get("zip"));
        primaryAddress.setCountryName((String)dynaForm.get("country"));
        String webSiteForm = (dynaForm.get("website") == null || dynaForm.get("website") == null) ? "" : (String)dynaForm.get("website");
        String webSite = "";
        if (webSiteForm.matches("^https?://.+")) {
          webSite = webSiteForm;
        } else if (webSiteForm.trim().length() > 0) {
          webSite = "http://" + webSiteForm;
        }
        primaryAddress.setWebsite(webSite);
        Integer addressId = dynaForm.get("addressId") == null ? new Integer(-1) : (Integer)dynaForm.get("addressId");
        primaryAddress.setAddressID(addressId.intValue());
        primaryAddress.setIsPrimary("YES");
        if (!primaryAddress.isEmpty()) {
        this.setPrimaryAddress(primaryAddress);
      }
      }

      if (CVUtility.updateFieldPermitted(entityRights, "source")) {
        Integer sourceIdInteger = (Integer)dynaForm.get("sourceId");
        int sourceId = sourceIdInteger == null ? 0 : sourceIdInteger.intValue();
        this.setSource(sourceId);
        this.setSourceName((String)dynaForm.get("sourceName"));
      }

      if (CVUtility.updateFieldPermitted(entityRights, "acctmanager")) {
        this.setAccManager(((Integer)dynaForm.get("accountManagerId")).intValue());
        this.setAcctMgrName((String)dynaForm.get("accountManagerName"));
      }

      if (CVUtility.updateFieldPermitted(entityRights, "acctteam")) {
        this.setAccTeam(((Integer)dynaForm.get("accountTeamId")).intValue());
        this.setAcctTeamName((String)dynaForm.get("accountTeamName"));
      }

      String pcFName = dynaForm.get("pcFirstName") == null ? "" : (String)dynaForm.get("pcFirstName");
      String pcMName = dynaForm.get("pcMiddleInitial") == null ? "" : (String)dynaForm.get("pcMiddleInitial");
      String pcLName = dynaForm.get("pcLastName") == null ? "" : (String)dynaForm.get("pcLastName");
      String pcTitle = dynaForm.get("pcTitle") == null ? "" : (String)dynaForm.get("pcTitle");

      IndividualVO individualVO = null;
      int individualId = dynaForm.get("pcIndividualId") == null ? 0 : ((Integer)dynaForm.get("pcIndividualId")).intValue();
      if (individualId != 0) {
        individualVO = contactFacadeRemote.getIndividual(individualId);
        // In certain cases (when the individual was imported via marketing list)
        // The individual and the Entity share the same (exact) Address  Therefore
        // If that is the case, I must make sure the IndividualVO address is updated also
        // otherwise the crapiness of the Entity and Individual EJB interaction. will
        // cause a condition, which always reverts the common address to the old one
View Full Code Here

      HttpSession session = request.getSession(true);
      ModuleFieldRightMatrix mfrmx = ((UserObject)session.getAttribute("userobject")).getUserPref().getModuleAuthorizationMatrix();
      HashMap individualFieldRights = mfrmx.getFieldRights("Individual");

      ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject("com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
      ContactFacade remote = (ContactFacade)aa.create();
      // here is hoping that the individualVOX is used only from the struts layer.
      remote.setDataSource(dataSource);

      Integer individualIdForm = (null == dynaForm.get("individualId")) ? new Integer(-1) : (Integer)dynaForm.get("individualId");
      int individualId = individualIdForm.intValue();
      IndividualVO individualVOReference = null;
      if (individualId > 0) {
        individualVOReference = remote.getIndividual(individualIdForm.intValue());
      } else {
        individualVOReference = new IndividualVO();
        individualVOReference.setContactID(individualId);
      }
      // seems Add new individual calls this'un too, nice deviation from what they do in Entity.
View Full Code Here

      UserObject userobject = (UserObject)session.getAttribute("userobject");
      ModuleFieldRightMatrix mfrmx = ((UserObject)session.getAttribute("userobject")).getUserPref().getModuleAuthorizationMatrix();
      HashMap groupFieldRights = mfrmx.getFieldRights("Group");
      int individualId = userobject.getIndividualID();
      ContactFacadeHome aa = (ContactFacadeHome)CVUtility.getHomeObject("com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
      ContactFacade remote = (ContactFacade)aa.create();
      int groupId = 0;
      if (dynaForm.get("groupid") != null) {
        groupId = Integer.parseInt((String)dynaForm.get("groupid"));
        this.setGroupID(groupId);
      }
      GroupVO groupVOReference = remote.getGroup(individualId, groupId);

      int fieldRight = 0;

      if (groupFieldRights != null && groupFieldRights.containsKey("groupdescription")) {
        fieldRight = ((Number)groupFieldRights.get("groupdescription")).intValue();
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.