Interface RuleSecretStore
- All Known Implementing Classes:
CachingRuleSecretStore
,JiraRuleSecretStore
public interface RuleSecretStore
-
Method Summary
Modifier and TypeMethodDescriptioncreateSecret
(TenantContext context, RuleSecretWithProjects secret) Creates secretvoid
deleteSecret
(TenantContext context, long secretId) Deletes secretgetAllSecrets
(TenantContext context) Retrieves all the secrets for a tenant with loaded projectsgetRulesSecretIsUsedIn
(TenantContext context, String secretKey) getSecretById
(TenantContext context, long secretId) Gets a single secret by id with loaded associated projectsgetSecretByKey
(TenantContext context, String key) Gets a secret by its key with loaded associated projectsgetSecretsByProject
(TenantContext context, String projectId) Retrieves all secrets associated to the given project, including other project associations.updateSecret
(TenantContext context, RuleSecretWithProjects secret) Updates given secret, including project associations.
-
Method Details
-
getAllSecrets
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
Gets a single secret by id with loaded associated projects- Parameters:
context
- The database tenant contextsecretId
- The id of the secret- Returns:
- an optional of the secret
-
getSecretByKey
Gets a secret by its key with loaded associated projects- Parameters:
context
- The database tenant contextkey
- The secret key- Returns:
- an optional of the secret
-
updateSecret
Updates given secret, including project associations.- Parameters:
context
- The database tenant contextsecret
- The secret with the updates to apply- Returns:
- The updated secret
-
createSecret
Creates secret- Parameters:
context
- The database tenant contextsecret
- The secret to create- Returns:
- The created secret
-
deleteSecret
Deletes secret- Parameters:
context
- The database tenant contextsecretId
- The id of secret to delete
-
getSecretsByProject
Retrieves all secrets associated to the given project, including other project associations.- Parameters:
context
- The database tenant contextprojectId
- The id of project to fetch secrets for
-
getRulesSecretIsUsedIn
-