|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.plan.artifact.ArtifactDefinitionManagerImpl
public class ArtifactDefinitionManagerImpl
Constructor Summary | |
---|---|
ArtifactDefinitionManagerImpl(ArtifactDefinitionDao artifactDefinitionDao,
PlanManager planManager)
|
Method Summary | |
---|---|
java.util.Map<ArtifactDefinition,ArtifactDefinition> |
cloneArtifactDefinitions(Job sourcePlan,
Job targetPlan)
Creates artifact definitions objects for a Buildable plan based according to definitions associated with input Buildable plan. |
java.util.Map<ArtifactDefinition,ArtifactDefinition> |
cloneArtifactDefinitions(Job sourcePlan,
Job targetPlan,
boolean preserveSharedFlag)
Creates artifact definitions objects for a Buildable plan based according to definitions associated with
input Buildable plan. |
ArtifactDefinition |
findArtifactDefinition(long id)
Get artifact definition of specified id |
ArtifactDefinition |
findArtifactDefinition(Plan plan,
java.lang.String label)
Get artifact definition associated with a plan of a given label |
java.util.List<ArtifactDefinition> |
findArtifactDefinitionsByPlan(Plan plan)
Get list of artifact definitions associated with a plan |
com.google.common.collect.Multimap<Job,ArtifactDefinition> |
getArtifactDefinitionsByJob(Chain chain,
com.google.common.base.Predicate<ArtifactDefinitionBase> predicate)
Get ArtifactDefinition grouped by Job |
boolean |
isArtifactDefinitionNameUniqueInChain(ArtifactDefinition artifactDefinition)
Test if artifact definition's name is unique within a chain that producer plan belongs to. |
boolean |
isArtifactDefinitionNameUniqueInJob(ArtifactDefinition artifactDefinition)
Test if artifact definition's name is unique within a producer job. |
java.util.Collection<ArtifactDefinitionContext> |
prepareDefinitionContexts(Plan plan)
Get list of 'lightweight' artifact definitions associated with a plan |
void |
removeArtifactDefinition(ArtifactDefinition artifactDefinition)
Remove artifact definition. |
void |
removeArtifactDefinitionsByPlan(Plan plan)
Remove all artifact definitions associated with a plan. |
void |
saveArtifactDefinition(ArtifactDefinition artifactDefinition)
Save artifact definition. |
void |
saveArtifactDefinitions(java.util.Collection<ArtifactDefinition> artifactsDefinitions)
Save all artifact definitions in a collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArtifactDefinitionManagerImpl(ArtifactDefinitionDao artifactDefinitionDao, PlanManager planManager)
Method Detail |
---|
@Nullable public ArtifactDefinition findArtifactDefinition(long id)
ArtifactDefinitionManager
findArtifactDefinition
in interface ArtifactDefinitionManager
id
- id of artifact definition
@Nullable public ArtifactDefinition findArtifactDefinition(@NotNull Plan plan, @NotNull java.lang.String label)
ArtifactDefinitionManager
findArtifactDefinition
in interface ArtifactDefinitionManager
plan
- plan which associated artifact definition should be retrievedlabel
- label to search among plan's artifact definitions
@NotNull public java.util.List<ArtifactDefinition> findArtifactDefinitionsByPlan(@NotNull Plan plan)
ArtifactDefinitionManager
findArtifactDefinitionsByPlan
in interface ArtifactDefinitionManager
plan
- plan which associated artifact definitions should be retrieved
@NotNull public java.util.Collection<ArtifactDefinitionContext> prepareDefinitionContexts(@NotNull Plan plan)
ArtifactDefinitionManager
prepareDefinitionContexts
in interface ArtifactDefinitionManager
plan
- plan with associated artifact definitions should be retrieved
public void removeArtifactDefinition(@NotNull ArtifactDefinition artifactDefinition)
ArtifactDefinitionManager
removeArtifactDefinition
in interface ArtifactDefinitionManager
artifactDefinition
- ArtifactDefinition
to be removedpublic void removeArtifactDefinitionsByPlan(@NotNull Plan plan)
ArtifactDefinitionManager
removeArtifactDefinitionsByPlan
in interface ArtifactDefinitionManager
plan
- plan which associated artifact definitions should be removedpublic void saveArtifactDefinition(@NotNull ArtifactDefinition artifactDefinition)
ArtifactDefinitionManager
saveArtifactDefinition
in interface ArtifactDefinitionManager
artifactDefinition
- object to be saved/updatedpublic void saveArtifactDefinitions(@NotNull java.util.Collection<ArtifactDefinition> artifactsDefinitions)
ArtifactDefinitionManager
saveArtifactDefinitions
in interface ArtifactDefinitionManager
artifactsDefinitions
- collection of objects to be saved/updated@NotNull public java.util.Map<ArtifactDefinition,ArtifactDefinition> cloneArtifactDefinitions(@NotNull Job sourcePlan, @NotNull Job targetPlan)
ArtifactDefinitionManager
Buildable
plan based according to definitions associated with input Buildable
plan.
This method does not persist the objects. SharedArtifact flags are copied.
cloneArtifactDefinitions
in interface ArtifactDefinitionManager
sourcePlan
- plan which associated artifact definitions should be clonedtargetPlan
- plan for which artifacts should be created
@NotNull public java.util.Map<ArtifactDefinition,ArtifactDefinition> cloneArtifactDefinitions(@NotNull Job sourcePlan, @NotNull Job targetPlan, boolean preserveSharedFlag)
ArtifactDefinitionManager
Buildable
plan based according to definitions associated with
input Buildable
plan. This method does not persist the objects.
cloneArtifactDefinitions
in interface ArtifactDefinitionManager
sourcePlan
- plan which associated artifact definitions should be clonedtargetPlan
- plan for which artifacts should be createdpreserveSharedFlag
- false will degrade all the artifacts to job level artifacts
public boolean isArtifactDefinitionNameUniqueInChain(@NotNull ArtifactDefinition artifactDefinition)
ArtifactDefinitionManager
ArtifactDefinitionBase.isSharedArtifact()
returns true.
If ArtifactDefinitionBase.isSharedArtifact()
returns false this method will always return true.
isArtifactDefinitionNameUniqueInChain
in interface ArtifactDefinitionManager
artifactDefinition
- artifact definition to be validated
public boolean isArtifactDefinitionNameUniqueInJob(@NotNull ArtifactDefinition artifactDefinition)
ArtifactDefinitionManager
isArtifactDefinitionNameUniqueInJob
in interface ArtifactDefinitionManager
artifactDefinition
- artifact definition to be validated
public com.google.common.collect.Multimap<Job,ArtifactDefinition> getArtifactDefinitionsByJob(@NotNull Chain chain, com.google.common.base.Predicate<ArtifactDefinitionBase> predicate)
ArtifactDefinition
grouped by Job
getArtifactDefinitionsByJob
in interface ArtifactDefinitionManager
chain
- predicate
- for filtering definition types
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |