Package org.motechproject.mots.service
Class ModuleProgressService
- java.lang.Object
-
- org.motechproject.mots.service.ModuleProgressService
-
@Service public class ModuleProgressService extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ModuleProgressService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateModuleProgresses(CommunityHealthWorker chw, java.util.Set<Module> modules)ModuleProgressgetModuleProgress(java.util.UUID chwId, java.util.UUID moduleId)Get ModuleProgress with specific CommunityHealthWorker ID and Module ID or throwEntityNotFoundExceptionif not found.voidremoveModuleProgresses(CommunityHealthWorker chw, java.util.Set<Module> modules)Remove Module Progresses for given CHW and Modules.voidupdateModuleProgress(VotoCallLogDto votoCallLogDto)Update Module Progress after call ends.voidupdateModuleProgressWithNewCourseModules(java.util.List<CourseModule> courseModules)Update ModuleProgresses with new Course Modules when Module is reused in newly released Course.
-
-
-
Method Detail
-
updateModuleProgress
public void updateModuleProgress(VotoCallLogDto votoCallLogDto)
Update Module Progress after call ends.- Parameters:
votoCallLogDto- log containing all Voto tree interactions in specific call
-
createModuleProgresses
public void createModuleProgresses(CommunityHealthWorker chw, java.util.Set<Module> modules)
-
removeModuleProgresses
public void removeModuleProgresses(CommunityHealthWorker chw, java.util.Set<Module> modules)
Remove Module Progresses for given CHW and Modules.- Parameters:
chw- CHW for which Module Progresses should be removedmodules- List of Module for which Module Progresses should be removed
-
getModuleProgress
public ModuleProgress getModuleProgress(java.util.UUID chwId, java.util.UUID moduleId)
Get ModuleProgress with specific CommunityHealthWorker ID and Module ID or throwEntityNotFoundExceptionif not found.- Parameters:
chwId- CommunityHealthWorker IDmoduleId- Module ID- Returns:
- ModuleProgress
- Throws:
EntityNotFoundException- if ModuleProgress with chwId and moduleId doesn't exist
-
updateModuleProgressWithNewCourseModules
public void updateModuleProgressWithNewCourseModules(java.util.List<CourseModule> courseModules)
Update ModuleProgresses with new Course Modules when Module is reused in newly released Course.- Parameters:
courseModules- list of new Course Modules with reused Modules
-
-