# Interface IArtifactDescriptor

All Known Implementing Classes:
  `ArtifactDescriptor`

public interface IArtifactDescriptor
An artifact descriptor describes an artifact stored in some artifact repository. The descriptor defines the artifact it contains, as well as any processing steps that must be performed when the artifact is transferred out of the repository (such as decompression, error checking, etc).

Since:
  2.0
Restriction:
  This interface is not intended to be implemented by clients. Instead subclass the `ArtifactDescriptor` class
Restriction:
  This interface is not intended to be extended by clients.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`ARTIFACT_CHECKSUM`
A prefix of an artifact descriptor property storing list of checksums of the artifact bytes in its native format (after processing steps have been applied).
`static final String`
`ARTIFACT_MD5`
Deprecated.
`static final String`
`ARTIFACT_SIZE`
An artifact descriptor property (value "artifact.size") indicating the size in bytes of the artifact in its native format (after processing steps have been applied).
`static final String`
`DOWNLOAD_CHECKSUM`
A prefix of an artifact descriptor properties storing checksum of the artifact bytes that are transferred.
`static final String`
`DOWNLOAD_CONTENTTYPE`
An artifact descriptor property (value "download.contentType") indicating the content type of the artifact bytes that are transferred.
`static final String`
`DOWNLOAD_MD5`
Deprecated.
`static final String`
`DOWNLOAD_SIZE`
An artifact descriptor property (value "download.size") indicating the number of bytes that will be transferred when this artifact is transferred out of the repository.
`static final String`
`FORMAT`
An artifact descriptor property (value "format") indicating the storage format of the artifact in the repository.
`static final String`
`FORMAT_PACKED`
Deprecated, for removal: This API element is subject to removal in a future version.
See bug for details.
`static final String`
`TYPE_ZIP`
An content type (value "application/zip") indicating the content is a zip file.

## Method Summary

Modifier and Type
Method
Description
`IArtifactKey`
`getArtifactKey()`
Return the key for the artifact described by this descriptor.
`IProcessingStepDescriptor[]`
`getProcessingSteps()`
Return the list of processing steps associated with this descriptor.
`Map<String,String>`
`getProperties()`
Returns a read-only collection of the properties of the artifact descriptor.
`String`
`getProperty(String key)`
Return the value of the given property in this descriptor `null` is returned if no such property exists
`IArtifactRepository`
`getRepository()`
Return the artifact repository that holds the artifact described by this descriptor.

## Field Details

### DOWNLOAD_SIZE

static final String DOWNLOAD_SIZE
An artifact descriptor property (value "download.size") indicating the number of bytes that will be transferred when this artifact is transferred out of the repository.

See Also:
  - Constant Field Values

### ARTIFACT_SIZE

static final String ARTIFACT_SIZE
An artifact descriptor property (value "artifact.size") indicating the size in bytes of the artifact in its native format (after processing steps have been applied).

See Also:
  - Constant Field Values

### DOWNLOAD_CHECKSUM

static final String DOWNLOAD_CHECKSUM
A prefix of an artifact descriptor properties storing checksum of the artifact bytes that are transferred.

Since:
  2.4
See Also:
  - Constant Field Values

### DOWNLOAD_MD5

@Deprecated static final String DOWNLOAD_MD5
Deprecated.
An artifact descriptor property (value "download.md5") indicating the MD5 checksum of the artifact bytes that are transferred.

See Also:
  - `DOWNLOAD_CHECKSUM`
  - Constant Field Values

### DOWNLOAD_CONTENTTYPE

static final String DOWNLOAD_CONTENTTYPE
An artifact descriptor property (value "download.contentType") indicating the content type of the artifact bytes that are transferred.

See Also:
  - Constant Field Values

### TYPE_ZIP

static final String TYPE_ZIP
An content type (value "application/zip") indicating the content is a zip file.

See Also:
  - Constant Field Values

### ARTIFACT_CHECKSUM

static final String ARTIFACT_CHECKSUM
A prefix of an artifact descriptor property storing list of checksums of the artifact bytes in its native format (after processing steps have been applied).

Since:
  2.4
See Also:
  - Constant Field Values

### ARTIFACT_MD5

@Deprecated static final String ARTIFACT_MD5
Deprecated.
An artifact descriptor property (value "artifact.md5") indicating the MD5 checksum of the artifact bytes in its native format (after processing steps have been applied).

See Also:
  - `ARTIFACT_CHECKSUM`
  - Constant Field Values

### FORMAT

static final String FORMAT
An artifact descriptor property (value "format") indicating the storage format of the artifact in the repository.

See Also:
  - `FORMAT_PACKED`
  - Constant Field Values

### FORMAT_PACKED

@Deprecated(forRemoval=true, since="2.5.0") static final String FORMAT_PACKED
Deprecated, for removal: This API element is subject to removal in a future version.
See bug for details.
A property value for the `FORMAT` artifact descriptor property (value "packed") indicating the storage format is using pack200 compression.

See Also:
  - `FORMAT`
  - Constant Field Values
Restriction:
  This field is not intended to be referenced by clients.

## Method Details

### getArtifactKey

IArtifactKey getArtifactKey()
Return the key for the artifact described by this descriptor.

Returns:
  the key associated with this descriptor

### getProperty

String getProperty(String key)
Return the value of the given property in this descriptor `null` is returned if no such property exists

Parameters:
  `key` - the property key to look for
Returns:
  the value of the given property or `null`

### getProperties

Map<String,String> getProperties()
Returns a read-only collection of the properties of the artifact descriptor.

Returns:
  the properties of this artifact descriptor.

### getProcessingSteps

IProcessingStepDescriptor[] getProcessingSteps()
Return the list of processing steps associated with this descriptor. An empty set of steps implies that this descriptor describes a complete copy of the artifact in its native form. If one or more steps are present, they may be performed when the artifact is transferred from the repository that contains it.

Returns:
  the list of processing steps for this descriptor

### getRepository

IArtifactRepository getRepository()
Return the artifact repository that holds the artifact described by this descriptor. `null` is returned if this descriptor is not held in a repository.

Returns:
  the repository holding this artifact or `null` if none.