OrgActivity[] orgActivityArray = new OrgActivity[ orgActivityVector.size() ]; System.out.println("DEBUG:!!!!"+orgActivityVector.size()); orgActivityVector.copyInto(orgActivityArray);
OrgActivity[] orgActivityArray = (OrgActivity []) orgActivities.toArray(); System.out.println("DEBUG:!!!!"+orgActivities.size());
  public void execute( PrintStream out,      HttpInput query_parameters,      PlanServiceContext psc,      PlanServiceUtilities psu ) throws Exception    {    Vector orgID_Info =  query_parameters.getParameterTokens("ORGID",'=');    Vector postOrgID_Info = query_parameters.getParameterTokens("POST",'=');    String orgID = new String("");    if(orgID_Info == null && postOrgID_Info == null)    {      String sortType = (String)query_parameters.getFirstParameterToken("SORT",'=');      displayClosurePlan(out,psc,sortType);    }    else if( orgID_Info != null )    {      if(orgID_Info.size() > 2)      {        //do search for OrgActivity Object        orgID = (String) orgID_Info.get(0);        String activityType = (String) orgID_Info.get(1);        String activityName = (String) orgID_Info.get(2);        OrgActivity org = getOrgActivityWith(orgID,activityType,psc);        displayOrgActivityWithName(out,org);      }      else      {        orgID = (String) orgID_Info.get(0);        String activityType = (String) orgID_Info.get(1);        OrgActivity org = getOrgActivityWith(orgID,activityType,psc);        displayOrgActivity(out,org);      }    }    else  // do Post    {      String postData = query_parameters.getBodyAsString();      String postOrgID = (String) postOrgID_Info.get(0);      String postActivityType = (String) postOrgID_Info.get(1);      Vector orgActivityVector = new Vector();      //OrgActivity org = getOrgActivityWith(postOrgID,postActivityType,psc);      Oplan plan = PSPOplanUtilities.getOplan(psc);      Enumeration org_activities = plan.getOrgActivities();      while(org_activities.hasMoreElements() )      {        OrgActivity org = (OrgActivity)org_activities.nextElement();        if(org.getOrgID().equals(postOrgID) )        {          orgActivityVector.addElement(org);        }      }      OrgActivity[] orgActivityArray = new OrgActivity[ orgActivityVector.size() ];      System.out.println("DEBUG:!!!!"+orgActivityVector.size());      orgActivityVector.copyInto(orgActivityArray);      PlugInDelegate delegate = psc.getServerPlugInSupport().getDirectDelegate();      delegate.openTransaction();      if (doPost(orgActivityArray,postData) == true)      {        delegate.publishChange(plan);        out.println("<html>");        out.println("<head>");        out.println("<title>Untitled Document</title>");        out.println("<meta http-equiv=\"refresh\" content=\" 1;URL=http://"+URLname+":5555/alpine/demo/CLOSURE_PLAN.PSP\">");        out.println("</head>");        out.println("<body bgcolor=\"#FFFFFF\">");        out.println("<H3><CENTER>Submit Successful !!</CENTER></H3>");        printHtmlEnd(out);      }      else      {        out.println("<html>");        out.println("<head>");        out.println("<title>Untitled Document</title>");        out.println("<meta http-equiv=\"refresh\" content=\" 2;URL=http://"+URLname+":5555/alpine/demo/CLOSURE_PLAN.PSP\">");        out.println("</head>");        out.println("<body bgcolor=\"#FFFFFF\">");        out.println("<h3><center>You have made an invalid change in which the start time is later than the ending time.</center></h3> \n");        out.println("<h3><center>Please redo it</center></h3>");        printHtmlEnd(out);      }      delegate.closeTransaction();    }  }