Package eu.planets_project.tb.api

Examples of eu.planets_project.tb.api.TestbedManager


      }
   
    public Collection<Experiment> getAllExpAwaitingAuth()
    {
        // Get the experiments-to-approve list:
        TestbedManager testbedMan = (TestbedManager)JSFUtil.getManagedObject("TestbedManager")
        Collection<Experiment> myExps = testbedMan.getAllExperimentsAwaitingApproval();
         currExps = Collections.list(Collections.enumeration(myExps));
        sort(getSort(), isAscending());
        return currExps;
    }
View Full Code Here


        return currExps;
    }
   
    public Collection<Experiment> getAllExpApproved()
    {   
        TestbedManager testbedMan = (TestbedManager)JSFUtil.getManagedObject("TestbedManager")
        Collection<Experiment> allExps = testbedMan.getAllExperimentsAtPhase(ExperimentPhase.PHASE_EXPERIMENTEXECUTION);
        currExps = Collections.list(Collections.enumeration(allExps));
        sort(getSort(), isAscending());
        return currExps;
    }
View Full Code Here

    }
             
               
      public int getNumAllExperiments()
      {
          TestbedManager testbedMan = (TestbedManager)JSFUtil.getManagedObject("TestbedManager")
          int num = testbedMan.getNumberOfExperiments();
          return num;
      }
View Full Code Here

            return dm.downloadExperiment( (ExperimentImpl)selectedExperiment );
        }
       
      public String exportAllExperimentsAction() {
        log.debug("Exporting all experiments");
        TestbedManager testbedMan = (TestbedManager)JSFUtil.getManagedObject("TestbedManager")
        Collection<Experiment> allExps = testbedMan.getAllExperiments();
            DownloadManager dm = (DownloadManager)JSFUtil.getManagedObject("DownloadManager");
          return dm.downloadAllExperiments( allExps );
      }
View Full Code Here

            FacesContext ctx = FacesContext.getCurrentInstance();
            this.linkEid = (String) (String) ctx.getExternalContext().getRequestParameterMap().get("linkEid");
            if( this.linkEid == null || "".equals(this.linkEid))
                return "goToBrowseExperiments";
           
            TestbedManager testbedMan = (TestbedManager)JSFUtil.getManagedObject("TestbedManager");
            Experiment selectedExperiment = testbedMan.getExperiment(Long.parseLong(linkEid));
            System.out.println("exp name: "+ selectedExperiment.getExperimentSetup().getBasicProperties().getExperimentName());

            //ExperimentInspector.putExperimentIntoSessionExperimentBean(selectedExperiment);
            JSFUtil.redirect("/reader/view_exp.faces?eid="+selectedExperiment.getEntityID());
                   
View Full Code Here

            return "selectDelete";
        }
       
        public String approveExperiment() {
            Experiment exp = (Experiment) this.getToAppExp_data().getRowData();
            TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
            exp.getExperimentApproval().setState(Experiment.STATE_COMPLETED);
            exp.getExperimentExecution().setState(Experiment.STATE_IN_PROGRESS);
            testbedMan.updateExperiment(exp);
            //send email to helpdesk to inform them of approval
            PlanetsMailMessage mailer = new PlanetsMailMessage();
            mailer.setSender("noreply@planets-project.eu");
            mailer.setSubject("Testbed Experiment Deleted");
            mailer.setBody("Experiment "+exp.getExperimentSetup().getBasicProperties().getExperimentName()+" approved.");
View Full Code Here

       
     
        public String deleteExperimentAction()
      {
      ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
      TestbedManager testbedMan = (TestbedManager)JSFUtil.getManagedObject("TestbedManager")
          testbedMan.removeExperiment(expBean.getID());
         
          //remove this experiment from the session
          FacesContext ctx = FacesContext.getCurrentInstance();
          ctx.getExternalContext().getSessionMap().remove("ExperimentBean");
View Full Code Here

   * Retrieves the ServiceTemplate from the ExperimentExecutable, which is
   * persisted within the Experiment. Please note: this is null for a new experiment.
   * @see eu.planets_project.tb.api.model.ExperimentSetup#getServiceTemplate()
   */
  public TestbedServiceTemplate getServiceTemplate() {
    TestbedManager tbManager = TestbedManagerImpl.getInstance(true);
    //get the Experiment this phase belongs to
    Experiment thisExperiment = tbManager.getExperiment(this.lExperimentIDRef);
   
    ExperimentExecutable executable = thisExperiment.getExperimentExecutable();
    if(executable !=null){
      //it has already been created
      return executable.getServiceTemplate();
View Full Code Here

            log.info("me: " + me.getAgentType()+ " " + me.getMeasurements().size() );
            for(MeasurementImpl m : me.getMeasurements() ) {
                log.info("m: "+m.toString());
            }
            */
        TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
//        if( this.measurementEvents.size() == 2 ) {
        /*
            // Empty:
            for( MeasurementEventImpl mev : this.measurementEvents ) {
                mev.setExperiment(null);
View Full Code Here

        return eref;
    }

    public ArrayList<Experiment> getErefBeans() {
        ArrayList<Experiment> ert = new ArrayList<Experiment>();
        TestbedManager testbedMan = (TestbedManager)JSFUtil.getManagedObject("TestbedManager")
        for( int i=0; i < this.eref.size(); i++ ) {
            Experiment erp = testbedMan.getExperiment((Long.parseLong(this.eref.get(i))));
            ert.add(i,erp);
        }
        return ert;
    }
View Full Code Here

TOP

Related Classes of eu.planets_project.tb.api.TestbedManager

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.