@ExperimentalApi public class RequirementResource extends Object
Modifier and Type | Field and Description |
---|---|
static RestAgentSummary |
AGENT_SUMMARY |
static RestRequirement |
REQUIREMENT
Used for REST documentation generation.
|
static List<RestRequirement> |
REQUIREMENTS |
Constructor and Description |
---|
RequirementResource(RequirementService requirementService,
BambooPermissionManager bambooPermissionManager,
FeatureManager featureManager,
InputParser inputParser,
LinkService linkService) |
Modifier and Type | Method and Description |
---|---|
RestRequirement |
addRequirementForJob(String jobKeyString,
RestRequirement requirement,
javax.ws.rs.core.UriInfo uriInfo)
Adds a requirement for a given job.
|
RestAgentSummary |
getAgentMatchesForJob(String jobKeyString,
javax.ws.rs.core.UriInfo uriInfo)
Gets a summary of the agents that are capable of running a job, based off its requirements.
|
RestAgentSummary |
getDetailedAgentMatchesForJob(String jobKeyString,
javax.ws.rs.core.UriInfo uriInfo) |
RestRequirement |
getRequirementForJob(String jobKeyString,
long requirementId,
javax.ws.rs.core.UriInfo uriInfo)
Gets the details of a requirement for a given job.
|
List<RestRequirement> |
getRequirementsForJob(String jobKeyString)
Gets all the requirements of a job.
|
javax.ws.rs.core.Response |
removeRequirementFromJob(String jobKeyString,
long requirementId)
Removes a requirement for a job.
|
RestRequirement |
updateRequirementForJob(String jobKeyString,
long requirementId,
RestRequirement requirement,
javax.ws.rs.core.UriInfo uriInfo)
Updates a requirement for a given job.
|
public static final RestRequirement REQUIREMENT
public static final List<RestRequirement> REQUIREMENTS
public static final RestAgentSummary AGENT_SUMMARY
public RequirementResource(RequirementService requirementService, BambooPermissionManager bambooPermissionManager, FeatureManager featureManager, InputParser inputParser, LinkService linkService)
public RestAgentSummary getAgentMatchesForJob(String jobKeyString, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
jobKeyString
- job key of the jobRestAgentSummary
WebValidationException
public RestAgentSummary getDetailedAgentMatchesForJob(String jobKeyString, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
WebValidationException
public List<RestRequirement> getRequirementsForJob(String jobKeyString) throws WebValidationException
jobKeyString
- job key of the jobRestRequirement
WebValidationException
public RestRequirement getRequirementForJob(String jobKeyString, long requirementId, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
jobKeyString
- job key of the jobrequirementId
- unique identifier of the requirement to get details ofRestRequirement
WebValidationException
public RestRequirement addRequirementForJob(String jobKeyString, RestRequirement requirement, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
jobKeyString
- job key of the jobrequirement
- a representation of the requirementRestRequirement
WebValidationException
public RestRequirement updateRequirementForJob(String jobKeyString, long requirementId, RestRequirement requirement, @Context javax.ws.rs.core.UriInfo uriInfo) throws WebValidationException
jobKeyString
- job key of the jobrequirementId
- requirement id of the requirement to updaterequirement
- an updated representation of the requirementRestRequirement
WebValidationException
public javax.ws.rs.core.Response removeRequirementFromJob(String jobKeyString, long requirementId) throws WebValidationException
jobKeyString
- key of the jobrequirementId
- requirement id of the requirement to deleteResponse
an empty responseWebValidationException
Copyright © 2019 Atlassian Software Systems Pty Ltd. All rights reserved.