com.atlassian.bamboo.build.artifact
Class AbstractArtifactHandler

java.lang.Object
  extended by com.atlassian.bamboo.build.artifact.AbstractArtifactHandler
All Implemented Interfaces:
ArtifactHandler, InitablePluginModule<ArtifactHandlerModuleDescriptor>, BambooPluginModule
Direct Known Subclasses:
AbstractLocalArtifactHandler, BambooRemoteArtifactHandler, S3ArtifactHandler

public abstract class AbstractArtifactHandler
extends Object
implements ArtifactHandler, InitablePluginModule<ArtifactHandlerModuleDescriptor>


Field Summary
protected static Set<AgentType> ALL_AGENT_TYPES
           
protected static Set<AgentType> LOCAL_AGENTS
           
static Set<AgentType> NON_LOCAL_AGENTS
           
 
Fields inherited from interface com.atlassian.bamboo.build.artifact.ArtifactHandler
LAN_SPEED, LOCAL_SPEED, WAN_SPEED
 
Constructor Summary
AbstractArtifactHandler(Set<AgentType> supportedAgents)
           
 
Method Summary
 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()
           
 ArtifactHandlerModuleDescriptor getModuleDescriptor()
           
 Set<AgentType> getSupportedAgents()
           
 void init(ArtifactHandlerModuleDescriptor moduleDescriptor)
          Initialises the Plugin with the plugin module descriptor
 
Methods 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, removeArtifactFromStorage, removeArtifactFromStorage, removeArtifactsFromStorage, removeArtifactsFromStorage, retrieve, retrieve
 

Field Detail

ALL_AGENT_TYPES

protected static final Set<AgentType> ALL_AGENT_TYPES

LOCAL_AGENTS

protected static final Set<AgentType> LOCAL_AGENTS

NON_LOCAL_AGENTS

public static final Set<AgentType> NON_LOCAL_AGENTS
Constructor Detail

AbstractArtifactHandler

public AbstractArtifactHandler(Set<AgentType> supportedAgents)
Method Detail

init

public void init(@NotNull
                 ArtifactHandlerModuleDescriptor moduleDescriptor)
Description copied from interface: InitablePluginModule
Initialises the Plugin with the plugin module descriptor

Specified by:
init in interface InitablePluginModule<ArtifactHandlerModuleDescriptor>
Parameters:
moduleDescriptor - Plugin module descriptor

canHandleArtifact

public boolean canHandleArtifact(ArtifactDefinitionContext artifact,
                                 Map<String,String> artifactHandlersConfiguration)
Specified by:
canHandleArtifact in interface ArtifactHandler

getDefaultConfiguration

@NotNull
public Map<String,String> getDefaultConfiguration()
Specified by:
getDefaultConfiguration in interface ArtifactHandler

getConfigValue

@Nullable
protected String getConfigValue(Map<String,String> artifactHandlersConfiguration,
                                         String key)

getConfigurationKey

protected String getConfigurationKey(String key)

getSupportedAgents

@NotNull
public Set<AgentType> getSupportedAgents()
Specified by:
getSupportedAgents in interface ArtifactHandler

getModuleDescriptor

@NotNull
public ArtifactHandlerModuleDescriptor getModuleDescriptor()
Specified by:
getModuleDescriptor in interface ArtifactHandler

configProvider

@NotNull
public static ArtifactHandlerConfigProvider configProvider(@NotNull
                                                                   Map<String,String> artifactHandlerConfiguration)
Create ArtifactHandlerConfigProvider that will return passed configuration


configProvider

@NotNull
public static ArtifactHandlerConfigProvider configProvider(@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.



Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.