Package org.pentaho.platform.api.mt
Interface ITenantedPrincipleNameResolver
public interface ITenantedPrincipleNameResolver
Utility to go between principal IDs (user/role IDs) and principal name and tenant. To illustrate, if
user "admin" belongs to tenant "acme," this resolver class determines the user's
unique ID within a multi-tenanted environment where multiple users with the same name might exist across tenants.
Conversely this class must be able to convert a unique user ID to a user name & tenant.
- Author:
- rmansoor
-
Method Summary
Modifier and TypeMethodDescriptiongetPrincipleId
(ITenant tenant, String principalName) Constructs a principle ID from tenant and principle name.getPrincipleName
(String principleId) Extracts the principle name from the principleId.Extracts the tenant from the principleId.boolean
Returns flag indicating that principleId is a valid tenanted string.
-
Method Details
-
getTenant
Extracts the tenant from the principleId.- Parameters:
principleId
- Principle ID.- Returns:
- Returns tenant that corresponds to the id.
-
getPrincipleName
Extracts the principle name from the principleId.- Parameters:
principleId
- Principle ID.- Returns:
- Returns principle name that matches the principle ID.
-
getPrincipleId
Constructs a principle ID from tenant and principle name.- Parameters:
tenant
- Tenant to be used for ID construction.principalName
- Name of the principle.- Returns:
- Returns Unique ID for the specified principle name and tenant across all the tenants.
-
isValid
Returns flag indicating that principleId is a valid tenanted string.- Parameters:
principleId
- ID of the principle.- Returns:
- Teturns True if the ID provided is a valid principle ID.
-