Interface TenantService

All Known Implementing Classes:
JiraTenantService

public interface TenantService
  • Method Details

    • getActiveTenantInfo

      Optional<TenantInfo> getActiveTenantInfo(TenantContext context)
      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

      Optional<TenantInfo> getActiveTenantInfo(CloudIdContext context)
      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

      TenantProperties getTenantProperties(TenantContext context)
      Retrieve tenant specific properties.
      Parameters:
      context - The context to lookup the tenant
      Returns:
      Properties for the tenant.
    • updateTenantProperties

      void updateTenantProperties(TenantContext context, Map<String,String> updatedProps)
      Update given tenant properties
      Parameters:
      context - The context to lookup the tenant
      updatedProps - the properties to update
    • setTenantProperty

      void setTenantProperty(TenantContext context, String key, String value)
      Set a specific tenant property
      Parameters:
      context - The context to lookup the tenant
      key - the property key
      value - the property value
    • removeProperty

      void removeProperty(TenantContext context, String key)
      Revert a specific tenant property back to default
      Parameters:
      context - The context to lookup the tenant
      key - the property key
    • save

      Optional<TenantInfo> save(Environment environment, TenantInfo tenantInfo)
      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 in
      tenantInfo - The updated tenant info
      Returns:
      The new active (current) tenantinfo
    • clearCache

      void clearCache(TenantContext tenantContext)
      Clear cache for context
      Parameters:
      tenantContext - the context to access this tenant.