本文整理匯總了Java中slender.services.core.tasks.TasksProgressService.getProgress方法的典型用法代碼示例。如果您正苦於以下問題:Java TasksProgressService.getProgress方法的具體用法?Java TasksProgressService.getProgress怎麽用?Java TasksProgressService.getProgress使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類slender.services.core.tasks.TasksProgressService
的用法示例。
在下文中一共展示了TasksProgressService.getProgress方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getTask
import slender.services.core.tasks.TasksProgressService; //導入方法依賴的package包/類
@POST
@Path("getTask")
@Override
public Response getTask(@FormParam("id") Integer id) {
TasksService service = new TasksServiceImpl();
TasksProgressService progressService = new TasksProgressServiceImpl();
Task task = service.getTask(id);
int progress = progressService.getProgress(id);
return Response.ok(new TaskResponse(task, progress)).build();
}
示例2: getProgress
import slender.services.core.tasks.TasksProgressService; //導入方法依賴的package包/類
@POST
@Path("getProgress")
@Override
public Response getProgress(@FormParam("id") Integer taskId) {
TasksProgressService service = new TasksProgressServiceImpl();
int progress = service.getProgress(taskId);
return Response.ok(progress).build();
}
示例3: getResponseEntity
import slender.services.core.tasks.TasksProgressService; //導入方法依賴的package包/類
public static GenericEntity<List<TaskResponse>> getResponseEntity(List<Task> entities) {
TasksProgressService service = new TasksProgressServiceImpl();
List<TaskResponse> responses = new ArrayList<TaskResponse>();
int progress;
for(Task t : entities) {
progress = service.getProgress(t.getId());
responses.add(new TaskResponse(t, progress));
}
return new GenericEntity<List<TaskResponse>>(responses) {};
}
示例4: testGetProgress
import slender.services.core.tasks.TasksProgressService; //導入方法依賴的package包/類
@Test
public void testGetProgress() {
TasksProgressService service = new TasksProgressServiceImpl();
int progress = service.getProgress(TestVal.taskID);
Assert.assertEquals(progress, 6);
}