com.atlassian.bamboo.plan.artifact
Interface ArtifactDefinitionDao

All Superinterfaces:
BambooObjectDao<ArtifactDefinition>
All Known Implementing Classes:
ArtifactDefinitionHibernateDao

public interface ArtifactDefinitionDao
extends BambooObjectDao<ArtifactDefinition>


Method Summary
 java.util.Collection<? extends ArtifactDefinition> findAll()
          Find all artifact definitions
 ArtifactDefinition findById(long id)
          Get artifact definition of specified id
 ArtifactDefinition findByName(ImmutablePlan plan, java.lang.String name)
          Find artifact definition of a given name associated with a producer job.
 ArtifactDefinition findByNameInChain(ImmutableChain chain, java.lang.String name)
          Find artifact definition of a given name which has sharedArtifact property set to true, associated with a producer job that belongs to the chain.
 java.util.List<ArtifactDefinition> findByProducer(ImmutablePlan plan)
          Get list of artifact definitions associated with a plan
 java.util.List<ArtifactDefinition> findSharedArtifactsByChain(ImmutableChain chain)
          Find all shared artifacts that exist for a particular chain.
 void removeByProducer(Plan plan)
          Remove all artifact definitions associated with a plan.
 
Methods inherited from interface com.atlassian.bamboo.persistence3.BambooObjectDao
delete, deleteAll, executeReturnLong, findAll, findById, save, saveAll
 

Method Detail

findById

@Nullable
ArtifactDefinition findById(long id)
Get artifact definition of specified id

Parameters:
id - id of artifact definition
Returns:
artifact definition of specified id or null if not found

findByName

@Nullable
ArtifactDefinition findByName(@NotNull
                                       ImmutablePlan plan,
                                       @NotNull
                                       java.lang.String name)
Find artifact definition of a given name associated with a producer job.

Parameters:
plan - plan which associated artifact definition should be retrieved
name - name to search among plan's artifact definitions
Returns:
artifact definition matching plan and label or null if not found

findByNameInChain

@Nullable
ArtifactDefinition findByNameInChain(@NotNull
                                              ImmutableChain chain,
                                              @NotNull
                                              java.lang.String name)
Find artifact definition of a given name which has sharedArtifact property set to true, associated with a producer job that belongs to the chain.

Parameters:
chain - chain which associated artifact definition should be retrieved
name - name to search among plan's artifact definitions
Returns:
artifact definition matching plan and label or null if not found

findAll

@NotNull
java.util.Collection<? extends ArtifactDefinition> findAll()
Find all artifact definitions

Returns:
Collection of all artifact definitions

findByProducer

@NotNull
java.util.List<ArtifactDefinition> findByProducer(@NotNull
                                                          ImmutablePlan plan)
Get list of artifact definitions associated with a plan

Parameters:
plan - plan which associated artifact definitions should be retrieved
Returns:
list of artifact definitions

findSharedArtifactsByChain

@NotNull
java.util.List<ArtifactDefinition> findSharedArtifactsByChain(@NotNull
                                                                      ImmutableChain chain)
Find all shared artifacts that exist for a particular chain.

Parameters:
chain - chain which associated artifact definitions should be retrieved
Returns:
shared artifacts that exist for the specified particular chain

removeByProducer

void removeByProducer(@NotNull
                      Plan plan)
Remove all artifact definitions associated with a plan.

Parameters:
plan - plan which associated artifact definitions should be removed


Copyright © 2013 Atlassian Software Systems Pty Ltd. All Rights Reserved.