Package org.bremersee.groupman.api
Interface GroupControllerApi
- All Known Implementing Classes:
GroupControllerMock
@Valid
public interface GroupControllerApi
The group controller api.
- Author:
- Christian Bremer
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Group>
createGroup
(@Valid Group group) Create group.org.springframework.http.ResponseEntity<Group>
deleteGroup
(String id) Delete group.Gets editable groups.org.springframework.http.ResponseEntity<Group>
getGroupById
(String id) Gets group by id.getGroupsByIds
(List<String> id) Gets groups by ids.Gets membership.org.springframework.http.ResponseEntity<GroupIdList>
Gets membership ids.org.springframework.http.ResponseEntity<Status>
Get status of the current user.Gets usable groups.org.springframework.http.ResponseEntity<Group>
updateGroup
(String id, @Valid Group group) Update group.
-
Method Details
-
createGroup
@RequestMapping(value="/api/groups", produces="application/json", consumes="application/json", method=POST) org.springframework.http.ResponseEntity<Group> createGroup(@Valid @RequestBody @Valid Group group) Create group.- Parameters:
group
- the group- Returns:
- the response entity
-
getGroupById
@RequestMapping(value="/api/groups/{id}", produces="application/json", method=GET) org.springframework.http.ResponseEntity<Group> getGroupById(@PathVariable("id") String id) Gets group by id.- Parameters:
id
- the id- Returns:
- the group by id
-
updateGroup
@RequestMapping(value="/api/groups/{id}", produces="application/json", consumes="application/json", method=PUT) org.springframework.http.ResponseEntity<Group> updateGroup(@PathVariable("id") String id, @Valid @RequestBody @Valid Group group) Update group.- Parameters:
id
- the idgroup
- the group- Returns:
- the response entity
-
deleteGroup
@RequestMapping(value="/api/groups/{id}", method=DELETE) org.springframework.http.ResponseEntity<Group> deleteGroup(@PathVariable("id") String id) Delete group.- Parameters:
id
- the id- Returns:
- the response entity
-
getGroupsByIds
@RequestMapping(value="/api/groups/f", produces="application/json", method=GET) org.springframework.http.ResponseEntity<List<Group>> getGroupsByIds(@RequestParam(value="id",required=false) List<String> id) Gets groups by ids.- Parameters:
id
- the list of ids- Returns:
- the groups by ids
-
getEditableGroups
@RequestMapping(value="/api/groups/f/editable", produces="application/json", method=GET) org.springframework.http.ResponseEntity<List<Group>> getEditableGroups()Gets editable groups.- Returns:
- the editable groups
-
getUsableGroups
@RequestMapping(value="/api/groups/f/usable", produces="application/json", method=GET) org.springframework.http.ResponseEntity<List<Group>> getUsableGroups()Gets usable groups.- Returns:
- the usable groups
-
getMembership
@RequestMapping(value="/api/groups/f/membership", produces="application/json", method=GET) org.springframework.http.ResponseEntity<List<Group>> getMembership()Gets membership.- Returns:
- the membership
-
getMembershipIds
@RequestMapping(value="/api/groups/f/membership-ids", produces="application/json", method=GET) org.springframework.http.ResponseEntity<GroupIdList> getMembershipIds()Gets membership ids.- Returns:
- the membership ids
-
getStatus
@RequestMapping(value="/api/groups/f/status", produces="application/json", method=GET) org.springframework.http.ResponseEntity<Status> getStatus()Get status of the current user.- Returns:
- the status
-