Package java.util

Examples of java.util.HashMap


  public String paymentID;

  public PaymentLines()
  {
    viewVector = new Vector();
    this.columnMap = new HashMap();

    columnMap.put("InvoiceId", new Integer(50) );
    columnMap.put("InvoiceNum", new Integer(200) );
    columnMap.put("Date", new Integer(200) );
    columnMap.put("Total", new Integer(150) ) ;
View Full Code Here


  // constructor
  public  EmailList()
  {

    columnMap = new HashMap();
    columnMap.put( "Subject" , new Integer(100) );
    columnMap.put( "From" , new Integer(120) );
    columnMap.put( "To" , new Integer(120) ) ;
    columnMap.put( "Received" , new Integer(150) ) ;
    columnMap.put( "Size" , new Integer(50)) ;
View Full Code Here

  private String lpName;

  public ListPreference(String value)
  {
    this.lpName = value;
    this.viewHashMap = new HashMap();
  }
View Full Code Here

 
    
  public InvoiceLines()
  { 
      viewVector = new Vector();
    this.columnMap = new HashMap();

    columnMap.put( "LineId" , new Integer(100) );
    columnMap.put( "ItemId" , new Integer(100) );       
    columnMap.put( "SKU" , new Integer(110) );
    columnMap.put( "Description" , new Integer(139) );
View Full Code Here

    String messageid    = (String) request.getParameter( "messageid" );
   
    mailMessage.setMessageID( Integer.parseInt( messageid ) );
         

    HashMap attchmentids =( HashMap) session.getAttribute( "AttachfileList" );


    int id = Integer.parseInt( accountid );

    /** code added for query change **/
 
View Full Code Here

      // first, get the list of valid fields from the database.
      // loop through that list, and get the form parameter value
      // for each valid field. Stick that value in a hashmap for
      // use in the rest of this handler...
      ArrayList validFields = mailRemote.getValidFields("Contact");
      HashMap contactForm = new HashMap();
      if (validFields != null && validFields.size() > 0)
      {
        Iterator iter = validFields.iterator();
        while (iter.hasNext())
        {
          HashMap validFieldMap = (HashMap)iter.next();
          String name = (String)validFieldMap.get("name");
          String fieldName = (String)validFieldMap.get("fieldName");
          String value = request.getParameter(fieldName);
          if (value == null){ value = ""; }
          contactForm.put(fieldName, value);
        }
      }
View Full Code Here

    {
      Iterator cfIter = validCustomFields.iterator();
      // loop through valid CF's...
      while (cfIter.hasNext())
      {
        HashMap fieldInfo = (HashMap)cfIter.next();
        Number fieldID = (Number)fieldInfo.get("fieldID");
        String fieldName = (String)fieldInfo.get("fieldName");
       
        // now that we have the field name, we can get the form
        // value for each valid custom field...
        String formValue = (String)contactForm.get(fieldName);
        if (formValue != null && formValue.length() > 0)
View Full Code Here

   *         this license.
   */
  private static final HashMap getEntityNameAndIndividualName(String dataSource)
  {
    String entityName = "ENTITYNAME";
    HashMap names = new HashMap();
    try {
      ContactFacadeHome contactFacadeHome = (ContactFacadeHome)CVUtility.getHomeObject("com.centraview.contact.contactfacade.ContactFacadeHome", "ContactFacade");
      ContactFacade contactFacade = (ContactFacade)contactFacadeHome.create();
      contactFacade.setDataSource(dataSource);
      EntityVO entityVO = contactFacade.getEntity(1);
      entityName = entityVO.getName();
      IndividualVO individualVO = entityVO.getIndividualVO();
      StringBuffer individualName = new StringBuffer();
      if (individualVO != null) {
        individualName.append(individualVO.getFirstName());
        individualName.append(" ");
        individualName.append(individualVO.getLastName());
      }
      names.put("entityName", entityName);
      names.put("individualName", individualName.toString());
    } catch (Exception e) {
      logger.error("[getEntityNameAndIndividualName] Exception thrown.", e);
    }
    return names;
  } //end of getEntityName method
View Full Code Here

      if (flag == true)
      {
        MailMessage mailmessage = null;
        EmailFacade remote = (EmailFacade)cfh.create();

        HashMap hm = new HashMap();
        hm.put("MessageID", new Integer(messageID));
        mailmessage = remote.getMailMessage(individualID, hm);
        remote.setDataSource(dataSource);

        String mailIdList[] = { rowId };

        remote.emailMarkasRead(Integer.parseInt(folderid), 1, mailIdList);

        ArrayList to = mailmessage.getTo();
        ArrayList cc = mailmessage.getCc();

        String arrayTO[] = new String[to.size()];
        for (int i = 0; i < arrayTO.length; i++)
        {
          MailAddress ma = (MailAddress)to.get(i);
          arrayTO[i] = ma.getAddress();
        }

        String arrayCC[] = new String[cc.size()];
        for (int j = 0; j < arrayCC.length; j++)
        {
          com.centraview.email.getmail.MailAddress macc = (MailAddress)cc.get(j);
          arrayCC[j] = macc.getAddress();
        }

        dynaForm.set("MessageID", Integer.toString(messageID));

        //From
        if (mailmessage.getMailFrom() != null)
        {
          dynaForm.set("from", mailmessage.getMailFrom());
        }
        // To
        if (arrayTO.length != 0)
        {
          dynaForm.set("to", arrayTO);
        }

        // CC
        if (arrayCC.length != 0)
        {
          dynaForm.set("cc", arrayCC);
        }

        //date
        if (mailmessage.getMessageDate() != null)
        {
          dynaForm.set("date", mailmessage.getMessageDate());
        }

        //subject
        if (mailmessage.getSubject() != null)
        {
          dynaForm.set("subject", mailmessage.getSubject());
        }

System.out.println("mailmessage.getSubject()"+mailmessage.getSubject());
        // body
        if (mailmessage.getBody() != null)
        {
          dynaForm.set("message", mailmessage.getBody());
        }
        if (mailmessage.getHeadersHM() != null)
        {
          HashMap hmHeader = (HashMap)mailmessage.getHeadersHM();
          String headerKey = (String)hmHeader.get(Constants.EH_SERVICE_KEY);
          if (headerKey != null)
          {
            String headerValue = null;
            if (headerKey.equals(Constants.EH_SERVICE_VALUE_ACTIVITY_INVITATION))
            {
              headerValue = (String)hmHeader.get(Constants.EH_ATTENDEE_STATUS_KEY);
              request.setAttribute("header", headerValue);
              String activityId = (String)hmHeader.get(Constants.EH_ACTIVITYID_KEY);
              request.setAttribute("activityId", activityId);

            }
            else if (headerKey.equals(Constants.EH_SERVICE_VALUE_CREATEINDIVIDUAL))
            {
              headerValue = (String)hmHeader.get(headerKey);
              headerValue = Constants.EH_SERVICE_VALUE_CREATEINDIVIDUAL;
              request.setAttribute("header", headerValue);
            }
            else if (headerKey.equals(Constants.EH_SERVICE_VALUE_INDIVIDUALIMPORTED))
            {
View Full Code Here

      // get from session the form associated with windowid
      HttpSession session = request.getSession();

      // hashMap
      HashMap threadHashMap = null;
      // file form from session
      ThreadForm sessionForm = null;

      // get from request windowid
      String windowId = (String) request.getParameter(ThreadConstantKeys.WINDOWID);
      System.out.println("1");     
      if ((request.getParameter(ThreadConstantKeys.TYPEOFOPERATION).toString()).equals(ThreadConstantKeys.ADD)) {
        // hash map for add folder
        threadHashMap = (HashMap) session.getAttribute(ThreadConstantKeys.NEWTHREADHASHMAP);
        // get form from hashmap
        sessionForm = (ThreadForm) threadHashMap.get(windowId);
      }
      else if ((request.getParameter(ThreadConstantKeys.TYPEOFOPERATION).toString()).equals(ThreadConstantKeys.EDIT)) {
        // hash map for edit activity
        threadHashMap = (HashMap) session.getAttribute(ThreadConstantKeys.EDITTHREADHASHMAP);
        // get form from hashmap
        sessionForm = (ThreadForm) threadHashMap.get(windowId);
      }

      // get previous form values 
      ThreadForm previousForm = (ThreadForm) form;

      // set activity id if present
      if (previousForm.getThreadId() != null)
        sessionForm.setThreadId(previousForm.getThreadId());     

      // set form for previous permission values
      if (ThreadConstantKeys.DETAIL.equals(""))//(previousTab)) 
      {
        sessionForm.setTitle(previousForm.getTitle());
        sessionForm.setDetail(previousForm.getDetail());
        sessionForm.setPriorityId(previousForm.getPriorityId());
        sessionForm.setPriorityName(previousForm.getPriorityName());
      }

      // set the form back in session
      if ((request.getParameter(ThreadConstantKeys.TYPEOFOPERATION).toString()).equals(ThreadConstantKeys.ADD)) {     
        threadHashMap.put(windowId, sessionForm);
        session.setAttribute(ThreadConstantKeys.NEWTHREADHASHMAP, threadHashMap);
      }
      else if ((request.getParameter(ThreadConstantKeys.TYPEOFOPERATION).toString()).equals(ThreadConstantKeys.EDIT)) {
        threadHashMap.put(windowId, sessionForm);
        session.setAttribute(ThreadConstantKeys.EDITTHREADHASHMAP, threadHashMap);
      }
    }
    catch (Exception e) {
      e.printStackTrace();   
View Full Code Here

TOP

Related Classes of java.util.HashMap

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.