Package java.util

Examples of java.util.Collection


                    (OutputCompletionListener) sdef.getOutputCompletionListenerClass().newInstance();
            }
           
            m_xmlOptions = sdef.getXmlOptions();

            Collection transportOptionsDefinitions = sdef.getTransportOptionsDefinitions();
            if (transportOptionsDefinitions.size() > 0) {
                m_transportOptionsMap = new HashMap();
                for (Iterator iterator = transportOptionsDefinitions.iterator(); iterator.hasNext();) {
                    TransportOptionsDefinition def = (TransportOptionsDefinition) iterator.next();
                    TransportOptions transportOptions = def.createTransportOptions();
                    m_transportOptionsMap.put(transportOptions.getClass().getName(), transportOptions);
                }
            }
View Full Code Here


        addToList = true;
      }catch(Exception ignored){
        //ignored
      }

      Collection marketList = remote.getAllList();
      Collection marketingList = new ArrayList();
      marketingList.add(new DDNameValue("-1", "New Marketing List"));

      Iterator iterator = marketList.iterator();

      Vector marketingListColumn = new Vector(marketList);

      if (marketingListColumn != null)
      {
        for (Enumeration e = marketingListColumn.elements(); e.hasMoreElements();)
        {
          HashMap hm = (HashMap)e.nextElement();

          String title = (String)hm.get("title").toString();
          String listID = (String)hm.get("ListID").toString();
          marketingList.add(new DDNameValue(listID, title));
          if (addToList && rowStringId.equals(listID))
          {
            existingListName = title;
          }
        } //end for (Enumeration e = col2.elements() ; e.hasMoreElements() ;)
View Full Code Here

    }catch(CreateException e){
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    chartRemote.setDataSource(dataSource);
    Collection chartRawData = (Collection)chartRemote.getTicketPieData(individualId, listParameters);

    // Add the raw data to a JFree dataset
    DefaultPieDataset pieData = new DefaultPieDataset();

    int totalTickets = 0;
    Iterator iter = chartRawData.iterator();
    while (iter.hasNext())
    {
      HashMap row = (HashMap)iter.next();
      String userName = (String)row.get("name");
      Number openTickets = (Number)row.get("count");
View Full Code Here

        // get the primary contact for this entity, they are the target
        // recipient
        String entityid = (String) dynaform.get("selectedEntityId");
        ArrayList entityIdCollection = new ArrayList();
        entityIdCollection.add(entityid);
        Collection contactID = PTRemote.getContactsForEntity(entityIdCollection, true);
        Iterator contactIdIterator = contactID.iterator();
        HashMap individualIds = new HashMap();
        if (contactIdIterator.hasNext()) {
          Number individualId = (Number) contactIdIterator.next();
          individualIds.put(individualId.toString(), individualId.toString());
        }
        dynaform.set("toIndividuals", individualIds);
      } else if (specificentity.equals("SPECIFICALL") && entitysavedsearch.equals("SPECIFICENTITY")) {
        // All individuals associated with the selected entity are
        // to be recipients
        String entityid = (String) dynaform.get("selectedEntityId");
        ArrayList entityIdCollection = new ArrayList();
        entityIdCollection.add(entityid);
        Collection contactID = PTRemote.getContactsForEntity(entityIdCollection, false);
        Iterator contactIdIterator = contactID.iterator();
        HashMap individualIds = new HashMap();
        while (contactIdIterator.hasNext()) {
          Number individualId = (Number) contactIdIterator.next();
          individualIds.put(individualId.toString(), individualId.toString());
        }
        dynaform.set("toIndividuals", individualIds);
      } else if (specificentity.equals("SPECIFICCONTACT") && entitysavedsearch.equals("SPECIFICENTITY")) {
        // specific
        String individualid = (String) dynaform.get("individualId");
        HashMap individualIds = new HashMap();
        individualIds.put(individualid, individualid);
        dynaform.set("toIndividuals", individualIds);
      } else if (entitysavedsearch.equals("INDIVIDUAL")) {
        String individualSearchId = (String) dynaform.get("individualSearchId");
        ArrayList results = new ArrayList();
        results.addAll(remoteAdvancedSearch.performSearch(individualID, Integer.parseInt(individualSearchId), "ADVANCE", null));
        HashMap individualIds = new HashMap();
        for (int i = 0; i < results.size(); i++) {
          Number resultId = (Number) results.get(i);
          // I stuck the key and value in to this hashmap as the same string
          // as that is how the rest of print templates is written and I
          // didn't have time to make it more reasonable.
          individualIds.put(resultId.toString(), resultId.toString());
        }
        dynaform.set("toIndividuals", individualIds);
      } else if (entitysavedsearch.equals("ENTITY") && savedsearch1.equals("PRIMARY")) {
        // this is when an entity saved search is selected, and we need to
        // get the individualid's of the primary contacts for the found set
        // of entities.
        String entitySearchId = (String) dynaform.get("entityId");
        ArrayList results = new ArrayList();
        results.addAll(remoteAdvancedSearch.performSearch(individualID, Integer.parseInt(entitySearchId), "ADVANCE", null));
        // results contains our collection of entity ids.
        Collection contactID = PTRemote.getContactsForEntity(results, true);
        Iterator contactIdIterator = contactID.iterator();
        HashMap individualIds = new HashMap();
        while (contactIdIterator.hasNext()) {
          Number individualId = (Number) contactIdIterator.next();
          individualIds.put(individualId.toString(), individualId.toString());
        }
        dynaform.set("toIndividuals", individualIds);
      } else if (entitysavedsearch.equals("ENTITY") && savedsearch1.equals("ALL")) {
        // This is exactly the same as above, except we are getting all
        // individuals instead of just primary contacts.
        String entitySearchId = (String) dynaform.get("entityId");
        ArrayList results = new ArrayList();
        results.addAll(remoteAdvancedSearch.performSearch(individualID, Integer.parseInt(entitySearchId), "ADVANCE", null));
        // results contains our collection of entity ids.
        Collection contactID = PTRemote.getContactsForEntity(results, false);
        Iterator contactIdIterator = contactID.iterator();
        HashMap individualIds = new HashMap();
        while (contactIdIterator.hasNext()) {
          Number individualId = (Number) contactIdIterator.next();
          individualIds.put(individualId.toString(), individualId.toString());
        }
        dynaform.set("toIndividuals", individualIds);
      } // end else if (entitysavedsearch.equals("ENTITY") &&
      request.setAttribute("body", "new");
      // now we finished getting the buttload of info.
      // So get the templates.
      Collection templateList = PTRemote.getallPrintTemplate(individualID, categoryId);
      session.setAttribute("mergeType", mergeType);
      dynaform.set("templateList", templateList);
      PrintTemplateVO ptVO = new PrintTemplateVO();
      String id = (String) dynaform.get("id");
View Full Code Here

          }
          address = address.replaceAll("\n", "<br>");
        } // end if (primaryAdd != null)

        Values.put("--Address--", address);
        Collection mocList = entityVO.getMOC();
        Iterator iterator = mocList.iterator();
        String emailAddress = "";
        String phoneNumber = "";
        while (iterator.hasNext()) {
          MethodOfContactVO moc = (MethodOfContactVO) iterator.next();
          if (moc.getMocType() == 1 && moc.getIsPrimary().equalsIgnoreCase("YES")) // this
View Full Code Here

    }catch(CreateException e){
      logger.error("[execute] Exception thrown.", e);
      throw new ServletException(e);
    }
    chartRemote.setDataSource(dataSource);
    Collection chartRawData = (Collection)chartRemote.getTicketBarData(individualId, listParameters);

    // Add the raw data to a JFree dataset
    DefaultCategoryDataset chartData = new DefaultCategoryDataset();
    Iterator iter = chartRawData.iterator();
    while (iter.hasNext())
    {
      HashMap row = (HashMap)iter.next();
      Number openTickets = (Number)row.get("count");
      String userName = (String)row.get("name");
View Full Code Here

          if (primaryAdd.getWebsite() != null) {
            ticketForm.setWebsite(primaryAdd.getWebsite());
          }
        }
       
        Collection mocList = entityVO.getMOC();
       
        Iterator iterator = mocList.iterator();
        while (iterator.hasNext()) {
          MethodOfContactVO moc  = (MethodOfContactVO) iterator.next();
          if (moc.getMocType() == 1 && moc.getIsPrimary().equalsIgnoreCase("YES")) {
            ticketForm.setEmail(moc.getContent());
          }else if (moc.getMocType() == 4){
View Full Code Here

   * @return Vector containing list of available statuses
   */
  public Vector getProjectStatusList()
  {
    CVDal dl = new CVDal(this.dataSource);
    Collection col = null;
    try {
      dl.setSql("project.getprojectstatuslist");
      col = dl.executeQuery();
      dl.clearParameters();
    } finally {
View Full Code Here

  public Vector getTaskStatusList() throws java.rmi.RemoteException
  {
     CVDal dl = new CVDal(this.dataSource);
     //ALLSQL.put("project.getprojectstatuslist", "select title from projectstatus");
     dl.setSql("project.getprojectstatuslist");
     Collection col = dl.executeQuery();
     dl.clearParameters();
       dl.destroy();
     return fillProjectStatusList(col);
  }
View Full Code Here

        + "st.TableName, st.TablePrimaryKey FROM searchtable st,"
        + "searchmodule sm WHERE st.SearchTableID = sm.SearchTableID "
        + "AND sm.IsPrimaryTable = 'Y' AND sm.moduleid = ?";
      cvdal.setSqlQuery(sqlQuery);
      cvdal.setInt(1, moduleID);
      Collection resultsCollection = cvdal.executeQuery();
      if (resultsCollection != null)
      {
        Iterator resultsIterator = resultsCollection.iterator();
        if (resultsIterator.hasNext())
        {
          HashMap resultsHashMap = (HashMap) resultsIterator.next();
          Number tableID = (Number) resultsHashMap.get("SearchTableID");
          String tableDisplayName = (String) resultsHashMap.get("DisplayName");
View Full Code Here

TOP

Related Classes of java.util.Collection

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.