Package jetbrains.buildServer.tools.impl
Class CustomArchiveServerToolProvider
- java.lang.Object
-
- jetbrains.buildServer.tools.ServerToolProviderAdapter
-
- jetbrains.buildServer.tools.impl.CustomArchiveServerToolProvider
-
- All Implemented Interfaces:
TeamCityExtension,ServerToolProvider,PositionAware,PositionConstraintAware
public class CustomArchiveServerToolProvider extends ServerToolProviderAdapter implements PositionAware
Created by Evgeniy.Koshkin.
-
-
Constructor Summary
Constructors Constructor Description CustomArchiveServerToolProvider(AgentPluginXmlParser agentPluginXmlParser, ArchiveExtractorManager archiveExtractorManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PositionConstraintgetConstraint()Constraint to be respected during objects sorting.StringgetOrderId()Returns object id that can be referenced by {PositionConstraint}ToolTypegetType()GetPackageVersionResulttryGetPackageVersion(File toolPackage)Retrieve tool version if given package has valid tool package format.voidunpackToolPackage(File toolPackage, File targetDirectory)Unpack valid tool package to the target directory.-
Methods inherited from class jetbrains.buildServer.tools.ServerToolProviderAdapter
fetchToolPackage, getAvailableToolVersions, getBundledToolVersions, getDefaultBundledVersionId, getDownloadableBundledToolVersions, normalizeToolPackageName
-
-
-
-
Constructor Detail
-
CustomArchiveServerToolProvider
public CustomArchiveServerToolProvider(@NotNull AgentPluginXmlParser agentPluginXmlParser, @NotNull ArchiveExtractorManager archiveExtractorManager)
-
-
Method Detail
-
getType
@NotNull public ToolType getType()
- Specified by:
getTypein interfaceServerToolProvider
-
tryGetPackageVersion
@NotNull public GetPackageVersionResult tryGetPackageVersion(@NotNull File toolPackage)
Description copied from interface:ServerToolProviderRetrieve tool version if given package has valid tool package format.- Specified by:
tryGetPackageVersionin interfaceServerToolProvider- Overrides:
tryGetPackageVersionin classServerToolProviderAdapter- Parameters:
toolPackage- Package to inspect.- Returns:
- Version of the tool or
GetPackageVersionResult.error(String)if package format is unknown / invalid.
-
unpackToolPackage
public void unpackToolPackage(@NotNull File toolPackage, @NotNull File targetDirectory) throws ToolExceptionDescription copied from interface:ServerToolProviderUnpack valid tool package to the target directory. Form directory layout to use later on the agent.- Specified by:
unpackToolPackagein interfaceServerToolProvider- Overrides:
unpackToolPackagein classServerToolProviderAdapter- Parameters:
toolPackage- file with the tool packagetargetDirectory- existing empty directory- Throws:
ToolException- if error occurs
-
getOrderId
@NotNull public String getOrderId()
Description copied from interface:PositionAwareReturns object id that can be referenced by {PositionConstraint}- Specified by:
getOrderIdin interfacePositionAware- Returns:
- object id
-
getConstraint
@NotNull public PositionConstraint getConstraint()
Description copied from interface:PositionConstraintAwareConstraint to be respected during objects sorting.- Specified by:
getConstraintin interfacePositionConstraintAware- Returns:
- position constraint
-
-