public class ArtifactHandlerPackagingDecorator extends ArtifactHandlerDecoratorSupport
A decorator for an ArtifactHandler
that adds packaging of artifact files when certain conditions are
met.
This decorator checks the ArtifactHandler.getMaxUnarchivedFilesPerArtifact(Map)
threshold when publishing
artifacts and if it is exceeded, it packages all artifact files into a single archive, which is then published
instead.
Artifacts are automatically unpacked during retrieval, which means that for artifact dependency consumers (e.g. different build stages, different build plans or deployment projects) the packaging will be transparent.
LAN_SPEED, LOCAL_SPEED, NEVER_ARCHIVE, WAN_SPEED
Constructor and Description |
---|
ArtifactHandlerPackagingDecorator(ArtifactHandler delegate) |
Modifier and Type | Method and Description |
---|---|
static com.google.common.base.Function<ArtifactHandler,ArtifactHandler> |
addFilePackaging()
A function that decorates
ArtifactHandler with conditional file packaging using ArtifactHandlerPackagingDecorator . |
protected ArtifactHandler |
delegate()
Returns the delegate instance that methods are forwarded to.
|
ArtifactHandlerPublishingResult |
publish(ResultKey resultKey,
ArtifactDefinitionContext artifact,
ArtifactPublishingConfig artifactPublishingConfig) |
ArtifactRetrievalStatus |
retrieve(ResultKey clientKey,
Artifact artifact,
ArtifactSubscriptionContext artifactSubscription,
ArtifactRetrievalConfig artifactRetrievalConfig)
Retrieve arbitrary
Artifact . |
canHandleArtifact, getArtifactLinkDataProvider, getArtifactLinkDataProvider, getDefaultConfiguration, getMaxUnarchivedFilesPerArtifact, getModuleDescriptor, getSpeed, getSupportedAgents, moveArtifactToGlobalStorage, removeArtifactFromStorage, removeArtifactFromStorage, removeArtifactsFromStorage, removeArtifactsFromStorage, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
publish
public ArtifactHandlerPackagingDecorator(@NotNull ArtifactHandler delegate)
@NotNull protected ArtifactHandler delegate()
ArtifactHandlerDecoratorSupport
delegate
in class ArtifactHandlerDecoratorSupport
@NotNull public static com.google.common.base.Function<ArtifactHandler,ArtifactHandler> addFilePackaging()
ArtifactHandler
with conditional file packaging using ArtifactHandlerPackagingDecorator
.@NotNull public ArtifactHandlerPublishingResult publish(@NotNull ResultKey resultKey, @NotNull ArtifactDefinitionContext artifact, @NotNull ArtifactPublishingConfig artifactPublishingConfig) throws Exception
publish
in interface ArtifactHandler
publish
in class ArtifactHandlerDecoratorSupport
Exception
@NotNull public ArtifactRetrievalStatus retrieve(@NotNull ResultKey clientKey, @NotNull Artifact artifact, @NotNull ArtifactSubscriptionContext artifactSubscription, @NotNull ArtifactRetrievalConfig artifactRetrievalConfig) throws Exception
ArtifactHandler
Artifact
. Artifact is found by the information in artifact parameter.retrieve
in interface ArtifactHandler
retrieve
in class ArtifactHandlerDecoratorSupport
clientKey
- identifier of plan or deployment doing the downloadartifact
- artifact informationartifactSubscription
- download details (e.g. target path, copy pattern)artifactRetrievalConfig
- handler specific configurationException
Copyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.