public class VariableDefinitionAccessorImpl extends Object implements EncryptedVariableDefinitionAccessor
Constructor and Description |
---|
VariableDefinitionAccessorImpl(VariableDefinitionDao variableDefinitionDao) |
Modifier and Type | Method and Description |
---|---|
@NotNull Long |
countAllProjectsVariables()
Count all project variables.
|
int |
countDeploymentEnvironmentVariables(long environmentId)
Count list of environment variables associated with a given deployment environment
|
@NotNull List<Long> |
findAllProjectsIdsUsingProjectVariables()
Get list of all project variables
|
@Nullable VariableDefinition |
findVariableDefinition(long id)
Find variable definition of specified id
|
@NotNull List<VariableDefinition> |
getDeploymentEnvironmentVariables(long environmentId)
Get list of environment variables associated with a given deployment environment
|
@NotNull List<VariableDefinition> |
getDeploymentVersionVariables(long deploymentVersionId)
Get list of environment variables associated with a given deployment version
|
@NotNull List<VariableDefinition> |
getGlobalNotOverriddenEnvironmentVariables(long environmentId) |
@NotNull List<VariableDefinition> |
getGlobalNotOverriddenVariables(@NotNull long projectId)
Get list of all global variables that are not overridden by project variables for a given project
|
@NotNull List<VariableDefinition> |
getGlobalNotOverriddenVariables(@NotNull PlanIdentifier plan)
Get list of all global variables that are not overridden by plan or project variables for a given plan
|
@Nullable VariableDefinition |
getGlobalVariableByKey(String key)
Retrieves a specific global variable by key.
|
@NotNull List<VariableDefinition> |
getGlobalVariables()
Get list of all global variables
|
@NotNull List<VariableDefinition> |
getInheritedNotOverriddenVariables(@NotNull PlanIdentifier plan)
Get list of all variables that are inherited by plan, that is all global, project and (in case of branches) default plan variables that are not overridden by a plan or plan branch.
|
@NotNull List<VariableDefinition> |
getInheritedVariables(@NotNull PlanIdentifier plan)
Get list of all variables that are inherited by plan, that is all global, project and (in case of branches) default plan variables.
|
@Nullable VariableDefinition |
getPlanVariableByKey(@NotNull PlanIdentifier plan,
@NotNull String key)
Retrieves a specific variable for the plan with the given key
|
@NotNull List<VariableDefinition> |
getPlanVariables(@NotNull PlanIdentifier plan)
Get list of plan variables associated with a given plan
|
@NotNull List<VariableDefinition> |
getProjectVariables(long projectId)
Get list of environment variables associated with a given project
|
@NotNull Map<String,String> |
getSimpleVariableMapByType(@NotNull VariableContext variableContext,
@NotNull VariableType variableType)
Filter variable context by variable type and return as simple key/value map
|
public VariableDefinitionAccessorImpl(VariableDefinitionDao variableDefinitionDao)
@Nullable public @Nullable VariableDefinition findVariableDefinition(long id)
VariableDefinitionAccessor
findVariableDefinition
in interface VariableDefinitionAccessor
id
- id of variable definition@NotNull public @NotNull List<VariableDefinition> getGlobalVariables()
VariableDefinitionAccessor
getGlobalVariables
in interface VariableDefinitionAccessor
@NotNull public @NotNull List<Long> findAllProjectsIdsUsingProjectVariables()
VariableDefinitionAccessor
findAllProjectsIdsUsingProjectVariables
in interface VariableDefinitionAccessor
@NotNull public @NotNull Long countAllProjectsVariables()
VariableDefinitionAccessor
countAllProjectsVariables
in interface VariableDefinitionAccessor
@Nullable public @Nullable VariableDefinition getGlobalVariableByKey(String key)
VariableDefinitionAccessor
getGlobalVariableByKey
in interface VariableDefinitionAccessor
key
- of the variable@Nullable public @Nullable VariableDefinition getPlanVariableByKey(@NotNull @NotNull PlanIdentifier plan, @NotNull @NotNull String key)
VariableDefinitionAccessor
getPlanVariableByKey
in interface VariableDefinitionAccessor
plan
- variable belongs tokey
- of variable@NotNull public @NotNull List<VariableDefinition> getPlanVariables(@NotNull @NotNull PlanIdentifier plan)
VariableDefinitionAccessor
getPlanVariables
in interface VariableDefinitionAccessor
plan
- Plan whose associated variables should be returnedpublic int countDeploymentEnvironmentVariables(long environmentId)
VariableDefinitionAccessor
countDeploymentEnvironmentVariables
in interface VariableDefinitionAccessor
environmentId
- id of Deployment environment@NotNull public @NotNull List<VariableDefinition> getDeploymentEnvironmentVariables(long environmentId)
VariableDefinitionAccessor
getDeploymentEnvironmentVariables
in interface VariableDefinitionAccessor
environmentId
- id of Deployment environment@NotNull public @NotNull List<VariableDefinition> getDeploymentVersionVariables(long deploymentVersionId)
VariableDefinitionAccessor
getDeploymentVersionVariables
in interface VariableDefinitionAccessor
deploymentVersionId
- id of Deployment environment@NotNull public @NotNull List<VariableDefinition> getProjectVariables(long projectId)
VariableDefinitionAccessor
getProjectVariables
in interface VariableDefinitionAccessor
projectId
- id of a Project@NotNull public @NotNull List<VariableDefinition> getGlobalNotOverriddenVariables(@NotNull @NotNull long projectId)
VariableDefinitionAccessor
getGlobalNotOverriddenVariables
in interface VariableDefinitionAccessor
projectId
- id of a project@NotNull public @NotNull List<VariableDefinition> getGlobalNotOverriddenVariables(@NotNull @NotNull PlanIdentifier plan)
VariableDefinitionAccessor
getGlobalNotOverriddenVariables
in interface VariableDefinitionAccessor
plan
- Plan whose associated variables should be used@NotNull public @NotNull List<VariableDefinition> getInheritedVariables(@NotNull @NotNull PlanIdentifier plan)
VariableDefinitionAccessor
getInheritedVariables
in interface VariableDefinitionAccessor
@NotNull public @NotNull List<VariableDefinition> getInheritedNotOverriddenVariables(@NotNull @NotNull PlanIdentifier plan)
VariableDefinitionAccessor
getInheritedNotOverriddenVariables
in interface VariableDefinitionAccessor
@NotNull public @NotNull List<VariableDefinition> getGlobalNotOverriddenEnvironmentVariables(long environmentId)
getGlobalNotOverriddenEnvironmentVariables
in interface VariableDefinitionAccessor
@NotNull public @NotNull Map<String,String> getSimpleVariableMapByType(@NotNull @NotNull VariableContext variableContext, @NotNull @NotNull VariableType variableType)
VariableDefinitionAccessor
getSimpleVariableMapByType
in interface VariableDefinitionAccessor
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.