Package cn.sparrowmini.org.service
Interface OrganizationRestService
-
- All Superinterfaces:
PreserveRole,PreserveScope
- All Known Subinterfaces:
OrganizationService
- All Known Implementing Classes:
OrganizationServiceImpl
@RequestMapping("/organizations") public interface OrganizationRestService extends PreserveScope
-
-
Field Summary
-
Fields inherited from interface cn.sparrowmini.org.service.scope.PreserveRole
ROLE_ADMIN, ROLE_SUPER_ADMIN, ROLE_SUPER_SYSADMIN, ROLE_SYSADMIN, ROLE_USER
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddParent(java.lang.String organizationId, java.util.List<java.lang.String> parentIds)longchildCount(java.lang.String organizationId, cn.sparrowmini.org.model.constant.OrganizationChildTypeEnum type)cn.sparrowmini.org.model.Organizationcreate(@NotNull cn.sparrowmini.org.model.Organization organization)voiddelete(@NotNull java.lang.String[] ids)cn.sparrowmini.org.model.Organizationget(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)voidremoveParent(java.lang.String organizationId, java.util.List<java.lang.String> parentIds)cn.sparrowmini.org.model.Organizationupdate(java.lang.String organizationId, java.util.Map<java.lang.String,java.lang.Object> map)-
Methods inherited from interface cn.sparrowmini.org.service.scope.PreserveRole
getRoles
-
Methods inherited from interface cn.sparrowmini.org.service.scope.PreserveScope
getScopes
-
-
-
-
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)
-
-