Class MultitenancyManager


  • public class MultitenancyManager
    extends java.lang.Object
    • 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)
      • 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)