-
- All Implemented Interfaces:
-
edu.wgu.osmt.HasAllPaginated
@Controller()@Transactional() public final class RichSkillController implements HasAllPaginated<RichSkillDoc>
-
-
Field Summary
Fields Modifier and Type Field Description private final RichSkillEsRepoelasticRepositoryprivate final KeywordDao.CompanionkeywordDaoprivate final StringallPaginatedPathprivate final SkillSortEnum.CompanionsortOrderCompanionprivate final RichSkillRepositoryrichSkillRepositoryprivate final TaskMessageServicetaskMessageServiceprivate final RichSkillEsReporichSkillEsRepoprivate final AuditLogRepositoryauditLogRepositoryprivate final AppConfigappConfigprivate final OAuthHelperoAuthHelper
-
Constructor Summary
Constructors Constructor Description RichSkillController(RichSkillRepository richSkillRepository, TaskMessageService taskMessageService, RichSkillEsRepo richSkillEsRepo, AuditLogRepository auditLogRepository, AppConfig appConfig, OAuthHelper oAuthHelper)
-
Method Summary
Modifier and Type Method Description RichSkillEsRepogetElasticRepository()final KeywordDao.CompaniongetKeywordDao()StringgetAllPaginatedPath()override in @Controllerimplementors with the path that [allPaginated] handlesSkillSortEnum.CompaniongetSortOrderCompanion()final RichSkillRepositorygetRichSkillRepository()final TaskMessageServicegetTaskMessageService()final RichSkillEsRepogetRichSkillEsRepo()final AuditLogRepositorygetAuditLogRepository()final AppConfiggetAppConfig()final OAuthHelpergetOAuthHelper()HttpEntity<List<RichSkillDoc>>allPaginated(UriComponentsBuilder uriComponentsBuilder, Integer size, Integer from, Array<String> status, String sort, @AuthenticationPrincipal() Jwt user)final HttpEntity<TaskResult>createSkills(@RequestBody() List<ApiSkillUpdate> apiSkillUpdates, @AuthenticationPrincipal() Jwt user)final ApiSkillbyUUID(@PathVariable() String uuid, @AuthenticationPrincipal() Jwt user)final StringbyUUIDHtmlView(@PathVariable() String uuid, @AuthenticationPrincipal() Jwt user)final HttpEntity<?>byUUIDCsvView(@PathVariable() String uuid, @AuthenticationPrincipal() Jwt user)final ApiSkillupdateSkill(@PathVariable() String uuid, @RequestBody() ApiSkillUpdate skillUpdate, @AuthenticationPrincipal() Jwt user)final HttpEntity<TaskResult>publishSkills(@RequestBody() ApiSearch search, @RequestParam(required = false, defaultValue = "Published") String newStatus, @RequestParam(required = false, defaultValue = "draft,published") List<String> filterByStatus, @RequestParam(required = false, defaultValue = "") String collectionUuid, @AuthenticationPrincipal() Jwt user)final HttpEntity<List<AuditLog>>skillAuditLog(@PathVariable() String uuid)final HttpEntity<TaskResult>exportLibrary(@AuthenticationPrincipal() Jwt user)-
-
Constructor Detail
-
RichSkillController
RichSkillController(RichSkillRepository richSkillRepository, TaskMessageService taskMessageService, RichSkillEsRepo richSkillEsRepo, AuditLogRepository auditLogRepository, AppConfig appConfig, OAuthHelper oAuthHelper)
-
-
Method Detail
-
getElasticRepository
RichSkillEsRepo getElasticRepository()
-
getKeywordDao
final KeywordDao.Companion getKeywordDao()
-
getAllPaginatedPath
String getAllPaginatedPath()
override in
@Controllerimplementors with the path that [allPaginated] handles
-
getSortOrderCompanion
SkillSortEnum.Companion getSortOrderCompanion()
-
getRichSkillRepository
final RichSkillRepository getRichSkillRepository()
-
getTaskMessageService
final TaskMessageService getTaskMessageService()
-
getRichSkillEsRepo
final RichSkillEsRepo getRichSkillEsRepo()
-
getAuditLogRepository
final AuditLogRepository getAuditLogRepository()
-
getAppConfig
final AppConfig getAppConfig()
-
getOAuthHelper
final OAuthHelper getOAuthHelper()
-
allPaginated
@GetMapping(value = {"/api/skills"}, produces = {"application/json"})@ResponseBody() HttpEntity<List<RichSkillDoc>> allPaginated(UriComponentsBuilder uriComponentsBuilder, Integer size, Integer from, Array<String> status, String sort, @AuthenticationPrincipal() Jwt user)
-
createSkills
@PostMapping(value = {"/api/skills"}, produces = {"application/json"})@ResponseBody() final HttpEntity<TaskResult> createSkills(@RequestBody() List<ApiSkillUpdate> apiSkillUpdates, @AuthenticationPrincipal() Jwt user)
-
byUUID
@GetMapping(value = {"/api/skills/{uuid}"}, produces = {"application/json"})@ResponseBody() final ApiSkill byUUID(@PathVariable() String uuid, @AuthenticationPrincipal() Jwt user)
-
byUUIDHtmlView
@RequestMapping(value = {"/api/skills/{uuid}"}, produces = {"text/html"}) final String byUUIDHtmlView(@PathVariable() String uuid, @AuthenticationPrincipal() Jwt user)
-
byUUIDCsvView
@RequestMapping(value = {"/api/skills/{uuid}"}, produces = {"text/csv"}) final HttpEntity<?> byUUIDCsvView(@PathVariable() String uuid, @AuthenticationPrincipal() Jwt user)
-
updateSkill
@PostMapping(value = {"/api/skills/{uuid}/update"}, produces = {"application/json"})@ResponseBody() final ApiSkill updateSkill(@PathVariable() String uuid, @RequestBody() ApiSkillUpdate skillUpdate, @AuthenticationPrincipal() Jwt user)
-
publishSkills
@PostMapping(value = {"/api/skills/publish"}, produces = {"application/json"})@ResponseBody() final HttpEntity<TaskResult> publishSkills(@RequestBody() ApiSearch search, @RequestParam(required = false, defaultValue = "Published") String newStatus, @RequestParam(required = false, defaultValue = "draft,published") List<String> filterByStatus, @RequestParam(required = false, defaultValue = "") String collectionUuid, @AuthenticationPrincipal() Jwt user)
-
skillAuditLog
@GetMapping(value = {"/api/skills/{uuid}/log"}, produces = {"application/json"}) final HttpEntity<List<AuditLog>> skillAuditLog(@PathVariable() String uuid)
-
exportLibrary
@Transactional(readOnly = true)@GetMapping(value = {"/api/export/library"}, produces = {"application/json"})@ResponseBody() final HttpEntity<TaskResult> exportLibrary(@AuthenticationPrincipal() Jwt user)
-
-
-
-