Package eu.planets_project.tb.api

Examples of eu.planets_project.tb.api.TestbedManager


     *
     * @return
     */
    public String downloadExperiment( Long expID ) {
        if( expID == null ) return "experimentNotFound";
        TestbedManager testbedMan = (TestbedManager)JSFUtil.getManagedObject("TestbedManager")
        Experiment exp = testbedMan.getExperiment(expID);
        return downloadExperiment( (ExperimentImpl) exp );
    }
View Full Code Here


        if( ! experimentRequiresApproval(exp) ) return;

        // Store the 'Asking for approval' status as a NULL decision:
        exp.getExperimentApproval().setDecision(APPROVAL_DECISION_AWAITING);
       
        TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
        testbedMan.updateExperiment(exp);
       
        // Mail the administrator:
        sendApprovalRequest(exp);
        log.info("The experiment '"+exp.getExperimentSetup().getBasicProperties().getExperimentName()+"' requires administrator approval.");
    }
View Full Code Here

        exp.getExperimentApproval().setGo(true);
        exp.getExperimentApproval().setState(Experiment.STATE_COMPLETED);
        exp.getExperimentExecution().setState(Experiment.STATE_IN_PROGRESS);
        exp.getExperimentApproval().addApprovalUser(APPROVAL_AUTOMATIC_USER);
       
        TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
        testbedMan.updateExperiment(exp);
       
        log.info("The experiment '"+exp.getExperimentSetup().getBasicProperties().getExperimentName()+"' was automaticallu approved for execution.");
    }
View Full Code Here

        exp.getExperimentApproval().setGo(true);
        exp.getExperimentApproval().addApprovalUser(currentUser.getUserid());
        exp.getExperimentApproval().setState(Experiment.STATE_COMPLETED);
        exp.getExperimentExecution().setState(Experiment.STATE_IN_PROGRESS);
       
        TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
        testbedMan.updateExperiment(exp);
       
        // Mail the user:
        sendApprovalNotice(exp);
        log.info("The experiment '"+exp.getExperimentSetup().getBasicProperties().getExperimentName()+"' was approved for execution.");
    }
View Full Code Here

            exp.getExperimentApproval().setExplanation("Experiment was denied approval for execution.");
        exp.getExperimentApproval().setDecision(APPROVAL_DECISION_DENIED);
        exp.getExperimentApproval().setGo(false);
        exp.getExperimentApproval().addApprovalUser(currentUser.getUserid());
       
        TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
        testbedMan.updateExperiment(exp);
       
        // Mail the user:
        sendDenialNotice(exp);
        log.info("The experiment '"+exp.getExperimentSetup().getBasicProperties().getExperimentName()+"' was denied approval for execution.");
    }
View Full Code Here

        // Need to clone to avoid a 'java.util.ConcurrentModificationException':
        List<String> usersToRemove = new ArrayList<String>();
        for( String user : approvalUsers ) usersToRemove.add(user);
        exp.getExperimentApproval().removeApprovalUsers(usersToRemove);
       
        TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
        testbedMan.updateExperiment(exp);
       
        log.info("The experiment '"+exp.getExperimentSetup().getBasicProperties().getExperimentName()+"' was made editable again.");
    }
View Full Code Here

        log.debug("Created experiment if necessary, now passing it back.");   
        return true;
    }
   
    public long persistExperiment() {
        TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
        long eid = testbedMan.registerExperiment(this.getExperiment());
        log.info("Created experiment eid = "+eid);
        return eid;
    }
View Full Code Here

        log.info("Created experiment eid = "+eid);
        return eid;
    }
   
    public void updateExperiment() {
        TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
        testbedMan.updateExperiment(this.getExperiment());
    }
View Full Code Here

     * @param exp The experiment to store.
     * @return the ID of the new experiment.
     */
    private static long storeExperiment( ExperimentImpl exp ) {
        // Merge into DB
        TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
        long lExpID = testbedMan.registerExperiment(exp);
        Experiment newExp = testbedMan.getExperiment(lExpID);
        log.info("Persisted experiment "+newExp.getEntityID());
        return lExpID;
    }
View Full Code Here

      } else
        return null;     
    }
   
    private String submitForApproval() {
        TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
        ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
        Experiment exp = expBean.getExperiment();
        exp.getExperimentSetup().setState(Experiment.STATE_COMPLETED);
        exp.getExperimentApproval().setState(Experiment.STATE_IN_PROGRESS);
        testbedMan.updateExperiment(exp);
        expBean.setCurrentStage(ExperimentBean.PHASE_EXPERIMENTAPPROVAL)
        FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove("BenchmarkBeans");
        // Attempt to approve the experiment, and forward appropriately
        if( ! AdminManagerImpl.experimentRequiresApproval(exp) ) {
            autoApproveExperiment();
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.