當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。