com.atlassian.bamboo.build.artifact
Interface ArtifactManager

All Known Implementing Classes:
AbstractArtifactManager, LocalArtifactManager, RemoteArtifactManager

public interface ArtifactManager

Common interface for artifact publishers.


Method Summary
 boolean publish(BuildLogger buildLogger, PlanResultKey planResultKey, java.io.File baseDirectory, ArtifactDefinitionContext artifact, int minExpectedFilesCnt)
          Deprecated. since 4.2 use $publish(BuildLogger, PlanResultKey, File, ArtifactDefinitionContext, Map, int)
 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 retrieve(BuildLogger buildLogger, PlanResultKey planResultKey, ArtifactSubscriptionContext artifactSubscription, java.util.Map<java.lang.String,java.lang.String> artifactHandlerConfiguration, java.io.File buildWorkingDirectory)
          Retrieves an artifact from artifact storage.
 boolean retrieve(PlanResultKey planResultKey, ArtifactSubscriptionContext artifactSubscription, java.io.File buildWorkingDirectory)
          Deprecated. since 4.2 use $retrieve(BuildLogger, PlanResultKey, ArtifactSubscriptionContext, Map, File)
 ErrorCollection validateArtifactsSize(java.io.File baseDirectory, ArtifactContext artifactContext)
          Validates total size of artifacts produced for single build result
 

Method Detail

publish

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)
Request copy of artifacts from a designated location to artifact storage.

Parameters:
buildLogger - optional, used to log messages
planResultKey - key of a plan result that created the artifact
artifact - definition of the artifact
deleteSource - true performs move instead of copy
minExpectedFilesCnt - how many files are necessary to consider the artifact complete, null if no requirements are made
size -
Returns:
true if publish operation result allows the build to continue

publish

@Deprecated
boolean publish(@Nullable
                           BuildLogger buildLogger,
                           @NotNull
                           PlanResultKey planResultKey,
                           @NotNull
                           java.io.File baseDirectory,
                           @NotNull
                           ArtifactDefinitionContext artifact,
                           int minExpectedFilesCnt)
Deprecated. since 4.2 use $publish(BuildLogger, PlanResultKey, File, ArtifactDefinitionContext, Map, int)

Request copy of artifacts from a designated location to artifact storage.

Parameters:
buildLogger - optional, used to log messages
planResultKey - key of a plan result that created the artifact
artifact - definition of the artifact
deleteSource - true performs move instead of copy
minExpectedFilesCnt - how many files are necessary to consider the artifact complete, null if no requirements are made
Returns:
true if publish operation result allows the build to continue

retrieve

@Deprecated
boolean retrieve(@NotNull
                            PlanResultKey planResultKey,
                            @NotNull
                            ArtifactSubscriptionContext artifactSubscription,
                            @NotNull
                            java.io.File buildWorkingDirectory)
Deprecated. since 4.2 use $retrieve(BuildLogger, PlanResultKey, ArtifactSubscriptionContext, Map, File)

Retrieves an artifact from artifact storage.

Parameters:
planResultKey - the plan result that contains the artifact
artifactSubscription - the artifact subscription used to identify artifact
buildWorkingDirectory - working directory of current build
Returns:
true if retrieval was successful, false otherwise

retrieve

boolean retrieve(@Nullable
                 BuildLogger buildLogger,
                 @NotNull
                 PlanResultKey planResultKey,
                 @NotNull
                 ArtifactSubscriptionContext artifactSubscription,
                 @NotNull
                 java.util.Map<java.lang.String,java.lang.String> artifactHandlerConfiguration,
                 @NotNull
                 java.io.File buildWorkingDirectory)
Retrieves an artifact from artifact storage.

Parameters:
buildLogger - to use
planResultKey - the plan result that contains the artifact
artifactSubscription - the artifact subscription used to identify artifact
buildWorkingDirectory - working directory of current build
Returns:
true if retrieval was successful, false otherwise

validateArtifactsSize

ErrorCollection validateArtifactsSize(@NotNull
                                      java.io.File baseDirectory,
                                      @NotNull
                                      ArtifactContext artifactContext)
Validates total size of artifacts produced for single build result

Parameters:
baseDirectory -
artifactContext - - contains artifacts size quota if set
Returns:
error set in in case of exceeding quota if set


Copyright © 2012 Atlassian. All Rights Reserved.