本文整理汇总了Java中slender.services.core.tasks.impl.TasksProgressServiceImpl类的典型用法代码示例。如果您正苦于以下问题:Java TasksProgressServiceImpl类的具体用法?Java TasksProgressServiceImpl怎么用?Java TasksProgressServiceImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TasksProgressServiceImpl类属于slender.services.core.tasks.impl包,在下文中一共展示了TasksProgressServiceImpl类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTask
import slender.services.core.tasks.impl.TasksProgressServiceImpl; //导入依赖的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.impl.TasksProgressServiceImpl; //导入依赖的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: addProgress
import slender.services.core.tasks.impl.TasksProgressServiceImpl; //导入依赖的package包/类
@POST
@Path("addProgress")
@Override
public Response addProgress(@FormParam("id") Integer taskId, @FormParam("userId") Integer userId, @FormParam("hours") int hours) {
TasksProgressService service = new TasksProgressServiceImpl();
service.addProgress(taskId, userId, hours);
return Response.ok(new SuccessResponse(true, "Successfully allocated time for task")).build();
}
示例4: getProgressPercentage
import slender.services.core.tasks.impl.TasksProgressServiceImpl; //导入依赖的package包/类
@POST
@Path("getProgressPercentage")
@Override
public Response getProgressPercentage(@FormParam("id") Integer taskId) {
TasksProgressService service = new TasksProgressServiceImpl();
double progress = service.getProgressPercentage(taskId);
return Response.ok(progress).build();
}
示例5: markAsComplete
import slender.services.core.tasks.impl.TasksProgressServiceImpl; //导入依赖的package包/类
@POST
@Path("markAsComplete")
@Override
public Response markAsComplete(@FormParam("id") Integer taskId) {
TasksProgressService service = new TasksProgressServiceImpl();
boolean rtrn = service.markAsComplete(taskId);
if(rtrn) {
return Response.ok(new SuccessResponse(true, "Success")).build();
}
return Response.ok(new SuccessResponse(false, "Failed")).build();
}
示例6: getResponseEntity
import slender.services.core.tasks.impl.TasksProgressServiceImpl; //导入依赖的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) {};
}
示例7: addAdditional
import slender.services.core.tasks.impl.TasksProgressServiceImpl; //导入依赖的package包/类
@Test(dependsOnMethods = {"addMainEntities"})
public void addAdditional() {
TasksProgressService service = new TasksProgressServiceImpl();
service.addProgress(TestVal.taskID, TestVal.user1ID, 4);
service.addProgress(TestVal.taskID, TestVal.user2ID, 2);
UsersService userService = new UsersServiceImpl();
userService.addUserToProject(TestVal.user1ID, TestVal.projectID);
userService.addUserToProject(TestVal.user2ID, TestVal.projectID);
userService.addUserToTask(TestVal.user1ID, TestVal.taskID);
userService.addUserToTask(TestVal.user2ID, TestVal.taskID);
}
示例8: testGetProgress
import slender.services.core.tasks.impl.TasksProgressServiceImpl; //导入依赖的package包/类
@Test
public void testGetProgress() {
TasksProgressService service = new TasksProgressServiceImpl();
int progress = service.getProgress(TestVal.taskID);
Assert.assertEquals(progress, 6);
}
示例9: testGetProgressPercentage
import slender.services.core.tasks.impl.TasksProgressServiceImpl; //导入依赖的package包/类
@Test
public void testGetProgressPercentage() {
TasksProgressService service = new TasksProgressServiceImpl();
double progress = service.getProgressPercentage(TestVal.taskID);
Assert.assertEquals(progress, 60.0);
}