-
- All Implemented Interfaces:
-
edu.wgu.osmt.HasAllPaginated
@Controller()@Transactional() public final class CollectionController implements HasAllPaginated<CollectionDoc>
-
-
Field Summary
Fields Modifier and Type Field Description private final CollectionEsRepoelasticRepositoryprivate final StringallPaginatedPathprivate final CollectionSortEnum.CompanionsortOrderCompanionprivate final CollectionRepositorycollectionRepositoryprivate final RichSkillRepositoryrichSkillRepositoryprivate final TaskMessageServicetaskMessageServiceprivate final AuditLogRepositoryauditLogRepositoryprivate final CollectionEsRepocollectionEsRepoprivate final AppConfigappConfigprivate final OAuthHelperoAuthHelper
-
Constructor Summary
Constructors Constructor Description CollectionController(CollectionRepository collectionRepository, RichSkillRepository richSkillRepository, TaskMessageService taskMessageService, AuditLogRepository auditLogRepository, CollectionEsRepo collectionEsRepo, AppConfig appConfig, OAuthHelper oAuthHelper)
-
Method Summary
Modifier and Type Method Description CollectionEsRepogetElasticRepository()StringgetAllPaginatedPath()override in @Controllerimplementors with the path that [allPaginated] handlesCollectionSortEnum.CompaniongetSortOrderCompanion()final CollectionRepositorygetCollectionRepository()final RichSkillRepositorygetRichSkillRepository()final TaskMessageServicegetTaskMessageService()final AuditLogRepositorygetAuditLogRepository()final CollectionEsRepogetCollectionEsRepo()final AppConfiggetAppConfig()final OAuthHelpergetOAuthHelper()HttpEntity<List<CollectionDoc>>allPaginated(UriComponentsBuilder uriComponentsBuilder, Integer size, Integer from, Array<String> status, String sort, @AuthenticationPrincipal() Jwt user)final ApiCollectionbyUUID(@PathVariable() String uuid)final StringbyUUIDHtmlView(@PathVariable() String uuid)final List<ApiCollection>createCollections(@RequestBody() List<ApiCollectionUpdate> apiCollectionUpdates, @AuthenticationPrincipal() Jwt user)final ApiCollectionupdateCollection(@PathVariable() String uuid, @RequestBody() ApiCollectionUpdate apiUpdate, @AuthenticationPrincipal() Jwt user)final HttpEntity<TaskResult>updateSkills(@PathVariable() String uuid, @RequestBody() ApiSkillListUpdate skillListUpdate, @RequestParam(required = false, defaultValue = "draft,published") List<String> status, @AuthenticationPrincipal() Jwt user)final HttpEntity<TaskResult>publishCollections(@RequestBody() ApiSearch search, @RequestParam(required = false, defaultValue = "Published") String newStatus, @RequestParam(required = false, defaultValue = "draft,published") List<String> filterByStatus, @AuthenticationPrincipal() Jwt user)final HttpEntity<TaskResult>getSkillsForCollectionCsv(@PathVariable() String uuid)final HttpEntity<List<AuditLog>>collectionAuditLog(@PathVariable() String uuid)-
-
Constructor Detail
-
CollectionController
CollectionController(CollectionRepository collectionRepository, RichSkillRepository richSkillRepository, TaskMessageService taskMessageService, AuditLogRepository auditLogRepository, CollectionEsRepo collectionEsRepo, AppConfig appConfig, OAuthHelper oAuthHelper)
-
-
Method Detail
-
getElasticRepository
CollectionEsRepo getElasticRepository()
-
getAllPaginatedPath
String getAllPaginatedPath()
override in
@Controllerimplementors with the path that [allPaginated] handles
-
getSortOrderCompanion
CollectionSortEnum.Companion getSortOrderCompanion()
-
getCollectionRepository
final CollectionRepository getCollectionRepository()
-
getRichSkillRepository
final RichSkillRepository getRichSkillRepository()
-
getTaskMessageService
final TaskMessageService getTaskMessageService()
-
getAuditLogRepository
final AuditLogRepository getAuditLogRepository()
-
getCollectionEsRepo
final CollectionEsRepo getCollectionEsRepo()
-
getAppConfig
final AppConfig getAppConfig()
-
getOAuthHelper
final OAuthHelper getOAuthHelper()
-
allPaginated
@GetMapping(value = {"/api/collections"}, produces = {"application/json"})@ResponseBody() HttpEntity<List<CollectionDoc>> allPaginated(UriComponentsBuilder uriComponentsBuilder, Integer size, Integer from, Array<String> status, String sort, @AuthenticationPrincipal() Jwt user)
-
byUUID
@GetMapping(value = {"/api/collections/{uuid}"}, produces = {"application/json"})@ResponseBody() final ApiCollection byUUID(@PathVariable() String uuid)
-
byUUIDHtmlView
@RequestMapping(value = {"/api/collections/{uuid}"}, produces = {"text/html"}) final String byUUIDHtmlView(@PathVariable() String uuid)
-
createCollections
@PostMapping(value = {"/api/collections"}, produces = {"application/json"})@ResponseBody() final List<ApiCollection> createCollections(@RequestBody() List<ApiCollectionUpdate> apiCollectionUpdates, @AuthenticationPrincipal() Jwt user)
-
updateCollection
@PostMapping(value = {"/api/collections/{uuid}/update"}, produces = {"application/json"})@ResponseBody() final ApiCollection updateCollection(@PathVariable() String uuid, @RequestBody() ApiCollectionUpdate apiUpdate, @AuthenticationPrincipal() Jwt user)
-
updateSkills
@PostMapping(value = {"/api/collections/{uuid}/updateSkills"}, produces = {"application/json"})@ResponseBody() final HttpEntity<TaskResult> updateSkills(@PathVariable() String uuid, @RequestBody() ApiSkillListUpdate skillListUpdate, @RequestParam(required = false, defaultValue = "draft,published") List<String> status, @AuthenticationPrincipal() Jwt user)
-
publishCollections
@PostMapping(value = {"/api/collections/publish"}, produces = {"application/json"})@ResponseBody() final HttpEntity<TaskResult> publishCollections(@RequestBody() ApiSearch search, @RequestParam(required = false, defaultValue = "Published") String newStatus, @RequestParam(required = false, defaultValue = "draft,published") List<String> filterByStatus, @AuthenticationPrincipal() Jwt user)
-
getSkillsForCollectionCsv
@GetMapping(value = {"/api/collections/{uuid}/csv"}, produces = {"application/json"}) final HttpEntity<TaskResult> getSkillsForCollectionCsv(@PathVariable() String uuid)
-
collectionAuditLog
@GetMapping(value = {"/api/collections/{uuid}/log"}, produces = {"application/json"}) final HttpEntity<List<AuditLog>> collectionAuditLog(@PathVariable() String uuid)
-
-
-
-