Examples of Task


Examples of org.springframework.social.google.api.tasks.Task

  public void getTaskFromDefaultListById() {
    mockServer
        .expect(requestTo("https://www.googleapis.com/tasks/v1/lists/@default/tasks/MTY1OTA2NzU4OTQyMQAzMjM0MDc6MDo4GTI5NjMfMTc"))
        .andExpect(method(GET))
        .andRespond(withSuccess(jsonResource("task"), APPLICATION_JSON));
    Task task = google.taskOperations().getTask(ACTIVE_TASK_ID);
    assertActiveTask(task);
  }
View Full Code Here

Examples of org.springside.examples.bootservice.domain.Task

  @Test
  public void listTask() {
    TaskList tasks = restTemplate.getForObject(resourceUrl, TaskList.class);
    assertThat(tasks).hasSize(5);
    Task firstTask = tasks.get(0);

    assertThat(firstTask.getTitle()).isEqualTo("Spring Boot");
    assertThat(firstTask.getUser().getName()).isEqualTo("Calvin");
  }
View Full Code Here

Examples of org.springside.examples.quickstart.entity.Task

    return "task/taskList";
  }

  @RequestMapping(value = "create", method = RequestMethod.GET)
  public String createForm(Model model) {
    model.addAttribute("task", new Task());
    model.addAttribute("action", "create");
    return "task/taskForm";
  }
View Full Code Here

Examples of org.structr.agent.Task

          String taskClassName = entry.getName();

          try {
            Class taskClass = Class.forName(taskClassName);
            Task task = (Task)taskClass.newInstance();

            logger.log(Level.FINE, "Starting task {0}", taskClassName);
            StructrApp.getInstance().processTasks(task);

          } catch(Throwable t) {
View Full Code Here

Examples of org.syrup.Task

        /* Check for double naming and prepare datastructures */
        for (int t = 0; t < tasks.length; t++)
        {

            Task tt = tasks[t];

            if (taskNames.get(tt.name()) != null)
            {
                throw new Exception("more then one Task with name: "
                    + tt.name());
            }
            else
            {
                taskNames.put(tt.name(), tt);
                taskContexts.put(tt, new HashMap());
            }
        }

        // Check if there are no Ports that have multiple Links attached
View Full Code Here

Examples of org.terasology.logic.behavior.tree.Task

            public void mock(Task spy) {
                when(spy.update(anyInt())).thenReturn(Status.SUCCESS);
            }
        }));

        Task task = interpreter.start(repeat);
        interpreter.tick(0);
        Assert.assertEquals(Status.RUNNING, task.getStatus());
        interpreter.tick(0);
        Assert.assertEquals(Status.RUNNING, task.getStatus());
        interpreter.tick(0);
        Assert.assertEquals(Status.RUNNING, task.getStatus());
        interpreter.tick(0);
        Assert.assertEquals(Status.RUNNING, task.getStatus());
        interpreter.tick(0);
        Assert.assertEquals(Status.RUNNING, task.getStatus());
    }
View Full Code Here

Examples of org.terasology.utilities.concurrency.Task

    }

    @Override
    public void submitTask(final String name, final Runnable task) {
        try {
            commonThreadPool.put(new Task() {
                @Override
                public String getName() {
                    return name;
                }
View Full Code Here

Examples of org.waveprotocol.wave.client.scheduler.Scheduler.Task

          synchronizer.tick();
        }
      });

      // Defer everything else, to let the RPC go out.
      SchedulerInstance.getMediumPriorityTimer().scheduleDelayed(new Task() {
        @Override
        public void execute() {
          installStatics();
          synchronizer.tick();
        }
View Full Code Here

Examples of org.wicketstuff.progressbar.spring.Task

  }

  @Test
  public void testTaskExecution() {
    final Integer[] data = new Integer[]{0};
    Task task = new Task() {
      @Override
      public void run() {
        for(int i = 0; i < 2; i++) {
          data[0]++;
          updateProgress(i, 2);
          if(isCancelled()) {
            return;
          }
        }
      }
    };
    assertEquals("Task progress initially 0", 0, task.getProgress());
    Long taskId = taskService.schedule(task);
    assertEquals("Task can be found by ID", task, taskService.getTask(taskId));
    taskService.start(taskId);
    assertEquals("Task was executed", 2, data[0]);
    assertEquals("Task progress is 100", 100, task.getProgress());
    assertTrue("Task is done after finish", task.isDone());
    assertNotNull("Task NOT removed from service after done",
        taskService.getTask(taskId));
    taskService.finish(taskId);
    assertNull("Task removed from service with finish",
        taskService.getTask(taskId));

    data[0] = 0;
    task.reset();
    assertEquals("Task progress is 0 after reset", 0, task.getProgress());
    // cancel should stop task at 50%
    task.cancel();
    Long newTaskId = taskService.scheduleAndStart(task);
    assertFalse("Unique id generated", taskId.equals(newTaskId));

    assertEquals("Cancelled after 50%", 1, data[0]);
    assertTrue("Task was cancelled", task.isCancelled());
    assertEquals("Progress is 50%", 50, task.getProgress());
    // done if cancelled?
    assertTrue("Task is done", task.isDone());
  }
View Full Code Here

Examples of org.wso2.carbon.humantask.dao.jpa.openjpa.model.Task

        return null;
    }

    public TaskDAO createTask(HumanTaskBaseConfiguration taskConfiguration, MessageDAO inputMessage) {
        EntityTransaction tx = null;
        Task task = null;

        try {
            tx = entityManager.getTransaction();
            tx.begin();

            if (taskConfiguration.isTask()) {
                task = new Task(taskConfiguration.getName(), TaskType.TASK);
            } else {
                task = new Task(taskConfiguration.getName(), TaskType.NOTIFICATION);
            }
            entityManager.persist(task);

            task.setInputMessage((Message) inputMessage);
            // TODO: Set priority after implementing evaluation context
            task.setStatus(TaskStatus.CREATED);
            task.setSkipable(false);
            task.setEscalated(false);

            // TODO: Populate generic human roles
            // TODO: Populate presnetation elements
            // TODO: Nominate owner
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.