Class RestAgentServiceImpl
- java.lang.Object
-
- com.atlassian.bamboo.plugins.rest.admin.agent.RestAgentServiceImpl
-
- All Implemented Interfaces:
RestAgentService
@Component public class RestAgentServiceImpl extends Object implements RestAgentService
Service layer to manage agents
-
-
Constructor Summary
Constructors Constructor Description RestAgentServiceImpl(AgentManager agentManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, RestPermissionCheck restPermissionCheck, EphemeralAgentsService ephemeralAgentsService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull RestAgentgetAgentById(@NotNull javax.ws.rs.core.UriInfo uriInfo, long agentId)Retrieve an agent definition@NotNull RestPageModel<RestAgent>getAgents(@NotNull javax.ws.rs.core.UriInfo uriInfo)Retrieve all agents on the bamboo server@NotNull RestAgentupdateAgent(@NotNull javax.ws.rs.core.UriInfo uriInfo, long agentId, @NotNull RestAgent restAgent)Update an agent
-
-
-
Constructor Detail
-
RestAgentServiceImpl
@Autowired public RestAgentServiceImpl(AgentManager agentManager, com.atlassian.sal.api.message.I18nResolver i18nResolver, RestPermissionCheck restPermissionCheck, EphemeralAgentsService ephemeralAgentsService)
-
-
Method Detail
-
getAgents
@NotNull public @NotNull RestPageModel<RestAgent> getAgents(@NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo)
Description copied from interface:RestAgentServiceRetrieve all agents on the bamboo server- Specified by:
getAgentsin interfaceRestAgentService- Parameters:
uriInfo- Object that provides access to information of http request- Returns:
- Collection of agents
-
getAgentById
@NotNull public @NotNull RestAgent getAgentById(@NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo, long agentId) throws NotFoundException
Description copied from interface:RestAgentServiceRetrieve an agent definition- Specified by:
getAgentByIdin interfaceRestAgentService- Parameters:
uriInfo- Object that provides access to information of http requestagentId- Id of agent- Returns:
- RestAgent object that contains the definition of the agent
- Throws:
NotFoundException- if no agent exists with an id equal to agentId
-
updateAgent
@NotNull public @NotNull RestAgent updateAgent(@NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo, long agentId, @NotNull @NotNull RestAgent restAgent) throws WebValidationException, NotFoundException
Description copied from interface:RestAgentServiceUpdate an agent- Specified by:
updateAgentin interfaceRestAgentService- Parameters:
uriInfo- Object that provides access to information of http requestagentId- Id of the agent to be updatedrestAgent- The updated agent definition- Returns:
- The updated agent
- Throws:
WebValidationException- If the agent definition is invalidNotFoundException- if no agent exists with an id equal to agentId
-
-