当前位置: 首页>>代码示例>>Java>>正文


Java TasksProgressServiceImpl类代码示例

本文整理汇总了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();
}
 
开发者ID:Slenderware,项目名称:SlenderRestAPI-Maven,代码行数:12,代码来源:TasksRestImpl.java

示例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();
}
 
开发者ID:Slenderware,项目名称:SlenderRestAPI-Maven,代码行数:10,代码来源:TasksRestImpl.java

示例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();
}
 
开发者ID:Slenderware,项目名称:SlenderRestAPI-Maven,代码行数:10,代码来源:TasksRestImpl.java

示例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();    
}
 
开发者ID:Slenderware,项目名称:SlenderRestAPI-Maven,代码行数:10,代码来源:TasksRestImpl.java

示例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();
}
 
开发者ID:Slenderware,项目名称:SlenderRestAPI-Maven,代码行数:14,代码来源:TasksRestImpl.java

示例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) {};
}
 
开发者ID:Slenderware,项目名称:SlenderRestAPI-Maven,代码行数:13,代码来源:TaskResponse.java

示例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);
}
 
开发者ID:Slenderware,项目名称:SlenderRestAPI-Maven,代码行数:14,代码来源:PersistServicesTest.java

示例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);
}
 
开发者ID:Slenderware,项目名称:SlenderRestAPI-Maven,代码行数:8,代码来源:TasksProgressTest.java

示例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);
}
 
开发者ID:Slenderware,项目名称:SlenderRestAPI-Maven,代码行数:8,代码来源:TasksProgressTest.java


注:本文中的slender.services.core.tasks.impl.TasksProgressServiceImpl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。