Interface TenantService
- All Known Implementing Classes:
JiraTenantService
public interface TenantService
-
Method Summary
Modifier and TypeMethodDescriptionvoidclearCache(TenantContext tenantContext) Clear cache for contextgetActiveTenantInfo(CloudIdContext context) Given the provided context, this method will try to look up full tenant details from the store.getActiveTenantInfo(TenantContext context) Given the provided context, this method will try to look up full tenant details from the store.getTenantProperties(TenantContext context) Retrieve tenant specific properties.voidremoveProperty(TenantContext context, String key) Revert a specific tenant property back to defaultsave(Environment environment, TenantInfo tenantInfo) Stores new TenantInfo (overwriting existing data).voidsetTenantProperty(TenantContext context, String key, String value) Set a specific tenant propertyvoidupdateTenantProperties(TenantContext context, Map<String, String> updatedProps) Update given tenant properties
-
Method Details
-
getActiveTenantInfo
Given the provided context, this method will try to look up full tenant details from the store. This may return empty if no stored tenant info can be found.- Parameters:
context- The context to lookup the tenant- Returns:
- Optional tenant info
-
getActiveTenantInfo
Given the provided context, this method will try to look up full tenant details from the store. This may return empty if no stored tenant info can be found.- Parameters:
context- The context to lookup the tenant- Returns:
- Optional tenant info
-
getTenantProperties
Retrieve tenant specific properties.- Parameters:
context- The context to lookup the tenant- Returns:
- Properties for the tenant.
-
updateTenantProperties
Update given tenant properties- Parameters:
context- The context to lookup the tenantupdatedProps- the properties to update
-
setTenantProperty
Set a specific tenant property- Parameters:
context- The context to lookup the tenantkey- the property keyvalue- the property value
-
removeProperty
Revert a specific tenant property back to default- Parameters:
context- The context to lookup the tenantkey- the property key
-
save
Stores new TenantInfo (overwriting existing data). Implementations should take care not to overwrite null attributes however, since this will be called for both installed and enabled events. The latter will not include the shared secret again.- Parameters:
environment- The environment to save this tenant intenantInfo- The updated tenant info- Returns:
- The new active (current) tenantinfo
-
clearCache
Clear cache for context- Parameters:
tenantContext- the context to access this tenant.
-