public class TrainingModuleManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
HL_GROUP_SEPARATOR
The hl group separator.
|
Modifier and Type | Method and Description |
---|---|
TrainingUnitQuestionnaireDTO |
addQuestionnaireToTrainingUnit(long trainingUnitId,
TrainingUnitQuestionnaireDTO questionnaireDTO,
String context,
String owner)
Adds the questionnaire to training unit.
|
TrainingVideoDTO |
addVideoToTrainingUnit(long trainingUnitId,
TrainingVideoDTO videoDTO,
String context,
String owner)
Adds the video to training unit.
|
TrainingCourseDTO |
changeStatus(long trainingProjectId,
boolean isActive,
String context,
String owner)
Change status.
|
int |
countQuestionnairesForTrainingUnit(long trainingUnitId,
String context)
Count questionnaires for training unit.
|
int |
countVideosForTrainingUnit(long trainingUnitId,
String context)
Count videos for training unit.
|
int |
deleteQuestionnaireForId(long questionnaireId,
String context)
Delete questionnaire for id.
|
int |
deleteTrainingCourse(long trainingCourseId,
String context,
String owner)
Delete training course.
|
int |
deleteTrainingUnit(String workspaceFolderId,
String context,
String owner)
Delete training unit.
|
int |
deleteTrainingUnitForId(Long unitId,
String context)
Delete training unit for id.
|
int |
deleteVideoForId(long videoId,
String context)
Delete video for id.
|
List<TrainingCourseDTO> |
getCoursesSharedWith(String context,
String... sharedWith)
Gets the courses shared with.
|
static TrainingModuleManager |
getInstance()
Gets the single instance of TrainingModuleManager.
|
List<TrainingUnitQuestionnaireDTO> |
getListOfQuestionnaireForTrainingUnit(long trainingUnitId,
String context)
Gets the list of questionnaire for training unit.
|
List<TrainingUnitDTO> |
getListOfTrainingUnitFor(long courseId,
String context)
Gets the list of training unit for.
|
List<TrainingVideoDTO> |
getListOfVideoForTrainingUnit(long trainingUnitId,
String context)
Gets the list of video for training unit.
|
List<TrainingCourseDTO> |
getOwnedCourses(String owner,
String context)
Gets the owned courses.
|
List<TrainingUnitProgressDTO> |
getProgressesForUnit(long unitId,
String context,
String username,
String itemId,
ItemType itemType)
Gets the progresses for unit.
|
TrainingCourseDTO |
getTrainingCourse(long courseId,
String context)
Gets the training course.
|
TrainingUnitDTO |
getTrainingUnit(long unitId,
String context)
Gets the training unit.
|
TrainingUnitDTO |
getTrainingUnitFor(String ownerLogin,
String workspaceFolderId,
String context,
String username)
Gets the training unit for.
|
List<TrainingCourseDTO> |
getUserCourses(String username,
String context)
Gets the user courses.
|
TrainingUnitProgressDTO |
setProgressForUnit(long unitId,
String context,
String username,
String itemId,
ItemType itemType,
boolean read)
Sets the progress for unit.
|
TrainingCourseDTO |
storeNewCourse(TrainingCourseDTO projectDTO,
String context,
String owner)
Store new course.
|
TrainingUnitDTO |
storeNewUnit(long trainingProjectId,
TrainingUnitDTO unitDTO,
String context,
String owner)
Store new unit.
|
TrainingCourseDTO |
updateTrainingCourse(TrainingCourseDTO project,
String context)
Update training course.
|
public static String HL_GROUP_SEPARATOR
public static TrainingModuleManager getInstance()
public List<TrainingCourseDTO> getUserCourses(String username, String context) throws Exception
username
- the usernamecontext
- the contextException
- the exceptionpublic List<TrainingCourseDTO> getCoursesSharedWith(String context, String... sharedWith) throws Exception
context
- the contextsharedWith
- the shared withException
- the exceptionpublic List<TrainingCourseDTO> getOwnedCourses(String owner, String context) throws Exception
owner
- the ownercontext
- the contextException
- the exceptionpublic TrainingCourseDTO storeNewCourse(TrainingCourseDTO projectDTO, String context, String owner) throws Exception
projectDTO
- the project DTOcontext
- the contextowner
- the usernameException
- the exceptionpublic TrainingUnitDTO storeNewUnit(long trainingProjectId, TrainingUnitDTO unitDTO, String context, String owner) throws Exception
trainingProjectId
- the training project idunitDTO
- the unit DTOcontext
- the contextowner
- the owner usernameException
- the exceptionpublic TrainingUnitDTO getTrainingUnit(long unitId, String context) throws Exception
unitId
- the unit idcontext
- the contextException
- the exceptionpublic int deleteTrainingCourse(long trainingCourseId, String context, String owner) throws Exception
trainingCourseId
- the training course idcontext
- the contextowner
- the owner usernameException
- the exceptionpublic TrainingCourseDTO changeStatus(long trainingProjectId, boolean isActive, String context, String owner) throws Exception
trainingProjectId
- the training project idisActive
- the is activecontext
- the contextowner
- the owner usernameException
- the exceptionpublic TrainingCourseDTO getTrainingCourse(long courseId, String context) throws Exception
courseId
- the course idcontext
- the contextException
- the exceptionpublic TrainingCourseDTO updateTrainingCourse(TrainingCourseDTO project, String context) throws Exception
project
- the projectcontext
- the contextException
- the exceptionpublic TrainingUnitDTO getTrainingUnitFor(String ownerLogin, String workspaceFolderId, String context, String username) throws Exception
ownerLogin
- the owner loginworkspaceFolderId
- the workspace folder idcontext
- the contextusername
- the usernameException
- the exceptionpublic List<TrainingUnitDTO> getListOfTrainingUnitFor(long courseId, String context) throws Exception
courseId
- the course idcontext
- the contextException
- the exceptionpublic List<TrainingUnitQuestionnaireDTO> getListOfQuestionnaireForTrainingUnit(long trainingUnitId, String context) throws Exception
trainingUnitId
- the training unit idcontext
- the contextException
- the exceptionpublic int countQuestionnairesForTrainingUnit(long trainingUnitId, String context) throws Exception
trainingUnitId
- the training unit idcontext
- the contextException
- the exceptionpublic TrainingUnitQuestionnaireDTO addQuestionnaireToTrainingUnit(long trainingUnitId, TrainingUnitQuestionnaireDTO questionnaireDTO, String context, String owner) throws Exception
trainingUnitId
- the training unit idquestionnaireDTO
- the questionnaire DTOcontext
- the contextowner
- the ownerException
- the exceptionpublic TrainingVideoDTO addVideoToTrainingUnit(long trainingUnitId, TrainingVideoDTO videoDTO, String context, String owner) throws Exception
trainingUnitId
- the training unit idvideoDTO
- the video DTOcontext
- the contextowner
- the ownerException
- the exceptionpublic List<TrainingVideoDTO> getListOfVideoForTrainingUnit(long trainingUnitId, String context) throws Exception
trainingUnitId
- the training unit idcontext
- the contextException
- the exceptionpublic int countVideosForTrainingUnit(long trainingUnitId, String context) throws Exception
trainingUnitId
- the training unit idcontext
- the contextException
- the exceptionpublic int deleteTrainingUnit(String workspaceFolderId, String context, String owner) throws Exception
workspaceFolderId
- the workspace folder idcontext
- the contextowner
- the ownerException
- the exceptionpublic int deleteTrainingUnitForId(Long unitId, String context) throws Exception
unitId
- the unit idcontext
- the contextException
- the exceptionpublic int deleteVideoForId(long videoId, String context) throws Exception
videoId
- the video idcontext
- the contextException
- the exceptionpublic int deleteQuestionnaireForId(long questionnaireId, String context) throws Exception
questionnaireId
- the questionnaire idcontext
- the contextException
- the exceptionpublic TrainingUnitProgressDTO setProgressForUnit(long unitId, String context, String username, String itemId, ItemType itemType, boolean read) throws Exception
unitId
- the unit idcontext
- the contextusername
- the usernameitemId
- the item iditemType
- the item typeread
- the readException
- the exceptionpublic List<TrainingUnitProgressDTO> getProgressesForUnit(long unitId, String context, String username, String itemId, ItemType itemType) throws Exception
unitId
- the unit idcontext
- the contextusername
- the usernameitemId
- the item iditemType
- the item typeException
- the exceptionCopyright © 2019. All Rights Reserved.