Package step.controller.multitenancy
Class MultitenancyManager
- java.lang.Object
-
- step.controller.multitenancy.MultitenancyManager
-
public class MultitenancyManager extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
GLOBAL_TENANT_NAME
static java.lang.String
NO_TENANT_NAME
-
Constructor Summary
Constructors Constructor Description MultitenancyManager(step.core.access.UserAccessor userAccessor, ProjectAccessor projectAccessor)
-
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)
java.util.List<Tenant>
getAllAvailableTenants()
Tenant
getCurrentTenant(step.core.AbstractContext session)
protected java.util.List<Project>
getGlobalProjects()
step.core.objectenricher.ObjectHook
getObjectHook()
protected java.lang.String
getOQLFilterForTenant(step.controller.multitenancy.TenantContext tenantContext)
java.util.List<ProjectMembership>
getProjectMembers(java.lang.String projectId)
protected ProjectMembership
getProjectMembership(java.lang.String projectId, java.lang.String userid)
protected ProjectMembership
getProjectMembership(java.util.List<ProjectMembership> members, java.lang.String userid)
java.util.List<Tenant>
getTenantsInSession(step.core.deployment.Session session)
java.util.List<Tenant>
getTenantsOfUser(java.lang.String userId)
java.util.function.BiConsumer<java.lang.Object,step.core.imports.ImportContext>
importHookFactory()
boolean
isSuperUserSession(step.core.access.User user)
void
removeMemberFromProject(java.lang.String id, java.lang.String userid)
void
selectDefaultTenantIfNoTenantIsSelected(@NotNull step.core.deployment.Session session)
void
selectTenant(@NotNull step.core.deployment.Session session, java.lang.String tenantName)
-
-
-
Field Detail
-
GLOBAL_TENANT_NAME
public static final java.lang.String GLOBAL_TENANT_NAME
- See Also:
- Constant Field Values
-
NO_TENANT_NAME
public static final java.lang.String NO_TENANT_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MultitenancyManager
public MultitenancyManager(step.core.access.UserAccessor userAccessor, ProjectAccessor projectAccessor)
-
-
Method Detail
-
isSuperUserSession
public boolean isSuperUserSession(step.core.access.User user)
-
getTenantsInSession
public java.util.List<Tenant> getTenantsInSession(step.core.deployment.Session session)
-
getTenantsOfUser
public java.util.List<Tenant> getTenantsOfUser(java.lang.String userId)
-
getAllAvailableTenants
public java.util.List<Tenant> getAllAvailableTenants()
-
selectDefaultTenantIfNoTenantIsSelected
public void selectDefaultTenantIfNoTenantIsSelected(@NotNull @NotNull step.core.deployment.Session session)
-
selectTenant
public void selectTenant(@NotNull @NotNull step.core.deployment.Session session, java.lang.String tenantName) throws java.security.AccessControlException, java.lang.Exception
- Throws:
java.security.AccessControlException
java.lang.Exception
-
getProjectMembership
protected ProjectMembership getProjectMembership(java.lang.String projectId, java.lang.String userid)
-
getProjectMembership
protected ProjectMembership getProjectMembership(java.util.List<ProjectMembership> members, java.lang.String userid)
-
getCurrentTenant
public Tenant getCurrentTenant(step.core.AbstractContext session)
-
getObjectHook
public step.core.objectenricher.ObjectHook getObjectHook()
-
importHookFactory
public java.util.function.BiConsumer<java.lang.Object,step.core.imports.ImportContext> importHookFactory()
-
getProjectMembers
public java.util.List<ProjectMembership> getProjectMembers(java.lang.String projectId)
-
addMemberToProject
public void addMemberToProject(java.lang.String projectId, java.lang.String userid, java.lang.String roleInProject)
-
getOQLFilterForTenant
protected java.lang.String getOQLFilterForTenant(step.controller.multitenancy.TenantContext tenantContext)
-
getGlobalProjects
protected java.util.List<Project> getGlobalProjects()
-
removeMemberFromProject
public void removeMemberFromProject(java.lang.String id, java.lang.String userid)
-
-