Class ArtifactsCachePublisherImpl
- java.lang.Object
-
- jetbrains.buildServer.agent.impl.BaseArtifactsPublisher
-
- jetbrains.buildServer.agent.publisher.ArtifactsCachePublisherImpl
-
- All Implemented Interfaces:
AgentExtension,ArtifactsPublisher,ArtifactsCachePublisher,TeamCityExtension
public class ArtifactsCachePublisherImpl extends BaseArtifactsPublisher implements ArtifactsCachePublisher
Created by Nikita Skvortsov date: 30.09.13.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDISABLE_FILECACHE_PUBLISHINGstatic StringTYPE_NAME
-
Constructor Summary
Constructors Constructor Description ArtifactsCachePublisherImpl(BuildAgentConfiguration configuration, EventDispatcher<AgentLifeCycleListener> dispatcher, ArtifactCacheProvider provider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetType()Get type string id.booleanisEnabled()Check if this publisher is currently enabled.booleanpublishFile(File file, String path, String digest)intpublishFiles(Map<File,String> filePathMap)Publishes files.intpublishFiles(Map<File,String> filePathMap, Map<File,String> digestMap)
-
-
-
Field Detail
-
DISABLE_FILECACHE_PUBLISHING
public static final String DISABLE_FILECACHE_PUBLISHING
- See Also:
- Constant Field Values
-
TYPE_NAME
public static final String TYPE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ArtifactsCachePublisherImpl
public ArtifactsCachePublisherImpl(@NotNull BuildAgentConfiguration configuration, @NotNull EventDispatcher<AgentLifeCycleListener> dispatcher, @NotNull ArtifactCacheProvider provider)
-
-
Method Detail
-
publishFiles
public int publishFiles(@NotNull Map<File,String> filePathMap) throws ArtifactPublishingFailedExceptionDescription copied from interface:ArtifactsPublisherPublishes files. Note that publishing is performed from the agent messages queue and thus this method can be called when build on the agent is already finished.- Specified by:
publishFilesin interfaceArtifactsPublisher- Parameters:
filePathMap- map of the file to publish to its destination directory- Returns:
- number of successfully published files
- Throws:
ArtifactPublishingFailedException- if publishing failed
-
publishFile
public boolean publishFile(File file, String path, String digest)
- Specified by:
publishFilein interfaceArtifactsCachePublisher
-
publishFiles
public int publishFiles(@NotNull Map<File,String> filePathMap, @NotNull Map<File,String> digestMap)- Specified by:
publishFilesin interfaceArtifactsCachePublisher
-
isEnabled
public boolean isEnabled()
Description copied from interface:ArtifactsPublisherCheck if this publisher is currently enabled. Allows disabling/skipping publishers in runtime.- Specified by:
isEnabledin interfaceArtifactsPublisher- Overrides:
isEnabledin classBaseArtifactsPublisher- Returns:
- see above.
-
getType
@NotNull public String getType()
Description copied from interface:ArtifactsPublisherGet type string id. Should matchjetbrains.buildServer.serverSide.storage.StorageType#getType()- Specified by:
getTypein interfaceArtifactsPublisher- Returns:
- see above
-
-