public abstract class AbstractLocalArtifactHandler extends AbstractArtifactHandler
ALL_AGENT_TYPES, LOCAL_AGENTS, NON_LOCAL_AGENTS
LAN_SPEED, LOCAL_SPEED, NEVER_ARCHIVE, WAN_SPEED
Constructor and Description |
---|
AbstractLocalArtifactHandler(Set<AgentType> supportedAgents) |
Modifier and Type | Method and Description |
---|---|
protected abstract ArtifactDirectoryBuilder |
getArtifactDirectoryBuilder(ArtifactHandlerConfigProvider artifactHandlerConfigProvider) |
ArtifactLinkDataProvider |
getArtifactLinkDataProvider(Artifact artifact,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider) |
ArtifactLinkDataProvider |
getArtifactLinkDataProvider(ArtifactLink artifactLink,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider) |
protected File |
getArtifactStorageDirectory(Artifact artifact,
ArtifactHandlerConfigProvider artifactHandlerConfigProvider) |
protected File |
getArtifactStorageDirectory(ResultKey resultKey,
ArtifactDefinitionContext artifact,
ArtifactHandlerConfigProvider artifactHandlerConfigProvider) |
int |
getSpeed(@NotNull Map<String,String> artifactHandlersConfiguration)
Return approximate transfer speed of this artifact handler in bytes per second for the specified configuration.
|
boolean |
moveArtifactToGlobalStorage(@NotNull Artifact artifact,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
Move artifact to a 'global storage'.
|
@NotNull ArtifactHandlerPublishingResult |
publish(@NotNull ResultKey planResultKey,
@NotNull ArtifactDefinitionContext artifact,
@NotNull ArtifactPublishingConfig artifactPublishingConfig,
@NotNull BuildLogger buildLogger) |
void |
removeArtifactFromStorage(@NotNull Artifact artifact,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
Removes artifact files for a single artifact.
|
void |
removeArtifactFromStorage(@NotNull PlanResultKey planResultKey,
@NotNull ImmutableArtifactDefinitionBase artifact,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
Removes artifact files for a single artifact.
|
void |
removeArtifactFromStorage(@NotNull ResultKey planResultKey,
@NotNull ImmutableArtifactDefinitionBase artifact,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
Removes artifact files for a single artifact.
|
void |
removeArtifactsFromStorage(@NotNull PlanKey planKey,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
Removes artifact files for all results of a single.
|
void |
removeArtifactsFromStorage(@NotNull PlanResultKey planResultKey,
@NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
Removes artifact files for a single plan result.
|
@NotNull ArtifactRetrievalStatus |
retrieve(@NotNull ResultKey clientKey,
@NotNull Artifact artifact,
@NotNull ArtifactSubscriptionContext artifactSubscription,
@NotNull ArtifactRetrievalConfig artifactRetrievalConfig)
Retrieve arbitrary
Artifact . |
canHandleArtifact, configProvider, configProvider, getConfigurationKey, getConfigValue, getDefaultConfiguration, getMaxUnarchivedFilesPerArtifact, getModuleDescriptor, getSupportedAgents, init
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
publish
@NotNull public @NotNull ArtifactHandlerPublishingResult publish(@NotNull @NotNull ResultKey planResultKey, @NotNull @NotNull ArtifactDefinitionContext artifact, @NotNull @NotNull ArtifactPublishingConfig artifactPublishingConfig, @NotNull @NotNull BuildLogger buildLogger) throws IOException
IOException
@NotNull public @NotNull ArtifactRetrievalStatus retrieve(@NotNull @NotNull ResultKey clientKey, @NotNull @NotNull Artifact artifact, @NotNull @NotNull ArtifactSubscriptionContext artifactSubscription, @NotNull @NotNull ArtifactRetrievalConfig artifactRetrievalConfig) throws IOException
ArtifactHandler
Artifact
. Artifact is found by the information in artifact parameter.clientKey
- identifier of plan or deployment doing the downloadartifact
- artifact informationartifactSubscription
- download details (e.g. target path, copy pattern)artifactRetrievalConfig
- handler specific configurationIOException
protected File getArtifactStorageDirectory(ResultKey resultKey, ArtifactDefinitionContext artifact, ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
protected File getArtifactStorageDirectory(Artifact artifact, ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
protected abstract ArtifactDirectoryBuilder getArtifactDirectoryBuilder(ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
public int getSpeed(@NotNull @NotNull Map<String,String> artifactHandlersConfiguration)
ArtifactHandler
artifactHandlersConfiguration
- artifact handler configurationArtifactHandler.LOCAL_SPEED
, ArtifactHandler.LAN_SPEED
, ArtifactHandler.WAN_SPEED
public void removeArtifactFromStorage(@NotNull @NotNull Artifact artifact, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
ArtifactHandler
public void removeArtifactFromStorage(@NotNull @NotNull PlanResultKey planResultKey, @NotNull @NotNull ImmutableArtifactDefinitionBase artifact, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
ArtifactHandler
ArtifactLink
Should not remove artifacts that were moved to global storage.public void removeArtifactFromStorage(@NotNull @NotNull ResultKey planResultKey, @NotNull @NotNull ImmutableArtifactDefinitionBase artifact, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
ArtifactHandler
ArtifactLink
Should not remove artifacts that were moved to global storage.public void removeArtifactsFromStorage(@NotNull @NotNull PlanResultKey planResultKey, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
ArtifactHandler
ResultsSummary
Should not remove artifacts that were moved to global storage.public void removeArtifactsFromStorage(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
ArtifactHandler
Plan
Should not remove artifacts that were moved to global storage.public boolean moveArtifactToGlobalStorage(@NotNull @NotNull Artifact artifact, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
ArtifactHandler
ArtifactHandler.removeArtifactFromStorage(Artifact, ArtifactHandlerConfigProvider)
is called.
It is not a requirement to physically move the files as long as the above contract is fulfilled.public ArtifactLinkDataProvider getArtifactLinkDataProvider(ArtifactLink artifactLink, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
public ArtifactLinkDataProvider getArtifactLinkDataProvider(Artifact artifact, @NotNull @NotNull ArtifactHandlerConfigProvider artifactHandlerConfigProvider)
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.