Class AbstractArtifactHandler
java.lang.Object
com.atlassian.bamboo.build.artifact.AbstractArtifactHandler
- All Implemented Interfaces:
ArtifactHandler
,InitablePluginModule<ArtifactHandlerModuleDescriptor>
,BambooPluginModule
- Direct Known Subclasses:
AbstractLocalArtifactHandler
,AbstractRepublishingArtifactHandler
public abstract class AbstractArtifactHandler
extends Object
implements ArtifactHandler, InitablePluginModule<ArtifactHandlerModuleDescriptor>
-
Field Summary
Modifier and TypeFieldDescriptionFields inherited from interface com.atlassian.bamboo.build.artifact.ArtifactHandler
LAN_SPEED, LOCAL_SPEED, NEVER_ARCHIVE, WAN_SPEED
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canHandleArtifact
(ArtifactDefinitionContext artifact, Map<String, String> artifactHandlersConfiguration) static @NotNull ArtifactHandlerConfigProvider
configProvider
(@NotNull ArtifactHandlersService artifactHandlersService) Create ArtifactHandlerConfigProvider that will return runtime configuration fetched from ArtifactHandlerService.static @NotNull ArtifactHandlerConfigProvider
configProvider
(@NotNull Map<String, String> artifactHandlerConfiguration) Create ArtifactHandlerConfigProvider that will return passed configurationprotected String
protected @Nullable String
getConfigValue
(Map<String, String> artifactHandlersConfiguration, String key) long
getMaxUnarchivedFilesPerArtifact
(@NotNull Map<String, String> artifactHandlersConfiguration) Returns the maximum number of files that can exist per artifact which will not be compressed and combined into a single archive.@NotNull ArtifactHandlerModuleDescriptor
void
init
(@NotNull ArtifactHandlerModuleDescriptor moduleDescriptor) Initialises the Plugin with the plugin module descriptorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlassian.bamboo.build.artifact.ArtifactHandler
getArtifactLinkDataProvider, getArtifactLinkDataProvider, getSpeed, moveArtifactToGlobalStorage, publish, removeAllArtifactsOfChain, removeArtifactFromStorage, removeArtifactFromStorage, removeArtifactFromStorage, removeArtifactsFromStorage, removeArtifactsFromStorage, retrieve
-
Field Details
-
ALL_AGENT_TYPES
-
LOCAL_AGENTS
-
NON_LOCAL_AGENTS
-
-
Constructor Details
-
AbstractArtifactHandler
-
-
Method Details
-
init
Description copied from interface:InitablePluginModule
Initialises the Plugin with the plugin module descriptor- Specified by:
init
in interfaceInitablePluginModule<ArtifactHandlerModuleDescriptor>
- Parameters:
moduleDescriptor
- Plugin module descriptor
-
canHandleArtifact
public boolean canHandleArtifact(ArtifactDefinitionContext artifact, Map<String, String> artifactHandlersConfiguration) - Specified by:
canHandleArtifact
in interfaceArtifactHandler
-
getDefaultConfiguration
- Specified by:
getDefaultConfiguration
in interfaceArtifactHandler
-
getConfigValue
-
getConfigurationKey
-
getSupportedAgents
- Specified by:
getSupportedAgents
in interfaceArtifactHandler
-
getModuleDescriptor
- Specified by:
getModuleDescriptor
in interfaceArtifactHandler
-
configProvider
@NotNull public static @NotNull ArtifactHandlerConfigProvider configProvider(@NotNull @NotNull Map<String, String> artifactHandlerConfiguration) Create ArtifactHandlerConfigProvider that will return passed configuration -
configProvider
@NotNull public static @NotNull ArtifactHandlerConfigProvider configProvider(@NotNull @NotNull ArtifactHandlersService artifactHandlersService) Create ArtifactHandlerConfigProvider that will return runtime configuration fetched from ArtifactHandlerService. This should be used to avoid unnecessary early fetching of configuration when it is not needed. -
getMaxUnarchivedFilesPerArtifact
public long getMaxUnarchivedFilesPerArtifact(@NotNull @NotNull Map<String, String> artifactHandlersConfiguration) Description copied from interface:ArtifactHandler
Returns the maximum number of files that can exist per artifact which will not be compressed and combined into a single archive. If the threshold is exceeded, artifacts will be packaged into a single file before publishing.
ArtifactHandler
does not need to treat archived artifacts differently - from ArtifactHandler perspective the packaging is transparent. Artifact files will be compressed before invoking #publish method and decompressed after invoking #retrieve method.This method should return
ArtifactHandler.NEVER_ARCHIVE
if packaging of artifacts is disabled, to always send files unarchived.- Specified by:
getMaxUnarchivedFilesPerArtifact
in interfaceArtifactHandler
- Parameters:
artifactHandlersConfiguration
- artifact handler configuration- Returns:
- maximum number of files per artifact that should not be packaged into a single file
-