本文整理匯總了Java中slender.services.core.users.UsersService.addUserToTask方法的典型用法代碼示例。如果您正苦於以下問題:Java UsersService.addUserToTask方法的具體用法?Java UsersService.addUserToTask怎麽用?Java UsersService.addUserToTask使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類slender.services.core.users.UsersService
的用法示例。
在下文中一共展示了UsersService.addUserToTask方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: addUserToTask
import slender.services.core.users.UsersService; //導入方法依賴的package包/類
@POST
@Path("assignUserToTask")
@Override
public Response addUserToTask(@FormParam("userId") Integer userId, @FormParam("taskId") Integer taskId) {
UsersService service = new UsersServiceImpl();
boolean rtrn = service.addUserToTask(userId, taskId);
if(rtrn)
return Response.ok(new SuccessResponse(true, "Successfull")).build();
return Response.ok(new SuccessResponse(false, "User does not exist")).build();
}
示例2: addAdditional
import slender.services.core.users.UsersService; //導入方法依賴的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);
}