Class ExternalArtifactStorageDiskUsageInfo
- java.lang.Object
-
- jetbrains.buildServer.serverSide.statistics.diskusage.ExternalArtifactStorageDiskUsageInfo
-
- All Implemented Interfaces:
ArtifactStorageDiskUsageInfo
public class ExternalArtifactStorageDiskUsageInfo extends Object implements ArtifactStorageDiskUsageInfo
-
-
Field Summary
Fields Modifier and Type Field Description static StringUNCLASSIFIED_EXTERNAL_STORAGE
-
Constructor Summary
Constructors Constructor Description ExternalArtifactStorageDiskUsageInfo(ServerArtifactHelper artifactHelper, ExternalStorageId storageId, String storageName, String storageType, ExternalStorageIdAccessor storageIdAccessor, SProject project)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanStoreArtifactsOfBuildType(SBuildType buildType)Checks if the build type can store artifacts in this storage (e.g.booleancanStoreArtifactsOfProject(File artifactsDirectory, SProject project)booleanequals(Object o)StringgetDescriptiveName()Returns a descriptive name of the storage.ArtifactStorageDiskUsageCalculatorgetDiskUsageCalcualtor()StringgetId()StringgetName()Returns a name of the storage.StringgetType()Returns a type of this storage (e.g.inthashCode()booleanisDefaultForBuildType(SBuildType buildType)Checks if the storage is default for this build type.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.statistics.diskusage.ArtifactStorageDiskUsageInfo
canStoreArtifactsOfBuild
-
-
-
-
Field Detail
-
UNCLASSIFIED_EXTERNAL_STORAGE
public static final String UNCLASSIFIED_EXTERNAL_STORAGE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ExternalArtifactStorageDiskUsageInfo
public ExternalArtifactStorageDiskUsageInfo(@NotNull ServerArtifactHelper artifactHelper, @NotNull ExternalStorageId storageId, @Nullable String storageName, @Nullable String storageType, @NotNull ExternalStorageIdAccessor storageIdAccessor, @NotNull SProject project)
-
-
Method Detail
-
getId
@NotNull public String getId()
- Specified by:
getIdin interfaceArtifactStorageDiskUsageInfo- Returns:
- a unique storage id
-
getName
@NotNull public String getName()
Description copied from interface:ArtifactStorageDiskUsageInfoReturns a name of the storage. For external storages a name is configured on a project level, while a path is used as a name for built-in storages- Specified by:
getNamein interfaceArtifactStorageDiskUsageInfo- Returns:
- storage name
-
getDescriptiveName
@NotNull public String getDescriptiveName()
Description copied from interface:ArtifactStorageDiskUsageInfoReturns a descriptive name of the storage. In comparison toArtifactStorageDiskUsageInfo.getName()this name should be more verbose to distinguish storages better. For example, it may contain a name of the project, were given external storage was configured- Specified by:
getDescriptiveNamein interfaceArtifactStorageDiskUsageInfo- Returns:
- descriptive storage name
-
getType
@NotNull public String getType()
Description copied from interface:ArtifactStorageDiskUsageInfoReturns a type of this storage (e.g. S3, Google, Built-in etc.)- Specified by:
getTypein interfaceArtifactStorageDiskUsageInfo- Returns:
- storage type
-
getDiskUsageCalcualtor
@NotNull public ArtifactStorageDiskUsageCalculator getDiskUsageCalcualtor()
- Specified by:
getDiskUsageCalcualtorin interfaceArtifactStorageDiskUsageInfo- Returns:
- calculator, which is used for computing sizes, occupied of builds on this storage
-
canStoreArtifactsOfProject
public boolean canStoreArtifactsOfProject(@NotNull File artifactsDirectory, @NotNull SProject project)- Specified by:
canStoreArtifactsOfProjectin interfaceArtifactStorageDiskUsageInfo- Parameters:
artifactsDirectory- build artifacts directoryproject- targe build project- Returns:
- true if artifacts of this build project can be stored in this storage
-
canStoreArtifactsOfBuildType
public boolean canStoreArtifactsOfBuildType(@NotNull SBuildType buildType)Description copied from interface:ArtifactStorageDiskUsageInfoChecks if the build type can store artifacts in this storage (e.g. the storage is accessible by the build type)- Specified by:
canStoreArtifactsOfBuildTypein interfaceArtifactStorageDiskUsageInfo- Parameters:
buildType- target build type- Returns:
- true if artifacts of this build type can be stored in this storage
-
isDefaultForBuildType
public boolean isDefaultForBuildType(@NotNull SBuildType buildType)Description copied from interface:ArtifactStorageDiskUsageInfoChecks if the storage is default for this build type. Default storages are used to store logs and internal artifacts, and for now it could be only built-in storage- Specified by:
isDefaultForBuildTypein interfaceArtifactStorageDiskUsageInfo- Parameters:
buildType- target build type
-
-