@Path(value="/projects") public class ProjectsService extends Object
Constructor and Description |
---|
ProjectsService(org.infinispan.Cache cache,
UsersService usersResource,
RolesService rolesResource) |
Modifier and Type | Method and Description |
---|---|
void |
addUserRole(String id,
String userId,
String roleId) |
javax.ws.rs.core.Response |
create(Project project) |
void |
createProject(Project project) |
javax.ws.rs.core.Response |
delete(String id) |
Project |
getProject(String id) |
Projects |
getProjects(String name) |
String |
getUserIdByName(String projectId,
String username) |
Roles |
getUserRoles(String id,
String userId) |
static String |
projectCacheId(String id) |
void |
removeUserRole(String id,
String userId,
String roleId) |
void |
update(String id,
Project project) |
public ProjectsService(org.infinispan.Cache cache, UsersService usersResource, RolesService rolesResource)
@GET @Produces(value="application/json") public Projects getProjects(@QueryParam(value="name") String name)
@POST @Consumes(value="application/json") @Produces(value="application/json") @RolesAllowed(value="admin") public javax.ws.rs.core.Response create(Project project) throws Exception
Exception
@PUT @Consumes(value="application/json") @Produces(value="application/json") @Path(value="{id}") @RolesAllowed(value="admin") public void update(@PathParam(value="id") String id, Project project) throws Exception
Exception
@DELETE @Path(value="{id}") @RolesAllowed(value="admin") public javax.ws.rs.core.Response delete(@PathParam(value="id") String id)
@GET @Path(value="{id}") @Produces(value="application/json") public Project getProject(@PathParam(value="id") String id)
@PUT @Path(value="{id}/users/{user}/roles/{role}") @RolesAllowed(value="admin") public void addUserRole(@PathParam(value="id") String id, @PathParam(value="user") String userId, @PathParam(value="role") String roleId)
@DELETE @Path(value="{id}/users/{user}/roles/{role}") @RolesAllowed(value="admin") public void removeUserRole(@PathParam(value="id") String id, @PathParam(value="user") String userId, @PathParam(value="role") String roleId)
Copyright © 2015 JBoss by Red Hat. All rights reserved.