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 String
UNCLASSIFIED_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 boolean
canStoreArtifactsOfBuildType(SBuildType buildType)
Checks if the build type can store artifacts in this storage (e.g.boolean
canStoreArtifactsOfProject(File artifactsDirectory, SProject project)
boolean
equals(Object o)
String
getDescriptiveName()
Returns a descriptive name of the storage.ArtifactStorageDiskUsageCalculator
getDiskUsageCalcualtor()
String
getId()
String
getName()
Returns a name of the storage.String
getType()
Returns a type of this storage (e.g.int
hashCode()
boolean
isDefaultForBuildType(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:
getId
in interfaceArtifactStorageDiskUsageInfo
- Returns:
- a unique storage id
-
getName
@NotNull public String getName()
Description copied from interface:ArtifactStorageDiskUsageInfo
Returns 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:
getName
in interfaceArtifactStorageDiskUsageInfo
- Returns:
- storage name
-
getDescriptiveName
@NotNull public String getDescriptiveName()
Description copied from interface:ArtifactStorageDiskUsageInfo
Returns 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:
getDescriptiveName
in interfaceArtifactStorageDiskUsageInfo
- Returns:
- descriptive storage name
-
getType
@NotNull public String getType()
Description copied from interface:ArtifactStorageDiskUsageInfo
Returns a type of this storage (e.g. S3, Google, Built-in etc.)- Specified by:
getType
in interfaceArtifactStorageDiskUsageInfo
- Returns:
- storage type
-
getDiskUsageCalcualtor
@NotNull public ArtifactStorageDiskUsageCalculator getDiskUsageCalcualtor()
- Specified by:
getDiskUsageCalcualtor
in 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:
canStoreArtifactsOfProject
in 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:ArtifactStorageDiskUsageInfo
Checks if the build type can store artifacts in this storage (e.g. the storage is accessible by the build type)- Specified by:
canStoreArtifactsOfBuildType
in 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:ArtifactStorageDiskUsageInfo
Checks 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:
isDefaultForBuildType
in interfaceArtifactStorageDiskUsageInfo
- Parameters:
buildType
- target build type
-
-