use of fi.otavanopisto.muikku.plugins.forum.model.ForumAreaGroup in project muikku by otavanopisto.
the class AcceptanceTestsRESTService method deleteWorkspaceDiscussionGroup.
@DELETE
@Path("/workspaces/{WORKSPACEENTITYID}/discussiongroups/{GROUPID}")
@RESTPermit(handling = Handling.UNSECURED)
public Response deleteWorkspaceDiscussionGroup(@PathParam("WORKSPACEENTITYID") Long workspaceEntityId, @PathParam("GROUPID") Long groupId) {
WorkspaceEntity workspaceEntity = workspaceEntityController.findWorkspaceEntityById(workspaceEntityId);
if (workspaceEntity == null) {
return Response.status(Status.NOT_FOUND).entity("WorkspaceEntity not found").build();
}
ForumAreaGroup group = forumController.findForumAreaGroup(groupId);
if (group == null) {
return Response.status(Status.NOT_FOUND).entity("Group not found").build();
}
forumController.deleteAreaGroup(group);
return Response.noContent().build();
}
Aggregations