Interface DomainGroupManagementApi


  • @Validated
    public interface DomainGroupManagementApi
    The domain group management api.
    Author:
    Christian Bremer
    • Method Detail

      • getGroups

        @RequestMapping(value="/api/groups",
                        produces="application/json",
                        method=GET)
        org.springframework.http.ResponseEntity<List<DomainGroup>> getGroups​(@RequestParam(value="sort",defaultValue="name")
                                                                             String sort,
                                                                             @RequestParam(name="q",required=false)
                                                                             String query)
        Get domain groups.
        Parameters:
        sort - the sort order
        query - the query
        Returns:
        the groups
      • addGroup

        @RequestMapping(value="/api/groups",
                        produces="application/json",
                        consumes="application/json",
                        method=POST)
        org.springframework.http.ResponseEntity<DomainGroup> addGroup​(@Valid @RequestBody
                                                                      @Valid DomainGroup group)
        Add domain group.
        Parameters:
        group - the domain group to add
        Returns:
        the added domain group
      • getGroup

        @RequestMapping(value="/api/groups/{groupName}",
                        produces="application/json",
                        method=GET)
        org.springframework.http.ResponseEntity<DomainGroup> getGroup​(@PathVariable("groupName")
                                                                      String groupName)
        Get domain group by name.
        Parameters:
        groupName - the group name
        Returns:
        the domain group
      • updateGroup

        @RequestMapping(value="/api/groups/{groupName}",
                        produces="application/json",
                        consumes="application/json",
                        method=PUT)
        org.springframework.http.ResponseEntity<DomainGroup> updateGroup​(@PathVariable("groupName")
                                                                         String groupName,
                                                                         @Valid @RequestBody
                                                                         @Valid DomainGroup domainGroup)
        Update domain group.
        Parameters:
        groupName - the group name
        domainGroup - the domain group
        Returns:
        the updated domain group
      • groupExists

        @RequestMapping(value="/api/groups/{groupName}/exists",
                        produces="application/json",
                        method=GET)
        org.springframework.http.ResponseEntity<Boolean> groupExists​(@PathVariable("groupName")
                                                                     String groupName)
        Checks whether a domain group exists.
        Parameters:
        groupName - the group name
        Returns:
        true if the group exists otherwise false
      • isGroupNameInUse

        @RequestMapping(value="/api/groups/{groupName}/in-use",
                        produces="application/json",
                        method=GET)
        org.springframework.http.ResponseEntity<Boolean> isGroupNameInUse​(@PathVariable("groupName")
                                                                          String groupName)
        Checks whether a group is in use or not.
        Parameters:
        groupName - the group name
        Returns:
        true if the group name is in use otherwise false
      • deleteGroup

        @RequestMapping(value="/api/groups/{groupName}",
                        produces="application/json",
                        method=DELETE)
        org.springframework.http.ResponseEntity<Boolean> deleteGroup​(@PathVariable("groupName")
                                                                     String groupName)
        Delete domain group.
        Parameters:
        groupName - the group name
        Returns:
        true if the domain group was deleted, otherwise false