Interface OrganizationRestService

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addParent​(java.lang.String organizationId, java.util.List<java.lang.String> parentIds)  
      long childCount​(java.lang.String organizationId, cn.sparrowmini.org.model.constant.OrganizationChildTypeEnum type)  
      cn.sparrowmini.org.model.Organization create​(@NotNull cn.sparrowmini.org.model.Organization organization)  
      void delete​(@NotNull java.lang.String[] ids)  
      cn.sparrowmini.org.model.Organization get​(java.lang.String organizationId)  
      org.springframework.data.domain.Page<?> getChildren​(java.lang.String organizationId, cn.sparrowmini.org.model.constant.OrganizationChildTypeEnum type, org.springframework.data.domain.Pageable pageable)  
      java.util.List<cn.sparrowmini.org.model.relation.OrganizationRelation> getParents​(java.lang.String organizationId)  
      SparrowTree<cn.sparrowmini.org.model.Organization,​java.lang.String> getTreeByParentId​(java.lang.String parentId)  
      void removeParent​(java.lang.String organizationId, java.util.List<java.lang.String> parentIds)  
      cn.sparrowmini.org.model.Organization update​(java.lang.String organizationId, java.util.Map<java.lang.String,​java.lang.Object> map)  
    • Method Detail

      • getChildren

        @GetMapping("/{organizationId}/children")
        @ResponseBody
        org.springframework.data.domain.Page<?> getChildren​(@PathVariable("organizationId")
                                                            java.lang.String organizationId,
                                                            cn.sparrowmini.org.model.constant.OrganizationChildTypeEnum type,
                                                            @Nullable
                                                            org.springframework.data.domain.Pageable pageable)
      • getParents

        @GetMapping("/{organizationId}/parents")
        @ResponseBody
        java.util.List<cn.sparrowmini.org.model.relation.OrganizationRelation> getParents​(@PathVariable("organizationId")
                                                                                          java.lang.String organizationId)
      • create

        @PostMapping("")
        @ResponseBody
        cn.sparrowmini.org.model.Organization create​(@NotNull @RequestBody
                                                     @NotNull cn.sparrowmini.org.model.Organization organization)
      • update

        @PatchMapping("/{organizationId}")
        @ResponseBody
        cn.sparrowmini.org.model.Organization update​(@PathVariable("organizationId")
                                                     java.lang.String organizationId,
                                                     @RequestBody
                                                     java.util.Map<java.lang.String,​java.lang.Object> map)
      • delete

        @PutMapping("/delete")
        @ResponseBody
        void delete​(@NotNull @RequestBody
                    @NotNull java.lang.String[] ids)
      • addParent

        @PostMapping("/{organizationId}/parents")
        @ResponseBody
        void addParent​(@PathVariable("organizationId")
                       java.lang.String organizationId,
                       @RequestBody
                       java.util.List<java.lang.String> parentIds)
      • removeParent

        @PutMapping("/{organizationId}/parents/delete")
        @ResponseBody
        void removeParent​(@PathVariable("organizationId")
                          java.lang.String organizationId,
                          @RequestBody
                          java.util.List<java.lang.String> parentIds)
      • getTreeByParentId

        @GetMapping("/tree")
        @ResponseBody
        SparrowTree<cn.sparrowmini.org.model.Organization,​java.lang.String> getTreeByParentId​(@Nullable @RequestParam("parentId")
                                                                                                    java.lang.String parentId)
      • get

        @GetMapping("/{organizationId}")
        @ResponseBody
        cn.sparrowmini.org.model.Organization get​(@PathVariable("organizationId")
                                                  java.lang.String organizationId)
      • childCount

        @GetMapping("/{organizationId}/childCount")
        @ResponseBody
        long childCount​(@PathVariable
                        java.lang.String organizationId,
                        cn.sparrowmini.org.model.constant.OrganizationChildTypeEnum type)