|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.bamboo.build.artifact.AbstractArtifactManager
public abstract class AbstractArtifactManager
Field Summary | |
---|---|
static java.lang.String |
ARTIFACT_SECURITY_TOKEN
|
Constructor Summary | |
---|---|
AbstractArtifactManager(com.atlassian.plugin.PluginAccessor pluginAccessor,
CustomVariableContext customVariableContext,
AdministrationConfigurationAccessor administrationConfigurationAccessor)
|
Method Summary | |
---|---|
static org.apache.tools.ant.types.FileSet |
createFileSet(java.io.File baseDirectory,
ArtifactDefinitionContext artifact,
boolean useRelativeLocation)
Deprecated. since 4.2 use $ ArtifactHandlingUtils.createFileSet() |
protected java.lang.Iterable<ArtifactHandler> |
getArtifactHandlers(ArtifactDefinitionContext artifact,
java.util.Map<java.lang.String,java.lang.String> artifactHandlersConfiguration)
|
protected abstract void |
markSubscriptionAsConsumed(PlanResultKey planResultKey,
ArtifactSubscriptionContext artifactSubscription,
java.lang.String linkType)
|
void |
moveArtifactToGlobalStorage(Artifact artifact)
Move artifact to a 'global storage'. |
boolean |
publish(BuildLogger buildLogger,
PlanResultKey planResultKey,
java.io.File baseDirectory,
ArtifactDefinitionContext artifact,
java.util.Map<java.lang.String,java.lang.String> artifactHandlerConfiguration,
int minExpectedFilesCnt)
Request copy of artifacts from a designated location to artifact storage. |
boolean |
publish(BuildLogger buildLogger,
PlanResultKey planResultKey,
java.io.File baseDirectory,
ArtifactDefinitionContext artifact,
java.util.Map<java.lang.String,java.lang.String> artifactHandlerConfiguration,
java.util.Set<java.lang.String> successfulPublishers,
int minExpectedFilesCnt)
Request copy of artifacts from a designated location to artifact storage. |
protected boolean |
publishFileSet(PlanResultKey planResultKey,
ArtifactDefinitionContext artifact,
org.apache.tools.ant.types.FileSet sourceFileSet,
java.util.Map<java.lang.String,java.lang.String> artifactHandlersConfiguration,
java.util.Set<java.lang.String> publishers,
BuildLogger buildLogger)
|
void |
removeArtifactFromStorage(Artifact artifact)
Removes artifact files for a single artifact. |
void |
removeArtifactFromStorage(PlanResultKey planResultKey,
ImmutableArtifactDefinitionBase artifact)
Removes artifact files for a single artifact. |
void |
removeArtifactsFromStorage(PlanKey planKey)
Removes artifact files for all results of a single. |
void |
removeArtifactsFromStorage(PlanResultKey planResultKey)
Removes artifact files for a single plan result. |
void |
removeOrphanedArtifacts()
|
boolean |
retrieve(BuildLogger buildLogger,
PlanResultKey planResultKey,
ArtifactSubscriptionContext artifactSubscription,
java.util.Map<java.lang.String,java.lang.String> artifactHandlersConfiguration,
java.io.File buildWorkingDirectory)
Retrieves a plan artifact from artifact storage. |
boolean |
retrieve(BuildLogger buildLogger,
PlanResultKey planResultKey,
ResultKey resultKey,
ArtifactDefinitionContext artifactDefinitionContext,
java.lang.String destinationPath,
java.util.Map<java.lang.String,java.lang.String> artifactHandlersConfiguration,
java.io.File buildWorkingDirectory,
java.util.Map<java.lang.String,Artifact> versionArtifacts)
Retrieves an artifact from artifact storage. |
ErrorCollection |
validateArtifactsSize(java.io.File baseDirectory,
ArtifactContext artifactContext)
Validates total size of artifacts produced for single build result |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ARTIFACT_SECURITY_TOKEN
Constructor Detail |
---|
public AbstractArtifactManager(com.atlassian.plugin.PluginAccessor pluginAccessor, CustomVariableContext customVariableContext, AdministrationConfigurationAccessor administrationConfigurationAccessor)
Method Detail |
---|
@Deprecated @Nullable public static org.apache.tools.ant.types.FileSet createFileSet(java.io.File baseDirectory, ArtifactDefinitionContext artifact, boolean useRelativeLocation)
ArtifactHandlingUtils.createFileSet()
baseDirectory
- directory used to resolve the copy patternsartifact
- artifact definitionuseRelativeLocation
- used to determine whether the relative location information from artifact definition
should be used
public boolean publish(@Nullable BuildLogger buildLogger, @NotNull PlanResultKey planResultKey, @NotNull java.io.File baseDirectory, @NotNull ArtifactDefinitionContext artifact, @NotNull java.util.Map<java.lang.String,java.lang.String> artifactHandlerConfiguration, int minExpectedFilesCnt)
ArtifactManager
publish
in interface ArtifactManager
buildLogger
- optional, used to log messagesplanResultKey
- key of a plan result that created the artifactartifact
- definition of the artifactminExpectedFilesCnt
- how many files are necessary to consider the artifact complete, null if no
requirements are made
public boolean publish(@Nullable BuildLogger buildLogger, @NotNull PlanResultKey planResultKey, @NotNull java.io.File baseDirectory, @NotNull ArtifactDefinitionContext artifact, @NotNull java.util.Map<java.lang.String,java.lang.String> artifactHandlerConfiguration, @NotNull java.util.Set<java.lang.String> successfulPublishers, int minExpectedFilesCnt)
ArtifactManager
publish
in interface ArtifactManager
buildLogger
- optional, used to log messagesplanResultKey
- key of a plan result that created the artifactartifact
- definition of the artifactsuccessfulPublishers
- used to return a list of plugin keys for ArtifactHandlers that succesfully published
artifactsminExpectedFilesCnt
- how many files are necessary to consider the artifact complete, null if no
requirements are made
public final ErrorCollection validateArtifactsSize(@NotNull java.io.File baseDirectory, @NotNull ArtifactContext artifactContext)
ArtifactManager
validateArtifactsSize
in interface ArtifactManager
artifactContext
- contains artifacts size quota if set
protected boolean publishFileSet(PlanResultKey planResultKey, ArtifactDefinitionContext artifact, org.apache.tools.ant.types.FileSet sourceFileSet, java.util.Map<java.lang.String,java.lang.String> artifactHandlersConfiguration, java.util.Set<java.lang.String> publishers, BuildLogger buildLogger)
public boolean retrieve(@Nullable BuildLogger buildLogger, @NotNull PlanResultKey planResultKey, @NotNull ArtifactSubscriptionContext artifactSubscription, @NotNull java.util.Map<java.lang.String,java.lang.String> artifactHandlersConfiguration, @NotNull java.io.File buildWorkingDirectory)
ArtifactManager
retrieve
in interface ArtifactManager
buildLogger
- to useplanResultKey
- the plan result that contains the artifactartifactSubscription
- the artifact subscription used to identify artifactbuildWorkingDirectory
- working directory of current build
public boolean retrieve(@Nullable BuildLogger buildLogger, @NotNull PlanResultKey planResultKey, @NotNull ResultKey resultKey, @NotNull ArtifactDefinitionContext artifactDefinitionContext, @NotNull java.lang.String destinationPath, @NotNull java.util.Map<java.lang.String,java.lang.String> artifactHandlersConfiguration, @NotNull java.io.File buildWorkingDirectory, @Nullable java.util.Map<java.lang.String,Artifact> versionArtifacts)
ArtifactManager
Artifact
object will be used to find artifact in the storage.
retrieve
in interface ArtifactManager
protected abstract void markSubscriptionAsConsumed(PlanResultKey planResultKey, ArtifactSubscriptionContext artifactSubscription, java.lang.String linkType)
protected java.lang.Iterable<ArtifactHandler> getArtifactHandlers(ArtifactDefinitionContext artifact, java.util.Map<java.lang.String,java.lang.String> artifactHandlersConfiguration)
public void removeArtifactFromStorage(@NotNull PlanResultKey planResultKey, @NotNull ImmutableArtifactDefinitionBase artifact)
ArtifactManager
removeArtifactFromStorage
in interface ArtifactManager
public void removeArtifactsFromStorage(@NotNull PlanResultKey planResultKey)
ArtifactManager
ResultsSummary
Should not remove artifacts that were moved to global storage.
removeArtifactsFromStorage
in interface ArtifactManager
public void removeArtifactsFromStorage(@NotNull PlanKey planKey)
ArtifactManager
Plan
Should not remove artifacts that were moved to global storage.
removeArtifactsFromStorage
in interface ArtifactManager
public void removeArtifactFromStorage(@NotNull Artifact artifact)
ArtifactManager
removeArtifactFromStorage
in interface ArtifactManager
public void moveArtifactToGlobalStorage(@NotNull Artifact artifact)
ArtifactManager
ArtifactManager.removeArtifactFromStorage(Artifact)
is called.
It is not a requirement to physically move the files as long as the above contract is fulfilled.
moveArtifactToGlobalStorage
in interface ArtifactManager
public void removeOrphanedArtifacts()
removeOrphanedArtifacts
in interface ArtifactManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |