for (int i  = 0;i <orgActivityArray.length ; i++ ) { if( orgActivityArray[i].getActivityType().equals("Deployment") ) { orgVector.addElement( orgActivityArray[i] );
for (Iterator iterator = PSPOplanUtilities.getOrgActivities(psc).iterator(); iterator.hasNext();) { OrgActivity orgActivity = (OrgActivity) iterator.next(); if (orgActivity.getActivityType().equals("Deployment")) { orgVector.addElement(orgActivity);
  public void displayClosurePlan(PrintStream out, PlanServiceContext psc,String sortType) {    try {      Oplan plan = PSPOplanUtilities.getOplan(psc);      OrgActivity[] orgActivityArray = plan.getOrgActivityArray();      Vector orgVector = new Vector();      for (int i  = 0;i <orgActivityArray.length ; i++ )      {        if( orgActivityArray[i].getActivityType().equals("Deployment") )        {          orgVector.addElement( orgActivityArray[i] );        }      }      OrgActivity[] orgArray = new OrgActivity[orgVector.size()];      orgVector.copyInto(orgArray);      bubbleSort(orgArray,orgArray.length,sortType);      printHtmlBegin(out);      out.println("<p align=\"center\"><b><font size=\"5\">CLOSURE PLAN</font></b></p>");      out.println("<center>");      out.println("<table cols=\"2\" width=\"60%\" border=\"1\">");      out.println("<tr>");      out.println("<td><b>Organization&nbsp;&nbsp;&nbsp;</b><a href=" +"\"http://"+URLname+":5555/alpine/demo/CLOSURE_PLAN.PSP\">"+"Click to Sort</a></td>");      out.println("<td><b>RDD&nbsp;&nbsp;&nbsp;</b><a href=" +"\"http://"+URLname+":5555/alpine/demo/CLOSURE_PLAN.PSP?SORT=RDD\">"+"Click to Sort</a></td>");      out.println("</tr>");      for (int i  = 0;i <orgArray.length; i++ )      {        System.out.println("In for loop");        //if(orgArray[i].getActivityType().equals("Deployment") )        //{        out.println("<tr>");        out.println("<td>" + orgArray[i].getOrgID() +"</td>");        if( orgArray[i].getActivityName() != null  )          out.println("<td><a href=" +"\"http://"+URLname+":5555/alpine/demo/CLOSURE_PLAN.PSP?ORGID="+orgArray[i].getOrgID()+"="+orgArray[i].getActivityType()+"="+orgArray[i].getActivityName()+ "\">"+" C+"+orgArray[i].getTimeSpan().getEndDate().getTime()+"</a></td>");        else          out.println("<td><a href=" +"\"http://"+URLname+":5555/alpine/demo/CLOSURE_PLAN.PSP?ORGID="+orgArray[i].getOrgID()+"="+orgArray[i].getActivityType()+"\">" +" C+"+orgArray[i].getTimeSpan().getEndDate().getTime()+"</a></td>");        out.println("</tr>");        //}      }      out.println("</table>");      out.println("</center>");      printHtmlEnd(out);      out.flush();    }    catch (Exception e) {      out.println("</table>");      printHtmlEnd(out);      System.out.println(e.getMessage());    }  }