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_TOKENFields inherited from interface com.atlassian.bamboo.build.artifact.ArtifactManager
LOGS_FOR_BUILD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCleanup temporary artifact storageprotected voidmarkSubscriptionAsConsumed(PlanResultKey planResultKey, ArtifactSubscriptionContext artifactSubscription, String artifactLinkType) voidmoveArtifactToGlobalStorage(@NotNull Artifact artifact) Move artifact to a 'global storage'.voidremoveAllArtifactsOfChain(@NotNull PlanKey planKey, @NotNull Iterable<PlanKey> jobKeys, @NotNull Map<String, String> artifactHandlersConfiguration) Removes artifact files for all results of a single chain.voidremoveArtifactFromStorage(@NotNull Artifact artifact) Removes artifact files for a single artifact.voidremoveArtifactsFromStorage(@NotNull PlanKey planKey) Removes artifact files for all results of a single.voidremoveArtifactsFromStorage(@NotNull PlanKey planKey, @NotNull Map<String, String> artifactHandlersConfiguration) Removes artifact files for all results of a single.voidremoveArtifactsFromStorage(@NotNull Iterable<ArtifactLink> artifactLinks) Removes artifact files for all plan results attached to supplied links.booleanremoveArtifactsIfOrphaned(@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.booleanMethods 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:
markSubscriptionAsConsumedin classAbstractArtifactManager
-
moveArtifactToGlobalStorage
Description copied from interface:ArtifactManagerMove 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:
moveArtifactToGlobalStoragein interfaceArtifactManager- Overrides:
moveArtifactToGlobalStoragein classAbstractArtifactManager- Throws:
IOException
-
removeArtifactFromStorage
Description copied from interface:ArtifactManagerRemoves artifact files for a single artifact.- Specified by:
removeArtifactFromStoragein interfaceArtifactManager- Overrides:
removeArtifactFromStoragein classAbstractArtifactManager
-
removeArtifactsFromStorage
Description copied from interface:ArtifactManagerRemoves artifact files for all results of a single. Called when removingPlanShould not remove artifacts that were moved to global storage.- Specified by:
removeArtifactsFromStoragein interfaceArtifactManager- Overrides:
removeArtifactsFromStoragein classAbstractArtifactManager
-
removeArtifactsFromStorage
public void removeArtifactsFromStorage(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull Map<String, String> artifactHandlersConfiguration) Description copied from interface:ArtifactManagerRemoves artifact files for all results of a single. Called when removingPlanShould not remove artifacts that were moved to global storage.- Specified by:
removeArtifactsFromStoragein interfaceArtifactManager- Overrides:
removeArtifactsFromStoragein classAbstractArtifactManager
-
removeAllArtifactsOfChain
public void removeAllArtifactsOfChain(@NotNull @NotNull PlanKey planKey, @NotNull @NotNull Iterable<PlanKey> jobKeys, @NotNull @NotNull Map<String, String> artifactHandlersConfiguration) Description copied from interface:ArtifactManagerRemoves artifact files for all results of a single chain. Called when removingChainShould not remove artifacts that were moved to global storage.- Specified by:
removeAllArtifactsOfChainin interfaceArtifactManager- Overrides:
removeAllArtifactsOfChainin classAbstractArtifactManager
-
removeArtifactsFromStorage
Description copied from interface:ArtifactManagerRemoves artifact files for all plan results attached to supplied links. Called when removingResultsSummaryShould not remove artifacts that were moved to global storage.- Specified by:
removeArtifactsFromStoragein interfaceArtifactManager- Overrides:
removeArtifactsFromStoragein classAbstractArtifactManager
-
removeOrphanedArtifacts
public boolean removeOrphanedArtifacts()- Returns:
- true if something was removed
-
removeArtifactsIfOrphaned
Description copied from interface:ArtifactManagerRemoves artifacts identified by the ids on the list, but only if they are not referenced by any deployment version or build result.- Returns:
- true if anything was removed
-
cleanupTemporaryArtifactStorage
public void cleanupTemporaryArtifactStorage()Cleanup temporary artifact storage
-