Class SubCategoryController


  • @RestController
    @CrossOrigin(origins="*")
    public class SubCategoryController
    extends Object
    • Constructor Detail

      • SubCategoryController

        public SubCategoryController()
    • Method Detail

      • saveSubCategory

        @PreAuthorize("isAuthenticated()")
        @RequestMapping(value="/{stakeholderId}/{topicId}/{categoryId}/save",
                        method=POST)
        public SubCategory<Section<Indicator>> saveSubCategory​(@PathVariable("stakeholderId")
                                                               String stakeholderId,
                                                               @PathVariable("topicId")
                                                               String topicId,
                                                               @PathVariable("categoryId")
                                                               String categoryId,
                                                               @RequestBody
                                                               SubCategory<Section<Indicator>> subcategoryFull)
      • onSaveDefaultSubCategory

        public void onSaveDefaultSubCategory​(SubCategory subCategory,
                                             String categoryId)
      • onUpdateDefaultSubCategory

        public void onUpdateDefaultSubCategory​(SubCategory subCategory,
                                               SubCategory oldSubcategory)
      • deleteSubCategory

        @PreAuthorize("isAuthenticated()")
        @RequestMapping(value="/{stakeholderId}/{topicId}/{categoryId}/{subcategoryId}/delete",
                        method=DELETE)
        public boolean deleteSubCategory​(@PathVariable("stakeholderId")
                                         String stakeholderId,
                                         @PathVariable("topicId")
                                         String topicId,
                                         @PathVariable("categoryId")
                                         String categoryId,
                                         @PathVariable("subcategoryId")
                                         String subcategoryId,
                                         @RequestParam(required=false)
                                         String children)
      • onDeleteDefaultSubCategory

        public boolean onDeleteDefaultSubCategory​(String defaultSubCategoryId,
                                                  String defaultCategoryId,
                                                  String children)
      • reorderSubCategories

        @PreAuthorize("isAuthenticated()")
        @RequestMapping(value="/{stakeholderId}/{topicId}/{categoryId}/reorder",
                        method=POST)
        public List<SubCategory> reorderSubCategories​(@PathVariable("stakeholderId")
                                                      String stakeholderId,
                                                      @PathVariable("topicId")
                                                      String topicId,
                                                      @PathVariable("categoryId")
                                                      String categoryId,
                                                      @RequestBody
                                                      List<String> subCategories)
      • changeSubCategoryVisibility

        @PreAuthorize("isAuthenticated()")
        @RequestMapping(value="/{stakeholderId}/{topicId}/{categoryId}/{subcategoryId}/change-visibility",
                        method=POST)
        public SubCategory changeSubCategoryVisibility​(@PathVariable("stakeholderId")
                                                       String stakeholderId,
                                                       @PathVariable("topicId")
                                                       String topicId,
                                                       @PathVariable("categoryId")
                                                       String categoryId,
                                                       @PathVariable("subcategoryId")
                                                       String subcategoryId,
                                                       @RequestParam("visibility")
                                                       Visibility visibility,
                                                       @RequestParam(required=false)
                                                       Boolean propagate)
      • deleteTree

        public void deleteTree​(Category category)
      • disConnectTree

        public void disConnectTree​(Category category)