Package ch.tatool.module

Examples of ch.tatool.module.ModuleScheduler


     *
     * @param module
     */
    private void loadModuleScheduler(ModuleImpl module) {
      // load the scheduler instance
      ModuleScheduler scheduler = (ModuleScheduler) instantiateObject(module,
          Module.PROPERTY_MODULE_SCHEDULER_CLASS, ModuleScheduler.class);
     
      String maxSessions = module.getModuleProperties().get(Module.PROPERTY_MODULE_SCHEDULER_MAX_SESSIONS);
     
      // initialize if we got a scheduler.
      if (scheduler != null) {
        scheduler.setModule(module);
        scheduler.setDataService(dataService);
        scheduler.initialize();
        if (maxSessions != null) {
          scheduler.setMaxSessions(Integer.valueOf(maxSessions));
        }
        module.setModuleScheduler(scheduler);
      }
    }
View Full Code Here


     
    }
  }

  private void startModule() {
    ModuleScheduler moduleScheduler = module.getModuleScheduler();
   
    if (moduleScheduler != null) {
      moduleScheduler.setMessages(messages);
      ModuleSchedulerMessage message;
      message = moduleScheduler.isSessionStartAllowed(module);
     
      if (message.isSessionStartAllowed()) {
        startModuleButton.setEnabled(false);
        executor = executionService.createExecutor(module);
        executionService.startExecution(executor, false);
View Full Code Here

    /**
     * Returns whether a module can be executed.
     */
    public boolean canExecute(Module module) {
        // check whether we are allowed to create a new session
        ModuleScheduler moduleScheduler = module.getModuleScheduler();
        if (moduleScheduler != null) {
          ModuleSchedulerMessage message = moduleScheduler.isSessionStartAllowed(module);
          return message.isSessionStartAllowed();
        } else {
          return true;
        }
    }
View Full Code Here

     *
     * @param module
     */
    private void loadModuleScheduler(ModuleImpl module) {
      // load the scheduler instance
      ModuleScheduler scheduler = (ModuleScheduler) instantiateObject(module,
          Module.PROPERTY_MODULE_SCHEDULER_CLASS, ModuleScheduler.class);
       
      // initialize if we got a scheduler. No scheduler = all access
      if (scheduler != null) {
        scheduler.setModule(module);
        scheduler.setDataService(dataService);
        scheduler.initialize();
        module.setModuleScheduler(scheduler);
      }
    }
View Full Code Here

    /**
     * Returns whether a module can be executed.
     */
    public boolean canExecute(Module module) {
        // check whether we are allowed to create a new session
        ModuleScheduler moduleScheduler = module.getModuleScheduler();
        if (moduleScheduler != null) {
          ModuleSchedulerMessage message = moduleScheduler.isSessionStartAllowed(module);
          return message.isSessionStartAllowed();
        } else {
          return true;
        }
    }
View Full Code Here

     *
     * @param module
     */
    private void loadModuleScheduler(ModuleImpl module) {
      // load the scheduler instance
      ModuleScheduler scheduler = (ModuleScheduler) instantiateObject(module,
          Module.PROPERTY_MODULE_SCHEDULER_CLASS, ModuleScheduler.class);
       
      // initialize if we got a scheduler. No scheduler = all access
      if (scheduler != null) {
        scheduler.setModule(module);
        scheduler.setDataService(dataService);
        scheduler.initialize();
        module.setModuleScheduler(scheduler);
      }
    }
View Full Code Here

      sb.append(module.getName());
      html = html.replaceAll("\\$moduleName", sb.toString());
    }
   
    // get information from the module scheduler
    ModuleScheduler moduleScheduler = module.getModuleScheduler();
    if (moduleScheduler != null) {
      String numSessions = moduleScheduler.getSchedulerNumSessions(module);
      String lastSessionDate = moduleScheduler.getSchedulerLastSessionDate(module);
     
      // number of sessions
      StringBuilder sb = new StringBuilder();
      sb.append("<b>");
      sb.append(messages.getString("ModuleInfoPanel.label.numSessions"));
View Full Code Here

     
    }
  }

  private void startModule() {
    ModuleScheduler moduleScheduler = module.getModuleScheduler();
    ModuleSchedulerMessage message;
   
    if (moduleScheduler != null) {
      message = moduleScheduler.isSessionStartAllowed(module);
     
      if (message.isSessionStartAllowed()) {
        startModuleButton.setEnabled(false);
        executor = executionService.createExecutor(module);
        executionService.startExecution(executor, false);
View Full Code Here

     
    }
  }

  private void startModule() {
    ModuleScheduler moduleScheduler = module.getModuleScheduler();
    ModuleSchedulerMessage message;
   
    if (moduleScheduler != null) {
      message = moduleScheduler.isSessionStartAllowed(module);
     
      if (message.isSessionStartAllowed()) {
        startModuleButton.setEnabled(false);
        executor = executionService.createExecutor(module);
        executionService.startExecution(executor, false);
View Full Code Here

TOP

Related Classes of ch.tatool.module.ModuleScheduler

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.