public final class ArtifactHandlingUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
S3_HANDLER |
static String |
SERVER_LOCAL_HANDLER |
static String |
SERVER_REMOTE_HANDLER |
Modifier and Type | Method and Description |
---|---|
static void |
copyFileSet(org.apache.tools.ant.types.FileSet sourceFileSet,
File destinationDirectory) |
static org.apache.tools.ant.types.FileSet |
createFileSet(File baseDirectory,
ArtifactDefinitionContext artifact,
boolean useRelativeLocation,
org.apache.log4j.Logger log)
Creates a FileSet object.
|
static com.google.common.collect.Ordering<ArtifactHandler> |
fastestFirstOrdering(Map<String,String> artifactHandlersConfiguration) |
static ArtifactHandler |
getArtifactHandlerForLink(com.atlassian.plugin.PluginAccessor pluginAccessor,
String linkType) |
static File |
getArtifactLocation(File baseDirectory,
ArtifactDefinitionContext artifact,
boolean useRelativeLocation) |
static String |
getArtifactMatchDescription(ArtifactDefinitionContext artifact,
org.apache.tools.ant.types.FileSet sourceFileSet) |
static String |
getArtifactUrl(ArtifactLinkManager artifactLinkManager,
ArtifactLink artifactLink,
String baseUrl)
Deprecated.
since 5.6 use
getArtifactUrl(ArtifactLinkManager, com.atlassian.bamboo.artifact.Artifact, String) instead |
static String |
getArtifactUrl(ArtifactLinkManager artifactLinkManager,
Artifact artifact,
String baseUrl) |
static String |
getConfigKey(String moduleDescriptorKey,
String settingKey)
Generate settings config key to be accessible at Artifact Handlers' config
|
static boolean |
isCustomArtifactHandlingConfigured(Map<String,String> planCustomConfiguration) |
static boolean |
isDefaultArtifactHandler(String key)
Bamboo has list of 'default' artifact handlers which are enabled by default.
|
static boolean |
isServerLocalArtifactHandler(String linkType) |
static void |
moveFileSet(org.apache.tools.ant.types.FileSet sourceFileSet,
File destinationDirectory) |
static Path |
resolveArtifactLocation(Path basePath,
String location) |
static void |
transferFileSet(org.apache.tools.ant.types.FileSet sourceFileSet,
File destinationDirectory,
boolean deleteSource) |
public static final String SERVER_LOCAL_HANDLER
public static final String SERVER_REMOTE_HANDLER
public static final String S3_HANDLER
@NotNull public static org.apache.tools.ant.types.FileSet createFileSet(File baseDirectory, ArtifactDefinitionContext artifact, boolean useRelativeLocation, @Nullable org.apache.log4j.Logger log) throws FileNotFoundException
baseDirectory
- directory used to resolve the copy patternsartifact
- artifact definitionuseRelativeLocation
- used to determine whether the relative location information from artifact definition should be usedlog
- optional logger to use for logging of fileset processingIllegalArgumentException
- if the artifact source is not a directoryFileNotFoundException
public static void copyFileSet(org.apache.tools.ant.types.FileSet sourceFileSet, File destinationDirectory) throws IOException
IOException
public static void moveFileSet(org.apache.tools.ant.types.FileSet sourceFileSet, File destinationDirectory) throws IOException
IOException
public static void transferFileSet(org.apache.tools.ant.types.FileSet sourceFileSet, File destinationDirectory, boolean deleteSource) throws IOException
IOException
@NotNull public static File getArtifactLocation(@NotNull File baseDirectory, @NotNull ArtifactDefinitionContext artifact, boolean useRelativeLocation)
@NotNull public static Path resolveArtifactLocation(Path basePath, @Nullable String location)
@NotNull public static String getArtifactMatchDescription(@NotNull ArtifactDefinitionContext artifact, @NotNull org.apache.tools.ant.types.FileSet sourceFileSet)
public static com.google.common.collect.Ordering<ArtifactHandler> fastestFirstOrdering(@NotNull Map<String,String> artifactHandlersConfiguration)
@Deprecated @Nullable public static String getArtifactUrl(@NotNull ArtifactLinkManager artifactLinkManager, @NotNull ArtifactLink artifactLink, @NotNull String baseUrl)
getArtifactUrl(ArtifactLinkManager, com.atlassian.bamboo.artifact.Artifact, String)
instead@Nullable public static String getArtifactUrl(@NotNull ArtifactLinkManager artifactLinkManager, @NotNull Artifact artifact, @NotNull String baseUrl)
public static boolean isCustomArtifactHandlingConfigured(Map<String,String> planCustomConfiguration)
public static boolean isServerLocalArtifactHandler(String linkType)
public static ArtifactHandler getArtifactHandlerForLink(com.atlassian.plugin.PluginAccessor pluginAccessor, String linkType)
public static boolean isDefaultArtifactHandler(String key)
key
- complete plugin key@NotNull public static String getConfigKey(@NotNull String moduleDescriptorKey, @NotNull String settingKey)
moduleDescriptorKey
- ArtifactHandler descriptor full keysettingKey
- setting nameCopyright © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.