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
FieldsModifier and TypeFieldDescriptionFields inherited from interface com.atlassian.bamboo.build.artifact.ArtifactHandler
LAN_SPEED, LOCAL_SPEED, NEVER_ARCHIVE, WAN_SPEED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandleArtifact(ArtifactDefinitionContext artifact, Map<String, String> artifactHandlersConfiguration) static @NotNull ArtifactHandlerConfigProviderconfigProvider(@NotNull ArtifactHandlersService artifactHandlersService) Create ArtifactHandlerConfigProvider that will return runtime configuration fetched from ArtifactHandlerService.static @NotNull ArtifactHandlerConfigProviderconfigProvider(@NotNull Map<String, String> artifactHandlerConfiguration) Create ArtifactHandlerConfigProvider that will return passed configurationprotected Stringprotected @Nullable StringgetConfigValue(Map<String, String> artifactHandlersConfiguration, String key) longgetMaxUnarchivedFilesPerArtifact(@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 ArtifactHandlerModuleDescriptorvoidinit(@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, waitMethods 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:InitablePluginModuleInitialises the Plugin with the plugin module descriptor- Specified by:
initin interfaceInitablePluginModule<ArtifactHandlerModuleDescriptor>- Parameters:
moduleDescriptor- Plugin module descriptor
-
canHandleArtifact
public boolean canHandleArtifact(ArtifactDefinitionContext artifact, Map<String, String> artifactHandlersConfiguration) - Specified by:
canHandleArtifactin interfaceArtifactHandler
-
getDefaultConfiguration
- Specified by:
getDefaultConfigurationin interfaceArtifactHandler
-
getConfigValue
-
getConfigurationKey
-
getSupportedAgents
- Specified by:
getSupportedAgentsin interfaceArtifactHandler
-
getModuleDescriptor
- Specified by:
getModuleDescriptorin 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:ArtifactHandlerReturns 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.
ArtifactHandlerdoes 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_ARCHIVEif packaging of artifacts is disabled, to always send files unarchived.- Specified by:
getMaxUnarchivedFilesPerArtifactin interfaceArtifactHandler- Parameters:
artifactHandlersConfiguration- artifact handler configuration- Returns:
- maximum number of files per artifact that should not be packaged into a single file
-