com.atlassian.bamboo.buildqueue.dao
Interface AgentDao

All Superinterfaces:
BambooObjectDao, bucket.core.persistence.ObjectDao
All Known Implementing Classes:
AgentHibernateDao

public interface AgentDao
extends BambooObjectDao

Agent Definition Dao that can search on PipelineDefinitions as well as it sub classes.


Method Summary
 java.util.List<PipelineDefinition> findAllAgents()
          Retrieves all agents();
 java.util.List<ElasticAgentDefinition> findAllElasticAgents()
          Retrieves all elastic agents
 java.util.List<LocalAgentDefinition> findAllLocalAgents()
          Retrieves all local agents
 java.util.List<RemoteAgentDefinition> findAllRemoteAgents()
          Retrieves all remote agents
 PipelineDefinition getAgentById(long id)
          Retrieve the agentDefinition object.
 PipelineDefinition getLocalAgentById(long id)
          Retrieve the localAgentDefinition
 PipelineDefinition getRemoteAgentById(long id)
          Retrieve the remoteAgentDefinition
 PipelineDefinition saveAndReturn(PipelineDefinition pipelineDefinition)
          Saves the passed definition and returns a new copy of the updated pipeline definition
 
Methods inherited from interface com.atlassian.bamboo.persistence.BambooObjectDao
findById
 
Methods inherited from interface bucket.core.persistence.ObjectDao
findAll, findAllSorted, getPersistentClass, refresh, remove, replicate, save, saveRaw
 

Method Detail

saveAndReturn

@NotNull
PipelineDefinition saveAndReturn(@NotNull
                                         PipelineDefinition pipelineDefinition)
Saves the passed definition and returns a new copy of the updated pipeline definition

Parameters:
pipelineDefinition - to save
Returns:
the saved and updated (e.g with agentId) pipelineDefinition

getAgentById

PipelineDefinition getAgentById(long id)
Retrieve the agentDefinition object.

Parameters:
id - - the id for the agent to be retrieved
Returns:
agentDefinition associated with the agentId or null if it couldn't be found

getLocalAgentById

PipelineDefinition getLocalAgentById(long id)
Retrieve the localAgentDefinition

Parameters:
id - of the agent
Returns:
LocalAgentDefintion associated with the id if no agent found, returns null

getRemoteAgentById

PipelineDefinition getRemoteAgentById(long id)
Retrieve the remoteAgentDefinition

Parameters:
id - of the agent
Returns:
RemoteAgentDefintion associated with the id if no agent found, returns null

findAllRemoteAgents

java.util.List<RemoteAgentDefinition> findAllRemoteAgents()
Retrieves all remote agents

Returns:
List of all remote agents

findAllLocalAgents

java.util.List<LocalAgentDefinition> findAllLocalAgents()
Retrieves all local agents

Returns:
List of all local agents

findAllElasticAgents

java.util.List<ElasticAgentDefinition> findAllElasticAgents()
Retrieves all elastic agents

Returns:
List

findAllAgents

java.util.List<PipelineDefinition> findAllAgents()
Retrieves all agents();

Returns:
List of all agents


Copyright © 2009 Atlassian Pty Ltd. All Rights Reserved.