Interface ITenantManager


  • public interface ITenantManager
    Author:
    wseyler This interface follows the following argument conventions: - parentPath is a fully qualified TENANT ONLY path that resolves to the parent of the tenant to be operated on - tenentPath is a fully qualified TENANT ONLY path that resolves to the tenant root folder. - tenantId is a internal UUID that uniquely identifies the tenant root folder
    • Method Detail

      • createTenant

        ITenant createTenant​(ITenant parentTenant,
                             String tenantName,
                             String tenantAdminRoleName,
                             String authenticatedRoleName,
                             String anonymousRoleName)
        Parameters:
        parentPath -
        tenantName -
        Returns:
        a "tenantPath"
      • getChildTenants

        List<ITenant> getChildTenants​(ITenant parentTenant)
        Gets children tenants of the "parent" tenant. Returns only level one children. Not descendants
        Parameters:
        parentTenant - -
        Returns:
        List of children that are subTenants of the parent tenant.
      • getChildTenants

        List<ITenant> getChildTenants​(ITenant parentTenant,
                                      boolean includeDisabledTenants)
        Gets children tenants of the "parent" tenant. Returns only level one children. Not descendants. If the includeDisabledTenants is true then it will return disabled tenants as well
        Parameters:
        parentTenant - -
        includeDisabledTenants -
        Returns:
        List of children that are subTenants of the parent tenant.
      • updateTentant

        void updateTentant​(String tenantPath,
                           Map<String,​Serializable> tenantInfo)
        Updates tenant with the items in tenant info. Each item must be a "well-know" attribute
        Parameters:
        tenantPath -
        tenantInfo -
      • deleteTenant

        void deleteTenant​(ITenant tenant)
        Deletes the tenant
        Parameters:
        tenant -
      • deleteTenants

        void deleteTenants​(List<ITenant> tenantPaths)
        Deletes a list of tenants
        Parameters:
        tenantPaths -
      • enableTenant

        void enableTenant​(ITenant tenant,
                          boolean enable)
        Enables/disables the tenant with the paths of tenantPath
        Parameters:
        tenant -
        enable -
      • enableTenants

        void enableTenants​(List<ITenant> tenantPaths,
                           boolean enable)
        Enables/disables the tenants with paths in the tenantPaths list
        Parameters:
        tenantPaths -
        enable -
      • isSubTenant

        boolean isSubTenant​(ITenant parentTenant,
                            ITenant descendantTenant)
        Parameters:
        parentTenant -
        descendantTenant -
        Returns:
        boolean that is true if the parentTenant is the same as descendantTenant or the descendantTenant is the descendant of the parent
      • getTenantByRootFolderPath

        ITenant getTenantByRootFolderPath​(String tenantRootFolderPath)
      • createUserHomeFolder

        RepositoryFile createUserHomeFolder​(ITenant tenant,
                                            String username)
        Creates users home folder. If the user is admin, this method will create home/admin folder
        Parameters:
        tenantPath -
        username -
        Returns:
        home folder
      • getUserHomeFolder

        RepositoryFile getUserHomeFolder​(ITenant tenant,
                                         String username)
        Retrieves users home folder.
        Parameters:
        tenantPath -
        username -
        Returns:
        home folder if it exists