Class LocalArtifactManager
java.lang.Object
com.atlassian.bamboo.build.artifact.AbstractArtifactManager
com.atlassian.bamboo.build.artifact.LocalArtifactManager
- All Implemented Interfaces:
ArtifactManager
-
Field Summary
Fields inherited from class com.atlassian.bamboo.build.artifact.AbstractArtifactManager
ARTIFACT_SECURITY_TOKEN
Fields inherited from interface com.atlassian.bamboo.build.artifact.ArtifactManager
LOGS_FOR_BUILD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Cleanup temporary artifact storageprotected void
markSubscriptionAsConsumed
(PlanResultKey planResultKey, ArtifactSubscriptionContext artifactSubscription, String artifactLinkType) void
moveArtifactToGlobalStorage
(@NotNull Artifact artifact) Move artifact to a 'global storage'.void
removeAllArtifactsOfChain
(@NotNull PlanKey planKey, @NotNull Iterable<PlanKey> jobKeys, @NotNull Map<String, String> artifactHandlersConfiguration) Removes artifact files for all results of a single chain.void
removeArtifactFromStorage
(@NotNull Artifact artifact) Removes artifact files for a single artifact.void
removeArtifactsFromStorage
(@NotNull PlanKey planKey) Removes artifact files for all results of a single.void
removeArtifactsFromStorage
(@NotNull PlanKey planKey, @NotNull Map<String, String> artifactHandlersConfiguration) Removes artifact files for all results of a single.void
removeArtifactsFromStorage
(@NotNull Iterable<ArtifactLink> artifactLinks) Removes artifact files for all plan results attached to supplied links.boolean
removeArtifactsIfOrphaned
(@NotNull List<Long> artifactIds) Removes artifacts identified by the ids on the list, but only if they are not referenced by any deployment version or build result.boolean
Methods inherited from class com.atlassian.bamboo.build.artifact.AbstractArtifactManager
findMatchingArtifact, getArtifactHandlers, getArtifactHandlersForAgent, publish, publish, republish, retrieve, retrieve, validateArtifactsSize
-
Constructor Details
-
LocalArtifactManager
public LocalArtifactManager()
-
-
Method Details
-
markSubscriptionAsConsumed
protected void markSubscriptionAsConsumed(PlanResultKey planResultKey, ArtifactSubscriptionContext artifactSubscription, String artifactLinkType) - Specified by:
markSubscriptionAsConsumed
in classAbstractArtifactManager
-
moveArtifactToGlobalStorage
Description copied from interface:ArtifactManager
Move artifact to a 'global storage'. Artifacts in 'global storage' should only be removed whenArtifactManager.removeArtifactFromStorage(Artifact)
is called. It is not a requirement to physically move the files as long as the above contract is fulfilled.- Specified by:
moveArtifactToGlobalStorage
in interfaceArtifactManager
- Overrides:
moveArtifactToGlobalStorage
in classAbstractArtifactManager
- Throws:
IOException
-
removeArtifactFromStorage
Description copied from interface:ArtifactManager
Removes artifact files for a single artifact.- Specified by:
removeArtifactFromStorage
in interfaceArtifactManager
- Overrides:
removeArtifactFromStorage
in classAbstractArtifactManager
-
removeArtifactsFromStorage
Description copied from interface:ArtifactManager
Removes artifact files for all results of a single. Called when removingPlan
Should not remove artifacts that were moved to global storage.- Specified by:
removeArtifactsFromStorage
in interfaceArtifactManager
- Overrides:
removeArtifactsFromStorage
in classAbstractArtifactManager
-
removeArtifactsFromStorage
public void removeArtifactsFromStorage(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull Map<String, String> artifactHandlersConfiguration) Description copied from interface:ArtifactManager
Removes artifact files for all results of a single. Called when removingPlan
Should not remove artifacts that were moved to global storage.- Specified by:
removeArtifactsFromStorage
in interfaceArtifactManager
- Overrides:
removeArtifactsFromStorage
in classAbstractArtifactManager
-
removeAllArtifactsOfChain
public void removeAllArtifactsOfChain(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull Iterable<PlanKey> jobKeys, @NotNull @NotNull Map<String, String> artifactHandlersConfiguration) Description copied from interface:ArtifactManager
Removes artifact files for all results of a single chain. Called when removingChain
Should not remove artifacts that were moved to global storage.- Specified by:
removeAllArtifactsOfChain
in interfaceArtifactManager
- Overrides:
removeAllArtifactsOfChain
in classAbstractArtifactManager
-
removeArtifactsFromStorage
Description copied from interface:ArtifactManager
Removes artifact files for all plan results attached to supplied links. Called when removingResultsSummary
Should not remove artifacts that were moved to global storage.- Specified by:
removeArtifactsFromStorage
in interfaceArtifactManager
- Overrides:
removeArtifactsFromStorage
in classAbstractArtifactManager
-
removeOrphanedArtifacts
public boolean removeOrphanedArtifacts()- Specified by:
removeOrphanedArtifacts
in interfaceArtifactManager
- Overrides:
removeOrphanedArtifacts
in classAbstractArtifactManager
- Returns:
- true if something was removed
-
removeArtifactsIfOrphaned
Description copied from interface:ArtifactManager
Removes artifacts identified by the ids on the list, but only if they are not referenced by any deployment version or build result.- Specified by:
removeArtifactsIfOrphaned
in interfaceArtifactManager
- Overrides:
removeArtifactsIfOrphaned
in classAbstractArtifactManager
- Returns:
- true if anything was removed
-
cleanupTemporaryArtifactStorage
public void cleanupTemporaryArtifactStorage()Cleanup temporary artifact storage
-