Package com.centraview.customfield

Examples of com.centraview.customfield.CustomFieldHome


  //abstract
  public void  deleteElement( int indvID, String key ) throws CommunicationException,NamingException
  {
    int elementID = Integer.parseInt(key);
    CustomFieldHome customFieldHome =(CustomFieldHome)CVUtility.getHomeObject("com.centraview.customfield.CustomFieldHome","CustomField");//call to CustomFieldEJB
    try
    {
      CustomField remote=(CustomField)customFieldHome.create();
      remote.setDataSource(this.dataSource);
      remote.deleteCustomField(indvID,elementID);
    }
    catch(Exception e)
    {
View Full Code Here


    * @return resultDeleteLog A Collection of the Error Message while deleting a particular record.
    */
  public ArrayList deleteElement( int individualID, String recordID[] ) throws CommunicationException,NamingException,RemoteException
  {
    ArrayList resultDeleteLog = new ArrayList();
    CustomFieldHome customFieldHome=(CustomFieldHome)CVUtility.getHomeObject("com.centraview.customfield.CustomFieldHome","CustomField");
    try
    {
      //call to EJB server
      CustomField remote=(CustomField)customFieldHome.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]);
View Full Code Here

    custVo.setValue(value);
    custVo.setFieldType(fieldType);
    custVo.setFieldID(fieldId);
    custVo.setRecordID(recordID);

    CustomFieldHome cfh = (CustomFieldHome)CVUtility.getHomeObject(
        "com.centraview.customfield.CustomFieldHome", "CustomField");

    try {
      CustomField remote = cfh.create();
      remote.setDataSource(dataSource);

      remote.updateCustomField(custVo);

      CustomFieldVO cfvo = remote.getCustomField(fieldId);
View Full Code Here

        recordID = Integer.parseInt(request.getParameter("recordID"));
      }

      CustomFieldVO cfvo = null;

      CustomFieldHome cfh = (CustomFieldHome)CVUtility.getHomeObject(
          "com.centraview.customfield.CustomFieldHome", "CustomField");
      CustomField remote = cfh.create();
      remote.setDataSource(dataSource);

      int userId = 0;
      if (session.getAttribute("userobject") != null) {
        userId = ((UserObject)session.getAttribute("userobject")).getIndividualID();
View Full Code Here

  public static TreeMap getCustomField(String recordType, String dataSource)
  {
    TreeMap hmap = null;
    try
    {
      CustomFieldHome cfh = (CustomFieldHome)
        CVUtility.getHomeObject("com.centraview.customfield.CustomFieldHome", "CustomField");
      CustomField remote = (CustomField) cfh.create();
      remote.setDataSource(dataSource);
      hmap = remote.getCustomFieldData(recordType);
    }
    catch (Exception e)
    {
View Full Code Here

  public static TreeMap getCustomField(String recordType, int recordID, String dataSource)
  {
    TreeMap hmap = null;
    try
    {
      CustomFieldHome cfh = (CustomFieldHome)
        CVUtility.getHomeObject("com.centraview.customfield.CustomFieldHome", "CustomField");
      CustomField remote = (CustomField) cfh.create();
      remote.setDataSource(dataSource);
      hmap = remote.getCustomFieldData(recordType, recordID);
    }
    catch (Exception e)
    {
View Full Code Here

  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException,
      ServletException, CommunicationException, NamingException
  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();

    CustomFieldHome cfh = (CustomFieldHome) CVUtility.getHomeObject("com.centraview.customfield.CustomFieldHome", "CustomField");
    try {
      HttpSession session = request.getSession(true);
      // We must have to remove the attribute from the session.
      session.removeAttribute("backgroundImportMembers");

      ListMemberForm dyn = (ListMemberForm) session.getAttribute("importListForm");
      UserObject userobject = (UserObject) session.getAttribute("userobject");
      int indvID = userobject.getIndividualID();

      FormFile ff = dyn.getTheFile();
      String strf = ff.getFileName();
      InputStream im = ff.getInputStream();

      CvFileFacade cvfile = new CvFileFacade();
      CvFileVO flvo = new CvFileVO();
      flvo.setTitle("EmailAttachment");
      flvo.setName(strf);
      flvo.setCreatedBy(indvID);
      flvo.setOwner(indvID);
      int emailAttachmentResult = cvfile.addEmailAttachment(indvID, flvo, im, dataSource);

      flvo = cvfile.getEmailAttachment(indvID, emailAttachmentResult, dataSource);
      String path = flvo.getPhysicalFolderVO().getFullPath(null, true) + flvo.getName();

      session.setAttribute("path", path);

      // fill vector with column name
      Vector v = new Vector();
      String hasHeader = dyn.getHeaderrow();
      // int vectorColCounter = 0;

      RandomAccessFile ral = new RandomAccessFile(new File(path), "r");
      String readline = "";

      String tabDelimiter = dyn.getFieldseprator();
      String lineDelimiter = dyn.getLineseprator();
      if (tabDelimiter.equals("")) {
        tabDelimiter = dyn.getTab();
      }
      if (lineDelimiter.equals("")) {
        lineDelimiter = dyn.getLine();
      }

      if (hasHeader.equals("Yes") || (hasHeader.equals("No"))) {
        readline = ral.readLine();
        String[] sFileFieldName = readline.split(tabDelimiter);
        for (int k = 0; k < sFileFieldName.length; k++) {
          v.add(new DDNameValue(sFileFieldName[k], sFileFieldName[k]));
        }
      }

      dyn.setHeadervector(v);
      dyn.setFilePath(path);

      Collection importEntityList = new ArrayList();
      Collection importIndividualList = new ArrayList();

      Collection mapImport = new ArrayList();
      mapImport.add(new DDNameValue("1", "--- Select ---"));
      mapImport.add(new DDNameValue("2", "First Name"));
      mapImport.add(new DDNameValue("3", "Middle Name"));
      mapImport.add(new DDNameValue("4", "Last Name"));
      mapImport.add(new DDNameValue("5", "Entity Name"));
      mapImport.add(new DDNameValue("6", "ExternalID (Entity)"));
      mapImport.add(new DDNameValue("6", "ExternalID (Individual)"));
      mapImport.add(new DDNameValue("7", "Street1"));
      mapImport.add(new DDNameValue("8", "Street2"));
      mapImport.add(new DDNameValue("9", "City"));
      mapImport.add(new DDNameValue("10", "State"));
      mapImport.add(new DDNameValue("11", "Zipcode"));
      mapImport.add(new DDNameValue("12", "Country"));
      mapImport.add(new DDNameValue("13", "Title"));
      mapImport.add(new DDNameValue("14", "Source (Individual)"));
      mapImport.add(new DDNameValue("14", "Source (Entity)"));
      mapImport.add(new DDNameValue("15", "Home Phone"));
      mapImport.add(new DDNameValue("16", "Fax Phone"));
      mapImport.add(new DDNameValue("17", "Main Phone"));
      mapImport.add(new DDNameValue("18", "Mobile Phone"));
      mapImport.add(new DDNameValue("19", "Other Phone"));
      mapImport.add(new DDNameValue("20", "Pager Phone"));
      mapImport.add(new DDNameValue("21", "Work Phone"));
      mapImport.add(new DDNameValue("22", "Email"));
      mapImport.add(new DDNameValue("23", "Website"));
      mapImport.add(new DDNameValue("24", "Account Manager"));
      mapImport.add(new DDNameValue("25", "Account Team"));

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

      Collection entityCustomFieldList = remote.getCustomFieldImportData("entity");
      Collection individualCustomFieldList = remote.getCustomFieldImportData("individual");
View Full Code Here

        return(mapping.findForward(forward));
      }
    
      CustomFieldVO customFieldVO = new CustomFieldVO()
     
      CustomFieldHome customfieldHome = (CustomFieldHome)CVUtility.getHomeObject("com.centraview.customfield.CustomFieldHome","CustomField");
      CustomField customfieldRemote = customfieldHome.create();
      customfieldRemote.setDataSource(dataSource);
     
      // get the custom field data from the EJB layer
      customFieldVO = customfieldRemote.getCustomField(customFieldId.intValue());
View Full Code Here

            }
            customfieldVO.setOptionValues(vecOption);
            customfieldVO.setOptionValuesIds(vecOptionIds);
         }

         CustomFieldHome customfieldHome = (CustomFieldHome)CVUtility.getHomeObject("com.centraview.customfield.CustomFieldHome","CustomField");
         CustomField customfieldRemote = (CustomField)customfieldHome.create();
         customfieldRemote.setDataSource(dataSource);
        
         customfieldRemote.updateNewCustomField(customfieldVO);

         // TODO updateNewCustomField EJB needs user-rights?
View Full Code Here

      String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
      HttpSession session = request.getSession();
      UserObject userObject = (UserObject)session.getAttribute("userobject");
      int individualId = userObject.getIndividualID();
      try {
        CustomFieldHome customfieldHome = (CustomFieldHome)CVUtility.getHomeObject("com.centraview.customfield.CustomFieldHome","CustomField");
        CustomField customField = customfieldHome.create();
        customField.setDataSource(dataSource);
        customField.deleteCustomField(individualId, customFieldId.intValue());
      } catch (Exception e) {
        logger.error("[execute]: Failed trying to delete Custom Field ID: "+customFieldId, e);
        throw new ServletException(e);
View Full Code Here

TOP

Related Classes of com.centraview.customfield.CustomFieldHome

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.