Package eu.planets_project.tb.gui.backing

Examples of eu.planets_project.tb.gui.backing.ExperimentBean


  /**
   * Set the selected service and operation to final and continue to select input data
   * @return
   */
  public String completeSerOpsSelection(){
    ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
    expBean.setOpartionSelectionCompleted(true);
        NewExpWizardController.redirectToExpStage(expBean.getID(), 2);
        return "success";
  }
View Full Code Here


      //TODO: continue with implementation
    }*/
   
    public void changedExpTypeEvent(ValueChangeEvent ce) {
      String id = ce.getNewValue().toString()
      ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
      expBean.setEtype(id);
      //updateExpTypeAction();
      changedExpType();
    }
View Full Code Here

     * e.g. only fetch Migration/Characterisation templates
     * @return
     */
    public Map<String,String> getAllAvailableTBServiceTemplates(){
      Map<String,String> ret = new TreeMap<String,String>();
      ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
      ServiceTemplateRegistry registry = ServiceTemplateRegistryImpl.getInstance();
      Collection<TestbedServiceTemplate> templates = new Vector<TestbedServiceTemplate>();
     
      //determine which typeID has been selected
        //simple migration experiment
      if(expBean.getEtype().equals("experimentType.simpleMigration")){
        //mapping between service type ID and experiment type ID
        templates = registry.getAllServicesWithType(
            TestbedServiceTemplate.ServiceOperation.SERVICE_OPERATION_TYPE_MIGRATION
            );
      }
       //simple characterisation experiment
      if(expBean.getEtype().equals("experimentType.simpleCharacterisation")){
        templates = registry.getAllServicesWithType(
            TestbedServiceTemplate.ServiceOperation.SERVICE_OPERATION_TYPE_CHARACTERISATION
            );
      }
      //test if at least one template exists
      if((templates!=null)&&(templates.size()>0)){
        //add data for rendering
      Iterator<TestbedServiceTemplate> itTemplates = templates.iterator();
      while(itTemplates.hasNext()){
        TestbedServiceTemplate template = itTemplates.next();
        //use the deployment date to extend the service name for selection
        String format = "yyyy-MM-dd HH:mm:ss";
        String date = doFormat(format, template.getDeploymentDate());
        ret.put(template.getName()+" - "+date+" - "+template.getDescription(),String.valueOf(template.getUUID()));
      }
     
      //only triggered for the first time
      if(expBean.getSelectedServiceTemplate()==null){
        expBean.setSelServiceTemplateID(ret.values().iterator().next());
        reloadOperations();
      }
      }
      return ret;
    }
View Full Code Here

     * e.g. only fetch Migration/Characterisation templates
     * @return
     */
    public Map<String,String> getAllAvailableServiceOperations(){
      TreeMap<String,String> ret = new TreeMap<String,String>();
      ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
      TestbedServiceTemplate template = expBean.getSelectedServiceTemplate();
      //log.debug("Looking up service operations for template: "+template);
      if(template!=null){
            log.debug("Looking for services of type: "+expBean.getEtype());
        List<ServiceOperation> lOperations = null;
          //simple migration experiment
          if(expBean.getEtype().equals("experimentType.simpleMigration")){
            //mapping between operationTypeID and experiment type ID
            lOperations = template.getAllServiceOperationsByType(
                TestbedServiceTemplate.ServiceOperation.SERVICE_OPERATION_TYPE_MIGRATION
                );
          }
           //simple characterisation experiment
          if(expBean.getEtype().equals("experimentType.simpleCharacterisation")){
            lOperations = template.getAllServiceOperationsByType(
                TestbedServiceTemplate.ServiceOperation.SERVICE_OPERATION_TYPE_CHARACTERISATION
                );
          }
         
View Full Code Here

     * BMBean contains information e.g. on if it's selected, if an auto evaluation service is available etc.
     * for backing the GUI elements. Finally a list of List<BenchmarkBean> is put into the session map as "BenchmarkBeans".
     * @return
     */
    public String getRetrieveBenchmarkBeans() {
         ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
     
         //the available BenchmarkGoals as BenchmarkBean (only from the selected category)
         Map<String,BenchmarkBean> availBenchmarks = new HashMap<String,BenchmarkBean>(expBean.getExperimentBenchmarks());
         //get all BenchmarkGoals
         Iterator<BenchmarkGoal> iter = BenchmarkGoalsHandlerImpl.getInstance().getAllBenchmarkGoals().iterator();
      //the information if a BMGoal can be used within an autoEvaluationService
         //Map<BMGoalID, EvaluationTestbedServiceTemplate>
         Map<String,TestbedServiceTemplate> mapAutoEvalSer = this.getSupportedAutoEvaluationBMGoals();
        
      while (iter.hasNext()) {
        BenchmarkGoal bmg = iter.next();
                Iterator<String> dtypeiter = expBean.getDtype().iterator();
                while (dtypeiter.hasNext()){
                    String currentType = dtypeiter.next();
                    DigitalObjectTypesImpl dtypeImpl = new DigitalObjectTypesImpl();
                    currentType = dtypeImpl.getDtypeName(currentType);
                    //only add the goals that match the already selected categories
View Full Code Here

    }
      
   
      private void autoApproveExperiment(){
        TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
          ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
        Experiment exp = expBean.getExperiment();
       
        // Approve the experiment, automatically:
        AdminManagerImpl.approveExperimentAutomatically(exp);
 
        // Update the Experiment Bean:
          testbedMan.updateExperiment(exp);
          expBean.setCurrentStage(ExperimentBean.PHASE_EXPERIMENTEXECUTION);
          expBean.setApproved(true);
      }
View Full Code Here

      *
      * @return
      */
     public void executeExperiment(){
        TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
          ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
        Experiment exp = expBean.getExperiment();
       
        // NOT if already running.
        if( exp.getExperimentExecutable().isExecutionRunning() ) return;
       
        try {
View Full Code Here

              this.executeExperiment();
    }
   
    public boolean getExecuteExperimentIsRunning() {
        // Return:
          ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
          Experiment exp = expBean.getExperiment();
          boolean running = exp.getExperimentExecutable().isExecutionRunning();
          return running;
    }
View Full Code Here

          return running;
    }
   
    public String getPositionInQueueStatusMessage() {
      String ret = "";
          ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
          refreshExperimentBean();
          Experiment exp = expBean.getExperiment();
      //get the batch processor that's responsible for this job
          BatchProcessor pb = TestbedBatchProcessorManager.getInstance().getBatchProcessor(exp.getExperimentExecutable().getBatchSystemIdentifier());
          String job_key = exp.getExperimentExecutable().getBatchExecutionIdentifier();
          log.info("Looking for experiment position under job key: "+job_key+" : " + pb.getPositionInQueue(job_key));
          ret+=pb.getPositionInQueue(job_key);
View Full Code Here

          return ret;
    }
   
    public int getExecuteExperimentProgress() {
          TestbedManager testbedMan = (TestbedManager) JSFUtil.getManagedObject("TestbedManager");
          ExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject("ExperimentBean");
          refreshExperimentBean();
          Experiment exp = expBean.getExperiment();

          if( exp.getExperimentExecutable() !=  null ) {
              log.info("Looking for experiment status... "+exp.getExperimentExecutable().getBatchExecutionIdentifier());
          }
          log.info("Invoked: "+exp.getExperimentExecutable().isExecutableInvoked());
View Full Code Here

TOP

Related Classes of eu.planets_project.tb.gui.backing.ExperimentBean

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.