class AdHocGroupMembersAPIController {

    @RequestMapping(value = "/group/{groupId}/members/save", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
    @ResponseBody
    public AcmGroup saveMembersToAdHocGroup(@RequestBody List<String> members,
            @PathVariable("groupId") String groupId) throws AcmAppErrorJsonMsg
    {
        LOG.info("Add user members group: [{}]", groupId);
        try
        {
            groupId = new String(Base64.getUrlDecoder().decode(groupId.getBytes()));
            return groupService.addUserMembersToGroup(members, groupId);
        }
        catch (AcmObjectNotFoundException e)
        {
            throw new AcmAppErrorJsonMsg("Failed to add user members to Ad Hoc Group", "ADHOC_GROUP", e);
        }
    }

}