@ExperimentalApi
public interface RequirementService
Modifier and Type | Method and Description |
---|---|
@NotNull ImmutableRequirement |
addRequirement(@NotNull PlanKey jobKey,
@NotNull String key,
ImmutableRequirement.MatchType matchType,
@Nullable String matchValue)
Add new requirement to a job.
|
@NotNull ExecutableAgentsMatrix |
getExecutableAgentMatrixForJob(@NotNull PlanKey jobKey)
retrieve all executable agents for a particular job.
|
@NotNull ImmutableRequirement |
getRequirementForJob(@NotNull PlanKey jobKey,
long requirementId)
Get a single requirement for a job.
|
@NotNull List<? extends ImmutableRequirement> |
getRequirementsForJob(@NotNull PlanKey jobKey)
Get all requirements for jobs.
|
void |
removeRequirement(@NotNull PlanKey jobKey,
long requirementId)
Remove a specific requirement
|
@NotNull ImmutableRequirement |
updateRequirement(@NotNull PlanKey jobKey,
long requirementId,
@NotNull String key,
ImmutableRequirement.MatchType matchType,
@Nullable String matchValue)
Update an existing requirement.
|
@NotNull ErrorCollection |
validateRequirementForAdd(@NotNull PlanKey jobKey,
@Nullable String key,
ImmutableRequirement.MatchType matchType,
@Nullable String matchValue)
Validate requirement details.
|
@NotNull ErrorCollection |
validateRequirementForUpdate(@NotNull PlanKey jobKey,
long requirementId,
@Nullable String key,
ImmutableRequirement.MatchType matchType,
@Nullable String matchValue)
Validate requirement details
|
@NotNull @NotNull List<? extends ImmutableRequirement> getRequirementsForJob(@NotNull @NotNull PlanKey jobKey) throws WebValidationException
jobKey
- of jobWebValidationException
- if job key invalid@NotNull @NotNull ImmutableRequirement getRequirementForJob(@NotNull @NotNull PlanKey jobKey, long requirementId)
jobKey
- of jobrequirementId
- of requirementNotFoundException
- if job key is invalid or requirement doesn't exist@NotNull @NotNull ErrorCollection validateRequirementForAdd(@NotNull @NotNull PlanKey jobKey, @Nullable @Nullable String key, @Nullable ImmutableRequirement.MatchType matchType, @Nullable @Nullable String matchValue)
jobKey
- of job requirement will be added tokey
- of requirement to match with the capabilitymatchType
- e.g. exists, regex match, equalsmatchValue
- for regex and equals the value the requirement should match@NotNull @NotNull ImmutableRequirement addRequirement(@NotNull @NotNull PlanKey jobKey, @NotNull @NotNull String key, @NotNull ImmutableRequirement.MatchType matchType, @Nullable @Nullable String matchValue) throws WebValidationException
jobKey
- of job to add to, must not be a branchkey
- 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 @NotNull ErrorCollection validateRequirementForUpdate(@NotNull @NotNull PlanKey jobKey, long requirementId, @Nullable @Nullable String key, @Nullable ImmutableRequirement.MatchType matchType, @Nullable @Nullable String matchValue)
jobKey
- of job requirement belongs torequirementId
- 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 match@NotNull @NotNull ImmutableRequirement updateRequirement(@NotNull @NotNull PlanKey jobKey, long requirementId, @NotNull @NotNull String key, @NotNull ImmutableRequirement.MatchType matchType, @Nullable @Nullable String matchValue) throws WebValidationException
jobKey
- of job requirement belongs torequirementId
- 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(@NotNull @NotNull PlanKey jobKey, long requirementId) throws WebValidationException
jobKey
- requirement belongs torequirementId
- of requirement to removeWebValidationException
- if requirement is not allowed to be removed@NotNull @NotNull ExecutableAgentsMatrix getExecutableAgentMatrixForJob(@NotNull @NotNull PlanKey jobKey) throws WebValidationException
jobKey
- WebValidationException
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.