Interface DomainGroupManagementApi


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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.springframework.http.ResponseEntity<org.bremersee.dccon.model.DomainGroup> addGroup​(@Valid org.bremersee.dccon.model.DomainGroup group)
      Add domain group.
      org.springframework.http.ResponseEntity<Boolean> deleteGroup​(String groupName)
      Delete domain group.
      org.springframework.http.ResponseEntity<org.bremersee.dccon.model.DomainGroup> getGroup​(String groupName)
      Get domain group by name.
      org.springframework.http.ResponseEntity<List<org.bremersee.dccon.model.DomainGroup>> getGroups​(String sort, String query)
      Get domain groups.
      org.springframework.http.ResponseEntity<Boolean> groupExists​(String groupName)
      Checks whether a domain group exists.
      org.springframework.http.ResponseEntity<Boolean> isGroupNameInUse​(String groupName)
      Checks whether a group is in use or not.
      org.springframework.http.ResponseEntity<org.bremersee.dccon.model.DomainGroup> updateGroup​(String groupName, @Valid org.bremersee.dccon.model.DomainGroup domainGroup)
      Update domain group.
    • Method Detail

      • getGroups

        @RequestMapping(value="/api/groups",
                        produces="application/json",
                        method=GET)
        org.springframework.http.ResponseEntity<List<org.bremersee.dccon.model.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<org.bremersee.dccon.model.DomainGroup> addGroup​(@Valid @RequestBody
                                                                                                @Valid org.bremersee.dccon.model.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<org.bremersee.dccon.model.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<org.bremersee.dccon.model.DomainGroup> updateGroup​(@PathVariable("groupName")
                                                                                                   String groupName,
                                                                                                   @Valid @RequestBody
                                                                                                   @Valid org.bremersee.dccon.model.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