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(Plan plan, java.lang.String name)
          Find artifact definition of a given name associated with a producer job.
 ArtifactDefinition findByNameInChain(Chain 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(Plan plan)
          Get list of artifact definitions associated with a plan
 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
                                       Plan 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
                                              Chain 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
                                                          Plan 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

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 © 2011 Atlassian. All Rights Reserved.