Package com.atlassian.bamboo.artifact
Interface ArtifactDao
-
- All Known Implementing Classes:
ArtifactHibernateDao
public interface ArtifactDao
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<MutableArtifact>findAll()Find allMutableArtifact@NotNull Map<String,Long>findArtifactUsedStorageByLinkType()Find how much space artifacts use by link type, e.g.@Nullable MutableArtifactfindById(long id)FindMutableArtifactby id.List<MutableArtifact>findOrphanedArtifacts()Find all artifacts that are no longer referenced by any result or version.List<MutableArtifact>findOrphanedArtifactsByIds(@NotNull List<Long> artifactIds)Find all artifacts which id is on the list and that are no longer referenced by any result or version.List<MutableArtifact>findPlanArtifactsReferencedByVersion(@NotNull PlanKey planKey)Find all artifacts that belong to a plan are part of a deployment version.List<MutableArtifact>findPlanResultArtifactsReferencedByVersion(@NotNull PlanResultKey planResultKey)Find all artifacts that belong to a build result are part of a deployment version.booleanisReferencedByVersion(long artifactId)voidremoveAll(@NotNull Collection<MutableArtifact> artifacts)Remove all artifacts in the collectionvoidremoveAllByIds(@NotNull Collection<Long> artifactIds)voidremoveById(long id)Remove artifact.voidremoveByPlanKey(@NotNull PlanKey planKey)Remove all artifacts that belong to a plan and are not part of a deployment version.voidremoveByPlanResultKey(@NotNull PlanResultKey planResultKey)Remove all artifacts that belong to a build result and are not part of a deployment version.voidsave(MutableArtifact artifact)Save artifact.voidupdatePlanKey(@NotNull PlanKey originalPlanKey, @NotNull PlanKey newPlanKey)Update planKey in Artifact entities when plan key has changed (ie after moving plan)
-
-
-
Method Detail
-
save
void save(MutableArtifact artifact)
Save artifact.- Parameters:
artifact-
-
findAll
List<MutableArtifact> findAll()
Find allMutableArtifact- Returns:
-
findById
@Nullable @Nullable MutableArtifact findById(long id)
FindMutableArtifactby id.- Parameters:
id-- Returns:
-
isReferencedByVersion
boolean isReferencedByVersion(long artifactId)
- Parameters:
artifactId-- Returns:
- true iff artifact is a part of a deployment verison
-
findPlanResultArtifactsReferencedByVersion
List<MutableArtifact> findPlanResultArtifactsReferencedByVersion(@NotNull @NotNull PlanResultKey planResultKey)
Find all artifacts that belong to a build result are part of a deployment version.- Parameters:
planResultKey-- Returns:
-
findPlanArtifactsReferencedByVersion
List<MutableArtifact> findPlanArtifactsReferencedByVersion(@NotNull @NotNull PlanKey planKey)
Find all artifacts that belong to a plan are part of a deployment version.- Parameters:
planKey-- Returns:
-
removeById
void removeById(long id)
Remove artifact.- Parameters:
id-
-
removeByPlanKey
void removeByPlanKey(@NotNull @NotNull PlanKey planKey)Remove all artifacts that belong to a plan and are not part of a deployment version.- Parameters:
planKey-
-
removeByPlanResultKey
void removeByPlanResultKey(@NotNull @NotNull PlanResultKey planResultKey)Remove all artifacts that belong to a build result and are not part of a deployment version.- Parameters:
planResultKey-
-
findOrphanedArtifacts
List<MutableArtifact> findOrphanedArtifacts()
Find all artifacts that are no longer referenced by any result or version.- Returns:
-
findOrphanedArtifactsByIds
List<MutableArtifact> findOrphanedArtifactsByIds(@NotNull @NotNull List<Long> artifactIds)
Find all artifacts which id is on the list and that are no longer referenced by any result or version.- Since:
- 6.9
-
removeAll
void removeAll(@NotNull @NotNull Collection<MutableArtifact> artifacts)Remove all artifacts in the collection
-
removeAllByIds
void removeAllByIds(@NotNull @NotNull Collection<Long> artifactIds)
-
updatePlanKey
void updatePlanKey(@NotNull @NotNull PlanKey originalPlanKey, @NotNull @NotNull PlanKey newPlanKey)Update planKey in Artifact entities when plan key has changed (ie after moving plan)- Parameters:
originalPlanKey- original PlanKeynewPlanKey- new PlanKey
-
-