Interface AgentAssignmentDao

  • All Known Implementing Classes:
    AgentAssignmentDaoImpl

    public interface AgentAssignmentDao
    For dealing with agent assignment database objects
    • Method Detail

      • save

        @NotNull
        @NotNull AgentAssignment save​(@NotNull
                                      @NotNull AgentAssignment agentAssignment)
        Save an agent assignment
        Parameters:
        agentAssignment - to save
        Returns:
        saved agent assignment
      • removeAll

        void removeAll​(@NotNull
                       @NotNull Iterable<? extends BambooIdProvider> agentAssignments)
        Remove a list of agent assignments
        Parameters:
        agentAssignments - to be removed
      • getAgentAssignment

        @Nullable
        @Nullable AgentAssignment getAgentAssignment​(long agentAssignmentId)
        Get a single agent assignment by id
        Parameters:
        agentAssignmentId - of assignment to retrieve
        Returns:
        assignment with id if found
      • getAssignmentsForEnvironment

        @NotNull
        @NotNull List<AgentAssignment> getAssignmentsForEnvironment​(long environmentId)
        Get all assignments directly reference an environment
        Parameters:
        environmentId - that would be referenced
        Returns:
        assignments for environment
      • getAssignmentsForExecutor

        @NotNull
        @NotNull List<AgentAssignment> getAssignmentsForExecutor​(long executorId,
                                                                 @NotNull
                                                                 @NotNull AgentAssignment.ExecutorType executorType)
        Get all assignments that directly reference a specific Executor (Agent, Image etc)
        Parameters:
        executorId - id of the executor
        executorType - type of the executor
        Returns:
        assignmnets for executor
      • getAssignmentsForExecutable

        @NotNull
        @NotNull List<AgentAssignment> getAssignmentsForExecutable​(long executableId,
                                                                   @NotNull
                                                                   @NotNull AgentAssignment.ExecutableType executableType)
        Get all assignments that directly reference a specific Executable (Environment, ob etc)
        Parameters:
        executableId - id of the executable
        executableType - type of the executable
        Returns:
        assignments for executable