@ExperimentalApi
public interface EnvironmentRequirementService
Modifier and Type | Method and Description |
---|---|
ImmutableRequirement |
addRequirement(long environmentId,
String key,
ImmutableRequirement.MatchType matchType,
String matchValue)
Add new requirement to an environment.
|
ExecutableAgentsMatrix |
getExecutableAgentMatrixForEnvironment(long environmentId)
retrieve all executable agents for a particular environment.
|
ImmutableRequirement |
getRequirementForEnvironment(long environmentId,
long requirementId)
Get a single requirement for a environment.
|
List<? extends ImmutableRequirement> |
getRequirementsForEnvironment(long environmentId)
Get all requirements for environment.
|
void |
removeRequirement(long environmentId,
long requirementId)
Remove a specific requirement
|
void |
renameRequirement(CapabilityType capabilityType,
String oldCapabilityKey,
String newCapabilityLabel,
boolean override)
Updates capability key across all environments.
|
ImmutableRequirement |
updateRequirement(long environmentId,
long requirementId,
String key,
ImmutableRequirement.MatchType matchType,
String matchValue)
Update an existing requirement.
|
@NotNull List<? extends ImmutableRequirement> getRequirementsForEnvironment(long environmentId) throws WebValidationException
environmentId
- of environmentWebValidationException
- if environmentId invalid@NotNull ImmutableRequirement getRequirementForEnvironment(long environmentId, long requirementId)
environmentId
- of environmentrequirementId
- of requirementNotFoundException
- if environmentId is invalid or requirement doesn't exist@NotNull ImmutableRequirement addRequirement(long environmentId, @NotNull String key, @NotNull ImmutableRequirement.MatchType matchType, @Nullable String matchValue) throws WebValidationException
environmentId
- of environmentkey
- of requirement to match with the capabilitymatchType
- e.g. exists, regex match, equalsmatchValue
- for regex and equals the value the requirement should matchWebValidationException
- for any data related error.@NotNull ImmutableRequirement updateRequirement(long environmentId, long requirementId, @NotNull String key, @NotNull ImmutableRequirement.MatchType matchType, @Nullable String matchValue) throws WebValidationException
environmentId
- of environmentrequirementId
- if of the requirement being updatedkey
- of requirement to match with the capabilitymatchType
- e.g. exists, regex match, equalsmatchValue
- for regex and equals the value the requirement should matchWebValidationException
- for any data related error.void removeRequirement(long environmentId, long requirementId) throws WebValidationException
environmentId
- of environmentrequirementId
- of requirement to removeWebValidationException
- if requirement is not allowed to be removed@NotNull ExecutableAgentsMatrix getExecutableAgentMatrixForEnvironment(long environmentId) throws WebValidationException
environmentId
- of environmentWebValidationException
void renameRequirement(CapabilityType capabilityType, String oldCapabilityKey, String newCapabilityLabel, boolean override)
capabilityType
- capability typeoldCapabilityKey
- previous capability key, for example system.builder.mvn.Maven 3newCapabilityLabel
- new capability label, for example Maven 3 updatedoverride
- existing values in case of conflict. If there is a conflict when entity already has capability
with new label this flag indicates if it should be overridden or not.Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.