@Singleton public class AgentResource extends Object
Constructor and Description |
---|
AgentResource(AgentCapabilityService agentCapabilityService,
AgentExecutableService agentExecutableService,
AgentManager agentManager,
com.atlassian.sal.api.message.I18nResolver i18nResolver,
RestHelperWrapper restHelperWrapper) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
createAgentCapability(long agentId,
RestCapability createCapabilityRequest)
Create new agent capability.
|
javax.ws.rs.core.Response |
deleteAgent(long agentId)
Remove build agent.
|
javax.ws.rs.core.Response |
deleteAgentCapability(long agentId,
String capabilityKey)
Remove build agent capability.
|
javax.ws.rs.core.Response |
deleteAllAgentCapabilities(long agentId)
Remove all capabilities of build agent.
|
javax.ws.rs.core.Response |
disableAgent(long agentId)
Disables an agent.
|
javax.ws.rs.core.Response |
enableAgent(long agentId)
Enables an agent.
|
List<RestCapability> |
getAgentCapabilities(long agentId,
boolean includeShared)
List agent's capabilities.
|
RestAgentInformation |
getAgentInformation(String expandParam,
boolean includeShared,
long agentId,
javax.ws.rs.core.UriInfo uriInfo)
Provides details of an agent with given id.
|
List<RestBuildAgent> |
getAgents(Boolean online)
Provides a list of all agents.
|
javax.ws.rs.core.Response |
getAgentStatus(long agentId)
Provides information about status of agent, if it's online or offline.
|
List<RestBuildAgent> |
getRemoteAgents(Boolean online)
Provides a list of all agent authentication statuses.
|
javax.ws.rs.core.Response |
updateAgentCapability(long agentId,
String capabilityKey,
RestRemoteAgentCapability updateCapabilityRequest)
Update existing agent capability.
|
@Inject public AgentResource(AgentCapabilityService agentCapabilityService, AgentExecutableService agentExecutableService, AgentManager agentManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, RestHelperWrapper restHelperWrapper)
public List<RestBuildAgent> getAgents(Boolean online)
public RestAgentInformation getAgentInformation(String expandParam, boolean includeShared, long agentId, @Context javax.ws.rs.core.UriInfo uriInfo)
agentId
- agent idincludeShared
- if response should include shared agent capabilities.public List<RestBuildAgent> getRemoteAgents(Boolean online)
public javax.ws.rs.core.Response getAgentStatus(long agentId) throws org.acegisecurity.AccessDeniedException
agentId
- agent idorg.acegisecurity.AccessDeniedException
public javax.ws.rs.core.Response enableAgent(long agentId) throws org.acegisecurity.AccessDeniedException, NotFoundException
agentId
- agent idorg.acegisecurity.AccessDeniedException
NotFoundException
public javax.ws.rs.core.Response disableAgent(long agentId) throws org.acegisecurity.AccessDeniedException, NotFoundException
agentId
- agent idorg.acegisecurity.AccessDeniedException
NotFoundException
public javax.ws.rs.core.Response deleteAgent(long agentId) throws org.acegisecurity.AccessDeniedException, WebValidationException
agentId
- agent idorg.acegisecurity.AccessDeniedException
WebValidationException
public List<RestCapability> getAgentCapabilities(long agentId, boolean includeShared)
agentId
- agent idincludeShared
- if response should include shared agent capabilities.public javax.ws.rs.core.Response createAgentCapability(long agentId, RestCapability createCapabilityRequest) throws WebValidationException
agentId
- agent idcreateCapabilityRequest
- new capability.WebValidationException
public javax.ws.rs.core.Response updateAgentCapability(long agentId, String capabilityKey, RestRemoteAgentCapability updateCapabilityRequest) throws WebValidationException
agentId
- agent idcapabilityKey
- capability key.updateCapabilityRequest
- new capability.WebValidationException
public javax.ws.rs.core.Response deleteAgentCapability(long agentId, @NotNull String capabilityKey) throws NotFoundException
agentId
- agent idcapabilityKey
- capability keyNotFoundException
public javax.ws.rs.core.Response deleteAllAgentCapabilities(long agentId) throws NotFoundException
agentId
- agent idNotFoundException
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.