@Singleton
@Path(value="tenants")
public class TenantServices
extends step.core.deployment.AbstractServices
Modifier and Type | Class and Description |
---|---|
static class |
TenantServices.ProjectMemberResponse |
Constructor and Description |
---|
TenantServices() |
Modifier and Type | Method and Description |
---|---|
void |
addMemberToProject(String projectId,
String userid,
String roleInProject) |
void |
deleteProject(String id,
Project project) |
List<Tenant> |
getAllAvailableTenants() |
List<Project> |
getAllProjects() |
Tenant |
getCurrentTenant() |
Project |
getProject(String id) |
List<TenantServices.ProjectMemberResponse> |
getProjectMembers(String projectId) |
void |
init() |
Project |
readProject(Project project) |
void |
removeMemberFromProject(String projectId,
String userid) |
Project |
saveProject(Project project) |
Project |
searchProjectByAttributes(Map<String,String> attributes) |
void |
selectTenant(String tenantName) |
Project |
updateProject(String id,
Project project) |
@PostConstruct public void init() throws Exception
init
in class step.core.deployment.AbstractServices
Exception
@GET @Path(value="/") @Consumes(value="application/json") @Produces(value="application/json") public List<Tenant> getAllAvailableTenants()
@POST @Consumes(value="application/json") @Path(value="/current") public void selectTenant(String tenantName) throws Exception
Exception
@GET @Consumes(value="application/json") @Produces(value="application/json") @Path(value="/current") public Tenant getCurrentTenant()
@POST @Path(value="/project") @Consumes(value="application/json") @Produces(value="application/json") public Project saveProject(Project project)
@POST @Path(value="/project/{id}") @Consumes(value="application/json") @Produces(value="application/json") public Project updateProject(@PathParam(value="id") String id, Project project)
@GET @Path(value="/project/{id}") @Consumes(value="application/json") @Produces(value="application/json") public Project getProject(@PathParam(value="id") String id)
@DELETE @Path(value="/project/{id}") @Consumes(value="application/json") @Produces(value="application/json") public void deleteProject(@PathParam(value="id") String id, Project project)
@GET @Path(value="/projects") @Consumes(value="application/json") @Produces(value="application/json") public List<Project> getAllProjects()
@POST @Path(value="/project/search") @Consumes(value="application/json") @Produces(value="application/json") public Project searchProjectByAttributes(Map<String,String> attributes)
@GET @Path(value="/project") @Consumes(value="application/json") @Produces(value="application/json") public Project readProject(Project project)
@GET @Path(value="/project/{id}/members") @Consumes(value="application/json") @Produces(value="application/json") public List<TenantServices.ProjectMemberResponse> getProjectMembers(@PathParam(value="id") String projectId)
@POST @Path(value="/project/{id}/members/{userid}") @Consumes(value="application/json") public void addMemberToProject(@PathParam(value="id") String projectId, @PathParam(value="userid") String userid, String roleInProject)
Copyright © 2020. All rights reserved.