Package step.controller.multitenancy
Class TenantServices
- java.lang.Object
-
- step.framework.server.AbstractServices<step.core.access.User>
-
- step.core.deployment.AbstractStepServices
-
- step.controller.multitenancy.TenantServices
-
@Singleton @Path("tenants") public class TenantServices extends step.core.deployment.AbstractStepServices
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TenantServices.MoveEntitiesParameters
static class
TenantServices.MoveEntitiesResult
static class
TenantServices.ProjectMemberResponse
-
Constructor Summary
Constructors Constructor Description TenantServices()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMemberToProject(java.lang.String projectId, java.lang.String userid, java.lang.String roleInProject)
step.controller.services.async.AsyncTaskStatus<?>
assignUnassignedEntities(java.lang.String id, boolean simulate)
void
deleteProject(java.lang.String id, Project project)
java.util.List<step.controller.multitenancy.Tenant>
getAllAvailableTenants()
java.util.List<Project>
getAllProjects()
java.util.List<step.controller.multitenancy.Tenant>
getAvailableTenantsOfUser(java.lang.String id)
step.controller.multitenancy.Tenant
getCurrentTenant()
Project
getProject(java.lang.String id)
java.util.List<TenantServices.ProjectMemberResponse>
getProjectMembers(java.lang.String projectId)
void
init()
step.controller.services.async.AsyncTaskStatus<TenantServices.MoveEntitiesResult>
moveEntities(java.lang.String entityName, TenantServices.MoveEntitiesParameters parameter)
Project
readProject(Project project)
void
removeMemberFromProject(java.lang.String projectId, java.lang.String userid)
Project
saveProject(Project project)
Project
searchProjectByAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
void
selectTenant(java.lang.String tenantName)
Project
updateProject(java.lang.String id, Project project)
-
Methods inherited from class step.core.deployment.AbstractStepServices
checkRightsOnBehalfOf, getAuthorizationManager, getContext, getExecutionRunnable, getObjectEnricher, getObjectFilter, getScheduler
-
-
-
-
Method Detail
-
init
@PostConstruct public void init() throws java.lang.Exception
- Overrides:
init
in classstep.core.deployment.AbstractStepServices
- Throws:
java.lang.Exception
-
getAllAvailableTenants
@GET @Path("/") @Consumes("application/json") @Produces("application/json") public java.util.List<step.controller.multitenancy.Tenant> getAllAvailableTenants()
-
getAvailableTenantsOfUser
@GET @Path("/user/{id}") @Consumes("application/json") @Produces("application/json") public java.util.List<step.controller.multitenancy.Tenant> getAvailableTenantsOfUser(@PathParam("id") java.lang.String id)
-
selectTenant
@POST @Consumes("application/json") @Path("/current") public void selectTenant(java.lang.String tenantName) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getCurrentTenant
@GET @Consumes("application/json") @Produces("application/json") @Path("/current") public step.controller.multitenancy.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") java.lang.String id, Project project)
-
getProject
@GET @Path("/project/{id}") @Consumes("application/json") @Produces("application/json") public Project getProject(@PathParam("id") java.lang.String id)
-
deleteProject
@DELETE @Path("/project/{id}") @Consumes("application/json") @Produces("application/json") public void deleteProject(@PathParam("id") java.lang.String id, Project project)
-
getAllProjects
@GET @Path("/projects") @Consumes("application/json") @Produces("application/json") public java.util.List<Project> getAllProjects()
-
searchProjectByAttributes
@POST @Path("/project/search") @Consumes("application/json") @Produces("application/json") public Project searchProjectByAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
-
readProject
@GET @Path("/project") @Consumes("application/json") @Produces("application/json") public Project readProject(Project project)
-
moveEntities
@POST @Path("/entities/{entityName}/bulk/move") @Consumes("application/json") @Produces("application/json") public step.controller.services.async.AsyncTaskStatus<TenantServices.MoveEntitiesResult> moveEntities(@PathParam("entityName") java.lang.String entityName, TenantServices.MoveEntitiesParameters parameter)
-
assignUnassignedEntities
@POST @Path("/project/{id}/unassigned-entities") @Consumes("application/json") @Produces("application/json") public step.controller.services.async.AsyncTaskStatus<?> assignUnassignedEntities(@PathParam("id") java.lang.String id, @QueryParam("simulate") boolean simulate)
-
getProjectMembers
@GET @Path("/project/{id}/members") @Consumes("application/json") @Produces("application/json") public java.util.List<TenantServices.ProjectMemberResponse> getProjectMembers(@PathParam("id") java.lang.String projectId)
-
addMemberToProject
@POST @Path("/project/{id}/members/{userid}") @Consumes("application/json") public void addMemberToProject(@PathParam("id") java.lang.String projectId, @PathParam("userid") java.lang.String userid, java.lang.String roleInProject)
-
removeMemberFromProject
@DELETE @Path("/project/{id}/members/{userid}") @Consumes("application/json") @Produces("application/json") public void removeMemberFromProject(@PathParam("id") java.lang.String projectId, @PathParam("userid") java.lang.String userid)
-
-