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
Fields Modifier and Type Field Description static String
TENANT_ENABLED
static String
TENANT_ROOT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ITenant
createTenant(ITenant parentTenant, String tenantName, String tenantAdminRoleName, String authenticatedRoleName, String anonymousRoleName)
RepositoryFile
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 listList<ITenant>
getChildTenants(ITenant parentTenant)
Gets children tenants of the "parent" tenant.List<ITenant>
getChildTenants(ITenant parentTenant, boolean includeDisabledTenants)
Gets children tenants of the "parent" tenant.ITenant
getTenant(String tenantId)
ITenant
getTenantByRootFolderPath(String tenantRootFolderPath)
RepositoryFile
getTenantRootFolder(ITenant tenant)
RepositoryFile
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 Detail
-
TENANT_ROOT
static final String TENANT_ROOT
- See Also:
- Constant Field Values
-
TENANT_ENABLED
static final String TENANT_ENABLED
- See Also:
- Constant Field Values
-
-
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
-
getTenantRootFolder
RepositoryFile getTenantRootFolder(ITenant tenant)
-
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
-
-