Examples of Task


Examples of org.jdesktop.application.Task

 
 
  @Override
  public void onClick() {
    Application app = BradsWebdavClientApp.getApplication();
    Task task = new DownloadFolderTask(app);
    BradsWebdavClientApp.getApplication().getContext().getTaskService().execute(task);
  }
View Full Code Here

Examples of org.jfree.data.gantt.Task

          seriesNames.add(seriesName);
          seriesMap.put(seriesName, taskSrs);
        }

        // create task
        Task task = taskSrs.get(crtGanttSeries.getTask());
        if(task == null) {
          task = new Task(crtGanttSeries.getTask(),
              crtGanttSeries.getStartDate(),
              crtGanttSeries.getEndDate());
          taskSrs.add(task);
        }
        // create subtask
        Task subtask = new Task(crtGanttSeries.getSubtask(),
            crtGanttSeries.getStartDate(),
            crtGanttSeries.getEndDate());
        // NOTE: For correct scaling/plotting JFreeChart needs the subtasks
        //       to be 'inside' of the containing task.
        //       Therefore the earliest subtask startvalue
        //       is set as startvalue for the whole task, and the
        //       latest subtask endvalue set as endvalue for the
        //       whole task.
        if(subtask.getDuration().getStart().before(task.getDuration().getStart())) {
          task.setDuration(new SimpleTimePeriod(subtask.getDuration().getStart(), task.getDuration().getEnd()));
        }
        if(subtask.getDuration().getEnd().after(task.getDuration().getEnd())) {
          task.setDuration(new SimpleTimePeriod(task.getDuration().getStart(), subtask.getDuration().getEnd()));
        }
        Number percent = crtGanttSeries.getPercent();
        if (percent != null)
        {
          subtask.setPercentComplete(percent.doubleValue());
        }
        task.addSubtask(subtask);

        if (crtGanttSeries.getLabelExpression() != null)
        {
View Full Code Here

Examples of org.jmule.core.jkad.utils.timer.Task

        removeSourceTask(task.getPublishID());
      }
     
    };
   
    publisher_maintenance = new Task() {
      public void run() {
        /*for(PublishKeywordTask task : keywordTasks.values()){
          if (Lookup.getSingleton().getLookupLoad()>INDEXTER_MAX_LOAD_TO_NOT_PUBLISH) return ;
          long currentTime = System.currentTimeMillis();
          if (currentTime - task.getLastpublishTime() >= task.getPublishInterval()) {
View Full Code Here

Examples of org.jscsi.scsi.tasks.Task

      if (lun < 0)
      {
         try
         {
            Task task = this.taskFactory.getInstance(port, command);
            assert task != null : "improper task factory implementation returned null task";
            this.targetTaskSet.offer(task); // non-blocking, sends any errors to transport port
            if (_logger.isDebugEnabled())
               _logger.debug("successfully enqueued target command with TaskRouter: " + command);
         }
View Full Code Here

Examples of org.kie.api.task.model.Task

        List<Long> statuses = new ArrayList<Long>();
        statuses.add(procInstId);
       
        List<Long> taskIds = ((InternalTaskService)taskService).getTasksByProcessInstanceId(procInstId);
        assertEquals( "Task list size", 1, taskIds.size());
        Task task = ((InternalTaskService)taskService).getTaskById(taskIds.get(0));
        assertNotNull( "No people assignments!", task.getPeopleAssignments() );
        assertNotNull( "No business adminstrators!", task.getPeopleAssignments().getBusinessAdministrators() );
        assertFalse( "Empty business adminstrators!", task.getPeopleAssignments().getBusinessAdministrators().isEmpty() );
        String busAdmin = task.getPeopleAssignments().getBusinessAdministrators().get(0).getId();
       
        Map<String, List<?>> fieldVals = new HashMap<String, List<?>>();
        fieldVals.put(PROCESS_INSTANCE_ID_LIST, statuses);
        List<org.kie.api.task.model.TaskSummary> taskSumList = ((InternalTaskService)taskService).getTasksByVariousFields(busAdmin, fieldVals, true);
        assertEquals( "Task summary list size", 1, taskSumList.size());
View Full Code Here

Examples of org.kie.remote.jaxb.gen.Task

       taskData.setProcessSessionId(2);
      
       String jsonTaskStr = objectMapper.writeValueAsString(serverTask);
       logger.debug( jsonTaskStr );
       assertFalse( "String contains 'realClass' attribute", jsonTaskStr.contains("realClass"));
       Task clientTask = jsonProvider.deserialize(jsonTaskStr, Task.class);
       long id = clientTask.getId();
       assertEquals("task id", 6, id);
    }
View Full Code Here

Examples of org.lealone.util.Task

            final JdbcConnection c = conn;
            // PipedReader / PipedWriter are a lot slower
            // than PipedInputStream / PipedOutputStream
            // (Sun/Oracle Java 1.6.0_20)
            final PipedInputStream in = new PipedInputStream();
            final Task task = new Task() {
                public void call() {
                    value = c.createClob(IOUtils.getReader(in), -1);
                }
            };
            PipedOutputStream out = new PipedOutputStream(in) {
                public void close() throws IOException {
                    super.close();
                    try {
                        task.get();
                    } catch (Exception e) {
                        throw DbException.convertToIOException(e);
                    }
                }
            };
            task.execute();
            return IOUtils.getBufferedWriter(out);
        } catch (Exception e) {
            throw logAndConvert(e);
        }
    }
View Full Code Here

Examples of org.libreplan.business.planner.entities.Task

                .asList(hoursGroup));
        return Task.createTask(taskSource);
    }

    public static Task createValidTaskWithFullProgress(){
        Task task = createValidTask();
        task.setAdvancePercentage(BigDecimal.ONE);
        return task;
    }
View Full Code Here

Examples of org.menacheri.jetserver.app.Task

  public static void startGames(AbstractApplicationContext ctx)
  {
    World world = ctx.getBean(World.class);
    GameRoom room1 = (GameRoom)ctx.getBean("Zombie_ROOM_1");
    GameRoom room2 = (GameRoom)ctx.getBean("Zombie_ROOM_2");
    Task monitor1 = new WorldMonitor(world,room1);
    Task monitor2 = new WorldMonitor(world,room2);
    TaskManagerService taskManager = ctx.getBean(TaskManagerService.class);
    taskManager.scheduleWithFixedDelay(monitor1, 1000, 5000, TimeUnit.MILLISECONDS);
    taskManager.scheduleWithFixedDelay(monitor2, 2000, 5000, TimeUnit.MILLISECONDS);
  }
View Full Code Here

Examples of org.nasutekds.guitools.controlpanel.task.Task

    LinkedHashSet<AttributeType> attrsToDelete =
      new LinkedHashSet<AttributeType>(1);
    attrsToDelete.add(attribute);

    Task newTask = new DeleteSchemaElementsTask(getInfo(), dlg,
        new LinkedHashSet<ObjectClass>(0), attrsToDelete);
    for (Task task : getInfo().getTasks())
    {
      task.canLaunch(newTask, errors);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.