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 Details

  • Method Details

    • getAgents

      @NotNull public @NotNull RestPageModel<RestAgent> getAgents(@NotNull @NotNull javax.ws.rs.core.UriInfo uriInfo)
      Description copied from interface: RestAgentService
      Retrieve all agents on the bamboo server
      Specified by:
      getAgents in interface RestAgentService
      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: RestAgentService
      Retrieve an agent definition
      Specified by:
      getAgentById in interface RestAgentService
      Parameters:
      uriInfo - Object that provides access to information of http request
      agentId - 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: RestAgentService
      Update an agent
      Specified by:
      updateAgent in interface RestAgentService
      Parameters:
      uriInfo - Object that provides access to information of http request
      agentId - Id of the agent to be updated
      restAgent - The updated agent definition
      Returns:
      The updated agent
      Throws:
      WebValidationException - If the agent definition is invalid
      NotFoundException - if no agent exists with an id equal to agentId