Interface RuleSecretStore

All Known Implementing Classes:
CachingRuleSecretStore, JiraRuleSecretStore

public interface RuleSecretStore
  • Method Details

    • getAllSecrets

      List<RuleSecretWithProjects> getAllSecrets(TenantContext context)
      Retrieves all the secrets for a tenant with loaded projects
      Parameters:
      context - The database tenant context
      Returns:
      the complete list or rule secrets for the tenant
    • getSecretById

      Optional<RuleSecretWithProjects> getSecretById(TenantContext context, long secretId)
      Gets a single secret by id with loaded associated projects
      Parameters:
      context - The database tenant context
      secretId - The id of the secret
      Returns:
      an optional of the secret
    • getSecretByKey

      Optional<RuleSecretWithProjects> getSecretByKey(TenantContext context, String key)
      Gets a secret by its key with loaded associated projects
      Parameters:
      context - The database tenant context
      key - The secret key
      Returns:
      an optional of the secret
    • updateSecret

      Updates given secret, including project associations.
      Parameters:
      context - The database tenant context
      secret - The secret with the updates to apply
      Returns:
      The updated secret
    • createSecret

      Creates secret
      Parameters:
      context - The database tenant context
      secret - The secret to create
      Returns:
      The created secret
    • deleteSecret

      void deleteSecret(TenantContext context, long secretId)
      Deletes secret
      Parameters:
      context - The database tenant context
      secretId - The id of secret to delete
    • getSecretsByProject

      List<RuleSecretWithProjects> getSecretsByProject(TenantContext context, String projectId)
      Retrieves all secrets associated to the given project, including other project associations.
      Parameters:
      context - The database tenant context
      projectId - The id of project to fetch secrets for
    • getRulesSecretIsUsedIn

      List<Long> getRulesSecretIsUsedIn(TenantContext context, String secretKey)