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