Package step.controller.multitenancy
Class TenantServices
- java.lang.Object
-
- step.core.deployment.AbstractServices
-
- step.controller.multitenancy.TenantServices
-
@Singleton @Path("tenants") public class TenantServices extends step.core.deployment.AbstractServices
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTenantServices.ProjectMemberResponse
-
Constructor Summary
Constructors Constructor Description TenantServices()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMemberToProject(String projectId, String userid, String roleInProject)voiddeleteProject(String id, Project project)List<Tenant>getAllAvailableTenants()List<Project>getAllProjects()TenantgetCurrentTenant()ProjectgetProject(String id)List<TenantServices.ProjectMemberResponse>getProjectMembers(String projectId)voidinit()ProjectreadProject(Project project)voidremoveMemberFromProject(String projectId, String userid)ProjectsaveProject(Project project)ProjectsearchProjectByAttributes(Map<String,String> attributes)voidselectTenant(String tenantName)ProjectupdateProject(String id, Project project)
-
-
-
Method Detail
-
init
@PostConstruct public void init() throws Exception
- Overrides:
initin classstep.core.deployment.AbstractServices- Throws:
Exception
-
getAllAvailableTenants
@GET @Path("/") @Consumes("application/json") @Produces("application/json") public List<Tenant> getAllAvailableTenants()
-
selectTenant
@POST @Consumes("application/json") @Path("/current") public void selectTenant(String tenantName) throws Exception- Throws:
Exception
-
getCurrentTenant
@GET @Consumes("application/json") @Produces("application/json") @Path("/current") public Tenant getCurrentTenant()
-
saveProject
@POST @Path("/project") @Consumes("application/json") @Produces("application/json") public Project saveProject(Project project)
-
updateProject
@POST @Path("/project/{id}") @Consumes("application/json") @Produces("application/json") public Project updateProject(@PathParam("id") String id, Project project)
-
getProject
@GET @Path("/project/{id}") @Consumes("application/json") @Produces("application/json") public Project getProject(@PathParam("id") String id)
-
deleteProject
@DELETE @Path("/project/{id}") @Consumes("application/json") @Produces("application/json") public void deleteProject(@PathParam("id") String id, Project project)
-
getAllProjects
@GET @Path("/projects") @Consumes("application/json") @Produces("application/json") public List<Project> getAllProjects()
-
searchProjectByAttributes
@POST @Path("/project/search") @Consumes("application/json") @Produces("application/json") public Project searchProjectByAttributes(Map<String,String> attributes)
-
readProject
@GET @Path("/project") @Consumes("application/json") @Produces("application/json") public Project readProject(Project project)
-
getProjectMembers
@GET @Path("/project/{id}/members") @Consumes("application/json") @Produces("application/json") public List<TenantServices.ProjectMemberResponse> getProjectMembers(@PathParam("id") String projectId)
-
addMemberToProject
@POST @Path("/project/{id}/members/{userid}") @Consumes("application/json") public void addMemberToProject(@PathParam("id") String projectId, @PathParam("userid") String userid, String roleInProject)
-
-