public abstract class AbstractArtifactHandler extends Object implements ArtifactHandler, InitablePluginModule<ArtifactHandlerModuleDescriptor>
Modifier and Type | Field and Description |
---|---|
protected static Set<AgentType> |
ALL_AGENT_TYPES |
protected static Set<AgentType> |
LOCAL_AGENTS |
static Set<AgentType> |
NON_LOCAL_AGENTS |
LAN_SPEED, LOCAL_SPEED, NEVER_ARCHIVE, WAN_SPEED
Constructor and Description |
---|
AbstractArtifactHandler(Set<AgentType> supportedAgents) |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandleArtifact(ArtifactDefinitionContext artifact,
Map<String,String> artifactHandlersConfiguration) |
static ArtifactHandlerConfigProvider |
configProvider(ArtifactHandlersService artifactHandlersService)
Create ArtifactHandlerConfigProvider that will return runtime configuration fetched from ArtifactHandlerService.
|
static ArtifactHandlerConfigProvider |
configProvider(Map<String,String> artifactHandlerConfiguration)
Create ArtifactHandlerConfigProvider that will return passed configuration
|
protected String |
getConfigurationKey(String key) |
protected String |
getConfigValue(Map<String,String> artifactHandlersConfiguration,
String key) |
Map<String,String> |
getDefaultConfiguration() |
long |
getMaxUnarchivedFilesPerArtifact(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.
|
ArtifactHandlerModuleDescriptor |
getModuleDescriptor() |
Set<AgentType> |
getSupportedAgents() |
void |
init(ArtifactHandlerModuleDescriptor moduleDescriptor)
Initialises the Plugin with the plugin module descriptor
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getArtifactLinkDataProvider, getArtifactLinkDataProvider, getSpeed, moveArtifactToGlobalStorage, publish, publish, removeArtifactFromStorage, removeArtifactFromStorage, removeArtifactsFromStorage, removeArtifactsFromStorage, retrieve
public void init(@NotNull ArtifactHandlerModuleDescriptor moduleDescriptor)
InitablePluginModule
init
in interface InitablePluginModule<ArtifactHandlerModuleDescriptor>
moduleDescriptor
- Plugin module descriptorpublic boolean canHandleArtifact(ArtifactDefinitionContext artifact, Map<String,String> artifactHandlersConfiguration)
canHandleArtifact
in interface ArtifactHandler
@NotNull public Map<String,String> getDefaultConfiguration()
getDefaultConfiguration
in interface ArtifactHandler
@Nullable protected String getConfigValue(Map<String,String> artifactHandlersConfiguration, String key)
@NotNull public Set<AgentType> getSupportedAgents()
getSupportedAgents
in interface ArtifactHandler
@NotNull public ArtifactHandlerModuleDescriptor getModuleDescriptor()
getModuleDescriptor
in interface ArtifactHandler
@NotNull public static ArtifactHandlerConfigProvider configProvider(@NotNull Map<String,String> artifactHandlerConfiguration)
@NotNull public static ArtifactHandlerConfigProvider configProvider(@NotNull ArtifactHandlersService artifactHandlersService)
public long getMaxUnarchivedFilesPerArtifact(@NotNull Map<String,String> artifactHandlersConfiguration)
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.
getMaxUnarchivedFilesPerArtifact
in interface ArtifactHandler
artifactHandlersConfiguration
- artifact handler configurationCopyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.