Package org.pentaho.platform.api.mt
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
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateTenant
(ITenant parentTenant, String tenantName, String tenantAdminRoleName, String authenticatedRoleName, String anonymousRoleName) createUserHomeFolder
(ITenant tenant, String username) Creates users home folder.void
deleteTenant
(ITenant tenant) Deletes the tenantvoid
deleteTenants
(List<ITenant> tenantPaths) Deletes a list of tenantsvoid
enableTenant
(ITenant tenant, boolean enable) Enables/disables the tenant with the paths of tenantPathvoid
enableTenants
(List<ITenant> tenantPaths, boolean enable) Enables/disables the tenants with paths in the tenantPaths listgetChildTenants
(ITenant parentTenant) Gets children tenants of the "parent" tenant.getChildTenants
(ITenant parentTenant, boolean includeDisabledTenants) Gets children tenants of the "parent" tenant.getTenantByRootFolderPath
(String tenantRootFolderPath) getTenantRootFolder
(ITenant tenant) getUserHomeFolder
(ITenant tenant, String username) Retrieves users home folder.boolean
isSubTenant
(ITenant parentTenant, ITenant descendantTenant) void
updateTentant
(String tenantPath, Map<String, Serializable> tenantInfo) Updates tenant with the items in tenant info.
-
Field Details
-
TENANT_ROOT
- See Also:
-
TENANT_ENABLED
- See Also:
-
-
Method Details
-
createTenant
ITenant createTenant(ITenant parentTenant, String tenantName, String tenantAdminRoleName, String authenticatedRoleName, String anonymousRoleName) - Parameters:
parentPath
-tenantName
-- Returns:
- a "tenantPath"
-
getChildTenants
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
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
Updates tenant with the items in tenant info. Each item must be a "well-know" attribute- Parameters:
tenantPath
-tenantInfo
-
-
deleteTenant
Deletes the tenant- Parameters:
tenant
-
-
deleteTenants
Deletes a list of tenants- Parameters:
tenantPaths
-
-
enableTenant
Enables/disables the tenant with the paths of tenantPath- Parameters:
tenant
-enable
-
-
enableTenants
Enables/disables the tenants with paths in the tenantPaths list- Parameters:
tenantPaths
-enable
-
-
isSubTenant
- 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
-
getTenantRootFolder
-
getTenant
-
getTenantByRootFolderPath
-
createUserHomeFolder
Creates users home folder. If the user is admin, this method will create home/admin folder- Parameters:
tenantPath
-username
-- Returns:
- home folder
-
getUserHomeFolder
Retrieves users home folder.- Parameters:
tenantPath
-username
-- Returns:
- home folder if it exists
-